IPX replay: byte-offset checkpoint does not fingerprint the spool file (silent evidence corruption) #182
Labels
No labels
bug
documentation
duplicate
enhancement
feature
good first issue
help wanted
invalid
question
refactor
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
nsaspy/hackmode#182
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Reviewed at commit
3b4e2da(filed against the IPX replay introduced in6f40a44, which advances #26).Problem
replay-ipx-http-spool(source/hackmode-core/capture-replay.lisp, lines ~157-227) resumes strictly from the stored byte offset offetch-latest-capture-checkpoint(op, capture-session, source-id triple). The checkpoint payload stores only:offset,:last-record-id,:framing-version(execution-graph.lisp~line 208). Nothing ties the offset to the actual spool file content.Repro
source-id(e.g. restored-from-backup or re-exported spool).No error is raised; evidence integrity is silently broken.
Suggested fix
Persist a fingerprint in the checkpoint payload (spool path plus file size, or a rolling content hash of the consumed prefix). On replay, refuse (or require an explicit re-baseline override) when the current file's size is smaller than the recorded offset or the fingerprint mismatches. Mirror the fingerprint in
ipx-frame-provenanceso exchanges remain attributable to a specific spool generation.Fixed by PR #199, merged as commit
420b788on master. Checkpoints now persist a SHA-256 fingerprint and size of the consumed spool prefix [0,offset); replay-ipx-http-spool verifies both before resuming and raises the new exported ipx-spool-fingerprint-mismatch condition on a replaced or shortened spool instead of silently decoding unrelated bytes into canonical evidence. RED-first regression tests cover both rejection paths; exact-head CI green (core/hygiene/boundary) atbf37e91.