Audit: research/qc/questions.js — the displayed verdict now comes from the NEWEST note, and a shared id reads MIXED when its records disagree on the verdict
Caveat first. No mathematics and no question status changes. This is the registry
generator: one display rule and one conflict rule, both inside summarise(). It changes
which record's text an index row prints, and when a row is marked MIXED; it does not
adjudicate any disagreement, and it never invents a verdict.
Builds on audit #238 (pending, research/qc/questions.js, revision c357a9fb…), which
fixed the generator's Windows path filters and added the registry-drift check. The served
file is e5890d25…; the base of this patch is served + #238 = c357a9fb…; this revision is
1d2d785e…. Both patches are supplied so the integrator can apply in either order.
1. The defect
research/qc/questions.js renders research/QUESTIONS.md from the notes' ``
blocks. Several notes may share one id, and the generator resolved that by taking the last
note in path order:
const last = g[g.length - 1].block; // path order, not chronology, not authority
That is not a ranking, and it is not claimed to be — but it silently decides which record's
text the index prints, and it can print the older one. Job #609 found the served case:
Q-rho-maximal-law has two notes, both PARTIAL, whose verdicts disagree.
rho-maximal-law.md (2026-08-18/19/20) says the weakest sufficient form is
"model-dependent and undecided"; rho-exact-z31-01.md (2026-08-28) says it is
"now measured against rather than undecided". Path order puts rho-maximal-law.md last
(rho-exact- < rho-max-), so the index printed the older text and listed the newer note
only as a link. Same defect class as the row-26 finding in job #587; #149 proposed the rule
change and no one implemented it.
The status cell had the same narrowness from the other side: it read MIXED only when the
notes disagreed on the status. Two notes agreeing on PARTIAL and disagreeing on the
verdict — the row-40 case — printed a single status and one arbitrary verdict.
2. The change
Two rules in summarise(), plus the export of the choice and the generated preamble.
(a) The displayed verdict comes from the newest note. fileLastDates() reads the
last-commit date of every file under research/ in one cached git log call — the same
log the parity gate in the same file already reads for first-commit dates — and
pickNewest(group, dates, rel) chooses. Three properties are deliberate:
- A file git does not know counts as new, which is the parity gate's own convention two functions above ("an untracked note is new").
- The last-in-path-order rule survives as the tiebreak inside the newest-dated set, so the choice stays deterministic and nothing changes for equal dates.
- With no dates at all the result is byte-for-byte the old rule, which is what keeps the selftest fixture (no git) and any exported corpus on the old behaviour.
pickNewest is a pure function and is exported: the date map is an argument, so the rule
can be checked without git.
(b) A shared id reads MIXED when its records disagree on the status OR on the verdict.
- statuses differ →
MIXED (statuses differ: a.md: PARTIAL; b.md: ANSWERED)(the old cell, now naming the axis); - statuses agree, verdicts differ →
MIXED (verdicts differ across N records).
The second form keeps the cell short: the records column already carries every note as a
link, and for the largest group (Q-varE-limit, 8 notes) listing eight identical statuses
would have been noise.
The generated preamble and the file's header comment are updated to say both. The rule is still not authority: an accepted review of an older note outranks a newer one, and the preamble says so.
3. What it does, measured
Run against the served corpus as mirrored in the 2026-09-10 checkout (554 ids, 581 notes — both unchanged):
- 17 of the 18 shared ids change. 11 rows newly read
MIXED (verdicts differ across N records); 6 already readMIXEDand now name the axis. The regenerated index differs by 34 added / 30 removed lines in 20 hunks (index-change.diff); the rest is the 4-line preamble. Q-rho-maximal-lawbecomesMIXED (verdicts differ across 2 records)— the reader is now sent to both notes instead of being shown one arbitrarily (index-change.diff, andindex-revised-mirror.mdlines 196 and 723 for the before/after).registry-driftgoes from 0 to 17 findings — exactly the changed rows. That is the check working: the regenerated index is what the new rule produces, soresearch/QUESTIONS.mdmust be regenerated and committed with this revision, or the gate stays red. The fast gate exits 0 either way.- The selftest is byte-identical before and after (
diff selftest-base.out selftest-revised.outis empty; both exit 1 on the mirror with "30 case(s) wrong", which is pre-existing in the 2026-09-10 checkout and not caused by this change — said plainly because a green gate is not claimed here).
4. The check that verifies the rule without git
The mirror has one commit, so every file's last-commit date is the same 2026-09-10 and the
newest-note half cannot be exercised through fileLastDates() there. That is why the choice is
pure. pick-newest-check.js drives pickNewest on real groups from the corpus with an
injected date map, 9 assertions, instant, no compute:
node pick-newest-check.js # from the repository root
- the real
Q-rho-maximal-lawgroup: with 2026-08-28 > 2026-08-19 it picksrho-exact-z31-01.md(the newest), notrho-maximal-law.md(the path-order last); - and flipping the dates flips the choice — the check is not one-way;
- equal dates keep the old last-in-path-order pick, deterministically;
- an empty date map reproduces the old rule exactly;
- a single undated note is treated as newest (the parity gate's convention);
- a real 3-note group (
Q-quadpoint-transplant): the newest date wins wherever it sits in path order.
Captured output: pick-newest-check.out.
5. What else this revision requires
- Regenerate and commit
research/QUESTIONS.mdin the same change:node research/qc.js --index. Until thenregistry-driftnames all 17 rows. A mirror- generated index is not in this return: the 2026-09-10 checkout is behind the served state, so shipping its output would overwrite current rows.index-revised-mirror.mdis an illustration of the rule's effect, not a document to commit. registry-check.py(job #587, return #230) compares the served row's status cell against the notes' own statuses, so it must take the same concession: a shared row readingMIXEDis agreement on status plus disagreement on the verdict, not a status conflict. One condition. Not shipped here; named so the tool is not left silently wrong.- A first-commit-to-last-commit subtlety:
fileAddDates()(the parity gate) andfileLastDates()(this rule) are separate calls over the same log. Merging them into one read is possible and not done here — two cached calls of ~1 s each at gate time is cheaper than a shared helper that both call sites must thread through.
6. Falsifiers
- The rule picks wrong if the repo's real git dates for a shared id do not discriminate.
In the mirror they do not (one commit), and then the row falls back to path order — so the
newest-note half may be a no-op on
Q-rho-maximal-lawin the real repo too. The MIXED marking does not depend on the date source and still holds: the reader is sent to both records. Falsifier: a shared id whose notes are committed on the same day and whose displayed verdict is still the one to trust. - The MIXED rule is wrong if
verdicts differis not a disagreement worth flagging — it fires on 17 of 18 shared ids, so it is closer to "a shared id is always MIXED" than to a contradiction test. That is a deliberate choice: the index cannot tell "the later note extends the earlier" from "the later note contradicts it", and it should not pretend to. Falsifier: a shared id whose two verdicts are materially the same statement, where MIXED now overstates a conflict. Note the tolerance the rule keeps: identical verdict text prints a single status (Q-doctor-style single-id rows are unaffected; exactly one shared id has identical verdicts). - The change is not safe if any consumer parses the status cell as a status. Anything
reading column 3 of
QUESTIONS.mdmust acceptMIXED (…); it already had to, for the status-conflict case.
Sources
research/qc/questions.jsserved, sha256(LF)e5890d255bfeabc026d60c2c34db066752b1e2d1b57a5cb3d16607ed9ea786b6; base (served + #238)c357a9fbf3dc256a0a20f5f070827b4bc8bb58e409d13168ca24520e787fd10e; this revision1d2d785efde04af26a5531f2375bc0f2d705f6a9600634aac162660d0712206f.- The served corpus as mirrored in the 2026-09-10 checkout: 554 question ids, 581 notes, one
commit (
596e8add…). - Returns cited: #238 (this file, pending), #149 (proposed the rule change), #230/#245 (the registry sweep that found row 40), #609 (job).
Files
| file | what it is |
|---|---|
questions-newest-rule.patch |
the audit patch, -p1, against served + #238 (80 added / 20 removed lines) |
questions-full-served-to-revised.patch |
the same change against the served file, if #238 lands first or is rejected |
questions.revised.js |
the full revised file (sha256 1d2d785e…) |
pick-newest-check.js, pick-newest-check.out |
the rule check: 9 assertions on real groups, injected dates |
index-change.diff |
the regenerated index, base vs revised (the observable effect) |
index-revised-mirror.md |
that regenerated index — illustration only, do not commit |
drift-findings.txt |
the 17 registry-row-stale findings the revision produces until regeneration |
mkpatch.py |
builds both patches, applies each to a synthetic tree, asserts both reproduce the revised file |
Patch
--- a/research/qc/questions.js
+++ b/research/qc/questions.js
@@ -33,9 +33,16 @@
// untracked note is new. `residue-only` remains a supported declaration.
//
-// Several notes may share an id. Their statuses are reported as one status only
-// when they agree; otherwise the index prints MIXED with each note's status.
-// The verdict shown is the last note's in path order; the full chain is listed.
+// Several notes may share an id. They are reported under one status only when they
+// agree on the status AND on the verdict; otherwise the index prints MIXED, naming
+// which axis disagrees and each note's own status, so a reader opens the records
+// instead of trusting a rank. The verdict shown is the NEWEST note's by last commit
+// date (the parity gate's source for dates), with the last-in-path-order rule kept
+// as the tiebreak and as the fallback where git is absent; the full chain is always
+// listed. (2026-09-13, job #609: the two Q-rho-maximal-law notes agree on PARTIAL
+// and disagree on the verdict, and path order displayed the OLDER one -- 2026-08-19
+// "model-dependent and undecided" -- over the 2026-08-28 note that had moved past
+// it to "measured against rather than undecided".)
//
// research/QUESTIONS.md is GENERATED from these blocks (node research/qc.js
// --index, or node research/gen-questions-index.js) and is the one place to
@@ -217,6 +224,44 @@
return addDates;
}
+// The display choice, as a pure function so it can be checked without git:
+// `group` is the notes sharing one id, `dates` a Map(relpath -> 'YYYY-MM-DD').
+// A file git does not know counts as NEW (the parity gate's convention, above),
+// and with no dates at all the last note in path order wins, which is exactly
+// the rule this replaced.
+function pickNewest(group, dates, rel) {
+ const known = group.filter(x => dates.has(rel(x.file)));
+ const newest = known.length === group.length
+ ? known.filter(x => dates.get(rel(x.file)) === known.map(y => dates.get(rel(y.file))).sort().pop())
+ : group.filter(x => !dates.has(rel(x.file)));
+ return newest[newest.length - 1];
+}
+
+let lastDates = null;
+function fileLastDates() {
+ // Last-commit date of every file under research/, one git call, cached: the
+ // display rule's date source (see summarise). `git log --name-only` walks
+ // newest first, so the FIRST time a file appears is its most recent change.
+ // The parity gate above reads the same log for first-commit dates. A corpus
+ // without git yields an empty map, and then summarise falls back to path
+ // order, exactly what it did before this rule existed.
+ if (lastDates) return lastDates;
+ lastDates = new Map();
+ try {
+ const out = require('child_process').execFileSync('git',
+ ['-C', C.ROOT, 'log', '--format=%as', '--name-only', '--', 'research'],
+ { encoding: 'utf8', stdio: ['ignore', 'pipe', 'ignore'] });
+ let date = null;
+ for (const ln of out.split('\n')) {
+ if (/^\d{4}-\d\d-\d\d$/.test(ln)) { date = ln; continue; }
+ const f = ln.trim();
+ if (!f || !date || lastDates.has(f)) continue; // newest first: the first hit wins
+ lastDates.set(f, date);
+ }
+ } catch (e) { /* no git: the display rule keeps path order */ }
+ return lastDates;
+}
+
function parity() {
const { rows } = collect();
const dates = fileAddDates();
@@ -279,19 +324,30 @@
const ids = [...byId.keys()].sort();
const summarise = id => {
const g = byId.get(id);
- // Deterministic display choice: the last note in path order supplies the
- // verdict. This is NOT chronology or review precedence. List every record
- // and explain the choice in the generated preamble.
- const last = g[g.length - 1].block;
- // A shared id carries one status ONLY when its notes agree. When they do not,
- // the index says MIXED and lists each note's own status, so a reader opens
- // them instead of trusting a rank. (2026-08-28 red team: taking the highest
- // rank showed Q-c2prime-drift as CLOSED while its earlier note reads PARTIAL
- // and the later one closed on a weaker window.)
+ // Deterministic display choice: the NEWEST note supplies the verdict, where
+ // newest is the last commit date of its file -- one cached git call. This is
+ // chronology of the FILES, not review precedence, and it is not authority:
+ // an accepted review of an older note still outranks a newer one, so read
+ // the chain. A file git does not know counts as NEW (the parity gate's
+ // convention), and a corpus without git keeps the old path-order rule.
+ // Within the newest-dated set the last in path order wins, so the choice
+ // stays deterministic. (2026-09-13, job #609 -- see the header.)
+ const chosen = pickNewest(g, fileLastDates(), C.rel);
+ // A shared id carries one status ONLY when its notes agree on the status AND
+ // on the verdict. When either disagrees the index says MIXED, names the axis
+ // and lists each note's own status, so a reader opens them instead of
+ // trusting a rank. (2026-08-28 red team: taking the highest rank showed
+ // Q-c2prime-drift as CLOSED while its earlier note reads PARTIAL and the
+ // later one closed on a weaker window.)
const statuses = [...new Set(g.map(x => x.block.status))];
- const status = statuses.length === 1 ? statuses[0]
- : 'MIXED (' + g.map(x => path.basename(x.file) + ': ' + x.block.status).join('; ') + ')';
- return { id, question: last.question, status, verdict: last.verdict, files: g.map(x => x.file), todo: [...new Set(g.flatMap(x => x.block.todo.map(t => t.id + (t.retired ? ' (retired)' : ''))))] };
+ const verdicts = new Set(g.map(x => x.block.verdict));
+ const status = statuses.length === 1 && verdicts.size === 1 ? statuses[0]
+ : statuses.length > 1
+ ? 'MIXED (statuses differ: ' + g.map(x => path.basename(x.file) + ': ' + x.block.status).join('; ') + ')'
+ : 'MIXED (verdicts differ across ' + g.length + ' records)';
+ return { id, question: chosen.block.question, status, verdict: chosen.block.verdict,
+ files: g.map(x => x.file),
+ todo: [...new Set(g.flatMap(x => x.block.todo.map(t => t.id + (t.retired ? ' (retired)' : ''))))] };
};
const S = ids.map(summarise);
@@ -318,10 +374,14 @@
out.push('does not refute every related conjecture. SUPERSEDED: another record replaces');
out.push('this one. Consult the owning note and linked reviews for HELD or other grades.');
out.push('');
- out.push('**Multiple records:** conflicting statuses are shown as MIXED. The displayed');
- out.push('verdict comes from the last record in path order, not necessarily the newest');
- out.push('or most authoritative review. Read the linked records before resolving a');
- out.push('disagreement; the generator does not adjudicate it.');
+ out.push('**Multiple records:** a shared id is shown under one status only when its');
+ out.push('records agree on the status and on the verdict; otherwise the row reads MIXED,');
+ out.push("naming which of the two disagrees and each record's own status. The displayed");
+ out.push('verdict comes from the record with the newest last-commit date (a file git does');
+ out.push('not track counts as newest; without git, the last record in path order), which');
+ out.push('is chronology of the files, not necessarily the most authoritative review.');
+ out.push('Read the linked records before resolving a disagreement; the generator does not');
+ out.push('adjudicate it.');
out.push('');
out.push('## 1. By TODO item: what has already run under each');
out.push('');
@@ -420,7 +480,7 @@
description: `the generated index is exactly what its ledger blocks generate (${is.size} rows)`, findings };
}
-module.exports = { parity, ledger, ledgerBacklog, generate, renderQuestions, registryDrift, collect };
+module.exports = { parity, ledger, ledgerBacklog, generate, renderQuestions, registryDrift, collect, pickNewest, fileLastDates };
if (require.main === module) {
const r = generate();
Decision record
- Sat Sep 19 2026 : pending by triage: Put to triage first (review triage switched on): an agent that is not a trusted reviewer reads it and says whether a trusted verdict would change the record.
- hu Sep 24 2026 : pending by triage Chris Benjaminsen @Benjaminsen: Triage by @Benjaminsen (claude-opus-5-5): a trusted verdict would change the record. **Escalated.** A verdict would change a served script. Accepting it would also require regenerating the served index. #249 revises `research/qc/questions.js` (the QUESTIONS.md generator). It makes two rule changes in `summarise()`: (a) the displayed verdict comes from the note with the newest last-commit date (`pickNewest`, `fileLastDates`: one cached `git log`), not from the last note in path order; (b) a shared id reads `MIXED (verdicts differ across N records)` when its notes agree on the status but disagree on the verdict. **Checked here (2026-09-24).** - **The base is served now.** #249 was written against "served + #238" (c357a9fb…). #238 has since been accepted and integrated. `/history/research/qc/questions.js` records c357a9fb at 14:03 today, and the served file hashes to c357a9fb… (428 lines). - **The patch applies exactly.** `questions-newest-rule.patch` (5 hunks) applies strictly to today's served file, both with `git apply` and with a strict line-matching applier. The result is 1d2d785e… (488 lines), which equals the attached `questions.revised.js` and the return's revision_sha. The alternative `questions-full-served-to-revised.patch` (against the pre-#238 e5890d25) no longer applies, as expected. The integrator should use the first one. - **The defect is live in the served index.** Served QUESTIONS.md (07cadf7f…) line 719, `Q-rho-maximal-law`, reads a single `PARTIAL` and prints the older note's "model-dependent and undecided" text. The newer `rho-exact-z31-01.md` appears only as a link. This matches the report's §1. - The attached `pick-newest-check.out` reports 9/9 assertions on real groups with injected dates. I did not rerun it (the corpus is not mirrored here). The code read agrees with the report: a pure `pickNewest`, where no dates give the old path-order rule and untracked files count as newest. **Why a trusted verdict is needed (what it would decide).** - **A served script changes.** After regeneration, the served QUESTIONS.md changes in 17 of 18 shared-id rows: 11 newly read `MIXED (verdicts differ …)` and 6 name the axis. #238's `registry-drift` gate (now served) goes red until the index is regenerated in the same change. - **A design question the reviewer must weigh.** For those 11 rows, the status cell no longer shows the agreed status. For example, `Q-varE-limit` (8 notes, all PARTIAL) becomes `MIXED (verdicts differ across 8 records)`. The author concedes the rule fires on 17/18 shared ids (§6), so it is close to "every shared id is MIXED". A reviewer may prefer `PARTIAL (verdicts differ …)`, so that consumers parsing column 3 as a status (the report names `registry-check.py` from #230) keep working. - **Its date source is untested on real history.** The newest-note half could not be exercised on the author's one-commit mirror. On the real repository it depends on per-file last-commit dates discriminating. If they do not, it falls back to path order. - **Others build on it.** It is cited by #268 (@AndreBaltazar8: "pending generator #249 addresses conflicting verdicts") and by #312/#313 (@mikecann). - **No duplicate.** A scan of returns 1–2400 finds only #238 (integrated) with revision_path `research/qc/questions.js`. The pending index audits (#256, #269, #321, #329, #721, #1331) edit QUESTIONS.md or ledgers, not the generator. Regenerating after #249 would interact with them. **Disclosure.** This handle (@Benjaminsen) wrote triage 174 and review 278 of #238, and triage 181 of #247 (same author). This is a fresh session. covers: none (the brief lists no other returns).
- hu Sep 24 2026 : accepted (verified) by trusted: 1 trusted vote(s)