Skip to content

A disposition's cited_to path must resolve: the pin-registration check gains the arm, and the three citations #834 left dangling are repaired - #842

Merged
brettheap merged 3 commits into
mainfrom
fix/cited-to-paths-resolve
Sep 9, 2026
Merged

brettheap merged 3 commits into
mainfrom
fix/cited-to-paths-resolve

Conversation

@brettheap

@brettheap brettheap commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

Lane: openxfactory-1 (openXfactory-1)

Continuation: the first author died on a rate limit at c599c904; continued
from the branch.
Its last words were that the bench's two findings "are real,
and they share a root: the last-token rule" — and it was right about both. The
rewrite is 5ab762ca, and the § THE REVIEW BENCH, AND WHAT THE ROOT ACTUALLY
WAS
section below is the whole of what changed after c599c904.

Continuation 2: the red pytest-suite at 5ab762ca is MEASURED, and it is
not this branch's.
The second author died mid-work; the third re-ran the
branch's own verification (53 passed, validator exit 0, three files, unchanged
head 5ab762ca — nothing on the branch needed repair) and traced the required
check's red to the codexFactory organization transfer. § THE RED
pytest-suite, AND WHOSE IT IS
at the bottom is the whole of what continuation
2 adds; no commit.

The defect

A dispositions[] entry in contracts/openspec-cli-pin.yaml ACCEPTS one
ERROR-level finding of the pinned OpenSpec CLI, and the pin's header rests the
whole mechanism on one sentence:

A DISPOSITION WITHOUT A CITATION IS REFUSED, not ignored. cited_to: is
required and must be non-empty … An uncited exception is the thing this estate
refuses everywhere else it appears.

scripts/validate-openspec-cli-pin.py enforces that the field is a non-empty
list and PRINTS its members into the disposition report a reviewer reads. It
never opens one. PR #834 renamed prepare-openspec-1.12-readiness to
prepare-openspec-1-12-readiness; two cited_to citations went on naming the
old path; validate-openspec-cli-pin.py --all --no-cache exited 0 before AND
after the rename; and the drift was caught by a human reading a diff (#834's
body, and Copilot's independent finding there). A citation nobody can open is a
suppression with a footnote, and the footnote is the only difference the header
rests the mechanism on.

Measured, on the pre-repair tree: the arm reports two findings and exit 1.
That is TWO and not three. The issue counted three occurrences of the stale
path; two are cited_to values in the pin, and the third is
scripts/validate-openspec-cli-pin.py:114's docstring — vendored byte-identical
into three sibling repositories, deliberately untouched here, its citation
history. The two codexFactory -qualified citations of the same file name
codexFactory's corpus, not this one, and this PR makes no claim about them.
Re-measured on the rewritten classifier: still exactly those two.

The header rule, measured

Grammar. The pin documents exactly this much about the field: "cited_to:
is required and must be non-empty" (header § A DISPOSITION WITHOUT A CITATION
IS REFUSED
). The whole of the rest is its own reader's production —
^ - (\S.*)$, the remainder of the LINE, verbatim, one citation per line,
whose members it deliberately never parses because flattening them "would make
the reader guess a delimiter that a citation could itself contain" — and that
line is also exactly what its disposition report PRINTS for a human to open.
So the line is the citation, and the line is what this arm classifies. There
is no declared path, URL or reference grammar beyond that, so the arm enforces
that and nothing more.

Permission to repair a recorded disposition. Searched the header for
disposition, recorded, never edited, immutable, append-only, frozen,
amend, once recorded: there is no rule that a recorded disposition is never
edited
(re-run by the continuing author, not inherited). What the header does
say is that entries are ADDED by a human reading ("a second finding needs a
second reading by a human"), RE-DERIVED at every bump ("every bump RE-DERIVES
the list rather than inheriting it"), DELETED when their finding goes stale
("this pin must fail until its entry is deleted") or on rollback ("a rollback
deletes the dispositions with the version"), and must carry a citation and an
authority. Repairing a pointer touches none of those three refusals (cited_to
stays non-empty, the authority is unchanged, no two entries cover one finding).
openspec/specs/neutral-product-pin/ never mentions dispositions;
govern-archived-record-edits governs the ARCHIVE tree and this is a live
contract member. The manifest's own note that "hand-edit protection is already
carried by the merge-gate floor, which names the pin a never-clearable path" is
a REVIEW requirement on such an edit, which this PR is. So the repair is
permitted, and it is in this PR.

The arm

In scripts/validate-pin-registrations.py (#828) rather than in a checker of
its own or in the vendored entrypoint: this is that file's own failure mode one
level down — a value the register publishes and nothing compares — and a check
added to the vendored validator grows the re-vendor debt for a question that is
openxFactory's alone (that file's § WHY A CHECKER OF ITS OWN already rules
both out for the same reason).

For each registered type: pin file it reads the cited_to: LINES out of the
pin's bytes, ALIGNS them one-to-one and in file order against the citations
yaml.safe_load parsed (so a finding can name the entry and the item it belongs
to), reads every machine referent of every line, and resolves the ones that name
an unqualified repo-relative path through the same containment helper the
registered path and consumer_entrypoint: go through:

finding wording
dangling FAIL <row>: dispositions[N] (<item>) cites `<path>`, but no such path is in this tree — a disposition rests on its citation, and a citation a reader cannot open is a suppression with a footnote
host-absolute / .. FAIL <row>: dispositions[N] (<item>) cites `<path>`, which is an ABSOLUTE path… — a citation is opened from the pinned checkout, and a path outside it is unreadable there
bytes and structure disagree FAIL <row>: `<pin>` carries N `cited_to:` line(s) in its bytes and M parsed citation(s) in its structure, so this arm cannot say WHICH disposition a line belongs to — it refuses the whole field rather than attach findings to the wrong entry

The classifier rule, stated. A line's referent region is the text before the
em-dash gloss (a § section and a trailing parenthetical cut with it); EVERY
token of that region is read, and the form decides the kind, in this order:
:// is a URL, a # is a forge reference (tested before the path rule, because
owner/repo#12 carries a slash too), a / is a repo-relative path, and a token
with no / names no directory and is not read as one. A path is another
repository's only when a repository name the pin ITSELF declares in its repo:
fields sits immediately in front of it
— the same field its verifier matches
against a tree identity read from git config --get remote.origin.url — and a
name meaning THIS repository (OWN_REPOSITORY_SPELLINGS, restated from
scripts/doc_health/pin_class.py and pinned equal to it by a test) qualifies
nothing away.

Everything else is recognised-and-unresolved, counted, and never a finding —
a URL, a #N / owner/repo#N forge reference, a path qualified to another
repository (codexFactory openspec/changes/…), a line with no machine referent
at all (council LA-A1). Inventing a reference grammar canon does not carry
would make this checker the author of a rule instead of the reader of one. The
counts are printed so a pass cannot be vacuous:

OK openspec-cli-pin: 4 disposition(s) carry 21 citation(s) naming 17
referent(s) — 9 name a path in this tree, 0 a URL, 3 a forge reference, 5 a
path qualified to another repository; 4 citation(s) name no machine referent;
7 line(s) the two readers read differently (5 truncated at a `#`, 2 read as a
single-key mapping), classified from the line; every in-tree path resolves

Deliberately not asserted: the :<line> suffix (stripped, not checked — a line
number drifts with every edit above it while the citation still names the right
document, and the pin documents no line grammar); the GLOSS (prose carries
slashes that are not paths — and/or, a date, §5.1/§12.0 — and no citation in
this corpus writes its referent after the dash); a qualifier that is not
adjacent to its path, and a repository the pin never declares (whose path is
therefore resolved here and reported missing — a loud finding a reader answers by
declaring the repository, over a silent pass on a path nobody opened); a URL's
reachability, a forge reference's existence, or another tree's path;
cited_to's presence and shape (the pin's own verifier refuses that as
pin-disposition-malformed, in its own words, and restating another checker's
finding in different words is what § 5.4 refused when it kept these questions in
separate families); and dispositions[].path, which the entrypoint reconciles
against a report this checker does not have. .exists() and not .is_file(),
because a citation legitimately names a change packet's directory.

The arm runs before the entrypoint assertions, because
consumer_entrypoint: 17 is terminal for a row and running the citation arm
afterwards would hide every dangling citation behind that one finding.

THE REVIEW BENCH, AND WHAT THE ROOT ACTUALLY WAS

Codex raised two P2 findings on c599c904. Both are real, both are reproduced
as tests, and both were one defect:
the arm read ONE TOKEN of a citation as
its referent, and read it from yaml.safe_load's VALUE where the field's
grammar, the pin's own reader and its own printed report all carry the LINE.

  1. "Resolve local paths preceded by prose." the packet at openspec/changes/foo/tasks.md was classified qualified — another
    repository's — purely for having more than one token, so check_citations
    never opened it and a rename under it exited 0. Taken: a qualifier is now
    a DECLARED repository name and nothing else, read on the token immediately
    before the path.
  2. "Reject mappings that cannot be reconstructed losslessly."
    openspec/missing.md: false came back {'openspec/missing.md': False},
    rejoined as openspec/missing.md: False, whose last token False read as
    prose while the dangling path passed at exit 0. Taken, and at the root
    rather than at the vector
    — because a lossless rejoin would NOT have closed
    it: openspec/gone.md: gone rejoins BYTE FOR BYTE and its last token is still
    gone, so the path still went unopened. Restricting recovery to provably
    lossless forms would have left that hole open.

And measuring the parser's loss surfaced a third class nobody had named,
already live in the pin:
a # is a YAML COMMENT, so three citations
(PR #444, codexFactory PR #216 twice) come back TRUNCATED to 'PR' and
'codexFactory PR' with the referent cut off — and a citation whose PATH sat
after a # would never have been opened at all. That settled the design: read
the line, not the parser's value.

The repair

The two unqualified in-tree citations (lines 390, 414) move to the landed
openspec/changes/prepare-openspec-1-12-readiness/evidence/openspec-1.12-readiness-2026-09-05.md.
Two lines; the ruling, the finding text, the authority and the reasoning are
untouched. Only the pointer moved, because only the pointer's referent moved.
The evidence FILE itself was never renamed — #834 renamed the directory — so the
dotted filename inside the path is correct as it stands.

The two grammars are WARNED, never forced, and no verdict rests on them

Seven of the pin's 21 citation lines mean one thing to yaml.safe_load and
another to the pin's own line-based reader: five truncated at a # (a comment
to a general YAML parser), two read as single-key MAPPINGS because a bare :
inside the quoted tool output (`Totals: 23 passed, 2 failed (25 items)`)
is a key/value separator. The arm names each one and the class it falls in, and
WARN lines do not move the exit code — the file's docstring says so. The
obvious fix, quoting the scalars, changes what that line-based reader CAPTURES
(its production takes the remainder of the line, quotes included) in a file
vendored into three sibling repositories: a governed repair with a re-vendor
cost, not a path a plain fix may take. Named for a successor rather than
silently passed or silently forced. Because the classification is done on the
LINE, the divergence changes no verdict either way — which is the difference
between this and the c599c904 version, where a verdict rested on it.

Verification

check result
validate-pin-registrations.py, pre-repair tree 2 named findings, exit 1 (both quoted above)
validate-pin-registrations.py, after the repair exit 0, 9 in-tree paths of 17 referents resolved, 7 WARN
validate-openspec-cli-pin.py --all --no-cache, before Totals: 102 passed, 2 failed (104 items), exit 0
validate-openspec-cli-pin.py --all --no-cache, after Totals: 102 passed, 2 failed (104 items), exit 0 — totals unchanged; the only output delta is the two cited to: lines and the run's random temp prefix
validate-manifest-digests.py OK contracts/manifest.yaml: 189 per-file digest(s) verify, before and after — the pin row carries no sha256 by D2's deliberate choice, and no release inventory digests this file, so no content-address check can break on it
pytest tests/pin_registrations tests/manifest_digests -q 53 passed (was 26 on main, 41 at c599c904): +27 tests over main, all in tests/pin_registrations/
pytest tests/openspec_cli_pin tests/pin_registrations tests/manifest_digests -q 207 passed
doc-health --single-repo . byte-identical before and after: 10 critical, 9 error, 57 warning, 16 info; 0 new regressions
the arm as first written against this file's citation tests 17 red — the bench's two findings are each pinned by a test, and so is the truncation class

Mutations — each goes red, so the suite measures the arm rather than its
presence:

mutation result
the resolve check dropped (if not target.exists(): → if False:) 8 tests red — and the PRE-REPAIR tree exits 0, which is the pre-#840 state exactly
the last-token rule restored (the region read as its last token only) 8 tests red, including the live register: a qualified path loses its qualifier and is reported missing
the parser's VALUE classified instead of the line 2 red, including the #-truncation case
the qualifier rule dropped (a foreign path read as this tree's) 5 red, including the live-corpus pin
the alignment proof dropped (zip without the length check) 2 red
containment bypassed for citations (ROOT / referent direct) 2 red
the trailing-colon trim dropped (openspec/gone.md: resolved as written) 3 red

The fixtures are the four cases the arm exists to separate, on tmp_path per
tests/manifest_digests/'s precedent: every citation form the live pin uses all
coherent; a citation naming a path that is gone; a citation malformed as a
repo-relative reference (host-absolute — naming a REAL host file, pytest.ini
by absolute path, so a checker that merely joined and asked .exists() would
report it present — and ..-escaping); and a pin carrying no dispositions:,
where the assertion does not apply and the line says so. The bench's group is
written as RAW YAML bytes rather than dumped, because a dumper quotes the defect
away before the arm sees it. Plus a live-corpus anti-vacuity pin, a live-corpus
assertion that the bytes and the structure ALIGN, a live-corpus assertion that
the two readers still disagree (so the WARN class cannot become vacuous, and
reds when a successor's re-vendor repairs it), a named assertion about #834's
rename in both directions (the dotless path present, the dotted spelling
surviving only where it is qualified to another repository), and the reader
stated at its boundaries.

Disclosure — vendored copies lag main by two more lines

The three B repos that vendor contracts/openspec-cli-pin.yaml byte-identical
(xFactory-Hermes-Install, openXwallet, Omnigent-Install) carry it at
openxFactory@44d8fbaf under their own 3-line "VENDORED from … do not edit
here" header. Their drift checks compare against that pinned commit, so they
stay green and this PR does not turn them red — but their copies now carry the
old, dangling citations once this lands on main, two lines further behind than
#826 already left them. A re-vendor to pick both up is owed on their side; named
here as a follow-on on #754, not performed in this PR.

scripts/validate-openspec-cli-pin.py is not edited — its docstring
citation of the same path is history, and it is the vendored entrypoint. No
openspec/ path is touched.

No OpenSpec change — plain fix per the #638 precedent, on Brett Heap's word
2026-09-09 ("lets do 3 item you recomend").

THE RED pytest-suite, AND WHOSE IT IS

The required pytest-suite check is RED on 5ab762ca and the cause is
estate-wide, out of this PR's scope, and already carried by another lane.

What the run says (run 34356610523, step Check out the pinned decision
core (freshness verifier only)
):

remote: Repository not found.
fatal: repository 'https://github.com/opensoft/codexFactory/' not found

.github/workflows/pytest-suite.yml:396 names repository: opensoft/codexFactory, and codexFactory was transferred to the
codeXfactory organization at about 13:1xZ today. The step is
continue-on-error by design, so the two tests/review_lane_pin/ test_floor_snapshot.py tests that need the core on disk SKIP —
TheFreshnessVerifier::test_the_snapshot_is_byte_identical_to_the_pinned_core
and TheVectorReplay::test_every_vector_replays — and the job then fails
three times over, exactly as that file's own comments say it must:
skipped=23 against EXPECT_SKIPPED: "21", plus the two BY-NAME assertions
that each verifier must have RUN AND PASSED. selected=10633 passed=10610 failures=0 errors=0: no test failed.

It is the estate's, not the branch's. pytest-suite was GREEN on this
same branch at c599c904 (run 34351689216, 12:33Z) and on every openxFactory
run through 13:09Z, and RED on every run from 13:15Z on — #847 and #848 carry
the identical red, and it is the same transfer that makes
merge-master-approval advisory-red estate-wide today.

Nothing this PR may do would clear it, and one obvious move would not even
work.
Moving EXPECT_SKIPPED to 23 is refused by the workflow's own § on
the Codex P2 finding of #569 ("the aggregate pin CANNOT cover for it") and
would leave the job red regardless, because the two verifiers are watched BY
NAME. Only restoring the checkout clears it: the workflow must name
codeXfactory/codexFactory AND mint a token for a codeXfactory
installation, since actions/create-github-app-token resolves the
installation from owner: and the mint above is github.repository_owner-
scoped. That is #801's slice B1 verbatim — "the decision-core pin, the
workflows, the operator tools" — which already carries both halves plus the
PINNED_REPOSITORY move in tests/review_lane_pin/test_floor_snapshot.py,
and is GATED on its runbook's step 1.6 (the second installation). A
workflow-only edit here would red that test; a workflow-and-test edit here
would be #801 authored twice in two lanes. Neither is this lane's to take, so
this PR takes neither and says so.

Closes #840

🤖 Generated with Claude Code

https://claude.ai/code/session_011pPD2SfAZtmh8qC3VAimXw

…gling are repaired

THE DEFECT (issue #840). A `dispositions[]` entry in
`contracts/openspec-cli-pin.yaml` ACCEPTS one ERROR-level finding of the pinned
OpenSpec CLI, and the pin's header rests the whole mechanism on one sentence:
"A DISPOSITION WITHOUT A CITATION IS REFUSED, not ignored … `cited_to:` is
required and must be non-empty", because "an uncited exception is the thing this
estate refuses everywhere else it appears".
`scripts/validate-openspec-cli-pin.py` enforces that the field is a non-empty
list, PRINTS its members into the disposition report a reviewer reads — and
never opens one. PR #834 renamed `prepare-openspec-1.12-readiness` to
`prepare-openspec-1-12-readiness`; two citations went on naming the old path;
`--all --no-cache` exited 0 before AND after; and the drift was caught by a
human reading a diff. A citation nobody can open is a suppression with a
footnote, and the footnote is the only difference the header rests on.

THE ARM, in `scripts/validate-pin-registrations.py` (#828) rather than in a
checker of its own or in the vendored entrypoint: this is that file's own
failure mode one level down — a value the register publishes and nothing
compares — and a check added to the vendored validator grows the re-vendor debt
for a question that is openxFactory's alone. For each registered `type: pin`
file it walks `dispositions[]`, classifies each `cited_to` member, resolves
every UNQUALIFIED repo-relative path through the same containment helper the
registered `path` and `consumer_entrypoint:` go through, and names a dangling,
absolute or `..`-escaping path as a finding at exit 1.

THE GRAMMAR ENFORCED IS THE ONE THE PIN DOCUMENTS, AND IT IS THIN. The header
says of the field exactly "required and must be non-empty"; the pin's own reader
admits a list of non-empty lines whose members it never parses, on the stated
ground that a delimiter "a citation could itself contain" must not be guessed.
So a URL, a `#N` / `owner/repo#N` forge reference, a path QUALIFIED to another
repository (`codexFactory openspec/changes/…`) and prose with no machine
referent (`council LA-A1`) are recognised-and-unresolved, COUNTED in the output
so a reader can see how much was measured, and never findings: inventing a
reference grammar canon does not carry would make this checker the author of a
rule instead of the reader of one. The `:<line>` suffix is stripped and NOT
checked — a line number drifts with every edit above it while the citation still
names the right document — and `.exists()` rather than `.is_file()`, because a
citation legitimately names a change packet's directory.

THE REPAIR, IN THE SAME COMMIT, BECAUSE THE HEADER PERMITS IT. Measured: the pin
carries no rule that a recorded disposition is never edited. What it does say is
that entries are ADDED by a human reading, RE-DERIVED at every bump, DELETED
when their finding goes stale or on rollback, and must carry a citation and an
authority — and repairing a pointer touches none of those three. Neither
`openspec/specs/neutral-product-pin/` (which never mentions dispositions) nor
`govern-archived-record-edits` (which governs the ARCHIVE tree; this is a live
contract member) says otherwise. So the two unqualified in-tree citations move
to the landed `prepare-openspec-1-12-readiness` path. The ruling, the finding
text, the authority and the reasoning are untouched: only the pointer moved,
because only the pointer's referent moved.

TWO CITATIONS AND NOT THREE, and the third is named rather than repaired. The
issue counted three occurrences of the stale path; two are `cited_to` values in
the pin and the third is `scripts/validate-openspec-cli-pin.py:114`'s docstring,
which is vendored byte-identical into three sibling repositories and is
deliberately not touched here — its citation is history, and the re-vendor debt
is the reason the arm did not go there either.

A THIRD THING WAS MEASURED AND IS WARNED, NOT FORCED. Two of the pin's
citations quote the tool's own output inside them (```Totals: 23 passed, 2
failed (25 items)```), and a bare `: ` inside a plain scalar makes the line a
single-key MAPPING to `yaml.safe_load` while the pin's own line-based reader
takes the whole line as one string. The arm RECONSTRUCTS the line the pin reads,
classifies that, and emits a non-failing `WARN`: quoting the scalar changes what
that line reader CAPTURES, in a file vendored into three sibling repositories,
so it is a governed repair with a re-vendor cost and not this plain fix's to
take. Named for a successor instead of silently passed or silently forced.

VERIFIED. `validate-pin-registrations.py`: 2 named findings and exit 1 on the
pre-repair tree, exit 0 after, with 9 in-tree paths of 21 citations resolved and
the rest counted by form. `validate-openspec-cli-pin.py --all --no-cache`:
`Totals: 102 passed, 2 failed (104 items)`, exit 0, IDENTICAL before and after
(the only output delta is the two `cited to:` lines and the temp prefix name).
`validate-manifest-digests.py`: OK, 189 digests — the pin row carries no
`sha256` by D2's choice and no release inventory digests this file.
`pytest tests/pin_registrations tests/manifest_digests -q`: 41 passed, was 26.
`doc-health --single-repo .`: byte-identical, 10 critical / 9 error / 57 warning
/ 16 info. Four mutations each go red — the resolve check dropped (3 tests), the
qualifier rule dropped (4), the reconstruction dropped (4), containment bypassed
(2) — and with the resolve check dropped the PRE-REPAIR tree exits 0, which is
the pre-#840 state exactly.

Refs #840 (closed by the pull request that carries this commit).

Lane: openxfactory-1
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LZG3GzLmkzpEMyzE1QwKtu
Copilot AI lite review requested due to automatic review settings September 9, 2026 12:33

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @brettheap! 👋

Your private repo does not have access to Sourcery.

Please upgrade to continue using Sourcery ✨

@brettheap

Copy link
Copy Markdown
Contributor Author

Lane: openxfactory-1 (openXfactory-1)

@codex review

Read the arm in scripts/validate-pin-registrations.py (classify_citation,
as_citation_text, check_citations) against the grammar the pin actually
documents, and press on these four in particular:

  1. The qualifier rule. A path with any preceding token is treated as
    another repository's and NOT resolved. That deliberately fails open — a
    citation written the packet at openspec/changes/foo/tasks.md goes
    unresolved. Is the fail-open right given the pin documents no grammar, or is
    there a narrower rule that still refuses codexFactory openspec/… while
    catching that?
  2. The :<line> suffix, stripped and not checked. Argued in the docstring
    as a reading aid that drifts; is that the right boundary?
  3. The WARN class for the two citations yaml.safe_load reads as a
    single-key mapping. The reconstruction is f"{key}: {value}". Does it
    round-trip in every case the pin's own line reader admits, and is warning
    (rather than failing) defensible when the repair would change what a reader
    vendored into three sibling repositories captures?
  4. Anything the arm reports that it should not, or passes that it should
    not, over the live pin's 21 citations — the counts are printed in the run
    output for exactly that comparison.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The new citation-resolution behavior is clearly scoped, uses the existing containment semantics, and is backed by thorough hermetic tests that cover both regressions and edge cases.

Pull request overview

This pull request tightens pin-registration validation by adding an additional assertion: any in-repo dispositions[].cited_to citation that looks like an unqualified repo-relative path must resolve within the current tree, preventing “suppression with an unreadable footnote” drift after renames.

Changes:

  • Extend scripts/validate-pin-registrations.py with a citation-resolution arm that classifies citation forms, resolves in-tree paths via the existing containment helper, and emits FAIL/WARN output accordingly.
  • Repair two stale cited_to references in contracts/openspec-cli-pin.yaml to point at the renamed readiness evidence directory.
  • Add a comprehensive test group in tests/pin_registrations/test_pin_registration_sweep.py covering pass/fail cases (dangling paths, absolute/.. escapes, unreadable YAML values) plus live-corpus anti-vacuity and the #834 rename invariants.
File summaries
File Description
scripts/validate-pin-registrations.py Adds citation classification + in-tree resolution checks and integrates the result into overall row coherence.
contracts/openspec-cli-pin.yaml Updates two cited_to paths to the landed prepare-openspec-1-12-readiness directory.
tests/pin_registrations/test_pin_registration_sweep.py Adds fixtures and assertions validating citation behavior (including WARN-class reconstruction) and pins the #834 rename repair.
Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c599c904e1

ℹ️ 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".

Comment thread scripts/validate-pin-registrations.py Resolved
Comment thread scripts/validate-pin-registrations.py Resolved
…gs, one root

THE BENCH FOUND TWO THINGS AND THEY WERE ONE DEFECT. Codex raised (1) that a
citation with prose before its path — `the packet at openspec/changes/foo/tasks.md`
— was classified as ANOTHER REPOSITORY'S on the strength of having more than one
token, so `check_citations` never opened it and a rename under it exited 0; and
(2) that a single-key mapping does not round-trip through `f"{key}: {value}"`, so
the admitted line `openspec/missing.md: false` came back `openspec/missing.md:
False`, whose last token `False` read as prose while the dangling path passed at
exit 0. Both are real, both are reproduced below, and both were the LAST-TOKEN
RULE — an arm that took one token of a citation as its referent, and took it from
`yaml.safe_load`'s VALUE where the pin's grammar, its own reader and its own
printed report all carry the LINE.

AND THE ROOT RAN DEEPER THAN EITHER REPORT. Measured on the live pin: a lossless
reconstruction would NOT have closed (2) — `openspec/gone.md: gone` rejoins byte
for byte and its last token is still `gone`, so the path still went unopened; and
the parser loses referents on this corpus in a second way nobody had named, since
a ` #` is a YAML COMMENT and three live citations (`PR #444`, `codexFactory PR
#216` twice) come back TRUNCATED to `'PR'` / `'codexFactory PR'` with the referent
cut off. A citation whose path sat after a `#` would never have been opened at
all. So the fix is not a better reconstruction; it is to stop reading the parser's
value.

WHAT NOW HAPPENS, AND ITS GROUND IN THE FIELD'S OWN GRAMMAR. The pin's header
says of `cited_to:` exactly that it "is required and must be non-empty"; the whole
of the rest is its own reader's production — `^      - (\S.*)$`, the remainder of
the line, verbatim, one citation per line, whose members it deliberately never
parses because flattening them "would make the reader guess a delimiter that a
citation could itself contain" — and that line is what its disposition report
prints for a human to open. So:

  * `citation_lines_in` reads the `cited_to:` LINES from the pin's bytes.
  * `check_citations` ALIGNS them one-to-one, in file order, against the citations
    `yaml.safe_load` parsed, so a finding still names the entry and item it
    belongs to. The alignment is PROVED, not assumed: if the two counts disagree
    the whole field is refused with one finding instead of classified, because an
    off-by-one would attach every finding to the wrong item and a flow sequence or
    a two-line citation is a form the pin's own reader does not admit either.
  * `read_citation` reads EVERY token of the line's referent region and decides
    the kind by FORM, in order: `://` is a URL, `#` is a forge reference (tested
    first, because `owner/repo#12` carries a slash too), `/` is a repo-relative
    path. A token with no `/` names no directory and is not read as one.
  * A QUALIFIER IS A DECLARED REPOSITORY NAME AND NOTHING ELSE, which is the
    bench's first finding answered at its root. `repository_qualifiers` reads the
    vocabulary out of the pin's own `repo:` fields — the field its verifier
    matches against a tree identity read from `git config --get remote.origin.url`
    — and only such a name, IMMEDIATELY before a path, makes that path another
    tree's. A name meaning THIS repository (`OWN_REPOSITORY_SPELLINGS`, restated
    from `scripts/doc_health/pin_class.py` and pinned equal to it by a test)
    qualifies nothing away. Two boundaries are stated rather than hidden: a
    non-adjacent qualifier is not read as one, and a repository the pin never
    declares is not in the vocabulary, so its path is resolved here and reported
    missing — a loud finding a reader answers by declaring the repository, over a
    silent pass on a path nobody opened.
  * The readers' DISAGREEMENT is still measured and named for a successor
    (`WARN`, exit code untouched: 5 lines truncated at a `#`, 2 read as single-key
    mappings), because quoting those scalars changes what the pin's line reader
    CAPTURES in a file vendored byte-identical into three sibling repositories —
    a governed repair with a re-vendor cost. But no verdict rests on it any more.

The gloss after the em dash is still not scanned, and the reason is now written
down where the cost falls: prose carries slashes that are not paths (`and/or`, a
date, `§5.1/§12.0`, the quoted `Totals: 23 passed, 2 failed (25 items)`), and no
citation in this corpus writes its referent after the dash.

MEASURED. `validate-pin-registrations.py` on this tree: exit 0, 21 citations
naming 17 referents (9 in-tree paths, 3 forge references, 5 qualified to another
repository, 4 citations naming no machine referent), 7 WARN lines, every in-tree
path resolves. On the PRE-REPAIR pin: the same two named findings and exit 1 —
unchanged from the first author's measurement, with the classifier rewritten under
it. `pytest tests/pin_registrations tests/manifest_digests -q`: 53 passed (26 on
`main`, 41 as first written). The arm AS FIRST WRITTEN fails 17 of this file's
citation tests. Mutations, each red: the resolve check dropped (8 tests, and the
pre-repair tree exits 0 — the pre-#840 state exactly); the last-token rule
restored (8, including the live register); the parser's value classified instead
of the line (2); the qualifier rule dropped (5); the alignment proof dropped (2);
containment bypassed (2); the trailing-colon trim dropped (3).
`validate-openspec-cli-pin.py --all --no-cache`: `Totals: 102 passed, 2 failed
(104 items)`, exit 0 — unchanged. `validate-manifest-digests.py`: 189 digests
verify. `doc-health --single-repo .`: BYTE-IDENTICAL to before this commit — 10
critical, 9 error, 57 warning, 16 info, 0 new regressions.

The repair of the two dangling citations stands as the first author left it, and
its ground was re-measured here rather than inherited: the pin's header carries no
rule that a recorded disposition is never edited — searched for `immutable`,
`append-only`, `frozen`, `never edited`, `once recorded` — while it does say
entries are ADDED by a human reading, RE-DERIVED at every bump, and DELETED when
their finding goes stale. Only the pointer moved, because only the pointer's
referent moved. `scripts/validate-openspec-cli-pin.py` is still not edited; no
`openspec/` path is touched.

Refs #840 (closed by the pull request that carries this commit).

Continuation: the first author died on a rate limit mid-fix-round at c599c90,
having named both findings and their shared root; this commit is that rewrite.

Lane: openxfactory-1
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_011pPD2SfAZtmh8qC3VAimXw
Copilot AI review requested due to automatic review settings September 9, 2026 13:21

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The new citation-resolution assertion is well-scoped, uses the existing containment helper, and is backed by thorough tests (including edge cases for YAML parsing divergence).

Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

@brettheap

brettheap commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor Author

Lane: openxfactory-1 (openXfactory-1)

The red pytest-suite on 5ab762ca is not this branch's, and this lane may
not clear it.
Measured, run 34356610523, step Check out the pinned decision
core
:

remote: Repository not found.
fatal: repository 'https://github.com/opensoft/codexFactory/' not found

codexFactory was transferred to the codeXfactory organization at about
13:1xZ today; .github/workflows/pytest-suite.yml:396 still names
opensoft/codexFactory, and the App token minted one job up is
github.repository_owner-scoped, so it could not read the new namespace even
under a redirect. The step is continue-on-error by design, the two
tests/review_lane_pin/test_floor_snapshot.py tests that need the core on disk
SKIP, and the job then fails three times over exactly as that file's comments
say it must: skipped=23 against EXPECT_SKIPPED: "21", plus the two
BY-NAME assertions (TheFreshnessVerifier, TheVectorReplay) that each
verifier must have RUN AND PASSED.

No test failed: selected=10633 passed=10610 skipped=23 failures=0 errors=0, margins 3543 / 3540 over the floors. This branch's own suite is
53 passed (tests/pin_registrations + tests/manifest_digests) and
validate-pin-registrations.py exits 0 on the live tree, re-run by this
author on a fresh clone of 5ab762ca.

It is estate-wide, and it is the same transfer that makes
merge-master-approval advisory-red today.
pytest-suite was GREEN on this
branch at c599c904 (run 34351689216, 12:33Z) and on every openxFactory run
through 13:09Z; RED on every run from 13:15Z on. #847 and #848 carry the
identical red.

Whose it is: #801's slice B1, "the decision-core pin, the workflows, the
operator tools", which already carries both halves the repair needs — the
codeXfactory/codexFactory rename AND a second mint scoped to a
codeXfactory installation — plus the PINNED_REPOSITORY move in
tests/review_lane_pin/test_floor_snapshot.py. It is GATED on its runbook's
step 1.6, the second installation. Moving EXPECT_SKIPPED to 23 is refused by
the workflow's own § on the #569 Codex P2 finding and would not clear the job
anyway, because the two verifiers are watched by name. A workflow-only edit
here would red that test; a workflow-and-test edit here would be #801 authored
twice in two lanes. This lane takes neither, and the PR body's § THE RED
pytest-suite, AND WHOSE IT IS
records it.

Head is unchanged at 5ab762ca; continuation 2 added no commit because
nothing on the branch needed repair.

Update, 14:01Z — main ITSELF is red for this, which settles it. The push
run on main (34358102328, head 6df21737, no pull request involved) printed
selected=10606 passed=10583 skipped=23 failures=0 errors=0 and failed on the
same skipped 23, pinned exactly 21. The trunk cannot show a green
pytest-suite today either, so "when green" is not a condition any openxFactory
branch can meet until the transfer repair lands.

@brettheap

Copy link
Copy Markdown
Contributor Author

Lane: openxfactory-1 (openXfactory-1)

@codex review

Your two P2s were on c599c904; the arm was REWRITTEN at 5ab762ca and you
have not seen the rewrite.
Both findings were taken at one root — the arm no
longer classifies yaml.safe_load's VALUE or a single last token; it reads the
cited_to: LINE from the pin's bytes (citation_lines_in), aligns the lines
one-to-one in file order against the parsed citations, and reads every token of
each line's referent region (read_citation), deciding the kind by form:
:// → URL, then # → forge reference (before the path rule, since
owner/repo#12 carries a slash), then / → repo-relative path. qualified
now means only that the token IMMEDIATELY before the path is a repository name
the pin itself declares in dispositions[].repo
(repository_qualifiers()), with OWN_REPOSITORY_SPELLINGS qualifying
nothing away.

Press on the rewrite, in particular:

  1. The alignment proof. check_citations refuses the whole field when the
    byte-read line count and the parsed citation count disagree, rather than
    attaching findings to the wrong entry. Is the refusal complete — is there a
    cited_to shape the pin's own reader admits where the two counts AGREE and
    yet the pairing is still off by position?
  2. citation_lines_in as a reader of YAML by bytes. It reproduces the
    pin's own production ^ - (\S.*)$. What does it do to a form the pin
    could legally carry that the production does not anticipate — a flow
    sequence, a block scalar, a differently-indented cited_to:, two pin files
    in one register? Should any of those be a finding rather than a divergence?
  3. The qualifier rule's two stated boundaries (docstring): a qualifier not
    adjacent to its path is not read as one, and a repository the pin never
    declares is NOT in the vocabulary, so its path is resolved here and reported
    missing. The second deliberately errs loud. Is either boundary wrong for the
    citations the live pin actually carries?
  4. The # truncation class, found while measuring the parser's loss: three
    live citations come back truncated to 'PR' / 'codexFactory PR'. It is
    WARN, not FAIL, and no verdict rests on it because classification is done on
    the line. Is warning the right class given the repair (quoting the scalars)
    changes what the line reader CAPTURES in a file vendored byte-identical into
    three sibling repositories?
  5. Anything the arm reports that it should not, or passes that it should
    not
    , over the live pin's 21 citations — the counts print for exactly that
    comparison: 21 citation(s) naming 17 referent(s) — 9 name a path in this tree, 0 a URL, 3 a forge reference, 5 a path qualified to another repository; 4 name no machine referent.

Note for the read: the required pytest-suite red on this head is the
codexFactory organization transfer breaking a cross-repository checkout,
estate-wide and unrelated to this diff — the comment above it measures that.

@brettheap

Copy link
Copy Markdown
Contributor Author

Lane: openxfactory-1 (openXfactory-1)

Addendum — measured, and it decides what "green" can mean today: the
credential the repair needs does not exist yet.

merge-master-approval fails on this same head for the SAME cause, in its own
words: Decision core unreadable — opensoft/codexFactory@4b12ba83 could not be checked out with the repo identity. Advisory check: this blocks no merge. The
difference between the two reds is only that one declares itself advisory and
pytest-suite is REQUIRED and fails closed by design.

And the second half of the repair is not yet installable:

$ gh api /orgs/opensoft/installations
145372182  4253636  openxfactory  all        <- the App this workflow mints
$ gh api /orgs/codeXfactory/installations
159936353  4312542  codexfactory  all
159941221    12526  sonarqubecloud  all      <- no openxfactory installation

actions/create-github-app-token resolves an installation from owner:, so
App 4253636 cannot read codeXfactory/codexFactory until it is INSTALLED on
that organization with Contents: read — #801's runbook step 1.6, a human step
that has not happened. Renaming the repository: alone would not clear this
check; #801's own second-mint comment says as much.

So no openxFactory pull request can show a green pytest-suite until step 1.6
plus #801 slice B1 land. What is true of THIS diff is unchanged and stands on
its own evidence: 53 passed on its own suites, validate-pin-registrations.py
exit 0 on the live tree, openspec-cli-pin (the pin's own entrypoint, in CI)
SUCCESS on 5ab762ca, selected=10633 passed=10610 failures=0 errors=0 in the
red run itself, and every other check SUCCESS. Landing it before the transfer
repair is a bypass decision for Brett, on the record, not something this lane
can measure its way out of.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5ab762caf4

ℹ️ 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".

Comment thread scripts/validate-pin-registrations.py Resolved
Comment thread scripts/validate-pin-registrations.py Resolved
@brettheap

Copy link
Copy Markdown
Contributor Author

Lane: openxfactory-1 (openXfactory-1)

Brett's word reaffirmed 2026-09-09T15:02Z: "land 842 and 846 when green" (after the App install on codeXfactory; ruling "Hold until main is green again" lifts when main's pytest-suite rerun 34358102328 reports success). Landing guard on this PR: six required checks green on the frozen head; merge-master-approval is advisory, red for the org-move cause, tolerated and disclosed.

Fresh merge ref so pytest-suite runs the repointed pinned-core checkout;
no content change to the PR's own diff.

Lane: openxfactory-1
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Copilot AI review requested due to automatic review settings September 9, 2026 15:43
@brettheap

Copy link
Copy Markdown
Contributor Author

Lane: openxfactory-1 (openXfactory-1)

HEAD MOVED BY MERGE-FROM-MAIN (2026-09-09T15:44Z): 5ab762ca → d142ea5a. PR #801 (slice B1, the workflow repoint to codeXfactory/codexFactory) merged at e86eca35; a re-run would replay the old merge ref, so main was merged in for a fresh one. The merge commit carries no content of its own — this PR's diff against main is the same 3 file(s) as before. Codex's 14:08Z findings on 5ab762ca are dispositioned to #851 (0 unresolved threads). Landing guard runs on d142ea5a when its pytest-suite and main's (run 34371838117) are green, on Brett's word "land 842 and 846 when green".

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

It introduces non-trivial new parsing/validation behavior in a gating validator (plus a large new test surface), so it merits final human review of edge cases and output semantics before approval.

Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 1
  • Review effort level: Lite

Comment thread scripts/validate-pin-registrations.py Resolved
@brettheap

Copy link
Copy Markdown
Contributor Author

Lane: openxfactory-1 (openXfactory-1)

FROZEN + LANDING PROVENANCE — 2026-09-09T16:11:52Z. Head d142ea5a (merge-from-main of the reviewed head 5ab762ca, no content of its own). Brett's words: "merge 842 and 846 when green, then ratify the 729 packet" (2026-09-09) and "land 842 and 846 when green" (reaffirmed 2026-09-09 ~15:1xZ); ruling "Hold until main is green again" satisfied — main's newest decided pytest-suite is success at e86eca35 (run 34371838117, skipped 21; the org-move cause cured by #801). Main has since moved to 256b1950 on other lanes' ideation-dashboard merges whose suites are pending or superseded-cancelled, not red, with files disjoint from this PR (decided=success@e86eca3 pending=1 cancelled_newer=3). Guard on live values: six required checks SUCCESS; merge-master-approval = SUCCESS (advisory); unresolved review threads 0 (Copilot's merge-head round dispositioned on the threads); closingIssuesReferences = #840 and the body's closing keywords name exactly that; no other lane's LANDING open on openxFactory main. Codex's two P2 findings on 5ab762ca are dispositioned to #851 (accepted, deferred; threads resolved). Admin merge with provenance: the PR is authored as brettheap and a self-approval cannot clear the review requirement (B2 pattern).

@brettheap
brettheap merged commit 4cdadd5 into main Sep 9, 2026
10 checks passed
@brettheap

Copy link
Copy Markdown
Contributor Author

Lane: openxfactory-1 (openXfactory-1)

LANDED — lane openxfactory-1, 2026-09-09T16:12:13Z, PR #842 → 4cdadd56 on opensoft/openxFactory main. Origin #840: CLOSED.

brettheap pushed a commit that referenced this pull request Sep 9, 2026
RATIFIED 2026-09-09 by Brett Heap (openxFactory operator authority), in session,
verbatim: "merge 842 and 846 when green, then ratify the 729 packet"
(2026-09-09T13:13:41Z, recorded on openxFactory issue #729). THE WORD IS ONE
UTTERANCE OF THREE CLAUSES IN ORDER, AND THE ORDER WAS KEPT: PR #842 merged
4cdadd5 at 16:11:57Z (closing #840) and PR #846 merged 183d1b4 at 16:12:40Z
(closing #833), both green after #801 cured the codexFactory org-move red; this
is the third clause. The earlier "author the 729 packet"
(2026-09-09T12:32:46Z) stays recorded as the ORIGIN of the authoring.

THE VETO POINT WAS PUT AND WAS NOT TAKEN. design.md D1 — option A (a
reason-quoted code span reported only where it matches EXACTLY a unit of the
requirement's basis that the block does not carry and that no marker declares
removed) against option B (any code span standing inside a reason, the remedy
shape issue #729's own body proposed) — was carried in the pull request body, in
tasks.md § 1.2, in the README row and on issue #729, with B written out beside A
and its four costs MEASURED. A is RATIFIED AS DESIGNED, ground two included, and
so is the narrowing D5 adds to the ruling's literal wording ("and that no marker
declares removed", narrower in the SILENT direction), which was disclosed on
#729 at 14:22Z — before the act the word made conditional on #842 and #846
landing green. A veto of A would have been a veto of GROUND TWO ONLY; ground
three rested on no predicate choice.

WHAT MOVES. proposal.md, design.md and tasks.md carry Status: ratified with
EXACTLY ONE citation line each (Ratified: in the proposal's front matter,
Ratified by: in the other two), which is what ratified-provenance counts.
.openspec.yaml gains approved_by + approved_on BESIDE the drafting provenance it
was authored with — kind and id unmoved, the addition-not-rewrite shape
add-drafted-proposal-origin defined, and the shape the archive gate's
origin-retention arm reads, which is why the status flip and the approval pair
move in ONE commit. The README OpenSpec Records row flips. Two records are
captured beside the packet: review/ratification-2026-09-09.md and
review/verification-2026-09-09.md.

TWO DISCLOSURES CARRIED INTO THE RECORD RATHER THAN LEFT TO BE FOUND. (a)
families.FAMILY_RESOLUTION line 117 has carried modified-block-currency as
CONTESTED since the flip of 2026-08-31 (#357) and that table has no per-class
grain, so issue #729's "not contested" premise was stale; the packet claims NO
exemption and states the inheritance plainly (design.md D7), and the MODIFIED
block carries canon's now-false "deliberately absent from FAMILY_RESOLUTION"
paragraph BYTE-FAITHFULLY BY NECESSITY — a MODIFIED block restates canon as
canon states it and this packet replaces exactly one sentence — recorded as
residue at tasks.md § 5.3. (b) #719's promoted Removed from canon marker names a
sentence canon no longer carries, so ground three would fire on it; it is
deliberately NOT restated, on this requirement's own rule that a marker is not a
carriage unit in either direction, and the AMENDED BY note says so in terms.

WHAT DOES NOT MOVE. No promoted canon is touched, no code and no test moves, no
ledger row moves (a row's derived keys read no lifecycle status), and § 5.2–§ 5.7
stay UNTICKED — the archive is a separate act on merged-plus-green realization
evidence and on a separate word, so #729 closes at archive and not at this
landing, which is why this pull request carries no closing keyword.

VERIFIED ON THE RATIFIED TREE, every number re-derived after the encode and with
both records in the lifecycle scan set: openspec validate
amend-marker-defect-reporting --strict valid; --all --strict 100 passed / 3
failed with the failure SET byte-identical to origin/main 183d1b4's same three
(disposition-codexfactory-declared-renames,
pin-openspec-cli-dependency-closure, spec/repo-boundary-governance) and none of
them this packet's; the pinned 1.12 entrypoint 1 passed / 0 failed clean;
proposal-support verify ok; sequenced_after passed (42 active, 9 declaring) with
the ledger consistent (190 rows) and ZERO rows moved; scope_globs passed;
doc-health --family modified-block-currency 0/0/0/8+1 = 9 info, finding lines
IDENTICAL to the origin/main control; doc-health --single-repo 10 critical /
8 error / 57 warning / 16 info with the finding-line diff against the
PRE-RATIFICATION branch EMPTY and the only line differing from origin/main's
being another change's pre-existing "missing status header" that #847 archived
out of the active scan set on main after this branch's last merge; the family
names this change ZERO times; pytest tests/doc-health 1646 passed
(test_modified_block_currency.py 139, the two touched files 178).

A MERGE FROM MAIN AND A RE-MEASURE ARE OWED AT LANDING. The branch's last merge
took e86eca3 (#801) at 15:44Z and #842/#846/#847 landed after it, so this tree
does not carry them; verification-2026-09-09.md § 9 states in advance which
figures move when the merge is taken.

Refs #729

Lane: openxfactory-1
Co-Authored-By: Claude Fable 5.1 <[email protected]>
brettheap pushed a commit that referenced this pull request Sep 9, 2026
…e house's (#863 bench)

Copilot on PR #863: `_BLOCK_SCALAR_KEY` took an identifier-shaped key
(`[A-Za-z_][A-Za-z0-9_]*`), which is this corpus's house style and not YAML's. A
hyphenated `INV-2: >-` or a quoted `"a: b": >-` opens a folded scalar just as
well, and its body would have been walked as STRUCTURE — the decoy class this
change exists to close, reintroduced through the key spelling.

The key is now any plain scalar up to the `: ` separator or a quoted one, every
chomping/indent indicator is admitted in either order, and a trailing comment on
the header line is admitted because YAML admits it. ONE BOUNDARY IS DELIBERATE
and is stated where the pattern is: a KEYLESS block scalar (`- >-` as a whole
sequence entry) is not matched, because a line of that shape inside an open
`cited_to:` list is a CITATION under the pin's own production and must be read as
one. Such an entry cannot hide a decoy either — it is not a mapping, so it
contributes no parsed citation while its body's lines bind to its entry index,
and the per-entry comparison refuses the field.

Copilot's second half — `key:>-` with no space — is not taken: without a space
after the colon YAML reads the whole thing as a plain scalar, so there is no
block scalar there to skip.

`test_a_block_scalar_is_recognised_by_yamls_key_spellings_not_one_houses` pins
the table in both directions and the hyphenated decoy end to end. 60 passed; the
live pin's verdict is still byte-for-byte unchanged.

Refs #842.

Lane: openxfactory-1
Co-Authored-By: Claude Fable 5.1 <[email protected]>
brettheap pushed a commit that referenced this pull request Sep 9, 2026
…here YAML ends it (#863 bench)

Codex on PR #863, and it is the correct half of the thread Copilot opened. The
previous cut spelled the key as "anything up to a colon", and that is not the
separator YAML uses: a key ends at a colon FOLLOWED BY WHITESPACE, so `a:b: >-`
is one key carrying an internal colon and `"a\"b: c": >-` is one quoted key
carrying both. Neither was recognised as an opener, so a folded body under either
would have been walked as STRUCTURE — the decoy class this reader exists to
close, reached through the key spelling for the second time.

The key is now read NON-GREEDILY up to the first `: ` that is followed by a
block-scalar header, which is exactly where YAML ends it, and the quoted
alternatives are gone because they were only ever a partial spelling of the same
rule. The refusals are unchanged and asserted: `- >-` inside an open list is a
CITATION under the pin's own production, `finding: 'x: y'` is a plain scalar, and
a citation whose gloss ends in `>` is not an opener.

`test_a_block_scalar_is_recognised_by_yamls_key_spellings_not_one_houses` carries
the three new spellings, two new refusals, and the hyphenated decoy re-run under
`a:b:`. 60 passed; the live pin's verdict is still byte-for-byte unchanged.

Refs #842.

Lane: openxfactory-1
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants