Repository navigation
Archived directories are measured against the UTC date of their adding commit; the ten one-day-early names and the two renamed-within-archive names are dispositioned in place - #820
Conversation
…ommit, and disposition the twelve in place #797 made `proposal-support.py archive` own the clock going forward and gated the ledger against the directory name. Neither arm looks at HISTORY, so the ten directories a local clock one day behind UTC named before either existed are invisible to both, and nothing measures them. The directory name is the archive's date of record — ledger rows, ratification records, the README index and cross-references in other archives all read it — so a name one day away from the commit that created it states a day the archive did not happen on. (1) The MEASUREMENT arm, on the plain `validate-sequenced-after.py .` run CI already invokes: one `git log --diff-filter=A --reverse --no-renames --name-only` walk over `openspec/changes/archive`, oldest first, attributing each directory to the first commit that adds any file under it — so the initial-import shape (many directories, one commit) attributes correctly, and the cost is 83ms rather than the 9.3s of 144 per-directory calls (113x; the two attributions agree on all 144). A disagreement with no disposition is a named finding; a disposition naming a directory that does not disagree, no longer exists, or cites a commit history does not carry is a finding too — a stale disposition silences a finding on a fact nobody can check. Both archive-date arms now report on one pass rather than the first returning before the second runs. A checkout that cannot answer — not a work-tree root, nested, or SHALLOW, where the graft boundary would appear to have added everything — says NOT RUN and leaves the verdict alone; a missing or unreadable record is CANNOT RUN, exit 2. (2a) The DISPOSITION of the twelve IN PLACE, names untouched, in `tests/sequenced_after/archive-date-dispositions.yaml` beside the corpus ledger and read the same way: ten named by a local clock one day behind UTC (#780's defect, unnoticed) and two that are the repository's initial import rather than an archive act, each citing its adding commit, the fact and the ruling. History is history and every citation stands; a rename would move every record that points at the directory. Every sha and date was re-derived by the shipped code and again by the issue's per-directory method, with no discrepancy against #812's table. The record carries the severity dial. It ships `error` because the ruling's own condition is met: 144 archived directories, 132 agree, 12 disagree, 12 dispositioned, 0 undispositioned, plain run green. Ruled by Brett Heap 2026-09-08, verbatim "rule 1 + 2a on 812, this lane authors it", "land 797 when green, then author 812" and "merge 812 when green". No OpenSpec change — plain fix per the #638 precedent. Refs #812 Lane: openxfactory-1 Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01XPt6t1VcNVB5yGzQGwWUFi
There was a problem hiding this comment.
Hi @brettheap! 👋
Your private repo does not have access to Sourcery.
Please upgrade to continue using Sourcery ✨
|
Lane: openxfactory-1 (openXfactory-1) @codex review |
|
Lane: openxfactory-1 (openXfactory-1) Date note, for the record. Authoring began 2026-09-08 UTC and the clock |
There was a problem hiding this comment.
🟡 Changes recommended
The new disposition record’s header comment is internally inconsistent about quoting rules and should be corrected to avoid misleading future edits.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds a second “archive-date” validation arm to validate-sequenced-after.py that checks archived directory names against the UTC date of the commit that originally added them, with an explicit disposition record for historically “wrong-day” directories.
Changes:
- Implement batch git-history attribution (
git log --diff-filter=A --reverse --no-renames --name-only) to map each archived directory to its oldest adding commit (UTC committer date). - Add strict, schema-checked disposition record (
tests/sequenced_after/archive-date-dispositions.yaml) to silence known historical disagreements and to flag stale/incorrect dispositions. - Add a comprehensive test suite using real git repos with controlled author/committer timestamps, plus live-corpus equivalence checks.
File summaries
| File | Description |
|---|---|
| scripts/sequenced_after.py | Implements the “archive-date vs adding-commit” measurement, strict disposition parsing, and stale-disposition detection. |
| scripts/validate-sequenced-after.py | Runs the new arm on the plain validator path (even if the first archive-date arm fails) and applies severity rules (warning/error + strict override). |
| tests/sequenced_after/test_archive_commit_dates.py | Adds real-git fixtures and coverage for disagreement detection, stale dispositions, and “cannot/not run” cases. |
| tests/sequenced_after/archive-date-dispositions.yaml | Adds the disposition record for the 12 known historical disagreements (10 one-day-early + 2 initial-import). |
| docs/document-lifecycle.md | Documents the new history-based measurement and the in-place disposition approach. |
Review details
- Files reviewed: 5/5 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…g note to entry scalars Two corrections to the arm as landed on this branch. A MISSING GIT BINARY WAS A TRACEBACK I INTRODUCED. Every other git caller in `sequenced_after.py` sits behind `--archive-gate`, which an operator asks for; this arm runs on the DEFAULT validation run, so a machine with no `git` in PATH would have gone from a working validator to a `FileNotFoundError` out of the middle of a corpus check. `_git` now converts `OSError` into `SequencedAfterError`, which the CLI already reports as `NOT RUN` with the verdict unchanged — the same answer it gives a shallow or non-work-tree checkout, and for the same reason: the checkout cannot answer the question. THE RECORD'S HEADER CONTRADICTED ITSELF (Copilot round 1, taken). It said "EVERY SCALAR IS QUOTED" while `schema_version`, `kind` and `enforcement` sit unquoted above it. The rule is about ENTRY scalars, and the three file keys must STAY unquoted: `schema_version` is an INTEGER the loader compares to `1`, so quoting it would make it the string "1" and the record would be refused. The header now says so, and a parametrized case asserts the refusal, so the claim is checked rather than merely written. Refs #812 Lane: openxfactory-1 Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01XPt6t1VcNVB5yGzQGwWUFi
|
Lane: openxfactory-1 (openXfactory-1) Copilot round 1 — 1 finding, TAKEN ( "EVERY SCALAR IS QUOTED" contradicted the file's own three unquoted keys — Also in the same commit, found by my own adversarial pass rather than by the Tests 375 → 407 on |
|
Lane: openxfactory-1 (openXfactory-1) The recorded
All ten are Two independent corroborations that the batch walk attributed the right
And the two |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f5f0080b69
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
🔵 Needs a closer look
It changes core validation gating behavior and adds new git-history parsing paths that should be confirmed by a human reviewer in CI and typical developer workflows.
Review details
Suppressed comments (1)
Previously missed (1) — in code that hasn't changed since the last review.
scripts/validate-sequenced-after.py:618
- The
--strict-archive-dateshelp text refers to the "archive-date-vs-adding-commit" arm, but the CLI output prefix for this arm is "archive-date-vs-commit". Using two different names makes it harder to grep logs and connect docs/help to output; consider aligning the help string to the emitted finding prefix.
- Files reviewed: 5/5 changed files
- Comments generated: 0 new
- Review effort level: Lite
…awful repair for two shapes it cannot judge Both findings are Codex P2 on #820, both taken. GIT FAILING IS NOT THE SAME FACT AS A CHECKOUT THAT DECLINES THE QUESTION, and the arm raised one error class for both — so the CLI mapped both to NOT RUN. A partial clone with objects unavailable, or a corrupt object store, would have left the run GREEN with a gate the record asks for at `error` silently off, which is the one answer a gate must never give. The distinction is now a TYPE, `ArchiveHistoryUnavailable`, and not a phrase in a message: a tree that is not a work-tree root, one nested in another repository, a SHALLOW clone and a machine with no git are contexts this arm deliberately does not serve (NOT RUN, verdict unchanged); a `git log` that exits non-zero AFTER those probes passed is git failing (CANNOT RUN, exit 2). The shallow PROBE failing moves to fail-closed for the same reason: it answers the question that decides whether the walk can be believed at all. THE RECORD FORBADE THE ONLY LAWFUL REPAIR FOR TWO SHAPES THE ARM CANNOT JUDGE. This arm compares a NAME to a COMMIT; it cannot say WHY they differ, and three causes produce the same shape. Besides the clock defect there are (2) a CORRECT archive whose act and whose commit fell on different UTC days — the wrapper owns the clock at the ACT, and a squash-merge is dated later — and (3) a change id that arrived carrying its own `YYYY-MM-DD-` prefix, which the pinned CLI preserves DELIBERATELY (`archive.js:1119-1124`) and `archive_directory_name()` computes by that same rule, so the directory takes the date IN THE ID. The header said no future entry may ever be written, which at `enforcement: error` left both of those with no repair but a disposition its own text forbade. It now names the three causes, says that 2 and 3 are LAWFUL entries once actually MEASURED and must name their own cause rather than borrowing the clock sentence, and forbids only what should be forbidden: writing an entry BEFORE the disagreement is measured. `docs/document-lifecycle.md` carries the same limitation, so a reader is not told the arm judges a cause it cannot judge. The dial stays `error`: the ruling's condition is met (144 directories, 132 agree, 12 dispositioned, 0 undispositioned, plain run green), and the escape for a future correct archive is now one truthful entry rather than a contradiction. Refs #812 Lane: openxfactory-1 Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01XPt6t1VcNVB5yGzQGwWUFi
|
Lane: openxfactory-1 (openXfactory-1) Codex round 1 — 2 × P2, BOTH TAKEN ( P2 — "Fail closed when the history walk itself errors" — TAKEN, in codeCorrect, and it is the more serious of the two: The distinction is now a type, not a phrase in a message:
The shallow probe failing moved to fail-closed on the same reasoning, which Three new tests, driven by a P2 — "Do not equate the archive operation date with commit date" — TAKEN, in the record and the docs; the comparison standsYour two sub-claims are both true, and I want to separate what I accept from Accepted, and it is a contradiction I wrote. The arm compares a NAME to a
And my record's header said "entries are added only for a measured The header now names all three causes, states that 2 and 3 are lawful entries Not changed: the comparison itself, and the So the design is deliberately: measure mechanically, judge in the record. Empirically, cause 1 is what happened. All ten were committed at Tests 375 → 411 on |
The `--strict-archive-dates` help said "archive-date-vs-adding-commit" while every line the arm emits is prefixed `archive-date-vs-commit`, so the help, the module docs and the output could not be grepped with one token. The emitted token wins everywhere — it is the one an operator has in front of them — and the docstring now says so explicitly rather than leaving the reader to notice. Copilot round 2 (suppressed comment, taken); no behaviour change. Refs #812 Lane: openxfactory-1 Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01XPt6t1VcNVB5yGzQGwWUFi
There was a problem hiding this comment.
🟢 Approval recommended
The new validation arm is well-guarded for unanswerable checkouts, uses a single-pass git walk for performance, and is backed by thorough fixture-based tests plus an explicit, strict disposition record for the known historical cases.
Review details
- Files reviewed: 5/5 changed files
- Comments generated: 0 new
- Review effort level: Lite
…he two raise classes where the caller reads them A 120-column run-on where the initial-import paragraph should have started, and a RAISES paragraph still describing one error class after the fail-closed split made it two. The second was the one that mattered: `adding_commits` now raises `ArchiveHistoryUnavailable` when the CHECKOUT declines the question and plain `SequencedAfterError` when git FAILS, and the docstring a caller reads before writing the `except` said neither. Prose only; no behaviour change. Refs #812 Lane: openxfactory-1 Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01XPt6t1VcNVB5yGzQGwWUFi
There was a problem hiding this comment.
🔵 Needs a closer look
It changes core validation behavior and exit-code semantics on the default validation path, so it warrants final human verification despite strong test coverage.
Review details
Suppressed comments (1)
Previously missed (1) — in code that hasn't changed since the last review.
tests/sequenced_after/test_archive_commit_dates.py:463
- Test docstring starts with four quotes ("""") which injects an extra leading
"character into the docstring text; this looks like a typo and makes the string content misleading.
- Files reviewed: 5/5 changed files
- Comments generated: 0 new
- Review effort level: Lite
There was a problem hiding this comment.
🔵 Needs a closer look
The new test git shim delegates to the resolved git binary without shell-quoting its path, which can break delegation when the git path contains spaces or special characters.
Review details
Suppressed comments (1)
Previously missed (1) — in code that hasn't changed since the last review.
tests/sequenced_after/test_archive_commit_dates.py:595
- In
_git_shim, the generated shell script usesexec {real} "$@"without quoting the resolvedgitpath. Ifshutil.which('git')ever returns a path containing spaces or shell metacharacters, the shim will fail to delegate correctly (and could run the wrong binary). Quoting the path viashlex.quote()makes the shim robust.
- Files reviewed: 5/5 changed files
- Comments generated: 0 new
- Review effort level: Lite
|
Lane: openxfactory-1 (openXfactory-1) Whole-suite comparison against 1.
The failure and error sets are identical, breakdown for breakdown — 66
(The branch run reads +30 rather than the +36 the targeted suites show, because 2. The MERGE REF, which is what CI actually runs. Worth stating because this arm reads the ARCHIVE CORPUS, so a sibling landing an |
|
Lane: openxfactory-1 (openXfactory-1) FROZEN — head
Bench, complete. One Five commits, five files, +1462/−9. I have not merged — that is Brett |
|
To use Codex here, create an environment for this repo. |
…an import The adversarial review of PR #820 measured two things the arm's own record got wrong about itself. THE TWO OLDEST ENTRIES WERE NOT A REPOSITORY IMPORT. Measured: this history's root is 3fd3e33 (2026-06-21); 746be44 has ONE parent, the subject "Add avatar-first client workflow scaffolding", and `git show --name-status -M` shows it RENAMED both directories out of their `-openworkflow` names on 2026-07-02. Their archive acts are 484042d (2026-06-26T05:55:08Z) and d7b66d7 (2026-06-26T04:37:58Z), both AGREEING with the 2026-06-26 the names carry. So the names are right and the disagreement is an artefact of `--no-renames` attributing a rename's destination to the rename commit. Both `fact` values now say that, each citing its own archive act in full, and the live-record test re-measures both halves — the rename out of `git show -M`, the archive act's UTC day out of `git log` — rather than taking the entry's word for them. A FOURTH CAUSE OF THE SHAPE EXISTS AND WAS UNNAMED: a rename of an archived directory INSIDE `archive/`. Proven on a fixture — `git mv` a month after the archive act yields a false disagreement a month wide, and with rename detection on the destination never appears as `A` and the directory is silently unmeasured. The record header, the module, the CLI help, the lifecycle doc and the pin test now name all four; the pin test checks all five places, because a cause named in one and missing from the others is how a rename came to be recorded as an import. The comparison and the `--no-renames` choice are UNCHANGED. The trade is written down where the choice is made: a finding a disposition can answer beats a directory the gate cannot see. Also: the live-record test asserted the fact set by exact equality and a hard twelve, forbidding in the suite exactly the future entries (causes 2, 3, 4) the header grants — it now asserts the known facts are PRESENT, that every entry states one, and a LOWER bound on the count. And `_git_shim` interpolates the real git path into a `/bin/sh` script; it is `shlex.quote`d. Bench 415 passed (was 411): three cause-4 fixture tests and one live rename-disposition test. Live corpus green, 0 undispositioned, 12 in force. Lane: openxfactory-1 Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01XPt6t1VcNVB5yGzQGwWUFi
There was a problem hiding this comment.
🔵 Needs a closer look
It introduces a substantial new validation/gating path with nuanced git-history probing and exit-code behavior that warrants final human review despite strong test coverage.
Review details
Suppressed comments (1)
tests/sequenced_after/archive-date-dispositions.yaml:111
- The header comment implies
kindandenforcementmust be unquoted “bare tokens”, but quoting them would still parse as strings and would not change what the loader compares; onlyschema_versionmust remain an integer. Clarifying this avoids readers thinking quotingenforcementwould break the record when it wouldn’t.
# unquoted. THE THREE FILE KEYS ABOVE ARE DELIBERATELY NOT QUOTED and must stay
# that way: `schema_version` is an INTEGER the loader compares to `1`, and
# `kind` and `enforcement` are enumerated bare tokens it compares to a fixed
# set — quoting `schema_version` would make it the string `"1"` and the record
# would be refused. (Copilot round 1: the sentence said "every scalar" and the
- Files reviewed: 5/5 changed files
- Comments generated: 1
- Review effort level: Lite
…ep the wrap at 80 Copilot round 2 on head e420684, taken: the CAUSE 4 paragraph I inserted into `adding_commits` left `core.quotePath=false` appended mid-line at 115 columns, so it read as part of the rename sentence rather than as the separate note it is. It is its own paragraph again. Also reflowed the four new lines that ran past 80 (a constant, two test names, three assertions, one record comment) to the width the rest of these files keep. No behaviour, no assertion semantics and no record content changed; 40 passed in the arm's file, 415 in the bench, live corpus green. Lane: openxfactory-1 Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01XPt6t1VcNVB5yGzQGwWUFi
|
Lane: openxfactory-1 (openXfactory-1) Fix round (adversarial review) — FROZEN at head
|
| check | result |
|---|---|
validate-sequenced-after.py . |
rc 0 — 12 disposition(s) in force, enforcement error, 0 undispositioned |
--strict-archive-dates |
rc 1 — the pre-existing ledger arm's 124 opt-in drift findings; this arm passes and prints |
--ledger-diff |
rc 0 — per-change sweep ledger consistent with the corpus (188 rows) |
pytest tests/sequenced_after tests/scope_globs tests/proposal-support -q |
415 passed, 2 subtests (main 89242304: 375; this PR's previous head 60fe7647: 411 — +4: three cause-4 fixture tests, one live cause-4 disposition test) |
| drop the disposition lookup | live run → 12 findings, rc 1; 5 tests fail |
| drop the comparison | the one-day-early and cause-4 fixtures' findings vanish; 12 fail |
| drop the stale loop | its three fixtures go green; the 3 STALE tests fail, nothing else |
doc-health.py --single-repo . |
unchanged — 92 findings, normalized sets diff IDENTICAL against both origin/main and the previous head 60fe7647; only delta anywhere is +88 governance words (the lengthened lifecycle paragraph), canon share 39.1% either way |
Each mutation was applied, run, and reverted from a pristine copy compared by md5.
FROZEN
ae179edc1dad91571e8ec2378015f5f6680c8442 — all ten check-runs SUCCESS, mergeable: MERGEABLE, 0 unresolved threads, closingIssuesReferences exactly [opensoft/openxFactory#812], no openspec/ path in the diff (five files: scripts/sequenced_after.py, scripts/validate-sequenced-after.py, tests/sequenced_after/archive-date-dispositions.yaml, tests/sequenced_after/test_archive_commit_dates.py, docs/document-lifecycle.md). The corpus ledger is byte-identical to origin/main; no archived directory is renamed or touched.
| check-run | conclusion |
|---|---|
pytest-suite |
SUCCESS |
lane-line |
SUCCESS |
signed-execution-chain-gate |
SUCCESS |
clearing-dispatch-gate |
SUCCESS |
openreposhape-pin |
SUCCESS |
openspec-cli-pin |
SUCCESS |
wallet-validation |
SUCCESS |
release-tag-gate |
SUCCESS |
merge-master-approval |
SUCCESS |
There was a problem hiding this comment.
🔵 Needs a closer look
It introduces a new history-dependent validation arm with nuanced exit-code semantics that affects gating behavior, so it warrants final human review despite strong test coverage.
Review details
- Files reviewed: 5/5 changed files
- Comments generated: 0 new
- Review effort level: Lite
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: eed1444f12
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…use-4 row is re-measured Codex P2 on head eed1444, and it is right: `assert set(renamed) == set(RENAMED)` was the same defect as the MINOR one level further in. The header grants a later MEASURED rename inside `archive/` its own lawful entry and the validator accepts one, so pinning the set would red the suite for exactly the repair the record permits. Demonstrated: with a synthetic third cause-4 row the equality is False and the subset is True. Taken two ways. The set assertion is now `set(RENAMED) <= set(renamed)`. And the live cause-4 test is GENERALISED OVER THE RECORD rather than written against the two known names, so a later entry meets the same standard instead of escaping the check: for EVERY row whose fact begins `renamed within archive/`, its `adding_commit` must not be the root, must have exactly one parent, must appear in the fact, the fact must name a SECOND full object name, `git show --name-status -M <adding_commit>` must really carry a rename whose destination is that directory, and at least one cited second name must be a commit whose UTC day EQUALS the date the directory carries. The two rows this corpus carries additionally pin the name they were renamed FROM and the act they cite. CAUSE 1 STAYS PINNED AT TEN, deliberately and with the reason written down: the header states cause 1 CANNOT RECUR through the wrapper, which has owned the clock at the archive act since #797, so an eleventh clock row would mean the wrapper was bypassed and should red rather than pass. 40 passed in the arm's file, 415 in the bench, live corpus green with 0 undispositioned and 12 in force. Lane: openxfactory-1 Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01XPt6t1VcNVB5yGzQGwWUFi
There was a problem hiding this comment.
🟢 Approval recommended
The new gate is well-scoped, heavily fixture-tested, and integrates cleanly with the existing validator flow (only minor maintainability nits remain).
Review details
Suppressed comments (2)
Previously missed (2) — in code that hasn't changed since the last review.
scripts/validate-sequenced-after.py:383
validate_corpus()reuses the nameproblemsfor thearchive-date-vs-commitarm results, after already usingproblemsfor sequenced_after validation earlier in the same function. Renaming the second variable avoids shadowing and makes future edits less error-prone.
tests/sequenced_after/test_archive_commit_dates.py:766monkeypatchis listed as a fixture argument here but never used in the test body. If this repo runs any linting (or if someone copies this pattern), unused fixture parameters can create noise; removing it keeps the test minimal.
- Files reviewed: 5/5 changed files
- Comments generated: 0 new
- Review effort level: Lite
|
Lane: openxfactory-1 (openXfactory-1) FROZEN at Provenance for the admin merge of #820 (plain fix; no OpenSpec change — the #638/#797 precedent). Words: Brett Heap, 2026-09-08, verbatim "file the successor arm issue, unclaimed" → #812; "rule 1 + 2a on 812, this lane authors it"; "land 797 when green, then author 812"; "merge 812 when green" (all recorded on #812). Arm (1): every archived directory measured against the UTC date of its oldest adding commit, 🤖 Generated with Claude Code |
Lane: openxfactory-1 (openXfactory-1)
#797 made
proposal-support.py archiveown the clock GOING FORWARD (UTC date,TZ=UTCfor the pinned CLI, the created directory asserted) and gated theledger on a row's
moved_oncontradicting its directory. Neither arm looks atHISTORY — the date an archived directory carries against the UTC date of the
commit that added it — so the ten directories a local clock one day behind UTC
named before either existed are invisible to both, and nothing measures them.
That directory name is the archive's date of record: ledger rows,
ratification records, the README index and cross-references in other archives
all read it, and
sequenced_after.ARCHIVE_DIRparses it as fact. A name one dayaway from the commit that created it states a day the archive did not happen on.
The rulings
Brett Heap, 2026-09-08T14:30:58Z, verbatim: "rule 1 + 2a on 812, this lane
authors it".
Brett Heap, 2026-09-08T14:38:49Z, verbatim: "land 797 when green, then author
812". — this branch is cut from the
mainthat contains #797 (1ef26900).Brett Heap, 2026-09-08T16:14:28Z, verbatim: "merge 812 when green".
(1) The measurement arm
On the plain
validate-sequenced-after.py .run — the one CI already invokesthrough
tests/sequenced_after/test_validate.py::test_corpus_sequenced_after_all_validate— every directory under
openspec/changes/archive/matchingARCHIVE_DIRismeasured against the UTC committer date of the OLDEST commit that added it.
One walk, not one per directory.
git log --diff-filter=A --reverse --no-renames --name-only -- openspec/changes/archivevisits every add under thearchive root once, oldest first; the first commit to touch a directory is the
one that created it, and
setdefaultkeeps it. The many-directories-one-commitshape falls out of it: one commit adding many directories attributes all of
them to itself, which is what
01198ccedid when it archived two changes atonce. Measured at 83 ms against 9.3 s for 144 per-directory
git logcalls (113×), and the two attributions were compared directory by directory
and agreed on all 144, under history simplification and
--full-historyalike —
test_THE_BATCH_WALK_AGREES_WITH_A_PER_DIRECTORY_LOG_on_every_DISPOSITIONkeeps that equivalence honest for every dispositioned row.
--no-renamesdeliberately: the question is when did this NAME come to exist,and rename detection answers a different one — a directory renamed within the
archive would be paired as
Rand never reported as an add at all, so the gatewould not merely misdate it, it would not see it. The price of that choice is
cause 4 below: a directory renamed inside
archive/after its archive actattributes to the RENAME commit and can disagree by any distance. That is a
finding a disposition can answer, which beats a directory the gate cannot
measure. The committer date because it is when the commit entered this
history, which is
the act the name claims to date; author and committer dates agree on all 144
here, so nothing turns on it today and the reason is written down for the day a
rebase moves one and not the other.
Findings, by name:
Equal → silent. Disagrees and dispositioned → silent. Disagrees with no
disposition → the finding. A stale disposition is itself a defect and is
reported in the same list: an entry naming a directory that no longer exists,
one whose directory AGREES with its adding commit, and one citing a commit or a
date history does not carry. The record's whole authority is that every entry
states a fact anyone can re-measure; an entry nobody can check silences a
finding on nothing.
Both archive-date arms now run on one pass. They read different things — a
ledger row against a directory name, and a directory name against history — and
want different repairs, so the first one's failure no longer returns before the
second has reported. Visible in Verification: under
--strict-archive-datestheledger arm's 124 pre-existing findings and this arm's verdict both print.
A checkout that DECLINES the question and git FAILING are different facts,
and they are a TYPE and not a phrase in a message (
ArchiveHistoryUnavailable,a subclass — Codex P2, taken). Not a git work-tree root, a nested tree (a
corpus written under some other checkout is untracked in it), a SHALLOW
clone, or no git binary at all →
NOT RUN, verdict unchanged: those areproperties of the checkout, and refusing there would red every consumer
validating an exported tree. But a
git logthat exits non-zero after thoseprobes passed — a partial clone with objects unavailable, a corrupt object store
— is git failing in a checkout that claimed it could answer, and is
CANNOT RUN,exit 2. Reporting that as
NOT RUNwould leave the run green with a gate therecord asks for at
errorsilently off, which is the one answer a gate mustnever give. The shallow probe failing fails closed for the same reason.
The shallow guard is the load-bearing decline: in a depth-1 clone the graft
boundary appears to have added every archived directory, so all but the newest
would be reported as disagreements nobody made — a hundred findings with no cause
an author could act on.
pytest-suite.ymlalready checks out atfetch-depth: 0. A directory with no adding commit (uncommitted in this worktree) is skipped: it has no date in history to disagree with, and its clock is
#797's to own at creation.
A missing or unreadable record is
CANNOT RUN, exit 2, in the existingstyle — and it wins over the first arm's exit 1, because "the run could not do
its job" and "the corpus disagrees" want different repairs. The order of the two
refusals is the point: git is probed FIRST (a property of the checkout), the
record SECOND (a property of the repository — it is part of this diff, and
reading "no record" as "no dispositions" would turn one bad line into twelve
findings whose real cause is the file).
Severity design, and why
errorshipsThe record carries the dial (
enforcement: warning | error), so arepository can adopt this arm and measure before it gates;
--strict-archive-datesasks for
errorregardless, and never for less. The instruction was to shiperroronly if the plain run is green with the twelve dispositioned. It is:144 archived directories, 132 agree, 12 disagree, 12 dispositioned, 0
undispositioned — so
erroris what the ruling's own condition asks for, andit ships. One dial covers both finding classes, including stale
dispositions, deliberately:
warningexists precisely for the window in which arepository is writing its dispositions by hand, and making one class
unconditionally fatal would defeat the dial's only purpose.
(2a) The disposition record — the twelve, in place
tests/sequenced_after/archive-date-dispositions.yaml, beside the corpus ledgerand read the same way (strict loader; anchors, aliases, merge keys, directives
and multi-document input refused). Names untouched. History is history and
every citation stands — a rename would move every record that points at the
directory, to correct a name whose only defect is that it is one day early.
Every sha and date below was re-derived here, by the shipped code and again
by the issue's own per-directory method. No discrepancy against #812's table:
all ten one-day-early rows match sha for sha and date for date, and both
initial-import directories are
746be44f, six days apart. The only differencefrom the issue is the corpus total — #812 measured 143 directories (131 agree),
this branch measures 144 (132 agree); one archive has landed since it was
filed, and it agrees.
2026-06-26-enable-live-openxfactory746be44f7af6f6bce51ee75602d7a77951efa1dfarchive/from…-enable-live-openworkflow-factory; the archive act itself,484042de…on 2026-06-26, AGREES with the name2026-06-26-migrate-canonical-policy-to-openxfactory746be44f7af6f6bce51ee75602d7a77951efa1dfarchive/from…-migrate-canonical-policy-to-openworkflow; the archive act itself,d7b66d72…on 2026-06-26, AGREES with the name2026-08-04-add-ideation-cross-reference-readiness7bf79c63af9d9d73b0419d13136d7ba20c589f6a2026-08-04-add-possibles-derivation-lane6d1994c7695328d5a2441dc3da537e3577e785dd2026-08-04-adopt-neutral-utility-pack61ecb5a5a3632a7aad03879892b6f143bcf31deb2026-08-04-implement-avatar-client-lab25d8e1c6691f0b636de8eff8acee4d171d206f5e2026-08-06-add-opendox-project-header01198cce1244a938243120232b5ad379cd94a4bb2026-08-06-add-project-scoped-selection01198cce1244a938243120232b5ad379cd94a4bb2026-08-06-add-proposal-origin-contract5ea242643f0466641b84ff72e51790074cc1e2972026-08-09-qualify-avatar-brokered-call-feasibilitye34dce6e8cbd7e86cc946b1e0556ece65b5dbcf42026-08-25-add-dispatch-credential-contract881e1c058fba71668224380ede404c5f9e7c0eb12026-09-04-add-chain-anchoring66d11a2422e778e9c6f7fe6dc358af83f9c1648dRows 3–12 carry
fact: "named by a local clock one day behind UTC; #780's defect, unnoticed"and are exactly one day early, every one (asserted, notdescribed). Rows 1–2 carry a different fact — cause 4, a rename inside
archive/— corrected in the fix round below; each names the rename commit,the name it was renamed FROM, and the archive act that actually created it, in
full:
All twelve carry
ruled_by: 'Brett Heap 2026-09-08 "rule 1 + 2a on 812"'andcited_to: "opensoft/openxFactory#812".What the measurement can and cannot say
The arm compares a NAME to a COMMIT. It cannot say WHY they differ, and
four causes produce the same shape — which is why an entry carries a
factand a
ruled_byrather than merely a directory name (Codex P2, taken; my firstheader got this wrong, and named only three of the four):
proposal-support and the ledger seeder own the UTC clock: TZ=UTC for the pinned CLI, the archived directory name asserted, moved_on taken from the directory, and a validator arm for drift #797 made this cause unable to recur through the wrapper, which owns the
clock at the archive act.
owns the clock at the act; the adding commit is made — and, squash-merged,
dated — later. An archive named just before UTC midnight and merged just
after is a correct archive that this arm reports. 132 of 144 agree, so it
is rare, not impossible.
YYYY-MM-DD-prefix, which thepinned CLI preserves deliberately (
archive.js:1119-1124; re-prefixingwould stutter the name and sort the folder under a day the change did not
happen on) and which
archive_directory_name()computes by that same rule.Such a directory takes the date in the id and will normally disagree. The
estate has no such change today.
archive/after its archiveact. The walk is
--no-renamesdeliberately, so the destination reads asan ADD at the RENAME commit and may disagree by any distance, not merely a
day — a fixture renaming a directory a month later reproduces it exactly.
The lawful disposition cites the rename commit as
adding_commitand namesthe archive act itself in
fact, which is what rows 1–2 do. Renamedetection is not the repair: under
-Mthe destination never appears asAat all, so the directory would be silently unmeasured — worse than afinding a disposition can answer.
Causes 2, 3 and 4 are LAWFUL entries once actually measured, naming their own
cause rather than borrowing the clock sentence. What the header forbids is only
what should be forbidden: writing an entry before the disagreement is
measured. (My first version forbade every future entry, which at
enforcement: errorleft a correct cause-2 or cause-3 archive with no lawfulrepair — a contradiction, and the sharper half of Codex's finding.)
docs/document-lifecycle.mdcarries the same limitation, so a lifecycle readeris not told the arm judges a cause it cannot judge.
Empirically, cause 1 is what happened to all ten. Every one was committed at
-04:00between 20:34 and 23:22 local — evening America/New_York, next UTCday. Not one is a merge that drifted:
2026-08-04-add-ideation-cross-reference-readiness2026-08-04-add-possibles-derivation-lane2026-08-04-adopt-neutral-utility-pack2026-08-04-implement-avatar-client-lab2026-08-06-add-opendox-project-header2026-08-06-add-project-scoped-selection2026-08-06-add-proposal-origin-contract2026-08-09-qualify-avatar-brokered-call-feasibility2026-08-25-add-dispatch-credential-contract2026-09-04-add-chain-anchoringTwo corroborations from outside this branch that the walk attributed the right
commits:
66d11a24's own subject is "Archive add-chain-anchoring … (#669)"landing at 00:36 UTC, the time this lane's record of #669 carries; and
01198ccearchived two changes in one commit, which is why rows 7 and 8share a sha — the many-directories-one-commit shape occurring naturally. The two
+08:00rows are visibly a different fact:746be44flands at 10:18 UTC on2026-07-02, the same UTC day it was committed, six days after the
2026-06-26names it carried in — renamed, not archived, and not an importeither (see the fix round).
Every scalar is quoted, the rule
_render_rowalready settled on for theledger beside it: unquoted
2026-06-26is adateto YAML and not a string, anall-digit object name would be an int, and one quoting rule is easier to keep
right than a per-key judgement.
adding_commitis the full 40-characterobject name and an abbreviation is refused — this record is a citation, and an
abbreviation is ambiguous by construction. A directory dispositioned twice
is refused by name: the entries are a sequence, so the strict loader's
duplicate-KEY refusal does not reach them, and last-one-wins would silently
apply whichever decision the file ends with.
Where the record lives, and why this is not an OpenSpec change
It is not canon. It sits under
tests/sequenced_after/besidecorpus-ledger.yamlbecause it is the same kind of object — a machine-readrecord of MEASURED FACTS that the validator consults — and the ledger is itself
not under
openspec/specs/. Nothing here adds, modifies or removes arequirement; the arm enforces the archive-date rule
document-lifecycle.mdalready states, and the record is its measured input. No
openspec/pathappears in the diff.
Verification
All on the live corpus at this branch's head.
Plain run — green, 0 undispositioned:
--strict-archive-dates— both arms report; the new one passes:Before this branch the run returned at the first arm's failure and the second
never printed. The 124 are the known opt-in drift
--strict-archive-datesalready reported on
main; this branch neither adds to them nor removes one.--ledger-diff— rows unchanged:Tests:
The 40 are
tests/sequenced_after/test_archive_commit_dates.py, and thefixtures are real git repositories with controlled commit dates
(
GIT_AUTHOR_DATE/GIT_COMMITTER_DATEcarrying offsets) — the whole arm is astatement about history, and a fixture that faked the walk would assert only
that the fake was read.
23:30 -01:00on the 4th is00:30 UTCon the 5th,which is the defect's actual shape and the reason the comparison converts rather
than slicing the timestamp string.
Covered: one-day-early → finding; dispositioned → silent; equal → silent; stale
disposition (agrees / directory gone / wrong sha / wrong date) → finding; record
missing → exit 2; record unreadable (6 shapes) → exit 2; duplicate entry →
refused by name; abbreviated sha → refused; initial-import shape (two
directories, one commit, plus a later touch that must NOT win) → attributed
correctly; uncommitted directory → skipped; a file directly under
archive/dates nothing; non-git tree → NOT RUN; nested tree → NOT RUN; shallow clone →
NOT RUN;
enforcement: warning→ printed, verdict unchanged; strict overridesthe dial upward; both arms report on one run; CANNOT RUN wins over the first
arm's failure; a failing
git log→ CANNOT RUN exit 2, not a silent pass;an unanswerable shallow probe fails closed; the decline cases are a
subclass; a rename inside
archive/is cause 4, is any distance wide, and adisposition citing the rename commit is its lawful repair; rename detection
would hide the directory from the arm entirely (measured on the same fixture,
which is why
--no-renamesstays); the record names all four causes, and so dothe module, the CLI help and the lifecycle doc. The two git-failure tests are
driven by a
gitshim that delegates to the real binary except for oneargument, so the branches are exercised rather than asserted.
Mutation checks:
if name in dispositions.entries: continue)if day != dated→ never)Each mutation was applied to
scripts/sequenced_after.py, run, and reverted froma pristine copy (md5 compared); the file is green again at the end (40 passed).
doc-health — unchanged:
92 findings each side; the normalized finding sets diff IDENTICAL (only the
repo=token differs, being the directory name). Re-measured after the fixround against both
origin/mainand this PR's previous head60fe7647; theonly delta anywhere in the report is the governance word count (+88 words, the
lengthened
document-lifecycle.mdparagraph), and canon share is unchanged at39.1%. The control was a detached worktree created outside this clone.
The arm's timing on the live corpus (best of 7, 144 directories):
The whole plain run goes from 0.41 s to 0.56 s wall.
Fix round (adversarial review)
Head
ae179edc. Two majors, one minor and one note — all four taken, eachre-measured here before it was acted on, plus two review rounds on the fix round
itself (Copilot: a docstring wrap broken to 115 columns by the CAUSE 4
insertion; Codex P2: the cause-4 set was pinned by equality, forbidding the very
future entry the header grants — both taken, threads replied and resolved). The
comparison and the
--no-renameschoice are unchanged; nothing underopenspec/is touched; the ledger is untouched; no archived directory istouched.
MAJOR 1 — rows 1–2 called a rename a repository import
Measured, in this checkout:
So
746be44fis neither an import nor a merge: it is a single-parent committhat renamed both directories out of their
-openworkflownames on2026-07-02. The names are correct. Their archive acts —
484042deandd7b66d72, both on 2026-06-26 UTC — agree with the2026-06-26the namescarry, and the disagreement the arm reports is an artefact of
--no-renamesattributing a rename's destination to the rename commit.
Taken (
e4206845): bothfactvalues now state the measured cause, each citingits own archive act in full (
adding_commit,ruled_byandcited_tounchanged — the schema has no field for a second commit, and the header's
vocabulary field is
fact); the table and the sentence above are corrected; andtest_EVERY_CAUSE_4_DISPOSITION_CITES_A_RENAME_AND_AN_AGREEING_ARCHIVE_ACTre-measures both halves — the rename out of
git show --name-status -M, thearchive act's UTC day out of
git log, plus the parent count and the root — sothe corrected entry is checkable rather than prose. It is written over the
record, not against the two known names, so a later cause-4 entry meets the
same standard rather than escaping the check (Codex round 2). The old
expected-fact set is gone from the live-record test.
MAJOR 2 — a fourth cause of the shape existed and was unnamed
A rename of an archived directory inside
archive/. Proven on a fixture(
_renamed_inside_archive): archive act 2026-08-01,git mva month later.The record header, the module, the CLI help,
docs/document-lifecycle.mdandthe pin test all said "three". All five now name four, and the pin test asserts
the fourth in all five places — because a cause named in one of them and
missing from the others is exactly how a rename came to be recorded as an
import. Three new fixture tests carry it: the finding and its distance, the
lawful cause-4 disposition, and the measurement showing rename detection would
hide the directory entirely.
The
--no-renameschoice stands, and the trade is now written down where thechoice is made: a finding a disposition can answer beats a directory the gate
cannot see.
MINOR — the live-record test forbade the entries the header permits
It asserted the fact set by exact equality and a hard twelve — which
forbids in the suite exactly the lawful future entries (causes 2, 3, 4) the
header grants, the same defect Codex P2 found one level up. Now: the known facts
must be present, every entry's
factmust be a non-empty string, the tenclock rows are still exactly one day early, and the count is a lower bound.
test_THE_LIVE_PLAIN_RUN_IS_GREEN_WITH_ZERO_UNDISPOSITIONEDreads the countfrom the record instead of pinning
12, and the cause-4 set is a subsetrather than an equality (Codex round 2 — demonstrated: with a synthetic third
cause-4 row the equality is
Falseand the subset isTrue). Cause 1 stayspinned at ten, deliberately, with the reason written beside it: the header
states cause 1 cannot recur through the wrapper, which has owned the clock at
the archive act since #797, so an eleventh clock row means the wrapper was
bypassed and should red rather than pass.
NOTE —
_git_shimshutil.which("git")was interpolated into a/bin/shscript unquoted; acheckout under a path with a space would build a shim that execs the wrong
thing.
shlex.quoted.Scope
scripts/sequenced_after.py,scripts/validate-sequenced-after.py,tests/sequenced_after/test_archive_commit_dates.py(new), the one record filetests/sequenced_after/archive-date-dispositions.yaml(new), and one paragraphin
docs/document-lifecycle.mdbeside #797's. No archived directory isrenamed or touched; nothing under
openspec/specs/; no ledger row; notcontracts/openspec-cli-pin.yaml. Noopenspec/path in the diff, so no Rule 6window.
No OpenSpec change — plain fix per the #638 precedent, on Brett Heap's word
2026-09-08.
Closes #812
🤖 Generated with Claude Code
https://claude.ai/code/session_01XPt6t1VcNVB5yGzQGwWUFi