Skip to content

fix: preserve events appended during drain#52

Open
antfleet-ops wants to merge 1 commit into
Virtual-Protocol:mainfrom
antfleet-ops:fix/acp-cli-preserve-drain-appends
Open

fix: preserve events appended during drain#52
antfleet-ops wants to merge 1 commit into
Virtual-Protocol:mainfrom
antfleet-ops:fix/acp-cli-preserve-drain-appends

Conversation

@antfleet-ops

Copy link
Copy Markdown

Summary

  • reuse one event-line reader for the locked drain file and the original output path
  • merge events appended to the original path while drain owns the .lock file
  • report the merged remaining count after writeback

Fixes #38.

Verification

  • npm run typecheck
  • npm run build

AntFleet audit provenance

Filed from antfleet-ops after AntFleet's two-model Virtuals repo scan found that events drain could rename the output file, then later overwrite events appended by a concurrent events listen --output process.

Constraint: keep the file-based listen/drain protocol and output shape.\nRejected: truncating the recreated output file | loses events appended after rename.\nConfidence: medium\nScope-risk: narrow\nDirective: future drain changes must treat the original path as producer-owned after rename.\nTested: npm run typecheck; npm run build\nNot-tested: concurrent filesystem integration test.
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.

Prevent events drain from overwriting concurrently appended events

1 participant