Skip to content

Fold Patch B into add-citation-remainder-report: signal grammar, out-of-root-link skip term, truncation predicates - #1097

Merged
brettheap merged 9 commits into
mainfrom
amend/citation-report-patch-b
Sep 18, 2026
Merged

brettheap merged 9 commits into
mainfrom
amend/citation-report-patch-b

Conversation

@brettheap

@brettheap brettheap commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

Lane: openxfactory-1

Folds Patch B into the ratified add-citation-remainder-report OpenSpec
change, on Brett Heap's word, verbatim "fold B as drafted" — recorded at
PR #1069, comment 5717459330.
This is the third fold-in word on that PR (after the bare ratification
"ratify #1069" and the two "fold them in before landing" rounds); it makes
normative the three round-nine Copilot threads that were held for a word of
their own because each puts something no earlier word had decided.

The three items

1. PRRT_kwDOTAvnrs6jYkwR (spec.md:415) — the five cross-repository
signals' matching rules.
The signals were promoted (by the first fold-in
word) named with examples rather than with grammars. The delta now fixes,
per signal, the repository-name vocabulary and its closure, the case rule,
the forge URL's boundary, the path-joined form's name boundary, the
decoration admitted around a bare qualifier word, and the parenthetical's
whitespace rule:

THE REPOSITORY-NAME VOCABULARY SHALL BE THE CLOSED SET NAMED HERE …
The set SHALL therefore be codexFactory, OpsxFactory, LedgerxFactory,
openXwallet, hermes-install and xFactory-Hermes-Install — the five
estates the measured cross-repository population belongs to, the last two
being one estate under the two spellings this corpus writes it in — and it
SHALL be CLOSED: an implementation SHALL NOT widen it, and a corpus needing
a wider set takes a RULING, exactly as the fixture-path location set does.

A NAME SHALL MATCH WITHOUT REGARD TO CASE.

(1) THE PATH-JOINED PREFIX SHALL FIRE where the citing line carries,
ending immediately before the token, a vocabulary name followed by / …
(2) THE FORGE URL SHALL FIRE where the token is immediately preceded …
http:// or https://, the host github.com, ONE owner segment, ONE
repository segment naming a vocabulary member, /blob/ or /tree/, ONE
ref segment, and / … (3) THE BARE QUALIFIER WORD SHALL FIRE where a
word inside the window … is a vocabulary member … (4) THE
CUSTODY-LOCATOR SCHEME SHALL FIRE
where the token is immediately
preceded … by the literal scheme prefix opsx: followed by one owner
segment and / … (5) THE TRAILING PARENTHETICAL SHALL FIRE where the
characters immediately following the token on the citing line are at most
ONE space, then (, then a vocabulary member under the decoration and
case rules above, then ).

No decision moves: the window (citing line plus three above), the closed
set of five signals, FLAG-never-drop and the INCLUSIVE headline are
unchanged.

2. PRRT_kwDOTAvnrs6jafy6 (spec.md:189) — the population arithmetic's
missing third skip term.
The promoted closure named two skip terms where
the population rule makes three: an entry skipped for leaving the
repository root once resolved is a tracked FILE, not the submodule gitlink
the non-file term is about, and it never reaches a decoder, so it fell in
neither bucket and the arithmetic did not close.

AND THAT CLOSURE NAMES TWO SKIP TERMS WHERE THIS POPULATION RULE HAS
THREE: AN ENTRY SKIPPED BECAUSE ITS PATH LEAVES THE REPOSITORY ROOT ONCE
RESOLVED SHALL BE COUNTED AND REPORTED IN A SKIP TERM OF ITS OWN.
…
THE COMPLETE IDENTITY SHALL THEREFORE BE: the tracked ENTRIES in scope
equal the FILES read, plus the entries skipped as non-files, PLUS THE
ENTRIES SKIPPED AS LINKS LEAVING THE REPOSITORY ROOT, plus the files
skipped as undecodable. AND THAT TERM SHALL BE PRINTED EVEN WHERE IT IS
ZERO
… A READING WHOSE ARITHMETIC DOES NOT CLOSE SHALL NOT BE PRESENTED
AS A LATER POINT IN THE SERIES.

Measured rather than assumed: the term is zero at b1df95ee and at this
branch's base, this repository tracking no symbolic link at either head —
stated anyway because an arithmetic that closes only while a class is empty
closes by luck.

3. PRRT_kwDOTAvnrs6jbfFz (spec.md:545, also :538) — the truncated
predicate and punctuation-stripped's firing condition.
The closed
vocabulary gave fixture-path a predicate on the second word and left
truncated a description ("the extraction severed mid-path") and
punctuation-stripped no firing condition at all.

AND truncated SHALL CARRY A PREDICATE RATHER THAN A DESCRIPTION …
THE REPORT SHALL CLASS A REMAINDER ENTRY truncated WHERE EVERY ONE OF
ITS OCCURRENCES SATISFIES AT LEAST ONE OF THE THREE PROBES NAMED BELOW, OR
WHERE THE TOKEN ENDS IN - AND DOES NOT RESOLVE
… (i) a longer path
on the same line ends with the token and stands in this tree; (ii) the
character immediately following the token is <; (iii) the token ends
its source line inside a string literal, the next line opens one, and the
path rejoined across the two resolves. THE OCCURRENCE RULE IS ALL,
NEVER ANY.

AND punctuation-stripped SHALL CARRY ITS FIRING CONDITION …
THE REPORT SHALL CLASS A REMAINDER ENTRY punctuation-stripped WHERE IT
STRIPPED A TRAILING CHARACTER FROM THE TOKEN UNDER THE GRAMMAR'S
NORMALIZATION, THE STRIPPED TOKEN STILL RESOLVED TO NOTHING, AND THE
truncated PREDICATE DID NOT FIRE
— AND SHALL NOT CLASS IT
punctuation-stripped OTHERWISE.

Nothing is minted, renamed or widened: the vocabulary is the same four
labels, and the truncated-wins-over-punctuation-stripped precedence this
packet already carried is unchanged, now spelled into the condition.

Counts

specs/packet-citation-report/spec.md: 43 → 63 scenarios as drafted; 68 after bench round one (three tracked-link cases, two probe-(iii) cases), 69 after round two (a dangling outside link) — the live count is grep -c "^#### Scenario:" on the head (5 requirements
throughout; one ## ADDED Requirements block; no ## MODIFIED).

Judgment calls taken "as drafted"

  • A closed five-estate vocabulary — codexFactory, OpsxFactory,
    LedgerxFactory, openXwallet, hermes-install / xFactory-Hermes-Install
    — because there is no machine-readable sibling-repository list in this
    tree to derive it from (the aggregation's .gitmodules is outside it; the
    one declared vocabulary in this tree, contracts/openspec-cli-pin.yaml
    dispositions[].repo, holds only two names). Widening the set, like
    widening fixture-path's location set, is a ruling.
  • Case-insensitive matching on the repository segment — measured, not
    assumed: codexFactory is written in six cases in this corpus (18.2%
    non-canonical) and openXwallet's lower-case spelling is the majority
    spelling, and case-insensitive matching is what
    validate-pin-registrations.py's own qualifier reader already does.
  • punctuation-stripped kept in the vocabulary with zero measured
    members
    — the class is empty in this tree (the one sentence-terminal
    full stop D0 measures sits on a token that resolves once the stop is
    gone), which is a fact about the corpus and not a defect of the
    vocabulary; the alternative (ruling it out of the vocabulary) would be
    minting-in-reverse, a decision and not a bench round's act.
  • Probe (i) moves two entries from unclassified into truncated — the
    two add-ideation-governance tokens are severed at their FRONT (the
    extraction pattern is anchored on openspec/changes/ and cannot reach a
    head written before it), so no trailing-character rule reaches them;
    design.md D4 had already ruled the probe ships as a class on its 4-of-4,
    zero-false-positive measurement.
  • The occurrence rule is ALL, never ANY — taken from fixture-path's
    own promoted occurrence rule and for its reason, not from the measurement
    itself (which states no occurrence rule for this probe); ALL and ANY give
    the same four verdicts on the measured corpus, so the choice changes
    nothing measured while closing the question.

Validators (clone root, post-merge)

  • openspec validate add-citation-remainder-report --strict →
    Change 'add-citation-remainder-report' is valid
  • openspec validate --all --strict → Totals: 109 passed, 2 failed (111 items) — the two failures are the known, pre-existing
    change/add-chain-attestation and change/add-composed-view-authoring;
    change/add-citation-remainder-report passes.
  • validate-openspec-cli-pin.py --change add-citation-remainder-report --strict → OK openspec-cli-pin: @fission-ai/[email protected] verified against its content address and every target validated --strict clean
  • proposal-support.py . verify → proposal support verification ok
  • validate-code-surface.py . → code_surface validation passed (every active declaration's head is admitted).
  • validate-sequenced-after.py . → sequenced_after validation passed (49 active changes, 17 declaring the field). (a separate, pre-existing
    archive-date-vs-commit finding on this same run names
    gate-code-surface-declarations — main's own archival commit 5dd0a8dc3,
    unrelated to this packet and reproducible on origin/main alone before
    this branch merges it)
  • validate-former-id-arrival.py . --base origin/main --head HEAD →
    former-id arrival gate passed (every packet-directory move in range is a draft's, an archive relocation, or declared).

Rule 6 landing when green; realization R1 (in progress) implements these
rules.

🤖 Generated with Claude Code

Summary by Sourcery

Make citation remainder reporting deterministic by formalizing cross-repository signal matching, completing population accounting, and defining mechanical truncation classifications.

New Features:

  • Define deterministic matching grammars and a closed repository vocabulary for cross-repository citation signals.
  • Add a dedicated, always-reported population skip term for entries whose resolved paths leave the repository root.
  • Specify mechanical predicates for truncated and punctuation-stripped remainder classifications.

Bug Fixes:

  • Close the population arithmetic for symlinks, including dangling links and entries reached through out-of-root parent links.
  • Prevent inconsistent remainder classifications caused by ambiguous tokenization and normalization rules.

Enhancements:

  • Clarify containment-based skip-term extents and lexical handling of split string literals.
  • Add scenarios covering signal boundaries, link resolution outcomes, and remainder-classification probes.

Documentation:

  • Update the citation remainder report OpenSpec design, proposal, specification, and implementation tasks with the folded normative rules.

Tests:

  • Expand the specification scenario suite with cross-repository signal, population arithmetic, symlink, and tokenization-classification cases.

brettheap and others added 4 commits September 17, 2026 16:05
…dicates

HELD FOR A WORD. Unlike the round-nine clarifications already folded at
9064fd4, none of these three threads reads a rule an earlier word decided:
each puts something NORMATIVE, so all three land only on a word that names
them and proposal.md's record carries <ORCHESTRATOR FILLS> placeholders
until one exists.

  PRRT_kwDOTAvnrs6jYkwR (spec.md:415) the five cross-repository signals
    were promoted with EXAMPLES and not with grammars, so repository-name
    vocabulary and case, forge-URL boundaries, the path-joined form,
    parenthetical parsing and the decoration around a bare qualifier word
    each let two realizations flag different entries while both satisfy
    the requirement. One SHALL sentence per signal, one scenario where
    each fires and one where it does not.
  PRRT_kwDOTAvnrs6jafy6 (spec.md:189) the promoted population closure
    names TWO skip terms where D3(a)'s rules make THREE. An entry the
    containment test skips for leaving the repository root is a tracked
    FILE and not a gitlink, and it reaches no decoder, so it falls in
    neither bucket and the arithmetic silently fails to close on exactly
    the entry class that rule exists to catch. A THIRD term is named,
    printed even at ZERO. Folding it into the non-file term is DECLINED:
    a symlink IS a file, and a tree carrying no links and a tree whose
    links were all refused would otherwise print the same number.
  PRRT_kwDOTAvnrs6jbfFz (spec.md:545, also :538) `fixture-path` was given
    a PREDICATE on the second word and the other two mechanical labels
    were not: "the extraction severed mid-path" is semantic, and
    `punctuation-stripped` names no firing condition at all, while D4's
    three measured sub-probes live only in design.md. The delta now
    carries those probes as the `truncated` predicate — (i) a LONGER path
    on the same line ends with the token and STANDS in the tree, (ii) the
    next character is `<`, (iii) the token ends its line inside a string
    literal, the next line opens one, and the rejoined path RESOLVES — a
    union with the trailing-hyphen arm already carried, under the
    occurrence rule ALL, closed against a fourth probe. One firing and
    one non-firing scenario per probe.

NOTHING THE MEASUREMENT ASSERTED MOVES ON THE PROBES. The union is what
caught 4 of 4 with zero false positives, and each token is still caught by
the probe that caught it: add-ideation-governance/{proposal,tasks}.md by
(i), both occurrences standing at the tail of a
tests/ideation-dashboard/fixtures/base-repo/… path on their own lines;
register-gate-rules-council-seats/walk- by (ii), all four occurrences
being walk-<YYYY-MM-DD>-register-act.md; and
archive/2026-08-27-add-hermes-customer-subject- by (iii),
pin_class.py:1248-1249. ALL rather than ANY is the one rule the
measurement does not state; it is taken from fixture-path's promoted
occurrence rule for fixture-path's reason and changes no verdict, every
one of the four satisfying its probe at EVERY occurrence.

AND `punctuation-stripped` IS THE HARDER HALF, BECAUSE THE CLASS IS EMPTY
HERE. A class is asserted on a REMAINDER entry and a token that resolves
is not one: D0(ii)'s single sentence-terminal full stop sits on
…/disposition-codexfactory-floor-relocation-retitle/evidence/codexfactory-floor-relocation-2026-09-10.md.,
whose stripped form RESOLVES — the cited file stands in this tree — so it
is reported RESOLVED with its normalization printed and never classed. The
promoted condition is therefore the only coherent one: the strip was
applied, the stripped token still resolved to nothing, and the `truncated`
predicate did not fire. It is NOT "the token resolved after a strip",
which would empty the class by construction rather than by corpus.

THE VOCABULARY IS THE ONE FINDING THAT COSTS SOMETHING, AND IT WAS LOOKED
FOR RATHER THAN ASSUMED. This repository carries NO machine-readable
enumeration of its sibling repositories. Three near-misses, each read and
each recorded in D3(c): xfactory-idea-routing-reference.schema.yaml's
`$defs.repository_id` DEFINES a repository identifier as an
aggregation-relative `.gitmodules` submodule path — a file that lives in
the AGGREGATION and not here — and constrains only the path SHAPE;
contracts/openspec-cli-pin.yaml's `dispositions[].repo`, the one DECLARED
vocabulary in this tree, holds TWO values and cannot name four of the five
estates the evidence's cross-repository tokens belong to; and
contracts/policies/repository-identity.yaml is a former-to-current
transfer map with one row. So the set is stated in the requirement, CLOSED
at the five estates the evidence names, widened only by a RULING. Both
alternatives are costed in D3(c).

THE CASE RULE IS MEASURED. Over D3(a)'s own population `codexFactory` is
written in SIX cases (3,359 canonical, 407 lower, 334 codeXfactory, and
three more) and `openXwallet` is written in LOWER case more often than in
its canonical one (1,411 against 785), so exact-case matching would drop
about 18% of one estate's occurrences and the MAJORITY spelling of
another's. Case-insensitive is also what read_citation already does. The
decoration set is _TOKEN_DECORATION widened by `*` and `_`, the evidence's
own § 1.3 choice for a Markdown corpus. The own-repository exclusion is
measured too: every trailing `(RepoName)` parenthetical after an
openspec/changes/… token in this tree names `openxFactory`. And the third
skip term is measured ZERO: `git ls-tree -r <head> | awk '$1=="120000"'`
returns 0 at b1df95e (5,466 = 5,415 + 47 + 4 gitlinks) and 0 at 9064fd4.

Scenarios 43 -> 63; requirements 5, unchanged; one ADDED block, no
MODIFIED. design.md D3(a) records the missing term and its measurement,
D3(c) the grammar and the vocabulary search, D4 the two class predicates
and the empty-class finding; tasks.md 1.12 and 1.13 mark all three held
and their boxes unmoved. NO DECISION MOVES: the window is still three
lines, the signal set is still those five in D3(c)'s order, the
population's three exclusions and its containment rule read as before, the
class vocabulary is the same four labels with the same precedence, and
FLAG-never-drop, the INCLUSIVE headline and the ADVISORY verdict are
untouched.

Lane: openxfactory-1
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Fills the three ORCHESTRATOR FILLS placeholders in the Patch B
Folded-in record (date 2026-09-17, word "fold B as drafted", PR #1069
comment 5717459330), re-spells the header from "Folded in — HELD, NOT
YET ON A WORD:" to "Folded in:", removes the held/should-be-moved
sentences, and relocates the record to sit directly after the second
existing Folded-in record.

Remaining before this branch is PR-ready: design.md D3(a)/D3(c)/D4
amendment records still read HELD and need the same re-word; README.md
OpenSpec Records bullet and tasks.md fold-in line are not yet updated;
full validator suite has not yet been run on this state; no PR opened
yet. Pushed now on an imminent-handoff instruction from the
orchestrator so no work is lost mid-task.

Lane: openxfactory-1
Co-Authored-By: Claude Fable 5.1 <[email protected]>
…ap's word

design.md D3(c) (PRRT_kwDOTAvnrs6jYkwR) and D4 (PRRT_kwDOTAvnrs6jbfFz) amendment
records read HELD FOR A WORD; re-worded to the landed form the b332a51 and
Patch A records use, naming Brett Heap's word "fold B as drafted" and PR #1069
comment 5717459330. tasks.md's mirrors of the same two records, inside § 1.12
and § 1.13, are reworded identically. design.md's D3(a) record
(PRRT_kwDOTAvnrs6jafy6) already read as landed prose with no HELD marker, so it
is left unchanged. No realization checkbox is ticked.

proposal.md's Patch B fold-in record (three ORCHESTRATOR FILLS placeholders,
the "Folded in — HELD" header, and the held/should-be-moved sentences) was
already fixed by the predecessor session and is verified, not touched here.

Lane: openxfactory-1
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Clean auto-merge (ort strategy), no conflicts. README.md's OpenSpec Records
"Active changes:" list keeps every bullet from both sides (add-citation-
remainder-report first, as this branch already had it), and correctly drops
gate-code-surface-declarations from Active into Archived per main's own
archival commit (#1076). tests/sequenced_after/corpus-ledger.yaml carries
both sides' non-overlapping row edits (this branch's new
add-citation-remainder-report row; main's gate-code-surface-declarations
state flip to archived).

Lane: openxfactory-1
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Copilot AI lite review requested due to automatic review settings September 17, 2026 16:40

@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.

Sorry @brettheap, you've used your own review budget of 250,000 diff characters for the last 7 days.

You can request another review in 8 hours and 27 minutes by commenting @sourcery-ai review. Upgrade to get a review now.

@sourcery-ai

sourcery-ai Bot commented Sep 17, 2026

Copy link
Copy Markdown

Reviewer's Guide

This fold-in makes three previously under-specified areas normative: deterministic grammars for cross-repository signals, a third population skip term for out-of-root links, and executable predicates with explicit precedence for truncated and punctuation-stripped; the packet grows from 43 to 63 scenarios without adding modified requirements.

Flow diagram for citation remainder classification precedence

flowchart TD
    A["Citation token enters remainder analysis"] --> B{"truncated predicate fires for every occurrence?"}
    B -- Yes --> C["Classify as truncated"]
    B -- No --> D{"Trailing character stripped and stripped token remains unresolved?"}
    D -- Yes --> E["Classify as punctuation-stripped"]
    D -- No --> F["Apply other remainder classification or leave unclassified"]
Loading

Flow diagram for population arithmetic with out-of-root link skips

flowchart TD
    A["Tracked entries in scope"] --> B["Files read"]
    A --> C["Entries skipped as non-files"]
    A --> D["Entries skipped as links leaving repository root"]
    A --> E["Files skipped as undecodable"]
    B --> F["Complete population identity closes"]
    C --> F
    D --> F
    E --> F
Loading

File-Level Changes

Change Details Files
Promote precise matching grammars for the five cross-repository citation signals.
  • Define a closed five-estate repository vocabulary with case-insensitive matching and own-repository exclusion.
  • Specify boundaries and accepted syntax for path prefixes, GitHub URLs, bare qualifiers, custody locators, and trailing parentheticals.
  • Add positive and negative scenarios covering each signal’s firing conditions.
openspec/changes/add-citation-remainder-report/specs/packet-citation-report/spec.md
openspec/changes/add-citation-remainder-report/design.md
openspec/changes/add-citation-remainder-report/proposal.md
openspec/changes/add-citation-remainder-report/tasks.md
Close the population arithmetic by reporting entries skipped because links resolve outside the repository root.
  • Add a distinct out-of-root-link skip term to the population identity.
  • Require the term to be printed even when zero and prevent non-closing readings from entering the series.
  • Add scenarios distinguishing out-of-root links, in-root symbolic links, non-files, and undecodable files.
openspec/changes/add-citation-remainder-report/specs/packet-citation-report/spec.md
openspec/changes/add-citation-remainder-report/design.md
openspec/changes/add-citation-remainder-report/proposal.md
openspec/changes/add-citation-remainder-report/tasks.md
Replace descriptive remainder classifications with deterministic predicates for tokenization artifacts.
  • Define truncated using three closed probes plus the existing trailing-hyphen case, with an ALL-occurrences rule.
  • Define punctuation-stripped only when normalization was insufficient, resolution failed, and truncated did not fire.
  • Add scenarios for resolving versus unresolved stripped tokens and each truncation probe.
openspec/changes/add-citation-remainder-report/specs/packet-citation-report/spec.md
openspec/changes/add-citation-remainder-report/design.md
openspec/changes/add-citation-remainder-report/proposal.md
openspec/changes/add-citation-remainder-report/tasks.md

Possibly linked issues

  • #add-declared-former-id successor: The PR directly advances the issue's proposed citation-remainder reporting successor by formalizing report rules and classifications.

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

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.

🟡 Changes recommended

Ten moderate findings and one nit remain, covering specification ambiguities and missing realization coverage.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

This PR folds Patch B’s citation-report rules into the OpenSpec packet.

Changes:

  • Defines cross-repository signal grammars and vocabulary.
  • Adds out-of-root link accounting.
  • Specifies truncated and punctuation-stripped predicates.
  • Expands scenarios from 43 to 63.
File summaries
File Summary and final comments
openspec/changes/add-citation-remainder-report/tasks.md Updates realization tasks. Moderate, 1 vote: add coverage for truncation probes, unresolved punctuation stripping, and zero/nonzero out-of-root-link arithmetic.
openspec/changes/add-citation-remainder-report/specs/packet-citation-report/spec.md Adds the normative rules and scenarios. Final comments: Moderate, 3 votes: account for unresolved or in-root directory links; moderate, 1 vote: clarify decorated parenthetical matching; nit, 3 votes: fix the grammar error; moderate, 1 vote: reconcile resolution and punctuation-stripping order; moderate, 2 votes: define string-literal probe semantics; moderate, 2 votes: restrict in-root symlink scenarios to regular files; moderate, 1 vote: supersede the earlier two-term identity; moderate, 1 vote: define occurrence aggregation; moderate, 1 vote: require all occurrences for probe (iii).
openspec/changes/add-citation-remainder-report/proposal.md Documents fold-in provenance.
openspec/changes/add-citation-remainder-report/design.md Records design rationale and measurements.
Review details

Suppressed comments (6)

openspec/changes/add-citation-remainder-report/specs/packet-citation-report/spec.md:677

  • Rule 5 says the repository member is matched under the decoration rules above, but this negative scenario treats any content besides a bare member as non-matching. A parenthetical such as (*codexFactory*) therefore both fires and does not fire; make the scenario distinguish an optionally decorated vocabulary member from other content.
#### Scenario: A parenthetical names this repository or stands further off
- **WHEN** the parenthetical after the token names this repository, or carries anything besides a vocabulary member, or is not the next thing after the token
- **THEN** the report MUST NOT flag the entry on the parenthetical

openspec/changes/add-citation-remainder-report/specs/packet-citation-report/spec.md:742

  • This new predicate relies on resolve-first semantics, but the same requirement still says that trailing prose punctuation is stripped before resolution (spec.md:785-788). Those orders disagree for a valid packet id ending in a grammar-admitted character, so two realizations can classify the same token differently; update the ordering statement as part of this fold.
the citation fails. **AND `truncated` WINNING IS THE PRECEDENCE THIS
SPECIFICATION ALREADY STATES**, spelled into the condition so that no

openspec/changes/add-citation-remainder-report/specs/packet-citation-report/spec.md:195

  • The preceding normative text still says the population identity has only the non-file and undecodable skip terms, while this amendment introduces a different identity with a third term. Because both statements use SHALL, an implementation can satisfy one arithmetic and violate the other. Update or explicitly supersede the earlier two-term identity so only the three-term closure remains normative.
AND THAT CLOSURE NAMES TWO SKIP TERMS WHERE THIS POPULATION RULE HAS THREE: AN
ENTRY SKIPPED BECAUSE ITS PATH LEAVES THE REPOSITORY ROOT ONCE RESOLVED SHALL BE
COUNTED AND REPORTED IN A SKIP TERM OF ITS OWN. The containment rule below skips
such an entry, and a SYMBOLIC LINK IS A TRACKED FILE — it is not the submodule
link the non-file term is about, which *is* a directory and has no text, and it

openspec/changes/add-citation-remainder-report/specs/packet-citation-report/spec.md:732

  • Normalization is recorded per occurrence and deduplication happens before class totals, so one token can have both a stripped occurrence (for example foo/) and an unstripped occurrence (foo). This condition does not say whether one stripped occurrence is enough or all occurrences must be stripped; different readers will assign different punctuation-stripped classes. Specify the occurrence aggregation rule here.
AND `punctuation-stripped` SHALL CARRY ITS FIRING CONDITION, WHICH IS NOT THE
SAME STATEMENT AS ITS DESCRIPTION: THE REPORT SHALL CLASS A REMAINDER ENTRY
`punctuation-stripped` WHERE IT STRIPPED A TRAILING CHARACTER FROM THE TOKEN
UNDER THE GRAMMAR'S NORMALIZATION, THE STRIPPED TOKEN STILL RESOLVED TO NOTHING,
AND THE `truncated` PREDICATE DID NOT FIRE — AND SHALL NOT CLASS IT

openspec/changes/add-citation-remainder-report/specs/packet-citation-report/spec.md:863

  • This positive scenario classifies an entry when only one occurrence satisfies probe (iii), which contradicts the new ALL-occurrences rule at lines 699–720 and the other probe scenarios. Require every occurrence to split and every rejoined path to resolve before assigning truncated.
- **WHEN** an occurrence ends its source line inside a string literal, the next line opens one, and the path rejoined across the two RESOLVES
- **THEN** the report MUST class the entry `truncated`

openspec/changes/add-citation-remainder-report/tasks.md:324

  • These newly normative predicates and the third population skip term are not carried into realization task 2.1's fixture minimum. That task still asks for one positive case per signal and the earlier fold-in cases, but nothing for the three new truncated probes, unresolved punctuation-stripped, or nonzero/zero out-of-root-link arithmetic, so realization can satisfy the spec without regression coverage for this fold.
      drafted against it promotes those probes verbatim — a longer existing path
      on the line ending with the token, a following `<`, and a split string
      literal whose rejoined path resolves — as a union with the trailing-hyphen
      arm under the occurrence rule ALL, and gives `punctuation-stripped` the
      only condition a class asserted on a REMAINDER entry can have. It landed
  • Files reviewed: 4/4 changed files
  • Comments generated: 4
  • Review effort level: Lite

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

…ink, probe (iii) pinned to a lexical rule, one typo

THREE PRECISION EDITS AND ONE TYPO, AND THE THREE PUT NO RULE. Each of them
reads a rule Patch B already drafted and closes a question the drafted text
left open — the arithmetic's extent, and the probe's lexical shape — so all
three are taken under the SAME word the fold landed on: Brett Heap,
2026-09-17, verbatim "fold B as drafted" (PR #1069, comment 5717459330). No
window moves, no signal is added or widened, the class vocabulary is the same
four labels with the same precedence, the population's three exclusions and
its containment rule read as they read before, and the three skip terms are
the three the word landed.

  PRRT_kwDOTAvnrs6jc-mz (spec.md:200) the "complete" identity still had an
    entry class with nowhere to go: a link that dangles, loops, cannot be
    read, or resolves to a DIRECTORY inside the root is not a gitlink, does
    not leave the root, and never reaches a decoder, so it fits none of the
    three terms as NAMED and the arithmetic can still fail to close. NO
    FOURTH TERM. The terms are now defined by their EXTENTS: the
    out-of-root-link term owns exactly the tracked links whose RESOLVED path
    stands outside the repository root, and the non-file term owns every
    OTHER tracked entry that is not a readable regular file once resolved —
    gitlinks, directories, and every such link — the two disjoint and, with
    the undecodable term, closing over every tracked entry in scope. Three
    scenarios; one sentence in design D3(a)'s Patch B record; three fixture
    cases in tasks § 2.1.

  PRRT_kwDOTAvnrs6jc-nS (spec.md:362) the in-root-link scenario admitted
    EVERY link resolving inside the root while the population rule skips
    what is not a file, so a link onto an in-root directory had no text to
    admit. The scenario is narrowed to a link resolving to a readable
    REGULAR FILE inside the root; the directory target is the new non-file
    scenario above.

  PRRT_kwDOTAvnrs6jc-ng (spec.md:718) probe (iii) read "inside a string
    literal" and "opens one", which is no predicate over a corpus written in
    several languages. It is pinned to a LEXICAL rule that names its
    delimiters: the occurrence is followed on its own line by ONE quote
    character, `"` or `'`, not repeated, standing as that line's last
    non-whitespace character and closing a literal the same character opened
    earlier on it; the next line's first non-whitespace character is that
    same quote, again not repeated, opening the continuation; and the token
    plus that continuation's content, up to the next occurrence of that same
    character, RESOLVES. Triple quotes, backticks, prefixed or raw literals,
    a backslash in either literal, and a continuation opened by the other
    quote character are NOT probe (iii). IT IS THE MEASURED SHAPE AND
    NOTHING WIDER: the one token this probe caught,
    `archive/2026-08-27-add-hermes-customer-subject-`, has its single
    occurrence at `scripts/doc_health/pin_class.py:1248-1249`, a Python
    implicit concatenation of two DOUBLE-QUOTED literals carrying no escape,
    whose rejoined path stands in this tree; the other three measured tokens
    are caught by (i) and (ii) as before and the 4-of-4-with-zero-false-
    positives figure is untouched. The two scenarios the fold carried are
    narrowed to the same shape so they cannot fire where the pin does not,
    and one firing and one non-firing scenario are added beside them; design
    D4's Patch B record carries the pin with the measured lines cited.

  PRRT_kwDOTAvnrs6jc-nw (spec.md:479) "the only DECLARED repository
    vocabulary that is holds two names" is ungrammatical; it now reads "the
    only DECLARED repository vocabulary this tree DOES carry holds two
    names". Meaning unchanged.

Scenarios 63 -> 68; five requirements and ONE `## ADDED Requirements` block,
unchanged; never MODIFIED. `openspec validate add-citation-remainder-report
--strict` clean; `--all --strict` 109 passed, 2 failed, both pre-existing on
main (add-chain-attestation, add-composed-view-authoring);
validate-openspec-cli-pin --strict clean; proposal-support verify ok;
validate-code-surface passed; validate-sequenced-after passes its two
sequencing checks and reports main's own undispositioned
archive-date-vs-commit finding on 2026-09-16-gate-code-surface-declarations,
added by main's 5dd0a8d.

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

Copy link
Copy Markdown
Contributor Author

Round one closed at 0862177e3b36911c71bf8142dedf9ba16a35e7e0. Four Copilot threads, all four replied and resolved. THREE OF THEM ARE PRECISION ON PATCH B'S OWN TEXT AND PUT NO RULE: each closes a question the drafted rule left open, so all three are taken under the SAME word the fold landed on — Brett Heap, 2026-09-17, verbatim "fold B as drafted" (PR #1069, comment 5717459330). The fourth is a typo.

  • PRRT_kwDOTAvnrs6jc-mz (spec.md:200) — the population arithmetic is closed by the skip terms' EXTENTS, not by their names: the out-of-root-link term owns exactly the tracked links whose RESOLVED path stands outside the root, the non-file term owns every OTHER tracked entry that is not a readable regular file once resolved (gitlinks, directories, and every dangling, looping, unreadable or directory-resolving link), the two disjoint and, with the undecodable term, closing over every tracked entry in scope. NO FOURTH TERM — declined as the mirror of the third term's keep. Three scenarios (spec.md:390, :396, :401); one sentence in design.md D3(a)'s Patch B record; three fixture cases in tasks.md § 2.1.
  • PRRT_kwDOTAvnrs6jc-nS (spec.md:362) — the in-root-link scenario is narrowed to a link resolving to a readable REGULAR FILE inside the root (spec.md:385); the directory target is the new non-file scenario above.
  • PRRT_kwDOTAvnrs6jc-ng (spec.md:718) — probe (iii) is pinned to a LEXICAL rule naming its delimiters (spec.md:760-767): one " or ', not repeated, closing a same-character literal and standing as the line's last non-whitespace character; the next line opening with that same quote, again not repeated; and the token plus that continuation's content up to its own closing quote RESOLVING — triple quotes, backticks, prefixed or raw literals, a backslash in either literal and a mismatched continuation quote named as NOT probe (iii). It is the measured shape and nothing wider: scripts/doc_health/pin_class.py:1248-1249, a Python implicit concatenation of two double-quoted literals. Two scenarios narrowed, one firing and one non-firing added (spec.md:933, :938); design.md D4's Patch B record carries the pin with the measured lines cited.
  • PRRT_kwDOTAvnrs6jc-nw (spec.md:479) — grammar: "the only DECLARED repository vocabulary that is holds two names" now reads "the only DECLARED repository vocabulary this tree DOES carry holds two names". Meaning unchanged.

Scenario count 63 → 68, all in the one ## ADDED Requirements block, over the same FIVE requirements; never MODIFIED.

Validators, in the clone at this head:

  • openspec validate add-citation-remainder-report --strict — Change 'add-citation-remainder-report' is valid.
  • openspec validate --all --strict — Totals: 109 passed, 2 failed (111 items); the two are add-chain-attestation and add-composed-view-authoring, both main's own MODIFIED-omits-scenario errors and neither touched here.
  • python3 scripts/validate-openspec-cli-pin.py --change add-citation-remainder-report --strict — @fission-ai/[email protected] verified against its content address and every target validated --strict clean.
  • python3 scripts/proposal-support.py . verify — proposal support verification ok.
  • python3 scripts/validate-code-surface.py . — code_surface validation passed (every active declaration's head is admitted); 49 active proposals, 49 declaring.
  • python3 scripts/validate-sequenced-after.py . — sequenced_after validation passed (49 active changes, 17 declaring the field) and archive-date agreement passed; its one archive-date-vs-commit finding is MAIN'S OWN — 2026-09-16-gate-code-surface-declarations: dated 2026-09-16, added 2026-09-17 by 5dd0a8dc39899820ab9fad6f02ae9b364bb43dc6 — undispositioned, inherited through the merge of main and owned by lane openXfactory-5.

Freeze line moves to 0862177e3b36911c71bf8142dedf9ba16a35e7e0; Rule 6 landing when the six required checks and main's newest decided suite are green.

Lane: openxfactory-1

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.

🟡 Changes recommended

Unresolved moderate findings leave link classification, occurrence semantics, and lexical truncation rules ambiguous.

Get a fresh assessment by requesting another Copilot review.

Review details

Suppressed comments (5)

openspec/changes/add-citation-remainder-report/proposal.md:16

  • The recorded scope/count no longer matches this diff: from the stated 43-scenario base, the added spec contains 25 new #### Scenario headings (five population, ten signal, and ten classification), yielding 68 rather than 63. The diff also includes the PR #1097 extent/lexical amendments in design.md and tasks.md, which are absent from the description's three #1069 items. Please reconcile the description and fold record with the packet contents.
Folded in: 2026-09-17 the three round-nine NORMATIVE threads, by Brett Heap's word, verbatim **"fold B as drafted"** — recorded at [PR #1069, comment 5717459330](https://github.com/opensoft/openxFactory/pull/1069#issuecomment-5717459330) — `PRRT_kwDOTAvnrs6jYkwR` (the five cross-repository signals' matching rules), `PRRT_kwDOTAvnrs6jafy6` (the population arithmetic's missing third skip term) and `PRRT_kwDOTAvnrs6jbfFz` (the `truncated` predicate and `punctuation-stripped`'s firing condition). `PRRT_kwDOTAvnrs6jYkwR`: the five D3(c) signals were promoted with EXAMPLES rather than with grammars, so the delta now fixes, per signal, the repository-name vocabulary and its closure, the case rule, the forge URL's boundary, the path-joined form's name boundary, the decoration admitted around a bare qualifier word, and the parenthetical's whitespace rule — one scenario where each signal fires and one where it does not. THE VOCABULARY IS STATED IN THE REQUIREMENT BECAUSE THIS REPOSITORY CARRIES NONE TO READ, which `design.md` D3(c) records with the three near-misses it examined and the two alternatives it costs. `PRRT_kwDOTAvnrs6jafy6`: the promoted population closure names TWO skip terms where D3(a)'s rules make THREE, so a tracked entry skipped for leaving the repository root belongs to no bucket and the arithmetic does not close; the delta now names that third term, requires it printed even at zero, and declines the alternative of folding it into the non-file term, which would close the arithmetic while hiding the one thing a reader needs from it. MEASURED: the term is ZERO at `b1df95ee` and at this branch's base, this repository tracking no symbolic link at either head. `PRRT_kwDOTAvnrs6jbfFz`: the closed vocabulary gave `fixture-path` a PREDICATE on the second word and left `truncated` a DESCRIPTION (*"the extraction severed mid-path"*) and `punctuation-stripped` no firing condition at all, while `design.md` D4's three measured sub-probes lived only there; the delta now carries those probes verbatim — a longer existing path on the line ending with the token, a following `<`, and a split string literal whose rejoined path resolves — as a union with the trailing-hyphen arm under the occurrence rule ALL, and gives `punctuation-stripped` the only condition a class asserted on a REMAINDER entry can have: the strip was applied, the stripped token still resolved to nothing, and the `truncated` predicate did not fire. MEASURED: the probes are the union that caught 4 of 4 hand-classified tokenization artifacts with zero false positives, each still caught by the probe it was caught by; and `punctuation-stripped` has NO member in the measured tree, the one sentence-terminal full stop there sitting on a token that RESOLVES once the stop is gone. NOTHING ELSE MOVES: the window is still the citing line plus the three above, the set is still those five signals, the population's three exclusions and its containment rule read exactly as they read before, the class vocabulary is the same four labels with the same precedence, and FLAG-never-drop and the INCLUSIVE headline are untouched.

openspec/changes/add-citation-remainder-report/specs/packet-citation-report/spec.md:795

  • This predicate is still ambiguous for an identity with multiple occurrences: normalization is explicitly recorded per occurrence, but punctuation-stripped is assigned to the remainder entry. The text does not say whether one stripped-and-unresolved occurrence is sufficient or every occurrence must satisfy the condition, so two conforming realizations can produce different class totals. Add an explicit ANY/ALL occurrence rule and a matching scenario.
SAME STATEMENT AS ITS DESCRIPTION: THE REPORT SHALL CLASS A REMAINDER ENTRY
`punctuation-stripped` WHERE IT STRIPPED A TRAILING CHARACTER FROM THE TOKEN
UNDER THE GRAMMAR'S NORMALIZATION, THE STRIPPED TOKEN STILL RESOLVED TO NOTHING,
AND THE `truncated` PREDICATE DID NOT FIRE — AND SHALL NOT CLASS IT
`punctuation-stripped` OTHERWISE. Each of the three conditions carries its

openspec/changes/add-citation-remainder-report/specs/packet-citation-report/spec.md:935

  • This second positive probe (iii) scenario has the same conflict with the required ALL occurrence rule: it says one occurrence is sufficient to class the whole remainder entry. An entry with another occurrence that fails the probe must not become truncated; make the condition universal.
- **WHEN** an occurrence is followed on its own line by one `"` that closes a literal opened by `"` earlier on that line and stands as the line's last non-whitespace character, the next line's first non-whitespace character is a single `"` opening the continuation, and the token followed by that continuation's content up to its own closing `"` RESOLVES
- **THEN** the report MUST class the entry `truncated`

openspec/changes/add-citation-remainder-report/specs/packet-citation-report/spec.md:770

  • Probe (iii) is not closed as claimed: prefixed and raw literal are language-dependent terms, but no prefix, delimiter, or boundary grammar is specified. Realizations can therefore disagree on whether forms such as r"...", f"...", or a language-specific raw form are excluded, changing the mechanical class totals. Define the exact lexical forms or remove this undefined exclusion.
IT IS CLOSED: a triple quote, a backtick, a prefixed or raw literal, a backslash
anywhere in either literal, and a continuation opened by the OTHER quote
character are NOT probe (iii), and neither is any construct this rule does not

openspec/changes/add-citation-remainder-report/tasks.md:261

  • This records the existing validator's decoration set as widened, but the validator is fenced by D7 and its _TOKEN_DECORATION remains unchanged; the */_ extension belongs to the new report's local grammar. Clarify that the report derives and widens a local copy so the realization task cannot modify validate-pin-registrations.py contrary to the scope fence.
      the path-joined form, `validate-pin-registrations.py`'s decoration set
      widened for Markdown, and the parenthetical's whitespace rule — is NEW
  • Files reviewed: 4/4 changed files
  • Comments generated: 2
  • Review effort level: Lite

… dangling outside link is out-of-root

Round two on PR #1097 answers Copilot thread PRRT_kwDOTAvnrs6jdWK1 on
design.md:750: the extent rule and the fixture guidance left a dangling
link's classification inconsistent between the out-of-root and non-file
terms.

A link's resolved path is now defined as a lexical fact (each target read
and joined, `..`/`.` normalised, no requirement that anything exist at the
end), so classification turns on where that path stands rather than on
whether the target exists: outside the root it is out-of-root even when
dangling, inside the root but not a readable regular file it is non-file,
and a chain with no resolved path at all (a loop, or a link whose own
target cannot be read) is non-file regardless of location.

spec.md gains one clause defining resolved path, one new scenario ("A
dangling link points outside the root"), and a tightened WHEN on the
sibling inside-case scenario (68 -> 69 scenarios); design.md and tasks.md
align their prose and fixture-case list to the same rule.

Taken under Brett Heap's standing word "fold B as drafted" (PR #1069
comment 5717459330): this is a clarification of the round-one extent
rule, not a new one.

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

Copy link
Copy Markdown
Contributor Author

Round two closed at 7b21491f7.

Thread: PRRT_kwDOTAvnrs6jdWK1 (design.md:750) — the extent rule left a dangling link's out-of-root/non-file classification inconsistent between the preceding extent (which assigns every outside-resolved link to out-of-root) and the text calling dangling links non-file.

The rule, in two lines: resolved path is a lexical fact, not an existence one (target read + joined, ../. normalised; no resolved path where the chain loops or can't be read). A tracked link's resolved path outside the root is out-of-root whether or not the target exists; inside the root but not a readable regular file, or with no resolved path at all, is non-file.

Scenarios: 68 → 69 (#### Scenario: A dangling link points outside the root, spec.md:405; sibling inside-case scenario tightened at spec.md:399).

Validators:

  • openspec validate add-citation-remainder-report --strict — valid.
  • openspec validate --all --strict — 109 passed, 2 failed (add-chain-attestation, add-composed-view-authoring — both pre-existing, unrelated).
  • validate-openspec-cli-pin.py --change add-citation-remainder-report --strict — verified, 1 passed / 0 failed.
  • proposal-support.py . verify — proposal support verification ok.
  • validate-code-surface.py . — passed (49 active declaring, 0 outside the grammar).
  • validate-sequenced-after.py . — passed except archive-date-vs-commit on 2026-09-16-gate-code-surface-declarations (main's own pre-existing finding, being fixed in Disposition the archive-date-vs-commit finding for gate-code-surface-declarations (prepared 2026-09-16, landed 2026-09-17) #1099).

Freeze line moves to 7b21491f7; Rule 6 landing when the six required checks and main's newest decided suite are green (main's fix is #1099).

Lane: openxfactory-1

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

One or more issues must be addressed before approval.

Review details

Suppressed comments (10)

Previously missed (2) — in code that hasn't changed since the last review.

openspec/changes/add-citation-remainder-report/specs/packet-citation-report/spec.md:216

  • The extent definition is not disjoint from the undecodable term: a regular file (or an in-root link to one) can be a readable filesystem file but fail strict UTF-8 decoding. If “readable” means text-readable, it lands in both non-file and undecodable; if it means byte-readable, that phase boundary is left implicit. Make the non-file predicate explicitly apply before decoding so the claimed population identity cannot double-count such an entry.
    openspec/changes/add-citation-remainder-report/specs/packet-citation-report/spec.md:585
  • This still is not a mechanically fixed signal grammar: owner segment and a path have no character set or boundary, so a string such as opsx:foo/bar is indistinguishable from an arbitrary command, subject, or workflow locator under the rule itself. The negative scenario cannot resolve that because those categories are named but not syntactically defined. Define the accepted owner/path form (or a closed owner vocabulary) before requiring implementations to agree.

openspec/changes/add-citation-remainder-report/design.md:752

  • This design amendment repeats the same ambiguous extent while claiming the terms are disjoint. Without saying that the non-file classification happens before UTF-8 decoding, an undecodable regular file can still be interpreted as belonging to both this term and the undecodable term; align this explanation with the population predicate in spec.md.
entry that is not a readable regular file once resolved, the two disjoint and,

openspec/changes/add-citation-remainder-report/design.md:722

  • The new amendment does not reconcile D0's earlier current-state rule at design.md:115-123, which still says scope = files read + entries skipped as non-files + files skipped as undecodable. Since this section presents that text as the promoted population rule, the design now gives readers a two-term recipe and the new three-skip-term recipe; update the baseline formula or clearly mark it as superseded historical text.
**AMENDMENT RECORD — THIS RULE OWES THE POPULATION'S ARITHMETIC A TERM OF ITS
OWN, AND THE REQUIREMENT NOW CARRIES ONE.** PR #1069, Copilot thread
`PRRT_kwDOTAvnrs6jafy6` (spec.md:189): the promoted closure reads *"the tracked
ENTRIES in scope equal the FILES read, plus the entries skipped as non-files,
plus the files skipped as undecodable"* — TWO skip terms where this subsection's

openspec/changes/add-citation-remainder-report/specs/packet-citation-report/spec.md:940

  • The predicate above makes truncated an ALL-over-occurrences class, but this scenario quantifies only one occurrence and still requires the entry to be classed. An identity with one qualifying split occurrence and another occurrence that fails probe (iii) would therefore satisfy this scenario while violating the stated ALL rule; quantify every occurrence here (and in the adjacent-literal scenario below).
- **WHEN** an occurrence's line ends at the close of a quoted literal, the next line opens one with the same quote character, and the path rejoined across the two RESOLVES
- **THEN** the report MUST class the entry `truncated`

openspec/changes/add-citation-remainder-report/specs/packet-citation-report/spec.md:195

  • The preceding population paragraph still states a normative two-term identity at lines 187-189 (entries = files read + non-files + undecodable). With this amendment, an out-of-root link makes that identity false, while the added “complete identity” below requires four terms, so the spec now contains two incompatible SHALL statements. Replace or explicitly supersede the old sentence instead of appending the correction.
AND THAT CLOSURE NAMES TWO SKIP TERMS WHERE THIS POPULATION RULE HAS THREE: AN
ENTRY SKIPPED BECAUSE ITS PATH LEAVES THE REPOSITORY ROOT ONCE RESOLVED SHALL BE
COUNTED AND REPORTED IN A SKIP TERM OF ITS OWN. The containment rule below skips
such an entry, and a SYMBOLIC LINK IS A TRACKED FILE — it is not the submodule
link the non-file term is about, which *is* a directory and has no text, and it

openspec/changes/add-citation-remainder-report/specs/packet-citation-report/spec.md:809

  • This condition is evaluated on a remainder entry, but normalizations and raw spellings are recorded per occurrence and one token can have multiple occurrences. It does not define whether one stripped occurrence is sufficient, all occurrences must be stripped, or how mixed resolved/unresolved occurrences affect the class, so implementations can produce different punctuation-stripped totals. Add an explicit occurrence quantifier and resolution aggregation rule, as the truncated and fixture-path rules do.
AND `punctuation-stripped` SHALL CARRY ITS FIRING CONDITION, WHICH IS NOT THE
SAME STATEMENT AS ITS DESCRIPTION: THE REPORT SHALL CLASS A REMAINDER ENTRY
`punctuation-stripped` WHERE IT STRIPPED A TRAILING CHARACTER FROM THE TOKEN
UNDER THE GRAMMAR'S NORMALIZATION, THE STRIPPED TOKEN STILL RESOLVED TO NOTHING,
AND THE `truncated` PREDICATE DID NOT FIRE — AND SHALL NOT CLASS IT

openspec/changes/add-citation-remainder-report/specs/packet-citation-report/spec.md:397

  • “Inside the repository root” is not enough to preserve the population declared above as tracked files minus the three exclusions: an in-scope symlink can point to an untracked file or to a tracked target under tests/, specs/, or openspec/changes/archive/. This rule would admit that target's text while counting the link as a file, bypassing the population recipe; specify whether the resolved target must itself be tracked and non-excluded, and add the corresponding fixture.
#### Scenario: A tracked link resolves to a regular file inside the root
- **WHEN** a tracked entry is a symbolic link whose target, once resolved, is a readable REGULAR FILE still standing inside the repository root
- **THEN** the report MUST admit its text and take tokens from it as from any other file it reads
- **AND** it MUST count it among the FILES read and in no skip term

openspec/changes/add-citation-remainder-report/tasks.md:437

  • The spec now adds a positive case for an in-root symlink to a readable regular file (spec.md:394), where the link must contribute to FILES read and tokens, but this fixture inventory enumerates only skipped/out-of-root links. Add that positive fixture so a realization cannot skip all symlinks and still satisfy the task's listed coverage.
      resolving OUTSIDE the root, which must land in the out-of-root term

openspec/changes/add-citation-remainder-report/tasks.md:324

  • These newly normative truncated probes (i)–(iii) and the punctuation-stripped firing condition are not added to the fixture requirements in task 2.1; that task still names the older -. precedence case but no positive/negative case for each probe or an unresolved stripped token. Without those fixtures, realization can satisfy the task while producing different class totals for this fold. Add the missing cases to the test task.
      drafted against it promotes those probes verbatim — a longer existing path
      on the line ending with the token, a following `<`, and a split string
      literal whose rejoined path resolves — as a union with the trailing-hyphen
      arm under the occurrence rule ALL, and gives `punctuation-stripped` the
      only condition a class asserted on a REMAINDER entry can have. It landed
  • Files reviewed: 4/4 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

brettheap pushed a commit that referenced this pull request Sep 18, 2026
Patch B's bench round two (PR #1097, `7b21491f`) fixes what each of the three
skip terms OWNS rather than what each is named for, so that no tracked entry
falls between two of them: the out-of-root-link term owns exactly the tracked
LINKS whose resolved path stands outside the root, and the non-file term owns
every other tracked entry that is not a readable regular file once resolved.

That made a link's RESOLVED PATH a fact about the path and not about what
stands at it, which `Path.resolve()` cannot answer: it is a filesystem call,
and this term must take a DANGLING link that leaves the root while leaving a
dangling link that does not. So `resolved_entry_path` walks the chain itself —
every step read in turn, each link replaced by its own target text joined onto
the directory it stands in, `..` and `.` normalised away — and returns None
only where the report cannot walk the chain at all, which the spec assigns to
the non-file term and the old `_contained` assigned to the out-of-root one.

Four entry classes move as a result, each of them previously in the wrong term
or in none: a link dangling INSIDE the root (was out-of-root, now non-file), a
chain that loops or cannot be read (was out-of-root, now non-file), a link
resolving to a DIRECTORY inside the root (unchanged, now stated), and a
dangling link resolving OUTSIDE the root (was non-file, now out-of-root).
`entry_disposition` decides all three terms in one place so the extents cannot
drift apart, and the arithmetic closes over every one of them.

Five tests, one per scenario the bench round added, plus the rename the round
made to the scenario that was `A tracked link stands inside the root`.

Refs #1053.

Lane: openxfactory-1
Co-Authored-By: Claude Fable 5.1 <[email protected]>
brettheap pushed a commit that referenced this pull request Sep 18, 2026
Patch B's bench round one (PR #1097, `0862177e`) replaced probe (iii)'s
description — "the token ends its source line INSIDE A STRING LITERAL" — with a
closed lexical rule, because *inside a string literal* is no predicate over a
corpus written in several languages, each with its own delimiters and escape
syntaxes, and a probe two realizations match differently is a class total two
readings cannot be compared by.

So `_inside_string_literal`, which counted unescaped quotes of either kind and
answered yes to a great deal this probe was never measured against, is gone.
In its place: the occurrence is followed on its own line by ONE quote character,
`"` or `'`, not repeated, which is that line's last non-whitespace character
and closes a literal the same character opened earlier on the same line; the
next line's first non-whitespace character is that same quote, again not
repeated; and the token plus the continuation literal's content, up to its own
closing quote, resolves. A triple quote, a backtick, a prefixed or raw literal,
a backslash in either literal and a continuation opened by the OTHER quote
character are refused, even where the rejoin would resolve.

The rule is pinned to the shape the measurement caught,
`scripts/doc_health/pin_class.py:1248-1249`, and the shipped probe fires on it
in this repository's own corpus, rejoining
`…2026-08-27-add-hermes-customer-subject-` onto
`runtime-contract/evidence/provider-verification.yaml`.

Two tests: one builds the shape in a file that is NOT Python, so the verdict is
reached from the quote characters alone; one parametrizes the seven refusals
over a fixture whose rejoined path WOULD resolve, so what is asserted is the
refusal and not a rejoin that happened to fail.

All 69 of Patch B's scenarios now carry a test that names them.

Refs #1053.

Lane: openxfactory-1
Co-Authored-By: Claude Fable 5.1 <[email protected]>
@brettheap

Copy link
Copy Markdown
Contributor Author

RULED — Brett Heap, 2026-09-18T09:42Z, verbatim: "land it when green" — confirms this PR lands under Rule 6 when green (the fold itself was ruled by "fold B as drafted", comment 5717459330 on #1069). Blocked today only by main's inherited archive-date red (#1099, lane openXfactory-5); on its merge: base refresh, fresh gate, FREEZE, landing. R1 (#1100) lands after this one.

Lane: openxfactory-1

Copilot AI review requested due to automatic review settings September 18, 2026 09:46
sourcery-ai[bot]
sourcery-ai Bot previously approved these changes Sep 18, 2026

@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.

Sourcery assessment

Approved.

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.

🟡 Changes recommended

Unresolved critical and moderate findings remain in the specification and design documentation.

Get a fresh assessment by requesting another Copilot review.

Review details

Suppressed comments (8)

openspec/changes/add-citation-remainder-report/design.md:1292

  • This new rationale conflicts with the earlier amendment record at design.md:1237-1244, which says punctuation-stripped is asserted only when the strip made resolution possible. The rule added here says the opposite: the stripped token must still resolve to nothing, while a token resolved by stripping is not a remainder entry or class. Leaving both statements in the design makes the class domain contradictory; update the earlier record and its measurement rationale to match this predicate.
**AND `punctuation-stripped` IS THE HARDER HALF, BECAUSE THE CLASS IS EMPTY
HERE.** A class is asserted on a REMAINDER entry, and a token that resolves is
not one: the single sentence-terminal full stop D0(ii) measures sits on
`…/disposition-codexfactory-floor-relocation-retitle/evidence/codexfactory-floor-relocation-2026-09-10.md.`,
whose stripped form RESOLVES — the cited file stands in this tree — so it is
reported RESOLVED with its normalization printed and never classed. The
condition promoted is therefore the only coherent one: the report stripped a
trailing character, the stripped token still resolved to nothing, and the
`truncated` predicate did not fire. **IT IS NOT "the token resolved after a

openspec/changes/add-citation-remainder-report/design.md:929

  • This design rationale repeats the same inaccurate absence claim: the repository has a tracked .gitmodules, even if it is only a partial submodule list and not the authoritative aggregation vocabulary. Please state that limitation explicitly; otherwise the recorded basis for choosing a closed set is factually incomplete.
RATHER THAN ASSUMED.** This repository carries NO machine-readable list of its
sibling repositories. Three near-misses, each read: (i)

openspec/changes/add-citation-remainder-report/specs/packet-citation-report/spec.md:767

  • Probe (i) is still a description rather than a complete predicate: longer path has no grammar or boundary, and stands in this tree does not say whether existence is tested on the literal path or after the report's containment/resolution rules. One implementation could treat a prose suffix or a path through a symlink as evidence while another could not, changing the truncated totals. Define the candidate path syntax and its resolution/containment test.
**(i) A LONGER PATH ON THE SAME LINE ENDS WITH THE TOKEN AND STANDS IN THIS
TREE** — the citation is that longer path and the token is only its tail,
because the extraction pattern is anchored on `openspec/changes/` and cannot
reach a head written before it. This is the probe the trailing-character rules
cannot reach at all: such a token is severed at its FRONT and carries no

openspec/changes/add-citation-remainder-report/specs/packet-citation-report/spec.md:809

  • The class is per remainder token, but normalization is applied per extracted occurrence before deduplication and raw/normalization are retained per occurrence (design.md:550-564, spec.md:349-357). If one occurrence is .../foo/ and another is .../foo, this condition does not say whether “it stripped” is existential or universal, so conforming implementations can disagree on punctuation-stripped and the class totals. Specify the occurrence aggregation rule and add a mixed-normalization scenario.
AND `punctuation-stripped` SHALL CARRY ITS FIRING CONDITION, WHICH IS NOT THE
SAME STATEMENT AS ITS DESCRIPTION: THE REPORT SHALL CLASS A REMAINDER ENTRY
`punctuation-stripped` WHERE IT STRIPPED A TRAILING CHARACTER FROM THE TOKEN
UNDER THE GRAMMAR'S NORMALIZATION, THE STRIPPED TOKEN STILL RESOLVED TO NOTHING,
AND THE `truncated` PREDICATE DID NOT FIRE — AND SHALL NOT CLASS IT

openspec/changes/add-citation-remainder-report/specs/packet-citation-report/spec.md:536

  • The rationale says this tree has no machine-readable sibling-repository list, but the checkout contains a tracked .gitmodules declaring openXwallet, openXdox, openDox, and installs/omnigent-install. The closed five-name vocabulary may still be intentional, but this premise is incomplete; describe the local list as partial/non-authoritative so the reason for not deriving the vocabulary is accurate.
named here because this repository carries no machine-readable enumeration of
its siblings to read one from: this estate's repository IDENTIFIERS are defined
as the aggregation's `.gitmodules` submodule paths, and that file is not in this
tree; the only DECLARED repository vocabulary this tree DOES carry holds two

openspec/changes/add-citation-remainder-report/specs/packet-citation-report/spec.md:396

  • This positive symlink scenario does not require the resolved regular file to contain valid UTF-8. An in-root regular file with invalid bytes satisfies this WHEN but must be counted in the undecodable skip term under the population rule, so the THEN incorrectly admits it and counts it as FILES read. Add the strict text condition or specify the undecodable branch.
- **WHEN** a tracked entry is a symbolic link whose target, once resolved, is a readable REGULAR FILE still standing inside the repository root
- **THEN** the report MUST admit its text and take tokens from it as from any other file it reads

openspec/changes/add-citation-remainder-report/specs/packet-citation-report/spec.md:940

  • This positive probe-(iii) scenario still says any same-quote “quoted literal” qualifies, while the lexical predicate above and the following negative scenario explicitly exclude repeated/triple quotes, backticks, mismatched delimiters, prefixed/raw literals, and backslashes. A triple-quoted or escaped case can satisfy this WHEN and both MUSTs; make the scenario reference the complete lexical predicate.
- **WHEN** an occurrence's line ends at the close of a quoted literal, the next line opens one with the same quote character, and the path rejoined across the two RESOLVES
- **THEN** the report MUST class the entry `truncated`

openspec/changes/add-citation-remainder-report/specs/packet-citation-report/spec.md:217

  • The new extent rule treats a symlink to any readable regular file inside the root as FILES read, but that target need not itself be tracked. Because the reading contract only declares whether tracked content differs from HEAD, an untracked target can change the report at the same HEAD without being declared, making series points non-reproducible. Decide whether resolved targets must be tracked or include untracked-target state in the tree declaration.
OWN EXACTLY THE TRACKED LINKS WHOSE RESOLVED PATH STANDS OUTSIDE THE REPOSITORY
ROOT, AND THE NON-FILE TERM SHALL OWN EVERY OTHER TRACKED ENTRY THAT IS NOT A
READABLE REGULAR FILE ONCE RESOLVED — a submodule gitlink, a directory, and
every tracked link the out-of-root term does not take, whether its lexically
  • Files reviewed: 4/4 changed files
  • Comments generated: 2
  • Review effort level: Lite

…links; the custody-locator grammar pinned

Two round-three Copilot threads on PR #1097, both
precision asks on Patch B's own drafted text:

- PRRT_kwDOTAvnrs6jsmQR (spec.md:216): the out-of-root term named only
  "tracked links," so a tracked regular file reached through a symlinked
  PARENT directory had nowhere to land and the population identity could
  fail to close. The term now owns every tracked ENTRY whose resolved
  path -- every component's own chain, parents included, read lexically
  -- stands outside the root, keeping its printed name for continuity.
  One scenario added; design D3(a) and tasks.md 2.1 record the round.

- PRRT_kwDOTAvnrs6jsmQw (spec.md:585): signal (4)'s owner/path grammar
  had no character class or boundary rule, so two realizations could
  disagree on an empty owner, a colon in the owner, or repeated slashes.
  The locator grammar is now pinned to one SHALL sentence:
  [A-Za-z0-9._-] for both the owner segment and every path segment.
  Confirmed against the corpus's own opsx:opensoft/... spellings, which
  already match the class. Two scenarios added; design D3(c) records the
  round.

Both are clarifications of Patch B's drafted rules, taken under the
standing word ("fold B as drafted", PR #1069 comment 5717459330; "land
it when green", PR #1097 comment 5728210367) -- neither adds a new rule.

Lane: openxfactory-1
Co-Authored-By: Claude Fable 5.1 <[email protected]>
sourcery-ai[bot]
sourcery-ai Bot previously approved these changes Sep 18, 2026

@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.

Sourcery assessment

Approved.

@brettheap

Copy link
Copy Markdown
Contributor Author

Round three closed at 1ec84ca51f54a6f6051a07d672f43cdcf4f97183.

  • PRRT_kwDOTAvnrs6jsmQR (out-of-root term): widened from "tracked links" to every tracked entry whose resolved path leaves the root, so a tracked file reached through a linked parent directory now closes the identity too. Resolved.
  • PRRT_kwDOTAvnrs6jsmQw (custody-locator grammar): signal (4) is pinned to [A-Za-z0-9._-] for the owner segment and every path segment, checked against the corpus's own opsx:opensoft/… spellings, which already match it. Resolved.

Scenarios 69 → 72.

  • openspec validate add-citation-remainder-report --strict: valid
  • openspec validate --all --strict: 109 passed, 2 failed (add-chain-attestation, add-composed-view-authoring — both pre-existing and unrelated)
  • validate-openspec-cli-pin.py --change add-citation-remainder-report --strict: OK, 1 passed 0 failed
  • proposal-support.py . verify: proposal support verification ok
  • validate-code-surface.py .: code_surface validation passed
  • validate-sequenced-after.py .: sequenced_after, archive-date agreement, and archive-date-vs-commit agreement all passed

Both threads are precision asks on Patch B's own drafted text, taken under the standing word ("fold B as drafted", PR #1069 comment 5717459330; "land it when green", PR #1097 comment 5728210367) — clarifications, not new rules.

freeze line moves to 1ec84ca51f54a6f6051a07d672f43cdcf4f97183; Rule 6 landing when the six required checks and main's newest decided suite are green.

Lane: openxfactory-1

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.

🟡 Changes recommended

The review identifies unresolved specification consistency issues and a design-summary inconsistency.

Get a fresh assessment by requesting another Copilot review.

Review details

Suppressed comments (7)

openspec/changes/add-citation-remainder-report/design.md:722

  • The earlier D0 population summary at design.md:118-121 still states the closure as scope = files read + non-files + undecodable, omitting the new out-of-root term. This amendment is the design record for the same rule, so the packet now contains conflicting arithmetic (even though today's measured term is zero); update the earlier summary to include all three skip terms.
**AMENDMENT RECORD — THIS RULE OWES THE POPULATION'S ARITHMETIC A TERM OF ITS
OWN, AND THE REQUIREMENT NOW CARRIES ONE.** PR #1069, Copilot thread
`PRRT_kwDOTAvnrs6jafy6` (spec.md:189): the promoted closure reads *"the tracked
ENTRIES in scope equal the FILES read, plus the entries skipped as non-files,
plus the files skipped as undecodable"* — TWO skip terms where this subsection's

openspec/changes/add-citation-remainder-report/specs/packet-citation-report/spec.md:195

  • The earlier SHALL at spec.md:187-189 still mandates a two-term identity. This paragraph adds the out-of-root term but does not supersede that requirement, so a reading with a non-zero out-of-root skip count must satisfy two incompatible arithmetic identities. Replace or explicitly supersede the earlier sentence so only the complete identity is normative.
AND THAT CLOSURE NAMES TWO SKIP TERMS WHERE THIS POPULATION RULE HAS THREE: AN
ENTRY SKIPPED BECAUSE ITS PATH LEAVES THE REPOSITORY ROOT ONCE RESOLVED SHALL BE
COUNTED AND REPORTED IN A SKIP TERM OF ITS OWN. The containment rule below skips
such an entry, and a SYMBOLIC LINK IS A TRACKED FILE — it is not the submodule
link the non-file term is about, which *is* a directory and has no text, and it

openspec/changes/add-citation-remainder-report/specs/packet-citation-report/spec.md:606

  • The locator grammar gives two incompatible results for a normal prose delimiter: it says scanning ends at the first character outside the class, but also says any outside-class character makes the locator invalid. The backtick after the cited opsx:...md examples is exactly such a character, so implementations can disagree on whether the signal fires. Restrict the invalid-character clause to characters inside owner/path segments and state that the first outside character terminates the locator.
EXACTLY THIS**: the literal prefix `opsx:`, then an OWNER segment of one or
more characters from `[A-Za-z0-9._-]`, then `/`, then a PATH of one or more
`/`-separated segments each of one or more characters from that same class,
ending at the first character outside the class or at end of line; an EMPTY
owner, an owner containing `:` or `/`, an EMPTY segment — repeated slashes, or
a trailing slash — or any character outside the class is NOT A LOCATOR AND
FIRES NO SIGNAL.

openspec/changes/add-citation-remainder-report/specs/packet-citation-report/spec.md:950

  • The PR description's live count is stale again: this branch's specification has 72 #### Scenario: headings, not 69, including the added population, signal, and classification scenarios. Please update the progression/count in the description or explain which three headings are intentionally excluded; none are excluded by this file.
#### Scenario: A longer path on the line ends with the token and stands in the tree

openspec/changes/add-citation-remainder-report/specs/packet-citation-report/spec.md:789

  • The ALL quantifier only scopes the three probes here; the alternative where the token ends in '-' and does not resolve is unquantified. That allows a remainder entry with one hyphen-ended occurrence and one ordinary occurrence to be classed truncated, contrary to the stated ALL rule and to the design/tasks claim that the hyphen arm is under it. Make every occurrence satisfy either a probe or the unresolved trailing-hyphen condition.
AND `truncated` SHALL CARRY A PREDICATE RATHER THAN A DESCRIPTION, CLOSED HERE
AS `fixture-path`'s IS: THE REPORT SHALL CLASS A REMAINDER ENTRY `truncated`
WHERE EVERY ONE OF ITS OCCURRENCES SATISFIES AT LEAST ONE OF THE THREE PROBES
NAMED BELOW, OR WHERE THE TOKEN ENDS IN `-` AND DOES NOT RESOLVE UNDER THE ORDER
THIS SPECIFICATION ALREADY FIXES — AND SHALL NOT CLASS IT `truncated` OTHERWISE.

openspec/changes/add-citation-remainder-report/specs/packet-citation-report/spec.md:992

  • The new punctuation-stripped scenario excludes only the three named probes, not the trailing-hyphen arm of the truncated predicate. A ...-. token with no probe (i)-(iii) satisfies this WHEN after the full stop is stripped, but the earlier scenario and predicate require it to be truncated, so this scenario permits contradictory classifications. Exclude the whole truncated predicate instead.
#### Scenario: A stripped token still resolves to nothing
- **WHEN** the report strips a trailing character from a token under the grammar's normalization, the stripped token still resolves to nothing, and no `truncated` probe fires for the entry
- **THEN** the report MUST class the entry `punctuation-stripped`
- **AND** it MUST record the normalization it applied

openspec/changes/add-citation-remainder-report/specs/packet-citation-report/spec.md:789

  • This new predicate relies on the resolve-first ordering, but the same requirement still says at lines 895-898 that trailing prose punctuation is stripped before resolution, using …-. as its example. Those two normative rules disagree on whether the grammar-valid trailing character is tried as-is, so the truncated/punctuation-stripped result is not deterministic; update the older precedence paragraph to match the resolve-first rule before closing this predicate.
AND `truncated` SHALL CARRY A PREDICATE RATHER THAN A DESCRIPTION, CLOSED HERE
AS `fixture-path`'s IS: THE REPORT SHALL CLASS A REMAINDER ENTRY `truncated`
WHERE EVERY ONE OF ITS OCCURRENCES SATISFIES AT LEAST ONE OF THE THREE PROBES
NAMED BELOW, OR WHERE THE TOKEN ENDS IN `-` AND DOES NOT RESOLVE UNDER THE ORDER
THIS SPECIFICATION ALREADY FIXES — AND SHALL NOT CLASS IT `truncated` OTHERWISE.
  • Files reviewed: 4/4 changed files
  • Comments generated: 1
  • Review effort level: Lite

…, as the extent does

A consistency fix under the standing word, no new rule.

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

Copy link
Copy Markdown
Contributor Author

Round four closed at 8325277af8dce35e951902d825ad23342b7b1290.

Thread PRRT_kwDOTAvnrs6js93B (spec.md:427): the "out-of-root term takes only the links" scenario reintroduced the link-only restriction the extent above it (spec.md:213-217) had already removed — retitled and rewritten to speak of the entry's resolved path (own link or a parent component's), not "a tracked link"; scenario count holds at 72.

Validators: openspec validate add-citation-remainder-report --strict OK; openspec validate --all --strict 109 passed / 2 failed (only add-chain-attestation, add-composed-view-authoring, as expected); validate-openspec-cli-pin.py --change add-citation-remainder-report --strict OK; proposal-support.py . verify OK; validate-code-surface.py . OK; validate-sequenced-after.py . OK.

Freeze line moves to 8325277af8dce35e951902d825ad23342b7b1290; Rule 6 landing when the six required checks and main's newest decided suite are green.

Lane: openxfactory-1

@brettheap

Copy link
Copy Markdown
Contributor Author

FREEZE — lane openxfactory-1, 2026-09-18T10:28Z, head 8325277a. No further pushes to this branch. Four Copilot bench rounds closed (9 threads, all resolved — every one a precision or consistency clarification of Patch B's drafted text under Brett Heap's word "fold B as drafted", comment 5717459330 on #1069; no new rule). Packet: 5 requirements, 72 scenarios, one ADDED block; every validator green including sequenced-after. Landing under Rule 6 on his word "land it when green" (comment 5728210367) once pytest-suite and the consumer gate report at this head and main's newest decided suite is green.

Lane: openxfactory-1

@sonarqubecloud

Copy link
Copy Markdown

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

Unresolved moderate and nit findings remain in the specification and design records.

Review details

Suppressed comments (9)

Previously missed (3) — in code that hasn't changed since the last review.

openspec/changes/add-citation-remainder-report/specs/packet-citation-report/spec.md:193

  • The two-term SHALL identity immediately above still says entries = files read + non-files + undecodable, while this paragraph introduces an additional out-of-root term. Because both statements remain normative, a realization can follow the earlier equation and omit the new bucket; explicitly supersede or rewrite the earlier equation so the three-term identity is the only population arithmetic.
    openspec/changes/add-citation-remainder-report/specs/packet-citation-report/spec.md:223
  • The non-file extent uses “not a readable regular file,” but the preceding rule has a separate undecodable bucket for regular files whose bytes fail UTF-8 decoding. If “readable” means text-decodable, an invalid-UTF-8 regular file satisfies both buckets; if it means OS-readable, the required disjointness is implicit. Define this term in terms of whether the resolved path is a regular file, leaving decode failures exclusively to the undecodable term so the identity is mechanically disjoint.
    openspec/changes/add-citation-remainder-report/specs/packet-citation-report/spec.md:428
  • The PR description still reports 69 scenarios, but the current specification has 72 #### Scenario: headings (rg -c '^#### Scenario:' openspec/changes/add-citation-remainder-report/specs/packet-citation-report/spec.md). The current diff adds seven population, twelve signal, and ten classification scenarios to the prior 43, so the advertised progression is stale by three; please update the count/progression or account for the extra headings.

openspec/changes/add-citation-remainder-report/design.md:722

  • This amendment records the third skip term, but the earlier D3(a) summary at design.md:115-123 still states the population identity using only non-files and undecodable entries. That leaves the design artifact inconsistent with the new specification and allows an implementation to follow the stale two-term rule; update the earlier summary as part of this fold rather than only documenting the historical amendment.
**AMENDMENT RECORD — THIS RULE OWES THE POPULATION'S ARITHMETIC A TERM OF ITS
OWN, AND THE REQUIREMENT NOW CARRIES ONE.** PR #1069, Copilot thread
`PRRT_kwDOTAvnrs6jafy6` (spec.md:189): the promoted closure reads *"the tracked
ENTRIES in scope equal the FILES read, plus the entries skipped as non-files,
plus the files skipped as undecodable"* — TWO skip terms where this subsection's

openspec/changes/add-citation-remainder-report/design.md:1323

  • This new amendment says punctuation-stripped applies when stripping was insufficient and the token remains unresolved, but the earlier D3(b) amendment at design.md:1266-1273 still says the class is asserted where the strip made resolution possible. Those records prescribe opposite classifications; a realization following the design record could violate the new spec. Update the earlier paragraph to use the same unresolved-after-strip condition.
condition promoted is therefore the only coherent one: the report stripped a
trailing character, the stripped token still resolved to nothing, and the
`truncated` predicate did not fire. **IT IS NOT "the token resolved after a
strip"**, which would leave the class empty by construction rather than by
corpus, since such a token leaves the remainder. **NOTHING IS MINTED, RENAMED OR

openspec/changes/add-citation-remainder-report/specs/packet-citation-report/spec.md:971

  • The class predicate fixes the occurrence rule as ALL, but this scenario quantifies only one occurrence and then classifies the entire entry. A token with one matching split occurrence and another ordinary occurrence would satisfy this scenario while violating the stated rule; quantify the condition over every occurrence or explicitly constrain it to a single-occurrence entry.
- **WHEN** an occurrence's line ends at the close of a quoted literal, the next line opens one with the same quote character, and the path rejoined across the two RESOLVES

openspec/changes/add-citation-remainder-report/specs/packet-citation-report/spec.md:981

  • The class predicate fixes the occurrence rule as ALL, but this scenario again describes only one occurrence and then assigns truncated to the whole entry. A multi-occurrence identity could therefore be classified from one adjacent-literal occurrence even when another occurrence fails the probe; make the WHEN condition apply to every occurrence or limit the scenario to one occurrence.
- **WHEN** an occurrence is followed on its own line by one `"` that closes a literal opened by `"` earlier on that line and stands as the line's last non-whitespace character, the next line's first non-whitespace character is a single `"` opening the continuation, and the token followed by that continuation's content up to its own closing `"` RESOLVES

openspec/changes/add-citation-remainder-report/specs/packet-citation-report/spec.md:613

  • The normative parenthetical grammar delegates the inner name to the decoration rules from signal (3), which would admit decorated forms, but the following negative rule says any content besides a vocabulary member inside the parentheses must not fire. Implementations can therefore disagree on inputs such as (*codexFactory*); define the parenthetical body explicitly as decorated/undecorated and keep the scenario consistent.
**(5) THE TRAILING PARENTHETICAL SHALL FIRE** where the characters immediately
following the token on the citing line are at most ONE space, then `(`, then a
vocabulary member under the decoration and case rules above, then `)`. More than
one space, any further content inside the parentheses, or a parenthetical that
is not the next thing after the token SHALL NOT fire it.

openspec/changes/add-citation-remainder-report/specs/packet-citation-report/spec.md:790

  • This new hyphen arm conflicts with the still-normative scenario at lines 457–460: that scenario says any token known to be split across lines is truncated and must not be resolved, while the resolve-first rule and this predicate say a token ending in - is not truncated if it resolves. A split token can coincide with a real packet id ending in -; add the non-resolving condition to that scenario or otherwise reconcile the two rules so classification is deterministic.
AND `truncated` SHALL CARRY A PREDICATE RATHER THAN A DESCRIPTION, CLOSED HERE
AS `fixture-path`'s IS: THE REPORT SHALL CLASS A REMAINDER ENTRY `truncated`
WHERE EVERY ONE OF ITS OCCURRENCES SATISFIES AT LEAST ONE OF THE THREE PROBES
NAMED BELOW, OR WHERE THE TOKEN ENDS IN `-` AND DOES NOT RESOLVE UNDER THE ORDER
THIS SPECIFICATION ALREADY FIXES — AND SHALL NOT CLASS IT `truncated` OTHERWISE.
  • Files reviewed: 4/4 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

brettheap added a commit that referenced this pull request Sep 18, 2026
…st step

Patch B's latest bench round (#1097, `1ec84ca5`) widens the term's extent in
the requirement itself: it owns "the tracked ENTRIES whose resolved path stands
outside the repository root — not only an entry that is itself a link, but any
tracked entry reached through one, a PARENT directory component included,
because the containment test is a predicate over the whole tracked path and not
only over an entry that happens to be a link itself", and adds the scenario that
makes it testable.

`entry_disposition` gated the term on `is_link` and sent every other
out-of-root entry to the non-file term, on a reasoning the code stated: git
refuses to track a path beyond a symbolic link. It is true of the moment a path
is added and not of the tree afterwards — a directory can BECOME a link after
the files under it were tracked, and the index still carries them at mode
100644. The gate is gone; the resolved path decides, and nothing else does.

`resolved_entry_path` needed no change: it already walks every component of a
tracked path, the entry's own and every parent's, in one lexical walk. The
docstrings now say so, which is the sentence the requirement moved to.

The entry class that changes term: a tracked regular file standing under a
parent that links out of the root. Counting it among the non-files said the
report declined it for carrying no text, when what it declined was text that is
not this corpus's — the one fact this term exists to carry, and the reason it
is a row of its own rather than folded into the non-file term.

`SYMLINK_MODE` goes with the gate, its only reader. Nothing now asks whether an
entry is a link; a mode that answered it beside a predicate that never asks
would be a second, silent rule.

One test, which fails against the parent commit with
`skipped_link_leaving_the_root == 0`.

Refs #1053.

Lane: openxfactory-1
Co-Authored-By: Claude Fable 5.1 <[email protected]>
brettheap added a commit that referenced this pull request Sep 18, 2026
Patch B's latest bench round (#1097, `1ec84ca5`) pins signal (4)'s grammar
exactly where it had only named the shape: the literal prefix, an OWNER segment
from `[A-Za-z0-9._-]`, `/`, then a PATH of one or more `/`-separated segments
each of one or more characters from that same class — "an EMPTY owner, an owner
containing `:` or `/`, an EMPTY segment — repeated slashes, or a trailing slash
— or any character outside the class is NOT A LOCATOR AND FIRES NO SIGNAL."

The owner half was already exact: the class admits neither `:` nor `/` and the
pattern must run out at the token's own start, so `opsx:own:er/`, `opsx:/` and
`opsx:own/er/` each failed to match rather than matching some shorter thing.
The PATH half was not being read at all. The path IS the cited token — the
prefix ends where the token begins — so the grammar's second half is a
predicate over the token as it was WRITTEN, and `opsx:opensoft/<token>` fired
whatever the token's own shape was.

`locator_path` is that predicate, and the empty-segment arm is what does the
work: a repeated slash inside the path and a trailing slash at the end of it
each leave one. Both are reachable through the extraction pattern, and both
now fire nothing. The character arm is stated because the grammar states it and
holds the boundary against this report's own extraction pattern, which admits
that class and `/` and nothing else today.

The locator is judged on the spelling as WRITTEN and never on the normalized
token, which is the only reading under which a trailing slash can be refused at
all — the normalization strips it before the token is deduplicated.

Two tests, six cases. The two path-shape cases fail against the parent commit;
the three owner cases pass on both and are kept as the pins for a grammar the
round spells out and the code had only implied.

Refs #1053.

Lane: openxfactory-1
Co-Authored-By: Claude Fable 5.1 <[email protected]>
@brettheap

Copy link
Copy Markdown
Contributor Author

Lane: openxfactory-1 (openXfactory-1)

LANDING — lane openxfactory-1, session 393ade52-a921-4dd9-9dc5-224ebc056651@Eagle, 2026-09-18T10:45:46Z, PR #1097 into opensoft/openxFactory main

Guard at 2026-09-18T10:45:49Z on head 8325277af8dce35e951902d825ad23342b7b1290: six required checks SUCCESS (lane-line, openspec-cli-pin, pytest-suite, release-tag-gate, signed-execution-chain-gate, wallet-validation); closingIssuesReferences = []; 0 unresolved threads; main's newest decided pytest-suite = success; no other-lane open LANDING into opensoft/openxFactory main (who --landing). mergeStateStatus BLOCKED = the code-owner-review ruleset that never clears on the author's own account; admin merge on Brett Heap's recorded word (FOLD Patch B into add-citation-remainder-report; Brett Heap 2026-09-17 fold B as drafted (comment 5717459330); 2026-09-18 land it when green (comment 5728210367)). Merge = merge commit.

@brettheap
brettheap merged commit c32749c into main Sep 18, 2026
15 checks passed
@brettheap

Copy link
Copy Markdown
Contributor Author

Lane: openxfactory-1 (openXfactory-1)

LANDED — lane openxfactory-1, session 393ade52-a921-4dd9-9dc5-224ebc056651@Eagle, 2026-09-18T10:45:58Z, PR #1097 into opensoft/openxFactory main → c32749c

brettheap added a commit that referenced this pull request Sep 18, 2026
Patch B has landed (#1097, main c32749c), so the packet text this branch was
built against is now the packet text in the tree: main carries the full
72-scenario delta, byte-identical to the #1097 branch tip the coverage count
was taken against. #1099 has landed too, so the three inherited sequenced_after
archive-date failures come in fixed rather than red.

Refs #1053.

Lane: openxfactory-1
Co-Authored-By: Claude Fable 5.1 <[email protected]>

# Conflicts:
#	openspec/changes/add-citation-remainder-report/tasks.md
brettheap pushed a commit that referenced this pull request Sep 18, 2026
…as re-homed, #1096, #1097) into the archive branch

ONE CONFLICT, RESOLVED BY KEEPING BOTH WRITERS. README.md's "Archived changes:"
block: both sides prepend a new entry — this branch's
`scope-pinned-arm-root-naming` (ARCHIVED 2026-09-17) and main's
`add-composed-view-authoring` (CLOSED AS RE-HOMED 2026-09-16, PR #1056). Both
are kept whole, neither text edited, ordered reverse-chronologically as the
block is: ours above theirs, theirs above `gate-code-surface-declarations`
(2026-09-16), which is main's own ordering for the two same-day entries.
`tests/sequenced_after/corpus-ledger.yaml` and
`tests/doc-health/test_modified_block_currency_self_gate.py` auto-merged and
were re-measured rather than assumed.

VALIDATION AT THIS MERGE: `validate-sequenced-after.py .` fully green — 47
active changes / 16 declaring, `archive-date agreement passed`, and
`archive-date-vs-commit agreement passed (… 13 disposition(s) in force,
enforcement error)`; `--ledger-diff` consistent (219 rows);
`pytest tests/sequenced_after` 286 passed;
`pytest tests/doc-health/test_modified_block_currency_self_gate.py` 19 passed;
`proposal-support.py . verify` ok; `openspec validate --all --strict` 108
passed / 1 failed (109 items) — the pre-existing pair is now a single
pre-existing failure, `add-chain-attestation`, because main's #1056 closed
`add-composed-view-authoring` out of the active corpus.

Lane: openxfactory-2
Co-Authored-By: Claude Opus 5 (1M context) <[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

Development

Successfully merging this pull request may close these issues.

2 participants