This repository was archived by the owner on Aug 16, 2026. It is now read-only.
Post-merge audit fixes: close six defects phases A-C shipped green - #73
Merged
Merged
Conversation
An audit of PR #72 found six defects, none of which failed a test — and in two cases a test existed that passed whether the feature worked or not. - An identity could survive erasure. A sampled ASSEMBLE stored the whole statement, so `WHERE subject = "john"` wrote that identity verbatim into an immutable, replicating Observation in `agent:harness` — a namespace the subject selector does not reach, so it never appeared in REPORT SUBJECT and survived FORGET SUBJECT. Now `query_sha256`, the same rule and the same reason as the corpus manifest's `selector_sha256` three thousand lines away. - Applying an advisory recommendation could strand it. Every Data proposal but outcome_review's revert is advisory, and the bindings' fused approve-and-apply approved first and refused second, leaving the finding in `approved` — whose only exits are `applied` and `expired`. One shared `ensure_executable` now answers for both preflight and apply, so the refusal lands while the finding is still dismissible. Approving an advisory finding stays legal: a Flag is acknowledged, not executed. - A second writer in a session made capture-stop skip real turns. The hook counted grains in the thread as a watermark, so anything else writing there consumed the count. A turn is now identified by its content address, with created_at pinned from the transcript — idempotent by construction rather than by arithmetic. - The corpus did not mask the step it exists to mask. A tool call whose result errored kept full loss weight; only the environment's reply was zeroed, which it is regardless. Call and result arrive in different events, so the correlation runs once the session is whole. - Two corpus fields were emitted and always empty: the elisions reader looked under `context` while the writer wrote top-level, and no code anywhere produced a policy version. `capture-stop --policy-version` is that producer. Each fix is pinned by a test that fails without it — verified, not assumed. Also records phases A-C in the changelog, which described only its own review round, and folds AGENTS.md/.agents into symlinks onto CLAUDE.md/.claude so the two stop drifting apart. The strategy and design documents this work was built from are not in this tree — they live at ~/Documents/dejadb/ instead of repo history.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Summary
A post-merge audit of PR #72 (phases A-C: trajectory capture, replay, governed
corpus export) found six defects. None failed a test, and in two cases a test
existed that passed whether the feature worked or not.
statement text, so
WHERE subject = "john"wrote that identity into animmutable, replicating Observation outside the erasure selector's reach. Now
stores
query_sha256— same rule as the corpus manifest'sselector_sha256.approved(whoseonly exits are
applied/expired) via the bindings' fused approve-and-applypath. One shared
ensure_executablecheck now refuses at preflight, beforethe approval is recorded.
capture-stopskip real turns —the watermark counted thread grains rather than identifying turns by content
address.
kept full loss weight; only the (always-zero) result step was masked.
elisions, and no producer anywhere for
policy_versions.Each fix is pinned by a test verified to fail without it.
Also: records phases A-C in the CHANGELOG (previously only the review round was
recorded), and folds
AGENTS.md/.agentsinto symlinks ontoCLAUDE.md/.claude.Test plan
cargo test --workspace— 1677 passed, 0 failedcargo clippy --workspace --all-targets -- -D warnings— clean