Skip to content

fix: batch agent recorder import integrity state#32

Merged
thiennamdinh merged 1 commit into
mainfrom
agent-recorder-bulk-integrity
Jul 2, 2026
Merged

fix: batch agent recorder import integrity state#32
thiennamdinh merged 1 commit into
mainfrom
agent-recorder-bulk-integrity

Conversation

@thiennamdinh

Copy link
Copy Markdown
Collaborator

Summary

  • Add a flush hook to record adapters so buffered record/integrity state can be finalized after batch writes.
  • Keep run integrity persistence immediate for live crash tolerance, while making import persist integrity state once after the replayable batch completes.
  • Bump agent-recorder to 0.1.1 for this patch-level performance/durability improvement.
  • Document the import/run durability distinction and add a test for on-flush integrity state persistence.

Testing

  • node scripts/sync-platform-package-versions.js
  • cd tools/agent-recorder && cargo fmt --check
  • cd tools/agent-recorder && cargo test --quiet
  • cd tools/agent-recorder && cargo test --examples --quiet
  • cd tools/agent-recorder && target/debug/agent-recorder --version

Notes/Risks

  • Interrupted integrity-backed imports may leave partial output/state alignment; docs instruct users to discard partial output or rerun from a clean/aligned backend and state file.
  • Live run behavior remains conservative and persists integrity state after each new record.

Summary
- Add a flush hook to record adapters and let integrity wrapping choose immediate or on-flush state persistence.
- Keep live run integrity state crash-durable after each record, but persist import integrity state once after the replayable batch completes.
- Document the import/run durability distinction and add coverage for on-flush state persistence.

Testing
- node scripts/sync-platform-package-versions.js
- cd tools/agent-recorder && cargo fmt --check
- cd tools/agent-recorder && cargo test --quiet
- cd tools/agent-recorder && cargo test --examples --quiet

Notes/Risks
- Interrupted integrity-backed imports may leave partial output/state alignment that should be discarded or rerun from a clean/aligned backend and state file.
- This preserves per-record durability for run.
@thiennamdinh
thiennamdinh merged commit 4809505 into main Jul 2, 2026
19 of 28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant