contract: manuscript is upstream of the contract; lock contract ownership - #46
Merged
Conversation
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
…rship Rebuilt on current main -- the previous attempt was branched from a stale base and would have clobbered #44's literal eq 2-6 transcriptions and its marginal-weighting guard. Those are kept untouched; this adds only what is new. - Precedence: the manuscript is upstream, the contract downstream, and an ambiguity is a question for the authors rather than something to infer from what makes a benchmark come out right. - SOURCES: both documents archived under docs/contract/source/ with sha256 prefixes, checked by a test, so a revision fails the build instead of going unnoticed. - Equation numbers COLLIDE between the two documents (eq 3 is the clonotypic entropy in one, the VampPrior in the other). Every note_eq now names its document, a test rejects a bare reference, and citing Note 1 for a metric is a failure -- it has no entropy or MI definitions at all. - phenotypic_flux added to METRIC_SPECS: implemented and previously unspecified. - UNIMPLEMENTED records joint entropy (eq 2) as defined-but-not-exposed. - OPEN_QUESTIONS for live disagreements, with a test asserting no key is also filed under SANCTIONED_EXTENSIONS: the flux distance default (eq 7 says D_KL, code says l1) and E[NMI(J)] vs NMI(E[J]) for a nonlinear metric. - CODEOWNERS restricts contracts, conformance tests, prose twins and source documents to @nceglia and @salehis. Advisory until branch protection requires Code Owner review. - Note references repointed to the archived Aug-3 PDF; deviation [I] recorded (guide concentration pinned to a scalar where eq 6 specifies a free vector), settled against the April note as a clear divergence rather than an ambiguity. - CLAUDE.md gains branching rules; a stale base is what produced three separate PRs for the same erratum. 174 passed, 3 skipped. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
nceglia
force-pushed
the
contract/source-of-truth
branch
from
August 5, 2026 19:08
cbcf9be to
8741f28
Compare
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.
Reorders the authority: the manuscript is ground truth, the contract is downstream.
Where they disagree the contract is wrong, and an ambiguity is a question for the
authors — not something to infer from what makes the code or a benchmark look right.
Source documents are now in the repo
Both live in
docs/contract/source/, with their SHA-256 prefixes recorded in themetrics manifest and checked by a test. A silent revision becomes a failing build rather
than something a human has to spot.
They are separate documents with colliding equation numbers:
metrics_2026-08-05.docxsupplementary_note_1_SS_2026-08-03.pdf"eq 3" is the clonotypic entropy in one and the VampPrior in the other. Every
note_eqnow names its document, and a test refuses a bare reference. Note 1 carries no entropy
or MI definitions at all — its only mention of the metric is the benchmark estimand
MI(C,φ) = I(C;φ)— so a metric citing it fails the suite.The eq 3–4 erratum is closed
The 2026-08-05 document corrects both: eq 3 weights by the conditional, eq 4's left side
reads
H(p(φ|c)). They now agree with the code, which was never changed.SOURCE_ERRATAis retired and replaced by
RESOLVED_ERRATA, kept because it records how thedisagreement was settled — by the MI decomposition identity producing a negative mutual
information under the literal equations, not by authority. That is the precedent for the
next one.
Manifest gaps closed
phenotypic_fluxwas implemented but entirely unspecified. Now inMETRIC_SPECS.UNIMPLEMENTEDrather than left silently absent.New:
OPEN_QUESTIONSLive disagreements with the document, deliberately kept separate from
SANCTIONED_EXTENSIONSso a pending decision cannot be quietly filed as a feature. Atest asserts no key appears in both.
normalize_modedefault — eq 6 specifies the mean denominator; the packagedefaults to
min. Every number produced with the default therefore does not follow eq 6.phenotypic_fluxdefault — eq 7 defines flux asD_KL; the code defaults tol1.The kernels already exist (
kl/dkl,l1,js/jsd); only the default differs.E[NMI(J)]vsNMI(E[J]). These differmaterially (0.267 vs 0.128 on a benchmark cell). Note 1's benchmark prose reads as the
current behaviour but is ambiguous; needs an author's answer rather than a guess.
Ownership
.github/CODEOWNERSrestricts contracts, conformance tests, prose twins and sourcedocuments to @nceglia and @salehis.
mainbranchprotection rule — that is a repository setting I can't change. Without it, CODEOWNERS
only auto-requests reviewers and blocks nothing.
Tests
169 passed, 3 skipped(up from 166 — four new guards, one replaced).🤖 Generated with Claude Code