Repository navigation
Replay: ask the config parser before re-deriving an agent exec entry (#453, #521) - #66
Merged
opencdlee-dotcom merged 1 commit intoSep 24, 2026
Conversation
…never saw the parser that stopped registering them _reobserve_agent_surface_answer rebuilt a `target` / `materialized` exec entry straight from the recorded fingerprint and the recorded program, and fed it to diff_agent_surface. The config parser was never asked, and P2d's fixes live there: Codex's runtime process table no longer registers an exec (#521), and a guarded hook line resolves to its script instead of the glue command in front of it (#453: /bin/mkdir -> aikit's hook_postwrite.py). The replay still listed both as re-derived and re-opening. For those two shapes the config at `path` is now read first by snapshot_agent_surface over that one file (`_agent_config_files` overridden, memoized per path), so the parse, the process-table refusal and the resolver are the ones a scan runs: - the entry is no longer registered -> dropped, "the current parser registers no such entry"; - it resolves to another file today -> re-derived against THAT file's bytes and custody, and matched on the fingerprint the sensor mints for them; resolved to nothing with content -> dropped; - entry and target unchanged -> exactly as before (held to the recorded bytes, moved-on when they changed); - config gone -> gone; unreadable -> not re-derivable; a pre-identity positional exec key -> not re-derivable, never read as a missing entry. A dropped answer may now carry the sensor's reason: _reobserve_apply counts it in stats["dropped_why"] (still reobserved + no_longer_emitted, so the accounting and the split are unchanged), and the report prints it under the not-re-derivable line. Live store: noise re-opened 59 of 214 (re-derived 9) -> 57 of 214, re-derived 7 (the target), as recorded 50; #453's 424 findings re-derive HIGH/- -> MEDIUM/local-commit on hook_postwrite.py and #521 is dropped. tests/test_backtest_replay_persistence.py: the agent exec-target class now writes a real config the parser reads, and adds the dropped, re-resolved, unchanged-but-moved-on, gone and positional-key cases. Its existing committed-target test failed on this base before this change: P2d asks custody at the target's realpath and the stub compared the temp path as written; it now compares real paths. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
opencdlee-dotcom
merged commit Sep 24, 2026
3be3e27
into
agent/fable-precision/assembly
7 of 9 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Precision plan, pass 2, step P2a-2: the replay harness now uses the config parser for agent exec entries. Base:
agent/fable-precision/assembly.The defect
_reobserve_agent_surface_answerrebuilt atargetormaterializedexec entry directly from the recorded fingerprint and the recorded program, then passed it todiff_agent_surface. The config parser never ran, and P2d's fixes live in that parser:/bin/mkdirbecame aikit'shook_postwrite.py).The replay still counted both incidents as re-derived and re-opening.
The fix (harness only)
For
targetandmaterializedrecords, the harness now reads the config atpaththroughsnapshot_agent_surface, limited to that one file (_agent_config_filesoverridden, memoized per path). The parse, the process-table refusal and the resolver are therefore the ones a scan runs.A dropped answer can now carry the sensor's reason, counted in
stats["dropped_why"]and printed under the not-re-derivable line. Dropped findings still count as re-observed and no longer emitted, so the accounting, the split and the self-check are unchanged.Live replay (
backtest replay --days 30 --reobserve)noise re-opened: 59 of 214 — re-derived 9 (the target), as recorded 50. Re-derived: #352 #382 #406 #413 #414 #432 #452 #453 #521.noise re-opened: 57 of 214 — re-derived 7 (the target), as recorded 50. Re-derived: #352 #382 #406 #413 #414 #432 #452.hook_postwrite.py, going from HIGH/- to MEDIUM/local-commit. #521: dropped by the current parser.Tests
tests/test_backtest_replay_persistence.py: the agent exec-target class now writes a real config that the parser reads, under the sandbox. It adds five cases: dropped (process table), re-resolved, unchanged-but-moved-on, config gone, and positional key.Pre-existing red on this base, fixed here:
test_a_target_now_proven_committed_is_demotedfails onagent/fable-precision/assemblyas it stands (1 != 0oncustody_changed). P2d asks custody at the target's realpath, and the stub compared the temp path as written. On macOS those differ, because the temp dir sits under/var -> /private/var. The stub now compares real paths.Full suite at 0594c36,
python3 -m pytest tests/ -q -p no:cacheprovider: 2417 passed, 7 skipped, 30 xfailed, 41 subtests passed in 1160.08s. The tree sha was 2e56a655 both before and after the run,~/.aegis/custody.jsonlwas byte-identical before and after, and S7's conftest guard is in the tree.🤖 Generated with Claude Code