Govreview 2b — contracts stop describing behaviour that changed under them - #282
Open
Polichinel wants to merge 1 commit into
Open
Govreview 2b — contracts stop describing behaviour that changed under them#282Polichinel wants to merge 1 commit into
Polichinel wants to merge 1 commit into
Conversation
Phase 2b of the governance consistency review — the class where a change landed, sibling documents were updated, and the document describing the behaviour was not. 5 findings, 3 of the review's 9 contradictions. **docs/CICs/FrameMetadata.md was wrong about the code it cites.** Its §6 table said a non-JSON metadata field is "**Silently stringified** — `io/npz.py` uses `json.dumps(..., default=str)`" while arrow raises. Commit 5423431 deleted that `default=str` on 2026-08-18 to close register C-90, three hours after this CIC was written. A consumer reading §6 today would build a workaround for a bug that has not existed since August, guided by a quotation of a line that no longer exists. **Its §10 said three guarantees are "not pinned by anything".** The same commit added all three tests. The commit stat shows why it was missed: 5423431 updated PredictionFrame.md, Summarize.md and TargetFrame.md — and not FrameMetadata.md. The CIC that described the gaps was the one document not updated when they closed. Both are mine, from the same day, and together they are the fifth recorded instance of the pattern C-96 names: a fix that reaches the instance and not the class. The §10 items are rewritten to name their closing tests rather than deleted. A CIC states its guarantees whether or not a test exists (ADR-006), and this document is the reason the gaps were found at all — written, gaps noticed while writing, gaps closed the same day. `docs/validate_docs.sh` check 12 now verifies 21 test references instead of 19, so the three newly-named tests are themselves guarded against renaming. **docs/CICs/Reconcile.md** told the reader that writing to `.values` "may corrupt shares". Since 2.0.0 it raises `ValueError` (ADR-028 / C-66) — the corruption it warns about is no longer reachable. **README.md** said `scripts/` holds "standalone dev tools, none wired into CI". Two of six run in the `docs` job. I made that false on 2026-08-18 by wiring in `check_arch_tree.py` and more false this afternoon by adding `check_doc_refs.py`. The line sits inside README's directory tree, which `check_arch_tree.py` validates — but that check reads module paths and ignores the prose beside them. **research/coherent_posterior_summary_note.md** asserted `tip_mass` default `0.5`. It has been `0.25` since ADR-019 Amendment 3 (2026-07-24). The note carries a v1.3.0 stamp, so the value was right when written; it now says both. Also corrected: a `tests/test_select.py:88` citation, which the register's own convention forbids — "name things, never line numbers", because line numbers drift silently. It now names `test_select_preserves_metadata`. **One finding did not survive verification and is not fixed.** F-B8-03 claimed `research/figures/NOTE.md` predates Amendment 4's correction to the MAP-containment law. It does not: the note says "every floor holding more than half the tip floor's **draws**", which is the corrected formulation and matches the shipped `2 * n_floor > n_tip`. The pre-correction version counted index spans. The note was already right. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Phase 2b. The class where a change landed, sibling documents were updated, and the document describing the behaviour was not. 5 findings, 3 of the review's 9 contradictions.
The one a consumer could act on
docs/CICs/FrameMetadata.md§6:That
default=strwas deleted on 2026-08-18 to close register C-90 — three hours after the CIC was written. A consumer reading §6 today builds a workaround for a bug that has not existed since August, guided by a quotation of a line that no longer exists.Its §10 said three guarantees are "not pinned by anything". The same commit added all three tests.
The commit stat shows why it was missed:
The CIC that described the gaps was the one document not updated when they closed. Fifth recorded instance of the pattern C-96 names.
The rest
Reconcile.md.values"may corrupt shares"ValueErrorsince 2.0.0README.mdscripts/— "none wired into CI"docsjobtip_massdefault0.50.25since Amendment 3The README line is mine twice over — false since 18 Aug when I wired in
check_arch_tree.py, more false this afternoon when I addedcheck_doc_refs.py. It sits inside the treecheck_arch_tree.pyvalidates, but that check reads module paths and ignores the prose beside them.§10 rewritten, not deleted
The gap items now name their closing tests. A CIC states its guarantees whether or not a test exists (ADR-006), and this document is why the gaps were found — written, noticed, closed the same day. Check 12 now verifies 21 test references instead of 19, so the newly-named tests are guarded against renaming.
Also fixed: a
tests/test_select.py:88citation, which the register's own convention forbids — "name things, never line numbers".One finding did not survive verification
F-B8-03 is withdrawn. It claimed
research/figures/NOTE.mdpredates Amendment 4's correction to the MAP-containment law. It does not — the note says "more than half the tip floor's draws", the corrected formulation, matching the shipped2 * n_floor > n_tip. The pre-correction version counted index spans. Already right; not touched.🤖 Generated with Claude Code