Skip to content

Fully autonomous AI Agents system capable of performing complex penetration testing tasks

fix(evidence-receipts): fsync each receipt append for durability

Sergey Kozyrenko4b9e4b4972ba
diff --git a/backend/pkg/tools/evidence_receipts.go b/backend/pkg/tools/evidence_receipts.go
index 50c26bb9..cca340e8 100644
--- a/backend/pkg/tools/evidence_receipts.go
+++ b/backend/pkg/tools/evidence_receipts.go
@@ -194,6 +194,10 @@ func (r *fileEvidenceReceiptRecorder) record(ctx context.Context, event evidence
return fmt.Errorf("failed to write evidence receipt: %w", err)
}
+ if err := file.Sync(); err != nil {
+ return fmt.Errorf("failed to flush evidence receipt: %w", err)
+ }
+
return nil
}