Repository navigation
fix(drift): digest mismatch with no per-item diff is drift, never clean (DSE-2125) - #126
Merged
Merged
Conversation
…lean (DSE-2125) compute_drift short-circuited only on a digest match. When overall_digest differed but name-keyed indexing collapsed duplicate entries (or a digest- covered field had no item-level check) on an unapproved baseline, it returned [] and check exited 0. After all item diffs, if nothing fired and the digests differ, emit digest-mismatch-unexplained (high). Tests: duplicate-name baseline and a forced digest both yield non-empty drift (both fail without the fix); the finding is not added when items already explain the mismatch. SPEC 6.2 and CHANGELOG updated. Claude-Session: https://claude.ai/code/session_01AsS8oRVvT4oiSCHmk4fkEm
CSO review: the TypeScript verifier shared the fail-open. Add the same digest-mismatch-unexplained backstop to packages/lock-ts, a drift conformance vector (duplicate-name baseline) generated from the Python reference, and the SPEC section 8 / CHECKS 2.1 entries. The schema-version-migrated advisory still counts as explaining the mismatch: a legacy unapproved lock differs by format alone and already exits non-zero. Claude-Session: https://claude.ai/code/session_01AsS8oRVvT4oiSCHmk4fkEm
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.
What
compute_driftreturned[](check exit 0) whenoverall_digestdiffered but no per-item diff fired, e.g. a baseline with duplicate tool/resource/prompt keys collapsed by_index_by. Now emitsdigest-mismatch-unexplained(high) so a changed surface can never be clean.Evidence (builder)
Security-specific (gate verdict path). Owner receipt: Ernest, chat, 2026-10-24.
https://claude.ai/code/session_01AsS8oRVvT4oiSCHmk4fkEm