Skip to content

File amend-kill-switch-to-declared-test-companion (DRAFT): the kill switch is one reviewed edit plus its declared test companion - #959

Merged
brettheap merged 27 commits into
mainfrom
change/amend-kill-switch-to-declared-test-companion
Sep 11, 2026
Merged

brettheap merged 27 commits into
mainfrom
change/amend-kill-switch-to-declared-test-companion

Conversation

@brettheap

@brettheap brettheap commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

Lane: openxfactory-2 (openXfactory-2)

FILING ≠ RATIFYING. This is a DRAFT pull request carrying a PROPOSAL. Every
document in the packet is Status: draft. It admits no text to canon, ratifies
no design decision, moves no byte of running machinery in either repository,
throws no kill switch, and ticks no box anywhere — including the parent's
box 3.6, which is an OBSERVATION box and does not tick on a successor being
named.

The authority

Brett Heap, 2026-09-11 at approximately 03:40Z, in session to lane
openxfactory-2, presented with the lane's multi-choice question, selected the
option "Accept the finding; file a successor" — a SELECTION, not a typed
sentence. Recorded on openxFactory
#745 comment 5632569506
(2026-09-11T09:42:11Z) and on codexFactory #232 (2026-09-11T09:42:12Z).

The ruling's consequence (3), verbatim:

a SUCCESSOR change is to be filed in openxFactory amending N-4 to state the
switch as it truly is — one reviewed edit plus its declared test companion
(or, alternatively, making the pinning suite kill-switch-aware) — so that a
later throw is landable and the box can be observed

Consequence (4), verbatim:

3.6's observation resumes only after that successor lands and a real bot cycle
exists.

The finding, in five lines

Measured 2026-09-11 and posted as the RESULT on
#745 at 03:08Z:

  1. Decision N-4 of extend-merge-master-envelope-to-floor-bot-lanes
    (ratified 2026-09-07, PR Propose extending the merge-master low-risk envelope to the two floor bot lanes (§ 6.3) #746, unarchived) states the kill switch "takes one
    edit
    ".
  2. In a throwaway clone at codexFactory main = 0ad92bd5,
    PYTHONPATH=scripts python3 -m pytest tests/merge-master/ -q gives 3993
    passed, 28 skipped
    clean; with the one edit (delete envelope lines 173–356 —
    the openxfactory-floor-regeneration mapping and nothing else; 356 → 172
    lines; the YAML still parses) it gives 29 failed, 3964 passed, 28 skipped.
  3. Those 29 span five test files (test_floor_regeneration_enrolment.py 17,
    test_enrolled_surface_config.py 7, test_behaviour_snapshot.py 3,
    test_caller_workflows.py 1, test_class_floor_differential.py 1) plus a
    sixth file that must move with them, the golden digest
    specs/018-per-tree-floor-instance/behaviour-snapshot.json.
  4. tests/merge-master/ is inside codexFactory's required validate check
    (validate.yml → scripts/validate-docs.sh:217), so the withdrawing pull
    request cannot land. A kill switch that cannot be thrown is not a switch.
  5. The pinning is not the defect — a suite that did not notice the enrolment
    leaving would be worse. The defect is the gap between the suite and N-4's
    ratified account.

What this packet does

Amends, by supersession, decision N-4 and its requirement
An enrolled autonomous lane carries a one-edit kill switch to: the kill switch
is one reviewed edit PLUS ITS DECLARED TEST COMPANION — the conformance
assertions that pin the enrolment, named beside the enrolment in the reviewed
declaration, so the withdrawal is landable against the required checks.
Adds a SHALL NOT on an enrolment whose withdrawal (companion applied, nothing
else) is not landable. Keeps the SHALL NOT on a switch held outside a
reviewable diff. Keeps the pinning's notice-it-leaving property, and refuses
alternative (B) "make the pinning suite kill-switch-aware" for exactly that
reason.

The requirement header is unchanged, and the parent is ratified but
unarchived, so the ## MODIFIED targets that change's own delta and the
front matter records
sequenced_after: [extend-merge-master-envelope-to-floor-bot-lanes].
The parent scenario's "parks for a human" is corrected to what is observable:
_find_surface matches on repository and head ref only — never on author — so
with the entry removed the pull request reaches no envelope decision (exit
11, decision=skip, no sticky comment) and stays at the human merge gate.

What is NOT proposed

No throw of the switch anywhere; no edit to the envelope's candidate mapping; no
schema member, no active: boolean, no repository variable; no ruleset edit and
no bypass actor in any form; no codexFactory byte authored by this lane (the
realization is a codexFactory companion change, authored there after
ratification: the banner correction + companion declaration, and one test that
the declared companion equals the pinning set); no relaxation of any assertion;
no contract bundle, tag, pin or digest movement. The candidate entry is
INTACT on codexFactory main (blob
fa8773628ef69dceab3a912740850c0432ffbce3, 356 lines).

The parent packet extend-merge-master-envelope-to-floor-bot-lanes is not
edited by this pull request at all
(its tasks.md is being moved by open
PR #957).

refs #745

🤖 Generated with Claude Code

Summary by Sourcery

Amend the kill-switch requirement so an enrolment can be withdrawn through one reviewed declaration edit together with its declared test companion.

New Features:

  • Define the kill switch as the enrolment declaration plus a declared, reviewable test companion so withdrawals remain landable against required checks.

Bug Fixes:

  • Correct the inaccurate one-edit kill-switch requirement and update the withdrawal scenario to reflect the actual no-candidate, human-gate behavior.

Enhancements:

  • Add draft OpenSpec requirements, design decisions, realization tasks, provenance, sequencing metadata, and per-enrolment conformance rules covering assertion and artefact companions.
  • Preserve independent pinning so withdrawals remain detectable, while requiring non-empty measurements and tracked, allowlisted artefact regeneration.
  • Document that the parent observation remains open and that realization and the later throw/restore are separate follow-up actions.

Documentation:

  • Add the draft change to the active OpenSpec records in README.md.

Tests:

  • Specify a conformance procedure that independently measures all pinning assertions and allowlisted artefact changes against a hermetic withdrawal baseline.

Chores:

  • Update the sequenced-after corpus ledger for the new co-modifying successor and its parent.

…edit kill switch amended to one reviewed edit plus its declared test companion

Successor named by extend-merge-master-envelope-to-floor-bot-lanes box 3.6's
2026-09-11 finding, on Brett Heap's selection "Accept the finding; file a
successor" (~03:40Z, in session). Filing, not ratifying. refs #745

Lane: openxfactory-2
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Copilot AI lite review requested due to automatic review settings September 11, 2026 10:54
@sourcery-ai

sourcery-ai Bot commented Sep 11, 2026

Copy link
Copy Markdown

Reviewer's Guide

This draft PR files a text-only OpenSpec successor that narrows and operationalizes N-4’s kill-switch semantics as a reviewed enrolment edit plus its declared test companion, while documenting the measured required-check gap, preserving failure-detection assertions, and deferring codexFactory realization and the parent’s real bot-cycle observation.

State diagram for the draft successor lifecycle

stateDiagram-v2
    [*] --> DraftFiled
    DraftFiled --> Ratified: ratification
    Ratified --> Realized: codexFactory companion change
    Realized --> Observable: successor lands and real bot cycle exists
    DraftFiled --> DraftFiled: no canon or running-machinery change
Loading

Flow diagram for the declared test-companion kill switch

flowchart TD
    A["Reviewed enrolment edit"] --> B["Declared test companion"]
    B --> C["Required conformance assertions and golden digest"]
    C --> D{"Withdrawal is landable against required checks?"}
    D -->|yes| E["Later kill-switch throw can proceed"]
    D -->|no| F["Enrolment is not permitted"]
    E --> G["Pinning still notices the enrolment leaving"]
Loading

File-Level Changes

Change Details Files
Adds a draft OpenSpec successor that supersedes N-4’s “one edit” kill-switch account with a reviewed enrolment edit plus a declared, reviewable test companion.
  • Records the measured failure: removing the candidate mapping causes 29 required-check failures across five tests and a golden snapshot.
  • Defines the companion as all assertions and artefacts that pin the enrolment, including a conformance test that detects stale declarations.
  • Adds a non-conformance rule when withdrawal with only the declared companion is not landable.
  • Preserves pinning’s notice-it-leaving behavior and explicitly rejects making tests derive enrolment from the declaration.
  • Corrects the withdrawal scenario to observe no envelope decision, exit 11, no sticky comment, and the human merge gate.
  • Declares that realization belongs to a later codexFactory companion change and that no switch, runtime code, or parent observation box is changed here.
openspec/changes/amend-kill-switch-to-declared-test-companion/proposal.md
openspec/changes/amend-kill-switch-to-declared-test-companion/specs/roles-authority-model/spec.md
openspec/changes/amend-kill-switch-to-declared-test-companion/tasks.md
Adds provenance, sequencing, and draft-status metadata for the proposed successor.
  • Captures the measurement, authority selection, related parent changes, and archive ordering in OpenSpec metadata.
  • Marks the proposal as sequenced after the unarchived parent and keeps all actions and boxes unticked.
  • Lists validation, later realization, observation, restore, and archive prerequisites.
openspec/changes/amend-kill-switch-to-declared-test-companion/.openspec.yaml
Registers the draft successor in the repository’s active OpenSpec changes list.
  • Adds a prominent active-changes entry identifying the proposal, authority, measured finding, sequencing, and filing-versus-ratification distinction.
README.md

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

brettheap and others added 2 commits September 11, 2026 06:56
…, five open questions

D-1 recommends (A) one reviewed edit plus its declared test companion and
refuses (B) a kill-switch-aware suite, because a suite that adapts to the entry
leaving no longer notices it leaving. refs #745

Lane: openxfactory-2
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
…e parent flipping sole to co-modifier

Machine-derived by validate-sequenced-after.py --seed-ledger --moved-by '#959'
--moved-on 2026-09-11: two rows, exactly the case the ledger header documents
(a change moves its own row, plus a partner's row when its
## MODIFIED Requirements block flips that partner from sole to co-modifier).
No file inside the parent packet is touched. refs #745

Lane: openxfactory-2
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>

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 affect validation, provenance, and required contract definitions.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This draft OpenSpec successor amends N-4 so a kill switch includes its declared test companion without runtime changes.

Changes:

  • Registers the successor in the active OpenSpec index.
  • Defines the amended requirement and withdrawal scenarios.
  • Documents provenance, realization, observation, and archival tasks.
File summaries
File Review result
README.md Nit: distinguish 29 failing tests across five test files from the sixth golden-digest artifact (1 vote).
openspec/changes/amend-kill-switch-to-declared-test-companion/tasks.md Moderate: missing D-1–D-6 design record (3 votes). Critical: unsatisfiable all-suite gate (2 votes). Moderate: parent acceptance wording mismatch (1 vote).
openspec/changes/amend-kill-switch-to-declared-test-companion/specs/roles-authority-model/spec.md Moderate: declaration and inspection contract is underspecified (1 vote); expected assertion set is not independent (1 vote). Critical: missing — marker separator (1 vote).
openspec/changes/amend-kill-switch-to-declared-test-companion/proposal.md Critical: missing sequencing ledger row (1 vote). Moderate: dangling design references (1 vote). Nits: malformed citation (1 vote) and grammar (2 votes).
openspec/changes/amend-kill-switch-to-declared-test-companion/.openspec.yaml Moderate: D-1 and D-2 provenance identifiers are not auditable (1 vote).
Review details

Suppressed comments (7)

README.md:540

  • The evidence is miscounted here: the measurement reports 29 failing tests across five test files, plus a sixth golden-digest file that must move; the digest is not a sixth test file containing those 29 tests. Keep the test-file count separate from the artifact count so the active record remains accurate.
  packet amends N-4 and its requirement by supersession to "one reviewed edit

openspec/changes/amend-kill-switch-to-declared-test-companion/.openspec.yaml:82

  • The origin record names D-1 and D-2 as decisions worth a veto, but this packet has no design artifact defining those IDs. That makes the provenance record non-auditable and contradicts the packet's own references to a design rationale. Add the missing design record or remove/retarget these decision identifiers.
    THE DECISIONS MOST WORTH A VETO are D-1 (alternative (A) "one reviewed edit
    plus its declared test companion" is recommended over alternative (B)
    "make the pinning suite kill-switch-aware", which is REJECTED because a
    suite that adapts to the entry leaving no longer notices it leaving — the
    single most valuable property the suite has), D-2 (the declaration site is

openspec/changes/amend-kill-switch-to-declared-test-companion/proposal.md:200

  • This packet references design.md here as D-1, but no design.md exists for this change; the changed files contain no definition of D-1 (or the other D-1…D-6 decisions cited elsewhere). That leaves the proposal's design references dangling and omits the decision record promised by the packet. Add the design artifact or retarget all citations to sections that actually exist before ratification.
  `design.md` D-1, because a suite that adapts to the entry leaving no longer

openspec/changes/amend-kill-switch-to-declared-test-companion/proposal.md:15

  • This citation has mismatched punctuation: the URL timestamp closes its parenthesis, but the codexFactory timestamp has no opening parenthesis and leaves an extra closing one. That makes the provenance sentence malformed.
2026-09-11T09:42:11Z) and codexFactory #232, 2026-09-11T09:42:12Z) —

openspec/changes/amend-kill-switch-to-declared-test-companion/specs/roles-authority-model/spec.md:11

  • The required equality check is not implementable from the stated contract: task 3.1 puts the companion in a YAML comment, while this requirement only says to compare it with “the set of assertions that actually pin the enrolment.” No comment grammar, parser, canonical assertion identifier, or discovery rule is defined, and a normal YAML parse cannot see comments. Define the declaration/inspection contract (including how the snapshot is represented) before requiring the conformance test.
The companion SHALL be declared, and the declaration SHALL be kept honest by a test. Where a class is enrolled, the assertions that pin that enrolment — every conformance assertion that fails when the class is withdrawn, INCLUDING any golden or snapshot artefact whose recorded value moves with the withdrawal — SHALL be named beside the enrolment in the same reviewed declaration; and a conformance test SHALL assert that the declared companion equals the set of assertions that actually pin the enrolment, so that a stale declaration is a failing check rather than a discovery made at the moment the switch is thrown.

openspec/changes/amend-kill-switch-to-declared-test-companion/specs/roles-authority-model/spec.md:11

  • As written, the companion test can be implemented tautologically by reading the companion list from the same envelope comment and comparing it with itself; neither this requirement nor task 3.2 requires an independently maintained expected set of assertion identities. That would let a stale declaration pass, contrary to the stated purpose. Require the test's expected set to come from independent test code or another independently reviewed source, and compare both directions.
The companion SHALL be declared, and the declaration SHALL be kept honest by a test. Where a class is enrolled, the assertions that pin that enrolment — every conformance assertion that fails when the class is withdrawn, INCLUDING any golden or snapshot artefact whose recorded value moves with the withdrawal — SHALL be named beside the enrolment in the same reviewed declaration; and a conformance test SHALL assert that the declared companion equals the set of assertions that actually pin the enrolment, so that a stale declaration is a failing check rather than a discovery made at the moment the switch is thrown.

openspec/changes/amend-kill-switch-to-declared-test-companion/tasks.md:114

  • This procedure deliberately expects exit 11 with no envelope decision, matching the unenrolled-head path in .github/workflows/merge-master-approval.yml:1585-1594. However, the parent §3.6 task still literally requires confirming that the next bot pull request “parks for a human” (openspec/changes/extend-merge-master-envelope-to-floor-bot-lanes/tasks.md:520-523). Because this packet says that parent box is completed only after this observation, the described evidence cannot satisfy the parent's acceptance text; amend the parent task or explicitly define that wording as equivalent before relying on it.
- [ ] **4.2 Observe the withdrawal.** The next real `floor/bot-regeneration` pull
      request reaches **no envelope decision** — `is_candidate: false`, exit 11
      (`_EXIT_NOT_CANDIDATE`), `decision=skip`, **no sticky comment** (the
      "Explain park or block" step is gated on `decision == 'park'`) — and stays
      at the human merge gate.
  • Files reviewed: 7/7 changed files
  • Comments generated: 5
  • Review effort level: Lite

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

Copilot AI review requested due to automatic review settings September 11, 2026 11:00

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 issues affect deterministic companion declarations, enrolled-class coverage, and validation criteria.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details

Suppressed comments (7)

openspec/changes/amend-kill-switch-to-declared-test-companion/design.md:287

  • The normative delta applies the companion rule to every enrolled class, but this open question leaves codexfactory-routine-code unresolved while tasks 3.1–3.2 only realize openxfactory-floor-regeneration. Ratifying this as written would make the first realization incomplete for an already-enrolled class. Cover all current classes (and define how future admissions sequence their companions), or narrow the requirement before ratification.
  one?** As written the requirement binds every enrolled candidate class, which
  reaches `codexfactory-routine-code` today and
  `openxfactory-review-lane-repin` if `admit-review-lane-repin-to-merge-approval-envelope`
  realizes. Whether the existing class's companion must be declared in the same
  companion change, or in its own, is a sequencing question for the realization

openspec/changes/amend-kill-switch-to-declared-test-companion/design.md:264

  • This table changes the observable result to “no envelope decision”/exit 11, but the parent task that will actually be followed and ticked still says to confirm that the pull request “parks for a human” (extend-merge-master-envelope-to-floor-bot-lanes/tasks.md:520-523). Unless that parent observation procedure is corrected through a coordinated follow-up, the recorded box 3.6 procedure remains false after this packet lands.
| the throw | delete the candidate entry — one edit, per N-4 — which **reds 29 assertions in a required check and cannot land** | ONE codexFactory pull request carrying the entry's removal **together with exactly the declared companion**, which passes the required checks and lands |
| what to observe | the parent's text says the next pull request "parks for a human" | the next real bot pull request reaches **no envelope decision** — `is_candidate: false`, exit 11 (`_EXIT_NOT_CANDIDATE`), `decision=skip`, **no sticky comment** — and stays at the human merge gate |
| the restore | (unstated) | a **revert** of that same pull request, restoring the entry and the companion assertions in one act |

openspec/changes/amend-kill-switch-to-declared-test-companion/proposal.md:202

  • This blanket prohibition on digest movement conflicts with D-3 and the later throw/restore tasks, which explicitly require specs/018-per-tree-floor-instance/behaviour-snapshot.json to move. Qualify it as no contract/release digest movement in openxFactory so it does not contradict the codexFactory behaviour-digest companion.
- No contract bundle, no tag, no pin movement, no digest movement.

openspec/changes/amend-kill-switch-to-declared-test-companion/specs/roles-authority-model/spec.md:11

  • The companion is defined as a set of "conformance assertions" but this same rule also includes a golden/snapshot artifact. A JSON digest is not an assertion, so the required equality test has no well-defined target as written; define the companion as typed assertions plus artifacts (and compare both), or explicitly define the artifact-to-assertion mapping before ratification.
The companion SHALL be declared, and the declaration SHALL be kept honest by a test. Where a class is enrolled, the assertions that pin that enrolment — every conformance assertion that fails when the class is withdrawn, INCLUDING any golden or snapshot artefact whose recorded value moves with the withdrawal — SHALL be named beside the enrolment in the same reviewed declaration; and a conformance test SHALL assert that the declared companion equals the set of assertions that actually pin the enrolment, so that a stale declaration is a failing check rather than a discovery made at the moment the switch is thrown.

openspec/changes/amend-kill-switch-to-declared-test-companion/specs/roles-authority-model/spec.md:7

  • This requirement applies to every enrolled candidate class, but the realization tasks declare a companion only for openxfactory-floor-regeneration. codexfactory-routine-code is also enrolled today, and design Q-2 leaves its companion unresolved, so ratifying this text would either make the existing enrollment non-conformant or leave the conformance test checking only a subset of the requirement. Scope the requirement to the amended class or add the declaration and verification plan for every current class before ratification.
The model SHALL ensure that every enrolled candidate class can be returned to the human merge gate by A SINGLE REVIEWED EDIT TO THE ENROLMENT DECLARATION TOGETHER WITH ITS DECLARED TEST COMPANION — the set of conformance assertions that pin that enrolment, named beside the declaration in the reviewed declaration itself, so that the withdrawing pull request is landable against the repository's required checks — and that the withdrawal takes effect on the next evaluation, without redeploying, reconfiguring or otherwise touching any lane.

openspec/changes/amend-kill-switch-to-declared-test-companion/tasks.md:70

  • This gate is currently impossible as written: the validation evidence in the related bookkeeping PR reports three pre-existing --all --strict failures on both the branch and origin/main. Other repository tasks use the meaningful invariant of zero new failures versus the baseline; requiring an absolutely clean all-change run would keep this task open for unrelated findings.
      resolves, `OPENSPEC_TELEMETRY=0 openspec validate
      amend-kill-switch-to-declared-test-companion --strict` is clean, and
      `openspec validate --all --strict` is clean.

openspec/changes/amend-kill-switch-to-declared-test-companion/tasks.md:84

  • The companion is required to be checked for exact equality, but task 3.1 places it in a free-form YAML comment and does not define a grammar or parser for the named files/assertions. A test in task 3.2 therefore has no deterministic representation to compare and cannot reliably detect a stale declaration. Define a machine-readable field or a rigid comment syntax plus its parser/test before treating this as a conformance guarantee.
      codexFactory `.github/merge-approval-envelope.yml`, in the BANNER/COMMENT
      block beside the `openxfactory-floor-regeneration` candidate: correct the
      sentence that repeats N-4's false "one edit" claim, and DECLARE that
      candidate's test companion — naming the exact files and the assertion(s)
      each carries. A comment-only edit: **no schema member is added**, no
  • Files reviewed: 7/7 changed files
  • Comments generated: 3
  • Review effort level: Lite

Comment thread README.md Resolved
…sured against main, grammar (Copilot threads)

T2: specs/roles-authority-model/spec.md's `Modified over` marker lacked the
` — ` reason separator `_REASON_SEP` requires (scripts/doc_health/
modified_block_currency.py); inserted it so `parse_marker` now returns a
non-None reason, matching the amend-mirror-floor-regeneration-merge-authority
precedent form.

T3: tasks.md task 2.5 claimed `openspec validate --all --strict` would be
clean outright, which is unsatisfiable — 3 pre-existing failures exist on
`main` (disposition-codexfactory-declared-renames,
disposition-codexfactory-floor-relocation-retitle, repo-boundary-governance).
Reworded to the parent's own task 1.7 form: per-change --strict clean, and
--all --strict with the failure set unchanged from main, naming the measured
set, count and the main sha (54c166c) measured against.

T5: proposal.md's "the realization is that repository's lane's to author"
grammar fixed to "the realization is for that repository's lane to author".

refs #745

Lane: openxfactory-2
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Co-Authored-By: Claude Sonnet 5 <[email protected]>
Copilot AI review requested due to automatic review settings September 11, 2026 11:15

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 measurement, declaration-format, enrollment-coverage, and validation-gate issues remain.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details

Suppressed comments (4)

README.md:539

  • This active-index sentence calls the measurement “29 required tests across 6 files,” but the packet's own table records 29 failures across five test files plus a sixth golden-digest artifact. The digest is not a test, so the summary misstates the evidence.
  measured false (29 required tests across 6 files incl. a golden digest); this

openspec/changes/amend-kill-switch-to-declared-test-companion/design.md:139

  • The companion must be equality-checked by task 3.2, but this design makes it a free-form banner comment and defines no machine-readable grammar or parsing contract. Q-3 only chooses file versus function granularity, not how the test can deterministically extract the declaration, so the required stale-declaration check is not implementable as specified. Define a fixed comment grammar (or another reviewable non-schema representation) before ratification.
The companion is declared **in the envelope's banner/comment block, immediately
beside the `openxfactory-floor-regeneration` candidate**, naming the exact
companion files and the assertion(s) each carries.

openspec/changes/amend-kill-switch-to-declared-test-companion/proposal.md:114

  • The preceding measurement table defines the six affected files as five test modules plus behaviour-snapshot.json, but this paragraph replaces the digest with test_S_the_kill_switch_is_not_held_outside_the_diff while still calling the set six files. That test is not in the measured breakdown or the PR description, so the companion scope is internally inconsistent. Add its actual file/path and failure to the measurement, or remove/rephrase this item.
2. `test_S_the_kill_switch_is_not_held_outside_the_diff` — the **scenario test
   for this very requirement**, asserting that the switch IS the reviewed
   declaration. It fails on the throw only because it looks the entry up by id.
   A scenario test that reds when its own scenario is exercised is the sharpest
   possible statement of the gap.

openspec/changes/amend-kill-switch-to-declared-test-companion/tasks.md:71

  • Task 2.5 explicitly accepts a non-zero openspec validate --all --strict result when the failure set matches main, but the repository constitution's non-negotiable Principle V requires OpenSpec artifacts to pass that command (.specify/memory/constitution.md:75-81). Record a sanctioned disposition/exception or resolve the baseline failures; do not define unchanged failures as the gate without reconciling the constitution.
- [ ] **2.5** `sequenced_after: [extend-merge-master-envelope-to-floor-bot-lanes]`
      resolves, `OPENSPEC_TELEMETRY=0 openspec validate
      amend-kill-switch-to-declared-test-companion --strict` is clean, and
      `openspec validate --all --strict` has its failure set UNCHANGED from
      `main` — requiring `--all --strict` clean outright is unsatisfiable: the
  • Files reviewed: 7/7 changed files
  • Comments generated: 1
  • Review effort level: Lite

…on grammar (D-2c), accurate 5+1 file count, scoped code_surface tests/ claim

N1: design.md D-2 gained D-2c — a stated minimal machine-readable grammar for
the companion declaration (pytest node ids for assertions, artefact paths for
golden/snapshot files; function grain for assertions, file grain for
artefacts), making task 3.2's equality check deterministic. Q-3 marked
answered. tasks.md 3.1/3.2 reworded to match, and to allow either a
comment-block or a sibling-file realization of the grammar.

N2: "29 required tests across 6 files" was wrong — it is 29 failing
assertions across five test files, plus a sixth file (the golden
behaviour-snapshot.json digest) that moves with them but is not itself a
test. Corrected in README.md, proposal.md and the roles-authority-model
spec.md marker; .openspec.yaml already carried the accurate FIVE+SIXTH
phrasing.

N3: proposal.md's code_surface field claimed no byte under `tests/` moves,
but this filing moves two rows of the machine-derived per-change sweep
ledger tests/sequenced_after/corpus-ledger.yaml. Scoped the claim to test
implementation/runtime code and named the ledger as the one tests/ file
this pull request touches.

refs #745

Lane: openxfactory-2
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Co-Authored-By: Claude Sonnet 5 <[email protected]>
Copilot AI review requested due to automatic review settings September 11, 2026 11:26

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 declaration, artifact-discovery, enrolled-class coverage, and digest-history inconsistencies remain.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details

Suppressed comments (11)

openspec/changes/amend-kill-switch-to-declared-test-companion/.openspec.yaml:56

  • PR #957 is already merged (2026-09-11T10:50:23Z), so this origin record's claim that the parent tasks.md is “being moved by open PR #957” is stale. Update it to say the move landed in the merged PR, or remove the temporal claim; otherwise the packet records an incorrect current dependency.
    request. The parent packet is NOT EDITED BY THIS LANE AT ALL — its
    `tasks.md` is being moved by open PR #957 and a conflict would be this
    lane's fault.

openspec/changes/amend-kill-switch-to-declared-test-companion/design.md:166

  • The grammar records pytest node IDs at function granularity but calls each one an individual assertion. If a node contains multiple assertions, the equality check cannot identify which assertion failed or enforce the companion at assertion level. Make the contract explicitly node-level throughout, or define an assertion-level identifier.
candidate id, two ordered lists: (a) the PYTEST NODE ID
(`path::Class::test_name`, or `path::test_name` where there is no class) of
every assertion that fails when that candidate is withdrawn, and (b) the
ARTEFACT PATH of every golden or snapshot file whose recorded value moves
with the withdrawal. Granularity is therefore FUNCTION (node-id) grain for

openspec/changes/amend-kill-switch-to-declared-test-companion/design.md:178

  • The grammar calls these entries ordered lists, while the equality check says to compare both sets. Those are different contracts: reordering entries is either significant or not, but the packet does not choose. Specify a canonical ordering and compare lists, or declare the entries unordered sets.
own design decision, bounded by this grammar. With the grammar fixed, the
D-2b equality check is DETERMINISTIC: withdraw the candidate in a scratch
tree, run the pinning suite, collect the failing node ids and the moved
artefact paths, and compare both sets to the declaration exactly — a
mismatch in either set fails the check.

openspec/changes/amend-kill-switch-to-declared-test-companion/design.md:270

  • PR #957 is already merged (2026-09-11T10:50:23Z), so this design record's claim that the parent tasks.md “is being moved by open PR #957” is stale. Update it to describe the completed move or remove the temporal claim; otherwise the archive/order rationale records a false current state.
- **no edit to the parent packet** `extend-merge-master-envelope-to-floor-bot-lanes`
  — its `tasks.md` is being moved by open PR #957 and a conflict would be this
  lane's fault — and therefore **no tick of its box 3.6 here**.

openspec/changes/amend-kill-switch-to-declared-test-companion/design.md:204

  • D-3 requires the restore to be a revert and also says that revert adds a second mirror movement to the digest history. A normal revert applies the inverse patch, removing the throw's digest entry and returning the prior bytes; it cannot append a new history entry. Decide whether restore is a distinct forward commit that records the mirror movement or whether the digest has only one movement.
**Consequence, stated rather than discovered:** the throw pull request carries a
digest movement and a reasoned entry for it, and the restore (a revert) carries
the mirror movement. That is two entries in the digest's history for one
observation, and it is correct that it be so.

openspec/changes/amend-kill-switch-to-declared-test-companion/design.md:170

  • The comment-block form never encodes the candidate id even though the grammar is defined per candidate. With multiple enrolled classes, # companion: <node-id> and # companion-artefact: <path> do not let the conformance test associate entries with a class unless an unstated block-scoping rule is assumed. Include the candidate id in each prefix or define explicit candidate-keyed blocks.
companion change MAY encode this grammar either as the envelope's own
comment block with a fixed line prefix (e.g. `# companion: <node-id>` /
`# companion-artefact: <path>`) or as a sibling file declared and keyed by

openspec/changes/amend-kill-switch-to-declared-test-companion/proposal.md:203

  • This unqualified “no digest movement” contradicts D-3 and the Impact section, which explicitly require the codexFactory golden digest to move for the later throw/restore. Scope this bullet to this openxFactory filing (or to contract digests) so the packet does not simultaneously refuse and require the same realization.
- No contract bundle, no tag, no pin movement, no digest movement.

openspec/changes/amend-kill-switch-to-declared-test-companion/specs/roles-authority-model/spec.md:11

  • This requirement is scoped to every enrolled candidate class, but the only realization task and declaration name openxfactory-floor-regeneration; codexfactory-routine-code is also explicitly kept enrolled in proposal.md:177-179 and design.md Q-2. Ratifying this text while realizing only the floor candidate leaves an existing enrolment without a declared companion and violates the new SHALL. Cover every current class, or narrow this delta's scope, before treating the packet as complete.
The model SHALL ensure that every enrolled candidate class can be returned to the human merge gate by A SINGLE REVIEWED EDIT TO THE ENROLMENT DECLARATION TOGETHER WITH ITS DECLARED TEST COMPANION — the set of conformance assertions that pin that enrolment, named beside the declaration in the reviewed declaration itself, so that the withdrawing pull request is landable against the repository's required checks — and that the withdrawal takes effect on the next evaluation, without redeploying, reconfiguring or otherwise touching any lane.

The declaration SHALL remain the switch. The enrolment SHALL be held in a reviewed, diff-visible declaration read from the base branch, and the model SHALL NOT accept a kill switch held in a value that does not appear in a reviewable diff: not a repository or organization variable, not a secret, not an environment setting, not a platform toggle, and not any store whose change leaves no reviewable record. A withdrawal SHALL therefore be visible in the declaration's history forever, and SHALL be a code-owner-reviewed act by construction.

The companion SHALL be declared, and the declaration SHALL be kept honest by a test. Where a class is enrolled, the assertions that pin that enrolment — every conformance assertion that fails when the class is withdrawn, INCLUDING any golden or snapshot artefact whose recorded value moves with the withdrawal — SHALL be named beside the enrolment in the same reviewed declaration; and a conformance test SHALL assert that the declared companion equals the set of assertions that actually pin the enrolment, so that a stale declaration is a failing check rather than a discovery made at the moment the switch is thrown.

openspec/changes/amend-kill-switch-to-declared-test-companion/specs/roles-authority-model/spec.md:11

  • The normative rule requires the companion to be named in “the same reviewed declaration itself,” but D-2 and task 3.1 allow a sibling declared file. A sibling file is a separate declaration, so a realization can satisfy the design/tasks while violating the requirement. Choose one location model or change the requirement to the broader reviewed-diff form and define its adjacency/review invariant.
The companion SHALL be declared, and the declaration SHALL be kept honest by a test. Where a class is enrolled, the assertions that pin that enrolment — every conformance assertion that fails when the class is withdrawn, INCLUDING any golden or snapshot artefact whose recorded value moves with the withdrawal — SHALL be named beside the enrolment in the same reviewed declaration; and a conformance test SHALL assert that the declared companion equals the set of assertions that actually pin the enrolment, so that a stale declaration is a failing check rather than a discovery made at the moment the switch is thrown.

openspec/changes/amend-kill-switch-to-declared-test-companion/specs/roles-authority-model/spec.md:34

  • Because the companion also includes golden/snapshot paths, this scenario's equality clause is incomplete: it only requires equality to the assertion set. A conformance implementation could ignore artefact entries and still satisfy this text; require exact equality for both the node-id list and artefact-path list, as D-2c describes.
- **AND** a conformance test asserts that the declared companion equals the set of assertions that actually pin the enrolment

openspec/changes/amend-kill-switch-to-declared-test-companion/tasks.md:96

  • The realization task repeats the unresolved sibling-file alternative, so it is not executable as written: the task neither identifies where that file is located nor reconciles it with the requirement's same-declaration rule. Once the declaration site is chosen, make this task name that one concrete form.
- [ ] **3.1 The banner correction and the companion declaration.** In
      codexFactory, beside the `openxfactory-floor-regeneration` candidate:
      correct the sentence that repeats N-4's false "one edit" claim, and
      DECLARE that candidate's test companion using design.md D-2c's
      grammar — the pytest node id of every assertion that fails when the
      candidate is withdrawn, and the artefact path of every golden/snapshot
      file whose recorded value moves with it. Realized either as the
      envelope's own `.github/merge-approval-envelope.yml` BANNER/COMMENT
      block or as a sibling declared file keyed by candidate id (D-2c; the
      companion change's own choice). Comment-only or additive: **no schema
  • Files reviewed: 7/7 changed files
  • Comments generated: 3
  • Review effort level: Lite

Copilot AI review requested due to automatic review settings September 11, 2026 11:34
…pendent verifier's eight round-3 findings

Merge (F4): git merge --no-edit origin/main (merge-base 22efcbe; main at
78d2c6f, having advanced past the 54c166c the verifier measured against).
One conflict, in README.md's OpenSpec Records block: kept this packet's row,
dropped the state-header-window-budget row main's own commit had just
archived out of Active changes. tests/sequenced_after/corpus-ledger.yaml
auto-merged clean (different rows).

F1 (BLOCKING, == Copilot N3): code_surface's tests/ scoping (already fixed
round 2) is now also named in proposal.md's "What changes" and tasks.md box
2.5: this filing moves two bookkeeping rows in the per-change sweep ledger,
seeded by validate-sequenced-after.py --seed-ledger, carrying no requirement
and no grant.

F2 (BLOCKING): the "A kill switch outside the diff" scenario is broadened,
not unchanged — the parent's "repository or environment setting" widens to
name secrets and any other value outside a reviewable diff, matching the
requirement's own body paragraph. Declared explicitly in proposal.md (the
scenario-inventory bullet plus a new paragraph) and tasks.md box 2.1. spec.md
itself is untouched: the broadened text was already correct, only its
description as "unchanged" was wrong.

F3: design.md no longer calls PR #957 "open" — it merged 2026-09-11T10:50:23Z
at 54c166c; this packet takes the merge-from-main rather than re-writing the
parent's tasks.md itself.

F5: .openspec.yaml's proposed_by drops the stale "(window `openxfactory-f7`)"
parenthetical (accurate at authoring, superseded by a profile switch at
11:04Z); lane + session id `c07ed656` identify the actor without it.

F6: proposal.md's "Two of the six files are not ordinary code" named a test
FUNCTION as if it were a file; reworded to "Two things in that set" and named
the file the function lives in (test_floor_regeneration_enrolment.py,
confirmed via a read-only, unpushed codexFactory clone).

F7: tasks.md gains box 1.3 under § 1, naming the ratification-encoding task
(approved_by/approved_on, Status flips, the ratification record, the README
row) that no existing box named.

F8: .openspec.yaml's `related` entry for govern-sibling-added-modified-deltas
now spells its archived path (archive/2026-09-02-govern-sibling-added-
modified-deltas) rather than the pre-archive id.

Re-validated after the merge: per-change --strict clean; --all --strict same
3 pre-existing failures as the live main tip (78d2c6f); ledger-diff exit 0;
targeted pytest 401 passed.

refs #745

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

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 inconsistencies remain around the withdrawal mechanism, companion coverage, and declaration placement.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details

Suppressed comments (4)

openspec/changes/amend-kill-switch-to-declared-test-companion/.openspec.yaml:56

  • This provenance text says PR #957 is still open and moving the parent task file, but the packet's own design records that PR as merged at 2026-09-11T10:50:23Z. As written, the front matter contradicts the current parent state and its later chronology; mark the sentence as historical-at-filing or update it to the merged state.
    request. The parent packet is NOT EDITED BY THIS LANE AT ALL — its
    `tasks.md` is being moved by open PR #957 and a conflict would be this
    lane's fault.

openspec/changes/amend-kill-switch-to-declared-test-companion/design.md:173

  • D-2 defines the declaration as being in the envelope banner immediately beside the candidate, and the requirement requires it in the same reviewed declaration, but this paragraph also permits a separate sibling file. If the companion chooses that option, the declared companion is no longer beside the enrolment in the enrolment declaration, so the realization can violate the requirement while satisfying the design. Remove the sibling-file alternative or amend the normative declaration-site language consistently.
companion change MAY encode this grammar either as the envelope's own
comment block with a fixed line prefix (e.g. `# companion: <node-id>` /
`# companion-artefact: <path>`) or as a sibling file declared and keyed by
candidate id; both are reviewed, diff-visible declarations under the same
code-owner review as the candidate itself, so either satisfies D-2's site
rule, and the choice between the two forms is the codexFactory companion's

openspec/changes/amend-kill-switch-to-declared-test-companion/design.md:306

  • Q-2 cannot remain unresolved while the modified requirement says this applies to every enrolled candidate class. The parent currently enrolls codexfactory-routine-code (extend-merge-master-envelope-to-floor-bot-lanes/design.md:246-247), but the realization tasks declare and test a companion only for openxfactory-floor-regeneration; after ratification the existing class would have no required companion or equality coverage. Extend the realization to cover every currently enrolled class, or explicitly narrow the normative requirement before ratifying it.
- **Q-2. Does the companion rule bind the OTHER enrolled class, and the next
  one?** As written the requirement binds every enrolled candidate class, which
  reaches `codexfactory-routine-code` today and
  `openxfactory-review-lane-repin` if `admit-review-lane-repin-to-merge-approval-envelope`
  realizes. Whether the existing class's companion must be declared in the same

openspec/changes/amend-kill-switch-to-declared-test-companion/tasks.md:52

  • Task 1.3 says to add Ratified by: to every document, including proposal.md, but this repository distinguishes the proposal's operator-ratification citation (Ratified:) from Ratified by: <change>: the parent task uses Ratified: for proposal.md, and specs/document-lifecycle/spec.md:45-52 reserves Ratified by: for an approving OpenSpec change. Split this instruction by document so the eventual ratification does not produce the wrong lifecycle header.
- [ ] **1.3** On Brett Heap's ratifying word (1.1), and in ONE commit: ADD
      `approved_by`/`approved_on` beside the drafting pair in `.openspec.yaml`
      (`kind` and `id` unmoved; `document-lifecycle` § Proposal origin
      declaration), flip every `Status: draft` header in this packet to
      `Status: ratified` + `Ratified by:` with the citation, write
      `review/ratification-<date>.md` carrying `Status: ratified` and ONE
      citation of the word, and move the README row's status. The lane
  • Files reviewed: 7/7 changed files
  • Comments generated: 2
  • Review effort level: Lite

…ion; in-envelope comment grammar; assertion-only equality check

R1/R4 — the amended requirement binds EVERY enrolled candidate class and this
packet grandfathers none. Task 3.1 now declares a companion for every class
enrolled in the envelope at realization time (today two: codexfactory-routine-code
and openxfactory-floor-regeneration), each measured the same way; task 3.2's
equality test runs per class; design.md's former Q-2 is moved out of the open
questions and answered at filing; tasks 5.1 and proposal.md's Impact state the
block explicitly — not archivable while ANY enrolled class lacks a declared
companion and a passing equality test.

R2 — the sibling-declared-file option is dropped. The companion is declared in
.github/merge-approval-envelope.yml beside the candidate it belongs to, as
comment lines, with a fixed grammar (`# companion:` / `# companion-artefact:`)
and a stated discovery rule for the checker.

R3 — the equality check is on assertions only: the failing node ids from
withdrawing that class alone equal the declared companion set, both directions
and order-free. Artefacts are declared and existence-checked, and their movement
is proved by the failing set itself, so no artefact-diff procedure is needed or
claimed.

refs #745

Lane: openxfactory-2
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Copilot AI review requested due to automatic review settings September 11, 2026 11:47

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 findings affect validation, companion integrity, provenance, and execution sequencing.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details

Suppressed comments (9)

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

openspec/changes/amend-kill-switch-to-declared-test-companion/.openspec.yaml:56

  • This provenance text is already stale relative to the packet's own design record: design.md:294-297 says PR #957 merged at 2026-09-11T10:50:23Z, while this still says it is an open PR and warns of a possible conflict. Leaving both claims in the packet makes the origin evidence internally contradictory; update this block to describe the merged parent state.

openspec/changes/amend-kill-switch-to-declared-test-companion/.openspec.yaml:53

  • The provenance currently makes the throw and restore depend on “a real bot cycle,” but the procedure elsewhere separates the configuration PR/revert from the two real-cycle observations. This wording over-constrains the sequence and conflicts with task 4.1; scope the real-cycle qualifier to the observations.
    tick-on-the-recording rule of 2026-09-06 does not reach it: what 3.6 owes
    is a THROW, an OBSERVATION and a RESTORE on a real bot cycle, and this
    filing performs none of the three. No box anywhere is ticked by this pull

openspec/changes/amend-kill-switch-to-declared-test-companion/design.md:195

  • This procedure only runs the pinning pytest suite and compares its node IDs, while the requirement and task 4.1 require the withdrawal pull request to pass the repository's required checks. A failure in another required check is invisible here, so the later removal can remain unlandable even when this equality test passes. Run the complete required validation/check set, or explicitly define this suite as the entire required surface.
**And the equality check is on ASSERTIONS ONLY (D-2b, stated exactly).** Let
**A** be the set of failing pytest node ids obtained by withdrawing THAT CLASS
ALONE in a scratch tree and running the pinning suite. The conformance test
asserts that **A equals that class's declared `# companion:` set**, in both

openspec/changes/amend-kill-switch-to-declared-test-companion/proposal.md:3

  • target_release is prose (a code surface (in codexFactory)) rather than the implemented value or a named release required by release-realization (see openspec/specs/release-realization/spec.md:23-29 and docs/release-realization-flow.md:19-24). This leaves the realization target undefined for the code surface; use implemented (or an actual release id) here and keep the explanation in the body.
target_release: a code surface (in codexFactory), so per `release-realization` this packet archives ONLY on merged + green realization evidence, and the evidence is the codexFactory companion landed with that repository's required `validate` check green — `tests/merge-master/` included — plus the new conformance test passing against the declared companion. No contract bundle is cut, nothing under `contracts/` moves, no `contract_bundle_version` is spent, no digest set moves and NO RELEASE TAG IS OWED. The parent's box 3.6 OBSERVATION is a further and separate thing this packet does not claim as its own archive evidence: it needs a real bot cycle, which does not exist today (hourly floor-regeneration has reported "nothing owed" since 2026-09-10T17:22Z) and which no agent may manufacture (the class pins `expected_author: openxfactory[bot]`).

openspec/changes/amend-kill-switch-to-declared-test-companion/specs/roles-authority-model/spec.md:21

  • The spec says an owner can “apply exactly the companion,” but D-2c declares only failing node IDs and artifact paths, not the actual edit set or an invariant restricting those edits to expected-data/digest updates. Consequently, a throw could make the named tests pass by changing or weakening their assertions while still satisfying the stated equality, so “nothing else” and the notice-it-leaving guarantee are not reviewable or enforceable. Define the allowed companion edits (and an independent check for assertion preservation), or narrow this guarantee.
- **WHEN** the owner removes a candidate class from the enrolment declaration AND applies exactly the companion declared beside that class, and nothing else
- **THEN** the repository's required checks pass on that pull request and the removal lands

openspec/changes/amend-kill-switch-to-declared-test-companion/tasks.md:123

  • This equality is vacuous when withdrawing a class produces no failures: A = ∅ and an empty # companion: set satisfy it, even though the suite no longer notices the enrolment leaving. That contradicts the notice-it-leaving rule in spec.md:15. Require A and the declared assertion set to be non-empty before comparing them.
      asserts that the set of failing node ids EQUALS that class's declared
      `# companion:` set exactly — both directions, order-free — and that every

openspec/changes/amend-kill-switch-to-declared-test-companion/tasks.md:123

  • The equality test is defined as removing a class from a scratch tree and running the pinning suite, but the actual withdrawal pull request also applies the declared companion, including updates to the failing assertions and the golden digest. If the scratch tree starts from that current tree, the baseline failures no longer exist and the declared set cannot be reproduced; define an immutable pre-withdrawal baseline (and how the required check obtains it) before using this as the conformance gate.
- [ ] **3.2 The conformance test — RUN PER CLASS.** ONE codexFactory test
      that, per D-2c's grammar and for **EACH enrolled candidate class**,
      withdraws THAT class alone in a scratch tree, runs the pinning suite, and
      asserts that the set of failing node ids EQUALS that class's declared
      `# companion:` set exactly — both directions, order-free — and that every

openspec/changes/amend-kill-switch-to-declared-test-companion/tasks.md:125

  • This task names “ONE codexFactory test” but gives no test path and does not require that test to run in the required validate pytest path. Task 3.4 only says tests/merge-master/ is included, so a companion could leave the new equality check outside CI while still satisfying the stated green-suite evidence. Name the test file and explicitly wire it into the required check.
- [ ] **3.2 The conformance test — RUN PER CLASS.** ONE codexFactory test
      that, per D-2c's grammar and for **EACH enrolled candidate class**,
      withdraws THAT class alone in a scratch tree, runs the pinning suite, and
      asserts that the set of failing node ids EQUALS that class's declared
      `# companion:` set exactly — both directions, order-free — and that every
      declared `# companion-artefact:` path EXISTS in the tree, so a stale
      declaration is a failing check rather than a discovery made when the

openspec/changes/amend-kill-switch-to-declared-test-companion/tasks.md:149

  • The throw is a reviewed codexFactory configuration pull request; it cannot be “taken on a real bot cycle.” The real bot cycle is the subsequent evaluation used for the withdrawal/resumption observations, as distinguished by design.md §3. Requiring the throw itself to occur on that cycle makes this procedure impossible or unnecessarily blocks it.
- [ ] **4.1 The throw is ONE pull request.** In codexFactory: the
      `openxfactory-floor-regeneration` candidate entry's removal **together
      with exactly the declared companion**, and nothing else — landable against
      the repository's required checks, and taken on a real bot cycle rather
      than on a manufactured one.
  • Files reviewed: 7/7 changed files
  • Comments generated: 1
  • Review effort level: Lite

Only README.md conflicted, inside `## OpenSpec Records`. Resolved by keeping
both sides: this packet's `amend-kill-switch-to-declared-test-companion`
bullet stays the FIRST item under `Active changes:`, and every placement main
made is kept exactly as main has it — `amend-repo-boundary-governance-scope-first-line`
(archived by PR #958) stays under `Archived changes:` and is not duplicated in
Active. The stale `state-header-window-budget` bullet this branch was still
carrying under `Active changes:` — a leftover of the earlier merge ff26a87,
listing an already-archived change a second time and linking a path that no
longer exists in the tree — is dropped for the same reason: main's placement
governs, and main lists it only under `Archived changes:`.

The resolved README now differs from origin/main by exactly this packet's own
bullet and nothing else.

refs #745

Lane: openxfactory-2
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Copilot AI review requested due to automatic review settings September 11, 2026 12:10
…tion diff, not inferred from node ids

The review's ground is accepted, and the inference it names is withdrawn rather
than defended. Declaring a `# companion-artefact:` path and checking that the
path exists proved nothing about movement: existence does not prove the declared
file is the one whose recorded value moves, a failing node id does not identify
the path its run rewrites, a recording test can fail for a reason unrelated to
the withdrawal, and a shared snapshot can change without any declared node id
naming it.

So the conformance check is now TWO EQUALITIES, both measured in the SAME
scratch tree with the class alone withdrawn:

  (i)  ASSERTIONS — the set of failing pytest node ids equals that class's
       declared `# companion:` set, both directions, order-free;
  (ii) ARTEFACTS — each declared artefact is regenerated by ITS OWN declared
       recording command, and the set of paths `git diff --name-only` reports
       changed equals that class's declared `# companion-artefact:` set — no
       more, no less.

The grammar gains the command that makes (ii) executable:
`# companion-artefact: <path> regenerate: <command>`. An artefact with no
recording command therefore cannot be declared and cannot form part of an
enrolment's companion; supplying the missing command is the realizing
codexFactory companion's work, stated as such in task 3.1 rather than left to be
discovered. Existence stays necessary and is no longer the check. The objection
that a pytest run does not report moved paths is answered by not asking it to.

Encoded at:
  design.md D-2c grammar (the `regenerate:` field and why the command is part of
    the declaration), D-2b (rewritten: the two equalities, the withdrawn
    inference stated with its four grounds, and the realization constraint), and
    D-2's summary sentence, § 4's measurement parenthetical and Q-1
  specs/roles-authority-model/spec.md paragraph 3 (SHALL assert BOTH equalities;
    SHALL NOT infer movement from the failing assertions or an existence check;
    an artefact with no declared recording command SHALL NOT be declared) and
    the "companion is declared beside the declaration" scenario, which gains the
    artefact-diff bullet — requirement header unchanged, every scenario kept
  tasks.md 3.1 (grammar + supply the missing recording command) and 3.2
    (rewritten as the two equalities), with 5.1's archive block and proposal.md
    brought into line

refs #745

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

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

A critical procedure-order contradiction and unresolved moderate design issues remain.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details

Suppressed comments (5)

README.md:538

  • This wording implies that PR #957 ticked box 3.6, but the parent packet records that PR as ticking 3.3 while leaving 3.6 unticked; #957 only recorded the 3.6 finding. Please make this say that the finding was “recorded by PR #957” to preserve the packet’s filing-versus-observation distinction.
  box 3.6's 2026-09-11 finding (tick PR #957): N-4's ratified "takes one edit" is

openspec/changes/amend-kill-switch-to-declared-test-companion/design.md:398

  • Step 3 defines the measured set only from failing pytest node IDs, so a collection/import error or interrupted run that produces no node ID can be omitted from A. If the expected assertion failures are still present, the equality can then pass even though the required suite is not landable; record and fail on collection/internal errors (and require a complete run) separately before comparing the node-ID set.
   Let **A** be the set of failing pytest node ids obtained by running, on the
   baseline commit's tree, **THE WHOLE PINNING SUITE (`tests/merge-master/`) WITH
   THE CONFORMANCE MODULE ITSELF EXCLUDED BY PATH** — `pytest --ignore=<the
   conformance module's path>`, that path being a CONSTANT IN TRUSTED TEST CODE

openspec/changes/amend-kill-switch-to-declared-test-companion/design.md:183

  • The declaration format only permits the function-level forms <path>::<Class>::<test> / <path>::<test>, but step 3 compares the exact failing pytest node IDs. Parametrized tests produce node IDs with a [param] suffix, so a pinning test can fail while its measured ID cannot be represented by this grammar and the equality will fail or require ad-hoc normalization. Define whether the companion stores full parameterized IDs or a canonical base-ID normalization, and apply that rule to both measured and declared sets (and the throw locator).
- `# companion: <pytest node id>` for each assertion that pins the enrolment,
  the node id being `<path>::<Class>::<test>`, or `<path>::<test>` where there
  is no class. FUNCTION grain, which answers Q-3.

openspec/changes/amend-kill-switch-to-declared-test-companion/design.md:403

  • The measured assertion set is defined only as failing node IDs. If withdrawing a class makes one pinning test skip (for example, because it conditionally skips when the class is absent), that node disappears from A; with other assertions still failing, the non-empty equality can pass while the suite has silently stopped checking part of the enrolment. Compare the post-withdrawal collection/skip outcome with the pre-withdrawal run or fail on any newly skipped/deselected pinning node, rather than treating only failures as the complete inventory.
3. **MEASURE THE ASSERTIONS OVER AN INDEPENDENT, COMPLETE PINNING INVENTORY.**
   Let **A** be the set of failing pytest node ids obtained by running, on the
   baseline commit's tree, **THE WHOLE PINNING SUITE (`tests/merge-master/`) WITH
   THE CONFORMANCE MODULE ITSELF EXCLUDED BY PATH** — `pytest --ignore=<the
   conformance module's path>`, that path being a CONSTANT IN TRUSTED TEST CODE
   and never a value read from a declaration. **WHAT IS RUN IS NOT DERIVED FROM
   THE DECLARATION**: the captured `# companion:` set is the EXPECTED value only,
   so a pinning assertion the declaration OMITS is still run and still enters
   **A**. The conformance test asserts that **A equals that class's CAPTURED
   `# companion:` set**, in both directions and order-free, **and that A is NOT

openspec/changes/amend-kill-switch-to-declared-test-companion/proposal.md:15

  • The provenance sentence is missing an opening parenthesis before the codexFactory timestamp but closes one after it, leaving the two recorded timestamps unbalanced. Add the opening ( so this citation is unambiguous and matches the openxFactory timestamp format.
2026-09-11T09:42:11Z) and codexFactory #232, 2026-09-11T09:42:12Z) —
  • Files reviewed: 7/7 changed files
  • Comments generated: 1
  • Review effort level: Lite

… the control-first order in the requirement

refs #745

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

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

Critical and moderate findings remain in the design, proposal, and task documents.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details

Suppressed comments (7)

openspec/changes/amend-kill-switch-to-declared-test-companion/design.md:783

  • The answered-Q2 summary also omits the required step-2a control even though it claims to follow D-2b's fixed order. A reader implementing the per-class companion from this section could skip the empty-inventory control and lose causal attribution of generated files; include the pre-withdrawal control before committing the withdrawal baseline.
PROCEDURE, in the order D-2b fixes and `tasks.md` § 3.2 carries (capture the
declarations, commit the withdrawal as the baseline, measure the assertions over
the whole pinning suite with the conformance module excluded by its own path —
a measured set that may not be empty — regenerate every allowlisted artefact and
diff against the baseline, record), and

openspec/changes/amend-kill-switch-to-declared-test-companion/design.md:326

  • A single empty control inventory does not establish that an allowlisted generator is deterministic or idempotent. A tool that is time/random dependent can happen to write nothing on 2a, then write on the post-withdrawal run for an unrelated reason; the procedure would attribute that delta to the withdrawal and potentially accept a wrong artefact companion. Repeat the same tool from the unchanged control baseline (or otherwise verify reproducibility) before allowing its post-withdrawal delta to count.
   PRE-WITHDRAWAL as the **CONTROL BASELINE**; then run **EVERY identifier in the
   allowlist table** against that control baseline through the SAME loop step 4
   fixes — BARRIER, then RUN, then INVENTORY, one tool at a time — and REQUIRE
   **EVERY CONTROL INVENTORY TO BE EMPTY**. An allowlisted recording tool is
   REQUIRED to be DETERMINISTIC AND IDEMPOTENT: run on the tree it was last run
   on, it writes nothing. **A NON-EMPTY CONTROL INVENTORY IS A CONFORMANCE
   FAILURE AGAINST THAT IDENTIFIER**, recorded BEFORE the withdrawal is measured,
   and **ONLY AN IDENTIFIER THAT PASSED THE CONTROL RUN HAS ITS POST-WITHDRAWAL

openspec/changes/amend-kill-switch-to-declared-test-companion/design.md:403

  • The assertion measurement is defined only as a set of failing pytest node IDs, with no requirement that the run complete without collection, internal, or other non-node errors. A collection error can make the suite incomplete while contributing no node ID, so the captured set could still equal the declaration and let the conformance check pass without measuring the whole pinning suite. Fail the check on any incomplete/non-node pytest diagnostic before comparing the node sets.
3. **MEASURE THE ASSERTIONS OVER AN INDEPENDENT, COMPLETE PINNING INVENTORY.**
   Let **A** be the set of failing pytest node ids obtained by running, on the
   baseline commit's tree, **THE WHOLE PINNING SUITE (`tests/merge-master/`) WITH
   THE CONFORMANCE MODULE ITSELF EXCLUDED BY PATH** — `pytest --ignore=<the
   conformance module's path>`, that path being a CONSTANT IN TRUSTED TEST CODE
   and never a value read from a declaration. **WHAT IS RUN IS NOT DERIVED FROM
   THE DECLARATION**: the captured `# companion:` set is the EXPECTED value only,
   so a pinning assertion the declaration OMITS is still run and still enters
   **A**. The conformance test asserts that **A equals that class's CAPTURED
   `# companion:` set**, in both directions and order-free, **and that A is NOT

openspec/changes/amend-kill-switch-to-declared-test-companion/proposal.md:291

  • This archive-condition summary says it is describing the same five-step order but omits step 2a, the determinism control on the committed pre-withdrawal tree. That control is what makes the later artifact delta attributable to the withdrawal; include it before the step-2b withdrawal here rather than leaving the summary to imply that withdrawal is the second step.
and this packet states once there (capture the declarations, commit the
withdrawal as the baseline, measure the assertions over the whole pinning suite
with the conformance module excluded by its own path — a measured set that may
not be empty — regenerate every allowlisted artefact and diff against the
baseline, record), and

openspec/changes/amend-kill-switch-to-declared-test-companion/proposal.md:3

  • This target-release field says the behaviour digest moves “by the companion realization,” but the realization task explicitly forbids any golden-artifact movement; D-3's digest movements occur only in the later throw and restore pull requests. Please distinguish the later observation acts from the companion realization so the archive evidence cannot be read as requiring the digest to change in §3.
target_release: a code surface (in codexFactory), so per `release-realization` this packet archives ONLY on merged + green realization evidence, and the evidence is the codexFactory companion landed with that repository's required `validate` check green — `tests/merge-master/` included — plus the new conformance test passing against the declared companion. No contract bundle is cut, nothing under `contracts/` moves, no `contract_bundle_version` is spent, no openxFactory CONTRACT digest set moves and NO RELEASE TAG IS OWED (the codexFactory BEHAVIOUR-SNAPSHOT digest is a different artefact entirely: it is a DECLARED COMPANION ARTEFACT and it DOES move, in THAT repository, at the throw and again at the restore, by the companion realization — that movement is the point of design.md D-3, not an exception to this sentence). The parent's box 3.6 OBSERVATION is a further and separate thing this packet does not claim as its own archive evidence: it needs a real bot cycle, which does not exist today (hourly floor-regeneration has reported "nothing owed" since 2026-09-10T17:22Z) and which no agent may manufacture (the class pins `expected_author: openxfactory[bot]`).

openspec/changes/amend-kill-switch-to-declared-test-companion/proposal.md:3

  • release-realization requires target_release to be implemented or a named aggregation release (openspec/specs/release-realization/spec.md:23-29). a code surface (in codexFactory) is neither, so this proposal's realization metadata is not compliant even though the following text identifies codexFactory's main line as the evidence target. Use the implemented form and keep the codexFactory details in the prose.
target_release: a code surface (in codexFactory), so per `release-realization` this packet archives ONLY on merged + green realization evidence, and the evidence is the codexFactory companion landed with that repository's required `validate` check green — `tests/merge-master/` included — plus the new conformance test passing against the declared companion. No contract bundle is cut, nothing under `contracts/` moves, no `contract_bundle_version` is spent, no openxFactory CONTRACT digest set moves and NO RELEASE TAG IS OWED (the codexFactory BEHAVIOUR-SNAPSHOT digest is a different artefact entirely: it is a DECLARED COMPANION ARTEFACT and it DOES move, in THAT repository, at the throw and again at the restore, by the companion realization — that movement is the point of design.md D-3, not an exception to this sentence). The parent's box 3.6 OBSERVATION is a further and separate thing this packet does not claim as its own archive evidence: it needs a real bot cycle, which does not exist today (hourly floor-regeneration has reported "nothing owed" since 2026-09-10T17:22Z) and which no agent may manufacture (the class pins `expected_author: openxfactory[bot]`).

openspec/changes/amend-kill-switch-to-declared-test-companion/tasks.md:122

  • This five-step synopsis jumps from declaration capture directly to the withdrawal and omits mandatory step 2a: commit the pre-withdrawal control baseline, run every allowlisted tool, and require empty inventories before step 2b. Without that control, a non-deterministic generator's output can be misattributed to the withdrawal, so please include 2a here and keep the other summaries synchronized.
      statement of it and is not restated here: capture the declarations from
      the pre-withdrawal envelope, commit the withdrawal as the baseline,
      measure the assertions over the whole pinning suite with the conformance
      module excluded by its own path, regenerate every allowlisted artefact and
      diff against the baseline commit, record. Each companion is declared using
  • Files reviewed: 7/7 changed files
  • Comments generated: 2
  • Review effort level: Lite

…ling, since NOSYSTEM alone leaves the user's global config active

refs #745

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

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

Clarify scratch-baseline ordering, realization scope, and complete required-check coverage.

Review details

Suppressed comments (5)

openspec/changes/amend-kill-switch-to-declared-test-companion/design.md:235

  • This design places the tracked-path check in Step 1 but scopes it to a hermetic scratch repository and a control baseline that are only introduced/committed in Step 2a below. Without explicitly staging the pre-withdrawal tree before capture, git ls-files has no defined control index to inspect, making the stated order underspecified. Define that setup in Step 1 or move the tracking check to immediately after the control-baseline commit, before withdrawal.
not TRACK at the control baseline (`git ls-files --error-unmatch -- <path>` in
the hermetic scratch repository, the path passed AFTER `--` and under
`GIT_LITERAL_PATHSPECS=1`, so a pull-request-editable declaration reaches git as
an OPERAND MATCHED LITERALLY — never an option, never a pathspec pattern; the
lexical refusal above already rejects a leading `-`, a leading `:` and every

openspec/changes/amend-kill-switch-to-declared-test-companion/specs/roles-authority-model/spec.md:11

  • The normative procedure requires the declaration and tracking check to be captured before withdrawal, but it also requires tracking to be tested against a control baseline that is committed only after the control-run stage. Because no scratch index/control-baseline setup is defined before capture, an implementation cannot satisfy both requirements literally. Clarify that the pre-withdrawal scratch index is prepared before capture, or move the tracked-path check to after the control commit and before withdrawal.
The companion SHALL be declared, and the declaration SHALL be kept honest by a test. Where a class is enrolled, the assertions that pin that enrolment — every conformance assertion that fails when the class is withdrawn, INCLUDING any golden or snapshot artefact whose recorded value moves with the withdrawal — SHALL be named beside the enrolment in the same reviewed declaration; and a conformance test SHALL assert BOTH EQUALITIES, each MEASURED AGAINST THE CAPTURED DECLARATION IN A COMMITTED POST-WITHDRAWAL BASELINE: the declaration SHALL be read and RETAINED BEFORE the withdrawal is applied, since the withdrawal removes it from the tree in which the measurement is taken; and a scratch tree in which that class alone is withdrawn — its enrolment declaration and the companion declaration lines beside it removed, and nothing else — SHALL carry that withdrawal COMMITTED as the baseline BEFORE ANY POST-WITHDRAWAL MEASUREMENT IS TAKEN, so that what is measured afterwards is only what the measurement itself changes. THE ORDER OF THE PROCEDURE IS FIXED HERE ONCE, AND THE CONTROL RUN PRECEDES THE WITHDRAWAL: the DETERMINISM CONTROL BELOW SHALL BE MEASURED FIRST, ON THE PRE-WITHDRAWAL TREE ITSELF COMMITTED AS THE CONTROL BASELINE; THEN the withdrawal SHALL be COMMITTED as the MEASUREMENT BASELINE; AND ONLY THEN SHALL the ASSERTION and REGENERATION MEASUREMENTS be taken against it. The committed-baseline rule therefore binds the measurements that FOLLOW the withdrawal and never the control that must PRECEDE it, so a literal implementation can satisfy both orderings. Against that baseline the test SHALL assert that the CAPTURED companion ASSERTIONS equal the set that actually pin the enrolment — the measured set being obtained by RUNNING THE COMPLETE PINNING SUITE WITH THE CONFORMANCE MODULE EXCLUDED BY ITS OWN PATH, a measurement INDEPENDENT OF THE DECLARATION so that a pinning assertion the declaration OMITS is still run and still enters the measured set — and that the CAPTURED companion ARTEFACTS equal what REGENERATING EVERY ARTEFACT IN THE ALLOWLIST TABLE actually produces, not only those the declaration names, so that an artefact that moves undeclared is caught by the same equality: THE SET OF (IDENTIFIER, PATH) PAIRS PRODUCED BY REGENERATING EVERY ALLOWLISTED ARTEFACT ONE TOOL AT A TIME FROM THE BASELINE SHALL EQUAL THE DECLARED PAIRS — each allowlisted tool run ALONE from the committed baseline, THE TREE RESET TO THAT BASELINE AND VERIFIED EMPTY IMMEDIATELY BEFORE EVERY RUN, THE FIRST RUN INCLUDED, so that EVERY PATH THE TOOL CREATED, MODIFIED OR DELETED, TRACKED OR NOT, is ATTRIBUTED to the identifier that produced it AND NOTHING ELSE IS. EVERY ALLOWLISTED RECORDING TOOL SHALL BE DETERMINISTIC AND IDEMPOTENT: A CONTROL REGENERATION ON THE COMMITTED PRE-WITHDRAWAL TREE SHALL PRODUCE AN EMPTY INVENTORY, OR THE TOOL IS NON-CONFORMANT; and DETERMINISM HERE SHALL MEAN THAT THE TOOL LEAVES THE TREE BYTE-IDENTICAL, IGNORED AND UNTRACKED PATHS INCLUDED, so that a tool emitting caches or scratch files is non-conformant rather than excused, EVERY ALLOWLISTED INVOCATION BEING RUN WITH INTERPRETER CACHES SUPPRESSED — `PYTHONDONTWRITEBYTECODE=1` and `PYTHONPYCACHEPREFIX` pointed OUTSIDE the scratch tree, and the companion design SHALL NAME THE EQUIVALENT for any non-Python runtime it allowlists. That CONTROL RUN SHALL be taken BEFORE the withdrawal is measured and on the PRE-WITHDRAWAL tree ITSELF COMMITTED as the CONTROL BASELINE, every allowlisted tool run one at a time under THE SAME BARRIER, RUN AND INVENTORY LOOP the measurement uses; a NON-EMPTY control inventory SHALL be a failing check recorded AGAINST THAT IDENTIFIER and evaluated BEFORE the withdrawal is measured, and ONLY an identifier that PASSED the control run SHALL have its post-withdrawal delta counted. Without that control the equality never establishes that a path moved BECAUSE OF the withdrawal: a tool that rewrites its output on EVERY run — a recorded timestamp among them — produces the same delta whatever the tree holds and would be attributed to the class regardless; with it, EVERY ATTRIBUTED PATH IS ONE THE WITHDRAWAL CAUSED. THE BY-PRODUCTS OF THE ASSERTION MEASUREMENT THAT PRECEDES THE REGENERATIONS — the untracked and ignored test caches its suite run leaves behind — SHALL be removed by that reset before the first regeneration and SHALL form no part of any identifier's inventory. EVERY ALLOWLISTED INVOCATION SHALL EXIT SUCCESSFULLY, and a NON-ZERO EXIT OR A TIMEOUT SHALL be a failing check recorded against that identifier and evaluated BEFORE its delta is read, that delta forming no pair at all, so that a recording tool which writes its declared paths and then fails cannot be reported as conformant on the strength of the pair equality alone. THE INVENTORY FOR EACH TOOL SHALL BE THE FULL WORKING-TREE DELTA AGAINST THAT BASELINE — tracked modifications and deletions, UNTRACKED files, and IGNORED files alike, taken after the tool's run and before the tree is restored — and SHALL NOT be a comparison of tracked content alone, which would not see a new or ignored file at all; AN IGNORED PATH A TOOL PRODUCES SHALL COUNT AS PRODUCED and SHALL fail the equality — ALWAYS, a declared artefact being a TRACKED path — exactly as an undeclared tracked one does, so that a generator writing an output where version control does not look is caught rather than admitted; a DECLARED pair whose identifier did not produce that path SHALL fail even where another allowlisted tool produced it, an UNDECLARED pair produced by any allowlisted tool SHALL fail, and the equality of the bare path sets SHALL be a CONSEQUENCE of that pair equality rather than the check, since a comparison of the path union alone cannot detect an artefact bound to the wrong recording tool — no more and no less, in both directions. NEITHER MEASURED SET SHALL BE DERIVED FROM THE DECLARATION IT IS COMPARED AGAINST: a check that runs only what the declaration names cannot detect what the declaration omits, and self-invocation SHALL be prevented by excluding the conformance module BY ITS OWN PATH rather than by narrowing either inventory. Each such artefact SHALL be named by A NORMALIZED REPOSITORY-RELATIVE POSIX PATH CONTAINED IN THE CHECKOUT, and the check SHALL REFUSE THE DECLARATION AT CAPTURE IN TWO STAGES. FIRST A LEXICAL REFUSAL THAT TOUCHES NO FILESYSTEM AT ALL: the declaration SHALL be refused where the declared path is AN ABSOLUTE PATH, CARRIES ANY `..` SEGMENT, ANY `.` SEGMENT, A BACKSLASH, AN EMPTY SEGMENT, A TRAILING SLASH, ANY NON-POSIX SEPARATOR, ANY PATH OR SEGMENT BEGINNING WITH `-`, ANY GLOB OR PATHSPEC-MAGIC CHARACTER (`*`, `?`, `[` OR `]`), OR A LEADING `:` — this stage opening nothing, resolving nothing and consulting no metadata, so a hostile spelling is refused before the filesystem is consulted at all; and this set of refusal classes is STATED HERE NORMATIVELY AND REPEATED VERBATIM wherever else this packet states it, so that the refusal set is ONE set rather than a list per site. THEN, AND ONLY FOR A PATH THAT SURVIVES THAT STAGE, A CONTAINMENT CHECK: the path SHALL be RESOLVED, following symlinks, and the resolved result SHALL be required to lie under the repository ROOT'S OWN RESOLVED PATH; this stage MAY consult filesystem METADATA, since resolution necessarily does, but SHALL NOT OPEN OR READ THE ARTEFACT BEFORE CONTAINMENT HOLDS. A refusal at EITHER stage SHALL name the refusal class and the offending declaration, so that a pull-request-editable declaration can neither reach outside the checkout nor be compared in a non-canonical spelling. AND EACH DECLARED ARTEFACT SHALL BE A TRACKED PATH AT THE CONTROL BASELINE: a recorded value lives in the tree by definition, so the check SHALL REFUSE AT THAT SAME CAPTURE a declared path that version control DOES NOT TRACK at that baseline, naming that refusal class and the offending declaration, and AN IGNORED OR UNTRACKED PATH IS THEREFORE NEVER DECLARABLE. Each such artefact SHALL be regenerated by AN ALLOWLISTED RECORDING TOOL NAMED BY IDENTIFIER IN THE DECLARATION AND RESOLVED ONLY IN REVIEWED TEST CODE: the declaration SHALL carry a bare identifier and SHALL NOT carry a command, an argument or any other text that is executed; that identifier SHALL be resolved to a fixed invocation by a table held in the reviewed conformance test code and run without a shell; and an identifier absent from that table SHALL fail the check rather than be resolved or executed, so that an edit to the declaration can never introduce execution. The movement of an artefact SHALL be measured by that regeneration DELTA against the baseline and SHALL NOT be inferred from the failing assertions, an existence check, or any other proxy; that delta SHALL NOT be narrowed to the declared paths, nor to tracked content alone, so that a path no declaration names is caught rather than hidden; and an artefact whose regeneration identifier is not declared and resolvable SHALL NOT be declared at all, and therefore cannot form part of an enrolment's companion. The model SHALL NOT accept an enrolment whose withdrawal fails NO conformance assertion: the measured set for every enrolled class SHALL be non-empty, and an empty measured set is a failing check, never a vacuous pass. So a stale declaration in either half is a failing check rather than a discovery made at the moment the switch is thrown.

openspec/changes/amend-kill-switch-to-declared-test-companion/specs/roles-authority-model/spec.md:13

  • This SHALL NOT is broader than the conformance procedure that follows: the procedure measures only the tests/merge-master/ node set and allowlisted artifact generators, but never runs the repository's required checks after applying the captured companion. An enrollment can therefore satisfy both equalities while another required check still rejects the withdrawal, so the stated landability guarantee is not established. Either scope the requirement to the checks actually measured or add an explicit post-companion run of the complete required-check gate.
The model SHALL NOT accept an enrolment whose withdrawal, WITH THE DECLARED COMPANION APPLIED AND NOTHING ELSE, is not landable against the repository's required checks. APPLYING THE COMPANION SHALL MEAN re-targeting each declared assertion's EXPECTATION to the post-withdrawal tree — the assertion re-targeted rather than deleted, skipped or weakened, so that it keeps noticing the enrolments that remain — and regenerating each declared artefact by the allowlisted recording tool its own declaration names; and NOTHING ELSE SHALL BIND AT BOTH LEVELS: (a) AT THE PATH LEVEL, NO CHANGE TO ANY FILE outside the enrolment declaration, the declared assertions' files and the declared artefact paths; AND (b) AT THE ASSERTION LEVEL, WITHIN a declared assertion's OWN FILE, NO CHANGE TO ANY ASSERTION, FIXTURE, HELPER OR IMPORT other than the declared node ids' EXPECTATIONS. THE PATH-LEVEL BOUND ALONE IS NOT THE BOUND: it is satisfied by a withdrawal that rewrites an UNDECLARED assertion inside a DECLARED file, which is precisely the change the declaration exists to bound. BOTH LEVELS SHALL BE VERIFIED BY THE WITHDRAWING PULL REQUEST'S REVIEWERS READING THE DIFF HUNK BY HUNK AGAINST THE DECLARATION, and a withdrawal that breaches EITHER LEVEL SHALL BE REFUSED. An enrolment that cannot be withdrawn by a landable pull request is not enrolled under a kill switch, however the declaration describes itself.

openspec/changes/amend-kill-switch-to-declared-test-companion/tasks.md:219

  • Step 1 requires this git ls-files check to run in Step 2's hermetic scratch repository against the control baseline, but the procedure only creates/configures that repository and commits the pre-withdrawal control baseline in Step 2a below. At this point there is no defined index/control baseline to query, so the required sequence cannot be followed literally. Either define scratch-repository/index setup before this check or defer the tracking check until immediately after the Step 2a commit (and before 2b).
      (step 2's hermetic environment) so it is an OPERAND MATCHED LITERALLY
      rather than an option or a pathspec pattern, issued in step 2's hermetic
      scratch repository on the
      PRE-WITHDRAWAL tree this step parsed — the tree step 2a commits UNCHANGED
      as the CONTROL BASELINE — so the refusal is decided before any withdrawal

openspec/changes/amend-kill-switch-to-declared-test-companion/tasks.md:146

  • This clause permits adding a recording/regeneration entry point in codexFactory, but the packet's declared realization surface is only the envelope comment block plus one trusted conformance test, and task 3.3 says that module and declarations are the only realization bytes. As written, a missing generator can require an unbounded third surface and contradict the later “nothing else” gate; constrain the supplied entry point to the trusted conformance module, or explicitly add its file to the authorized surface and the 3.3 scope.
      identifier is a reviewed test-code change, not a declaration edit. **An
      artefact with no declared, resolvable identifier cannot be declared**, so
      where a declared artefact has none this task SUPPLIES ONE (a
      recording/regeneration entry point in codexFactory, plus its table row)
  • Files reviewed: 7/7 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

…tch-to-declared-test-companion

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

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 specification and conformance gaps remain.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details

Suppressed comments (9)

README.md:538

  • This parenthesized wording is ambiguous against the parent task, which explicitly leaves box 3.6 unchecked and says the finding was measured, not thrown (openspec/changes/extend-merge-master-envelope-to-floor-bot-lanes/tasks.md:540-558). “tick PR #957” can read as saying that box was ticked; describe PR #957 as recording the finding instead.
  box 3.6's 2026-09-11 finding (tick PR #957): N-4's ratified "takes one edit" is

openspec/changes/amend-kill-switch-to-declared-test-companion/design.md:797

  • The closure condition is repeated here with the same ambiguous lacks ... and ... wording. If this is read as a conjunction of absences, a class missing only one prerequisite can pass the archive gate; make the predicate explicitly require either missing prerequisite to block archival.
and 3.2 carry it per class, and tasks § 5.1 states that this packet is **not
archivable while ANY enrolled candidate class lacks a declared companion and a
passing conformance test over BOTH equalities**. It is recorded here rather

openspec/changes/amend-kill-switch-to-declared-test-companion/design.md:809

  • This list is headed “Open questions — declared, not answered,” but Q-3 immediately says “Answered” and D-2c/spec.md already fix the granularity. Keeping a resolved decision in the unresolved-question list makes the packet's review state inaccurate; move Q-3 into the answered-at-filing record or remove it from this list.
- **Q-3. Should the declaration name assertions at test-function granularity or
  at file granularity?** Answered: node-id (function) grain for assertions,
  file grain for artefacts (D-2c).

openspec/changes/amend-kill-switch-to-declared-test-companion/design.md:406

  • Step 3 measures only the set of failing node IDs. Because the suite already has skipped cases, a test that turns into a skip/xfail/deselection when the class is withdrawn is invisible to this equality; a different failure can keep the set non-empty and make the declaration appear complete. Add a pre-withdrawal outcome control and fail on newly non-failing pinning nodes, not just missing failures.
   Let **A** be the set of failing pytest node ids obtained by running, on the
   baseline commit's tree, **THE WHOLE PINNING SUITE (`tests/merge-master/`) WITH
   THE CONFORMANCE MODULE ITSELF EXCLUDED BY PATH** — `pytest --ignore=<the
   conformance module's path>`, that path being a CONSTANT IN TRUSTED TEST CODE
   and never a value read from a declaration. **WHAT IS RUN IS NOT DERIVED FROM

openspec/changes/amend-kill-switch-to-declared-test-companion/proposal.md:294

  • This archive predicate can be read as requiring a class to lack both conditions before it blocks archive. A class with a declared companion but no passing conformance test (or vice versa) could therefore satisfy a literal not companion and not test check. State that the class lacks either condition, and keep the same predicate in tasks.md and design.md.
**This packet is NOT ARCHIVABLE while ANY enrolled candidate class lacks a
declared companion and a passing conformance test over both equalities**

openspec/changes/amend-kill-switch-to-declared-test-companion/specs/roles-authority-model/spec.md:11

  • The measured assertion companion is defined only as failing pytest node IDs. A pinning test can become skipped, xfailed, deselected, or otherwise stop asserting after the withdrawal and still be absent from that set; if another test fails, the non-empty/equality checks pass while the suite no longer notices that pin. Compare post-withdrawal outcomes with a pre-withdrawal control and reject newly non-failing outcomes (or include them in the measured inventory).
The companion SHALL be declared, and the declaration SHALL be kept honest by a test. Where a class is enrolled, the assertions that pin that enrolment — every conformance assertion that fails when the class is withdrawn, INCLUDING any golden or snapshot artefact whose recorded value moves with the withdrawal — SHALL be named beside the enrolment in the same reviewed declaration; and a conformance test SHALL assert BOTH EQUALITIES, each MEASURED AGAINST THE CAPTURED DECLARATION IN A COMMITTED POST-WITHDRAWAL BASELINE: the declaration SHALL be read and RETAINED BEFORE the withdrawal is applied, since the withdrawal removes it from the tree in which the measurement is taken; and a scratch tree in which that class alone is withdrawn — its enrolment declaration and the companion declaration lines beside it removed, and nothing else — SHALL carry that withdrawal COMMITTED as the baseline BEFORE ANY POST-WITHDRAWAL MEASUREMENT IS TAKEN, so that what is measured afterwards is only what the measurement itself changes. THE ORDER OF THE PROCEDURE IS FIXED HERE ONCE, AND THE CONTROL RUN PRECEDES THE WITHDRAWAL: the DETERMINISM CONTROL BELOW SHALL BE MEASURED FIRST, ON THE PRE-WITHDRAWAL TREE ITSELF COMMITTED AS THE CONTROL BASELINE; THEN the withdrawal SHALL be COMMITTED as the MEASUREMENT BASELINE; AND ONLY THEN SHALL the ASSERTION and REGENERATION MEASUREMENTS be taken against it. The committed-baseline rule therefore binds the measurements that FOLLOW the withdrawal and never the control that must PRECEDE it, so a literal implementation can satisfy both orderings. Against that baseline the test SHALL assert that the CAPTURED companion ASSERTIONS equal the set that actually pin the enrolment — the measured set being obtained by RUNNING THE COMPLETE PINNING SUITE WITH THE CONFORMANCE MODULE EXCLUDED BY ITS OWN PATH, a measurement INDEPENDENT OF THE DECLARATION so that a pinning assertion the declaration OMITS is still run and still enters the measured set — and that the CAPTURED companion ARTEFACTS equal what REGENERATING EVERY ARTEFACT IN THE ALLOWLIST TABLE actually produces, not only those the declaration names, so that an artefact that moves undeclared is caught by the same equality: THE SET OF (IDENTIFIER, PATH) PAIRS PRODUCED BY REGENERATING EVERY ALLOWLISTED ARTEFACT ONE TOOL AT A TIME FROM THE BASELINE SHALL EQUAL THE DECLARED PAIRS — each allowlisted tool run ALONE from the committed baseline, THE TREE RESET TO THAT BASELINE AND VERIFIED EMPTY IMMEDIATELY BEFORE EVERY RUN, THE FIRST RUN INCLUDED, so that EVERY PATH THE TOOL CREATED, MODIFIED OR DELETED, TRACKED OR NOT, is ATTRIBUTED to the identifier that produced it AND NOTHING ELSE IS. EVERY ALLOWLISTED RECORDING TOOL SHALL BE DETERMINISTIC AND IDEMPOTENT: A CONTROL REGENERATION ON THE COMMITTED PRE-WITHDRAWAL TREE SHALL PRODUCE AN EMPTY INVENTORY, OR THE TOOL IS NON-CONFORMANT; and DETERMINISM HERE SHALL MEAN THAT THE TOOL LEAVES THE TREE BYTE-IDENTICAL, IGNORED AND UNTRACKED PATHS INCLUDED, so that a tool emitting caches or scratch files is non-conformant rather than excused, EVERY ALLOWLISTED INVOCATION BEING RUN WITH INTERPRETER CACHES SUPPRESSED — `PYTHONDONTWRITEBYTECODE=1` and `PYTHONPYCACHEPREFIX` pointed OUTSIDE the scratch tree, and the companion design SHALL NAME THE EQUIVALENT for any non-Python runtime it allowlists. That CONTROL RUN SHALL be taken BEFORE the withdrawal is measured and on the PRE-WITHDRAWAL tree ITSELF COMMITTED as the CONTROL BASELINE, every allowlisted tool run one at a time under THE SAME BARRIER, RUN AND INVENTORY LOOP the measurement uses; a NON-EMPTY control inventory SHALL be a failing check recorded AGAINST THAT IDENTIFIER and evaluated BEFORE the withdrawal is measured, and ONLY an identifier that PASSED the control run SHALL have its post-withdrawal delta counted. Without that control the equality never establishes that a path moved BECAUSE OF the withdrawal: a tool that rewrites its output on EVERY run — a recorded timestamp among them — produces the same delta whatever the tree holds and would be attributed to the class regardless; with it, EVERY ATTRIBUTED PATH IS ONE THE WITHDRAWAL CAUSED. THE BY-PRODUCTS OF THE ASSERTION MEASUREMENT THAT PRECEDES THE REGENERATIONS — the untracked and ignored test caches its suite run leaves behind — SHALL be removed by that reset before the first regeneration and SHALL form no part of any identifier's inventory. EVERY ALLOWLISTED INVOCATION SHALL EXIT SUCCESSFULLY, and a NON-ZERO EXIT OR A TIMEOUT SHALL be a failing check recorded against that identifier and evaluated BEFORE its delta is read, that delta forming no pair at all, so that a recording tool which writes its declared paths and then fails cannot be reported as conformant on the strength of the pair equality alone. THE INVENTORY FOR EACH TOOL SHALL BE THE FULL WORKING-TREE DELTA AGAINST THAT BASELINE — tracked modifications and deletions, UNTRACKED files, and IGNORED files alike, taken after the tool's run and before the tree is restored — and SHALL NOT be a comparison of tracked content alone, which would not see a new or ignored file at all; AN IGNORED PATH A TOOL PRODUCES SHALL COUNT AS PRODUCED and SHALL fail the equality — ALWAYS, a declared artefact being a TRACKED path — exactly as an undeclared tracked one does, so that a generator writing an output where version control does not look is caught rather than admitted; a DECLARED pair whose identifier did not produce that path SHALL fail even where another allowlisted tool produced it, an UNDECLARED pair produced by any allowlisted tool SHALL fail, and the equality of the bare path sets SHALL be a CONSEQUENCE of that pair equality rather than the check, since a comparison of the path union alone cannot detect an artefact bound to the wrong recording tool — no more and no less, in both directions. NEITHER MEASURED SET SHALL BE DERIVED FROM THE DECLARATION IT IS COMPARED AGAINST: a check that runs only what the declaration names cannot detect what the declaration omits, and self-invocation SHALL be prevented by excluding the conformance module BY ITS OWN PATH rather than by narrowing either inventory. Each such artefact SHALL be named by A NORMALIZED REPOSITORY-RELATIVE POSIX PATH CONTAINED IN THE CHECKOUT, and the check SHALL REFUSE THE DECLARATION AT CAPTURE IN TWO STAGES. FIRST A LEXICAL REFUSAL THAT TOUCHES NO FILESYSTEM AT ALL: the declaration SHALL be refused where the declared path is AN ABSOLUTE PATH, CARRIES ANY `..` SEGMENT, ANY `.` SEGMENT, A BACKSLASH, AN EMPTY SEGMENT, A TRAILING SLASH, ANY NON-POSIX SEPARATOR, ANY PATH OR SEGMENT BEGINNING WITH `-`, ANY GLOB OR PATHSPEC-MAGIC CHARACTER (`*`, `?`, `[` OR `]`), OR A LEADING `:` — this stage opening nothing, resolving nothing and consulting no metadata, so a hostile spelling is refused before the filesystem is consulted at all; and this set of refusal classes is STATED HERE NORMATIVELY AND REPEATED VERBATIM wherever else this packet states it, so that the refusal set is ONE set rather than a list per site. THEN, AND ONLY FOR A PATH THAT SURVIVES THAT STAGE, A CONTAINMENT CHECK: the path SHALL be RESOLVED, following symlinks, and the resolved result SHALL be required to lie under the repository ROOT'S OWN RESOLVED PATH; this stage MAY consult filesystem METADATA, since resolution necessarily does, but SHALL NOT OPEN OR READ THE ARTEFACT BEFORE CONTAINMENT HOLDS. A refusal at EITHER stage SHALL name the refusal class and the offending declaration, so that a pull-request-editable declaration can neither reach outside the checkout nor be compared in a non-canonical spelling. AND EACH DECLARED ARTEFACT SHALL BE A TRACKED PATH AT THE CONTROL BASELINE: a recorded value lives in the tree by definition, so the check SHALL REFUSE AT THAT SAME CAPTURE a declared path that version control DOES NOT TRACK at that baseline, naming that refusal class and the offending declaration, and AN IGNORED OR UNTRACKED PATH IS THEREFORE NEVER DECLARABLE. Each such artefact SHALL be regenerated by AN ALLOWLISTED RECORDING TOOL NAMED BY IDENTIFIER IN THE DECLARATION AND RESOLVED ONLY IN REVIEWED TEST CODE: the declaration SHALL carry a bare identifier and SHALL NOT carry a command, an argument or any other text that is executed; that identifier SHALL be resolved to a fixed invocation by a table held in the reviewed conformance test code and run without a shell; and an identifier absent from that table SHALL fail the check rather than be resolved or executed, so that an edit to the declaration can never introduce execution. The movement of an artefact SHALL be measured by that regeneration DELTA against the baseline and SHALL NOT be inferred from the failing assertions, an existence check, or any other proxy; that delta SHALL NOT be narrowed to the declared paths, nor to tracked content alone, so that a path no declaration names is caught rather than hidden; and an artefact whose regeneration identifier is not declared and resolvable SHALL NOT be declared at all, and therefore cannot form part of an enrolment's companion. The model SHALL NOT accept an enrolment whose withdrawal fails NO conformance assertion: the measured set for every enrolled class SHALL be non-empty, and an empty measured set is a failing check, never a vacuous pass. So a stale declaration in either half is a failing check rather than a discovery made at the moment the switch is thrown.

openspec/changes/amend-kill-switch-to-declared-test-companion/tasks.md:587

  • This repeats the ambiguous archive predicate: wording with and can permit archive when only one of the companion or conformance-test conditions is missing, depending on how the gate is implemented. Use an explicit either ... or ... condition so every enrolled class must have both, and keep it aligned with the proposal and design.
      observation is an unarchivable packet by construction, not an oversight.** **THIS PACKET IS NOT ARCHIVABLE WHILE ANY ENROLLED
      CANDIDATE CLASS LACKS A DECLARED COMPANION AND A PASSING CONFORMANCE TEST
      OVER BOTH EQUALITIES.**

openspec/changes/amend-kill-switch-to-declared-test-companion/tasks.md:403

  • The inventory is not lossless for all path spellings admitted by the grammar: porcelain v1 text quotes paths containing characters such as ", and a literal path containing -> can be mistaken for a rename when the procedure splits every status line that way. Such an artefact can be misattributed and produce a false companion equality. Use NUL-delimited porcelain with a rename-aware parser, or reject every spelling the text parser cannot represent.
      hermetic git environment as **`git status --porcelain=v1
      --untracked-files=all --ignored=matching`**, taking the path from EVERY
      status line, counting a RENAME as BOTH paths, and taken IMMEDIATELY AFTER
      that identifier's run and BEFORE the next iteration's barrier.

openspec/changes/amend-kill-switch-to-declared-test-companion/tasks.md:165

  • The per-class loop does not require an isolated scratch repository. If the implementation reuses this tree, the first class's removal remains committed when the next class is measured, so the next capture is not a pre-withdrawal envelope/control baseline and its deltas are contaminated. Require a fresh hermetic scratch tree (or restore the original pre-withdrawal tree) at the start of each class iteration.
      IN THIS ORDER, RUN PER ENROLLED CLASS.** ONE codexFactory test that, per D-2c's
      grammar and for **EACH enrolled candidate class**, performs exactly the
      sequence below. **THE ORDER IS PART OF THE RULE**: every later step
  • Files reviewed: 7/7 changed files
  • Comments generated: 2
  • Review effort level: Lite

…timeout, and refuse an assertion run that never produced node ids

refs #745

Lane: openxfactory-2
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Copilot AI review requested due to automatic review settings September 11, 2026 16:55
@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

A moderate documentation issue remains in the landability/conformance explanation, alongside minor consistency fixes.

Review details

Suppressed comments (4)

README.md:539

  • PR #957 explicitly says parent box 3.6 was left unchecked ([ ]); it only recorded the finding while ticking 3.3. “(tick PR #957)” reads as though this observation box was ticked, contradicting the packet's own repeated claim that 3.6 remains open. Please identify #957 as recording the finding instead.
  box 3.6's 2026-09-11 finding (tick PR #957): N-4's ratified "takes one edit" is
  measured false (29 required-check assertions across five test files, plus a

openspec/changes/amend-kill-switch-to-declared-test-companion/proposal.md:15

  • The codexFactory citation has an unmatched closing parenthesis after its timestamp; add the opening parenthesis before that timestamp so the two record citations are balanced.
2026-09-11T09:42:11Z) and codexFactory #232, 2026-09-11T09:42:12Z) —

openspec/changes/amend-kill-switch-to-declared-test-companion/tasks.md:169

  • This section calls itself the packet's SINGLE statement and says design.md, the scenarios, and proposal.md only point to it, but those artifacts reproduce substantial parts of the five-step procedure (for example, design.md §2 and the requirement/scenarios above). Maintaining multiple normative copies creates a concrete drift risk; make §3.2 the sole procedural source and reference it elsewhere, or remove the single-source claim.
      order cannot hold. This list is the packet's SINGLE statement of the
      procedure; 3.1 above, `design.md` D-2b, the `## MODIFIED` scenarios and
      `proposal.md` point AT IT rather than restate it.

openspec/changes/amend-kill-switch-to-declared-test-companion/tasks.md:533

  • This calls landability a consequence of enumerating the failing assertions and regenerating artefacts, but the required validate check is not established as being composed only of those measurements. The conformance equality can pass while another required check remains red; task 3.4's separate full-validate gate confirms that green validation is an additional verification, not a consequence. State that gate explicitly here instead of claiming the equality proves it.
      **LANDABILITY IS THEN A CONSEQUENCE, not a further hope:** every assertion
      that would fail is one this pull request re-targets, and every artefact
      that would move is one it regenerates, so codexFactory's required
      `validate` check passes ON THE THROW'S OWN TREE.
  • Files reviewed: 7/7 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

@brettheap

Copy link
Copy Markdown
Contributor Author

Lane: openxfactory-2 (openXfactory-2)
LANDING — lane openxfactory-2 (openXfactory-2), session 703e3647, 2026-09-11T17:18:57Z, PR #959 into openxFactory main
Pre-flight PASS at head c6008f1: required checks success, 0 unresolved threads, closingIssuesReferences 0, no open LANDING for this repo. Brett Heap ${WORD_WHEN:-2026-09-11, in session, multi-choice SELECTION}, verbatim: "Accept the finding; file a successor".

@brettheap
brettheap merged commit 07a8a45 into main Sep 11, 2026
12 checks passed
@brettheap

Copy link
Copy Markdown
Contributor Author

Lane: openxfactory-2 (openXfactory-2)
LANDED — lane openxfactory-2 (openXfactory-2), 2026-09-11T17:19:14Z, PR #959 → 07a8a45 (window closed)
Brett Heap ${WORD_WHEN:-2026-09-11, in session, multi-choice SELECTION}, verbatim: "Accept the finding; file a successor". --squash --admin at head c6008f1 (code-owner review cannot clear on a self-authored PR; admin merge on his word, B2 pattern).

brettheap added a commit that referenced this pull request Sep 11, 2026
…erged-into-empty-tail-standing

origin/main had moved to cc4ae9d (past the branch's 3402d93 base, and
past 07a8a45 which had already landed while the first merge was in
flight) while this PR sat open: PR #959 (amend-kill-switch-to-declared-
test-companion, filed DRAFT, touches README.md and
tests/sequenced_after/corpus-ledger.yaml) and PR #940 (split-opendox § 5.2
shed, a large deletion of the retired ideation_dashboard module plus its
tests, contracts/schemas and examples, plus edits to
.github/workflows/pytest-suite.yml, docs/opendox-carve-manifest.yaml,
several validate-*.py scripts and openspec/changes/split-opendox-two-layer-
product/).

Only README.md conflicted, at the same site as the earlier merge: HEAD had
already moved amend-merged-into-empty-tail-standing's row out of Active
changes (this archive PR does that move), while origin/main still carried
it there unarchived. Resolved the same way — kept origin/main's new
amend-kill-switch-to-declared-test-companion row and dropped the stale
active amend-merged-into-empty-tail-standing row entirely; it survives
only in Archived changes, where this branch already placed it with the PR
#973 citation. The archived directory
openspec/changes/archive/2026-09-11-amend-merged-into-empty-tail-standing/
is untouched (`git diff HEAD -- <dir>` empty after this commit).

Every other file that both sides touched (or origin/main deleted)
auto-merged clean, none of it under this packet's own path.
tests/sequenced_after/corpus-ledger.yaml auto-merged clean: this branch's
one row (amend-merged-into-empty-tail-standing: archived, moved_by "#973")
and origin/main's new row (amend-kill-switch-to-declared-test-companion:
active, moved_by "#959") both stand.

refs #914

Lane: openxfactory-1
Co-Authored-By: Claude Sonnet 5 <[email protected]>
brettheap added a commit that referenced this pull request Sep 11, 2026
… events and § 2 scope

Eight findings from the lane's independent verifier on head 5d0a7b1, all
RULED ACCEPT, encoded in one commit. No mechanism, no decision and no
ratifying act changes: every fix is a factual or wording correction inside
the record and its mirrors.

- V1 LANDING TIME. PR #959 merged 2026-09-11T17:19:09Z and its squash
  commit 07a8a45 carries committer date 17:19:08Z. The figure
  2026-09-11T17:19:14Z that this packet carried is the LANDER'S OBSERVATION
  time - the moment the landing script read the merge back. Corrected at
  review/ratification-2026-09-11.md, README.md's packet row and the pull
  request body, and the Records section now states what 17:19:14Z is, so
  the FILED landing records that carry it (openxFactory #745 comment
  5638082322, codexFactory #232 comment 5638082613) stand as filed.
  Corrects the landing time recorded in 819d7f4's message: PR #959 merged
  at 17:19:09Z; 17:19:14Z was the lander's observation time. That message
  is not rewritten - no history rewrite, no force push.
- V2 NO MERGE. The "Landing PR #959 ... is a SEPARATE act" bullet was
  prospective about a pull request item 10 of the same record says already
  landed; it now reads NO MERGE BY THIS RECORD and states #959's landing in
  the past, with the Rule 6 act owed by the pull request carrying this
  ratifying commit named separately.
- V3 ROUND SPAN. "Rounds 7 through 21 (2026-09-11 12:58Z-16:52Z)" matched
  neither the rulings' span nor the encodes'; every mirror (record, README
  row, proposal.md's Ratified: paragraph, pull request body) now reads
  "ruled ~12:52Z through ~16:52Z; encoded by pushes 12:57Z through 16:55Z,
  the last being c6008f1".
- V4 FINAL HEAD. "the final head" was applied to the squash commit and
  #959's actual final head was named nowhere. Every site now names PR
  #959's final head c6008f1 (committed 2026-09-11T16:55:31Z; rounds 1-21
  encoded) and says it landed on main as squash commit 07a8a45.
- V5 SECTION 2. "Every box in tasks.md § 3, § 4 and § 5 stays unticked"
  omitted § 2; it now reads § 2, § 3, § 4 and § 5, matching tasks.md's own
  header and the pull request body.
- V6 ORDER OF EVENTS. Items 7 and 8 were out of sequence against round 6's
  encode commit 62d9c99 (12:35:51Z, after the 12:34Z typed word). Item 7 is
  now the RULING and the REPORT to Brett Heap (~12:30Z), item 8 the typed
  word given after that report, and item 9 opens with round 6's encode.
- V7 DRAFT STATE. The pull request body's "is opened as a DRAFT" was stale;
  it now records the draft opening (17:32Z) and the ready-for-review mark
  (18:25Z), with landing still a separate Rule 6 act.
- V8 DOUBLED HEDGE. "at approximately 11:58Z (approx.)" and the 12:16Z twin
  drop the redundant parenthetical in the record and in design.md.

Validation: openspec validate amend-kill-switch-to-declared-test-companion
--strict passes; --all --strict fails on exactly origin/main's two
pre-existing items (disposition-codexfactory-declared-renames,
disposition-codexfactory-floor-relocation-retitle); doc-health
proposal-origin / ratified-provenance / status-validity name this packet in
0 lines each, unchanged from head 5d0a7b1; every packet file's Status: line
sits within its first 15 lines; validate-sequenced-after.py exits 0.

Lane: openxfactory-2
Co-Authored-By: Claude Fable 5.1 <[email protected]>
brettheap added a commit that referenced this pull request Sep 11, 2026
…election "Ratify as filed" (#974)

* Ratify amend-kill-switch-to-declared-test-companion on Brett Heap's selection "Ratify as filed"

Brett Heap, openxFactory repository owner, first-hand and in session, gave
THREE acts, all three recorded in ONE openxFactory #745 comment
(5634512736): word one, 2026-09-11 at approximately 11:58Z, a SELECTION —
the option "Ratify as filed (Recommended)", whose description read "Ratify
the text as landed. Realization (the codexFactory companion) and archive
stay separate later acts on your word, per the three-act pattern."; word
two, at approximately 12:16Z, a SECOND SELECTION — "Yes, ratify with the
tightening (Recommended)" — confirming that word one covers round 5's
tightening (each declared companion artefact carries its own regeneration
command, and the conformance test asserts that the set of paths changed by
regenerating equals the declared artefact set); and word three, at
approximately 12:34Z, TYPED VERBATIM — "land it when green and apply the
ratify" — given after the lane reported round 6's three deltas and
reaffirmed verbatim through the afternoon, which the lane reads as covering
rounds 6 through 21 (all Copilot findings ruled accept by the lane, none of
them a change of mechanism). What is ratified is the packet's text at the
final head 07a8a45 (2026-09-11T17:19:14Z),
rounds 1-21 encoded: the amended requirement and D-1 through D-6, all
standing as recommended with no veto exercised. No realization in either
repository, no archive, no throw of the kill switch, no tick of the
parent's box 3.6 and no box in sections 2-5 of this packet: those remain
separate later acts on Brett Heap's word. Record:
openspec/changes/amend-kill-switch-to-declared-test-companion/review/ratification-2026-09-11.md

refs #745

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

* Carry the ratification citation in tasks.md's header and mark proposal.md's at-filing block as history

Two Copilot findings on the ratifying commit, both wording of the record and
neither a change to what was ratified. (1) tasks.md carried `Status:
ratified` with no ratification citation inside the 15-line lifecycle header
window, the ruling text sitting far below it: a `Ratified by:` line now sits
beside the status, naming Brett Heap's three acts and the record path, and
saying in the same breath that the two paragraphs below it record the
at-filing state and that no box in sections 2 through 5 is ticked. (2)
proposal.md's `Proposed:` block still read in the present tense — "This
document is a PROPOSAL", "none has been given" — which after the status flip
contradicted the `Ratified:` paragraph above it: the block is kept VERBATIM
as history and a qualifier above it states that its negations were true at
filing and are superseded by the ratification, while realization and archive
remain separate later acts on Brett Heap's word with no word for either
given. No ruled text, no decision, no mechanism and no box moves.

refs #745

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

* Correct the ratification record's landing facts, round span, order of events and § 2 scope

Eight findings from the lane's independent verifier on head 5d0a7b1, all
RULED ACCEPT, encoded in one commit. No mechanism, no decision and no
ratifying act changes: every fix is a factual or wording correction inside
the record and its mirrors.

- V1 LANDING TIME. PR #959 merged 2026-09-11T17:19:09Z and its squash
  commit 07a8a45 carries committer date 17:19:08Z. The figure
  2026-09-11T17:19:14Z that this packet carried is the LANDER'S OBSERVATION
  time - the moment the landing script read the merge back. Corrected at
  review/ratification-2026-09-11.md, README.md's packet row and the pull
  request body, and the Records section now states what 17:19:14Z is, so
  the FILED landing records that carry it (openxFactory #745 comment
  5638082322, codexFactory #232 comment 5638082613) stand as filed.
  Corrects the landing time recorded in 819d7f4's message: PR #959 merged
  at 17:19:09Z; 17:19:14Z was the lander's observation time. That message
  is not rewritten - no history rewrite, no force push.
- V2 NO MERGE. The "Landing PR #959 ... is a SEPARATE act" bullet was
  prospective about a pull request item 10 of the same record says already
  landed; it now reads NO MERGE BY THIS RECORD and states #959's landing in
  the past, with the Rule 6 act owed by the pull request carrying this
  ratifying commit named separately.
- V3 ROUND SPAN. "Rounds 7 through 21 (2026-09-11 12:58Z-16:52Z)" matched
  neither the rulings' span nor the encodes'; every mirror (record, README
  row, proposal.md's Ratified: paragraph, pull request body) now reads
  "ruled ~12:52Z through ~16:52Z; encoded by pushes 12:57Z through 16:55Z,
  the last being c6008f1".
- V4 FINAL HEAD. "the final head" was applied to the squash commit and
  #959's actual final head was named nowhere. Every site now names PR
  #959's final head c6008f1 (committed 2026-09-11T16:55:31Z; rounds 1-21
  encoded) and says it landed on main as squash commit 07a8a45.
- V5 SECTION 2. "Every box in tasks.md § 3, § 4 and § 5 stays unticked"
  omitted § 2; it now reads § 2, § 3, § 4 and § 5, matching tasks.md's own
  header and the pull request body.
- V6 ORDER OF EVENTS. Items 7 and 8 were out of sequence against round 6's
  encode commit 62d9c99 (12:35:51Z, after the 12:34Z typed word). Item 7 is
  now the RULING and the REPORT to Brett Heap (~12:30Z), item 8 the typed
  word given after that report, and item 9 opens with round 6's encode.
- V7 DRAFT STATE. The pull request body's "is opened as a DRAFT" was stale;
  it now records the draft opening (17:32Z) and the ready-for-review mark
  (18:25Z), with landing still a separate Rule 6 act.
- V8 DOUBLED HEDGE. "at approximately 11:58Z (approx.)" and the 12:16Z twin
  drop the redundant parenthetical in the record and in design.md.

Validation: openspec validate amend-kill-switch-to-declared-test-companion
--strict passes; --all --strict fails on exactly origin/main's two
pre-existing items (disposition-codexfactory-declared-renames,
disposition-codexfactory-floor-relocation-retitle); doc-health
proposal-origin / ratified-provenance / status-validity name this packet in
0 lines each, unchanged from head 5d0a7b1; every packet file's Status: line
sits within its first 15 lines; validate-sequenced-after.py exits 0.

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

---------

Co-authored-by: Claude Fable 5.1 <[email protected]>
brettheap added a commit that referenced this pull request Sep 12, 2026
…easure

D2's ruled option is "Sweep in this PR" — the corpus as it stands — and a
sweep's population is a fact about a tree, so it is measured at the head the
sweep lands on. The merge of `origin/main` `1f068646` brought in
`amend-kill-switch-to-declared-test-companion` (landed with #959,
2026-09-11T17:19:09Z), whose `target_release:` declaration carries no leading
token at all: it opens as a running sentence, so the value token is the
article `a` and the gate refuses it (exit 1), reddening
`test_corpus_target_release_validates` with it.

Swept by the same one-token correction the other five took — `a` ->
`implemented` before the author's own gloss, carried verbatim after an em
dash. That `implemented` is the author's own meaning and not this lane's
judgment: the gloss reads "No contract bundle is cut, nothing under
`contracts/` moves ... and NO RELEASE TAG IS OWED". Registering it instead was
not available: the register is CLOSED by D1's ruled option, an entry may be
removed and never added.

- `design.md` D2a: the sweep as performed, six carriers with the sixth's
  class, its custody check, the alternative refused, and the live-corpus race
  disclosed rather than closed. D2's three options are left exactly as they
  were put and ruled.
- Four tests (70 -> 74): a running sentence's first word IS its token; the
  swept form reads as `implemented`; both again end to end.
- Accounting made literally true where it is a live claim: `proposal.md`
  code_surface, the before/after table and its prose, `tasks.md` 3.4, 3.5, new
  3.18, and 4.1/4.3/4.4/4.6/4.9 re-measured at this head. Historical bench
  records anchored to a named tree are left as the records they are.

Re-measured after: `validate-target-release.py .` exit 0 — 41 active, 41
declaring, 17 `implemented`, 3 a named release, 21 named by the register, 0
outside; `origin/main` `1f068646` exit 1 — 40 active, 10 `implemented`, 6
outside, the six named by path.

refs #956

Lane: openxfactory-1
Co-Authored-By: Claude Fable 5.1 <[email protected]>
brettheap added a commit that referenced this pull request Sep 21, 2026
…aration text and the five-step procedure, as this repository's half (#1129)

Lane: openxfactory-2 (openXfactory-2)

**THE WORD, VERBATIM.** Brett Heap, 2026-09-21, on openxFactory #745: ***"do 1 and 2, claim 5"***. Item 2 is this: realize §§ 2.1–2.5 and 3.1–3.3 of the ratified packet `amend-kill-switch-to-declared-test-companion`. **STOP BEFORE § 4** — it needs a real bot cycle, which no agent may manufacture.

**ONE FILE MOVES**: `openspec/changes/amend-kill-switch-to-declared-test-companion/tasks.md` (+215 / −5). openxFactory's half of this packet carries **NO CODE** (`proposal.md`'s `code_surface`), and **NO codexFactory BYTE IS AUTHORED HERE** — that companion is that repository's lane's to write (`design.md` D-5).

## Boxes TICKED — satisfied on `main` by the filing, each with its evidence written beneath the box

- **2.1 — ticked.** `specs/roles-authority-model/spec.md` carries ONE `## MODIFIED Requirements` block (line 3) and ONE header (line 5), character-for-character the parent's at `openspec/changes/extend-merge-master-envelope-to-floor-bot-lanes/specs/roles-authority-model/spec.md:53`; first body line (line 7) opens *"The model SHALL ensure…"*; FIVE scenarios at lines 19, 26, 31, 38, 44 — the parent's TWO (its `:56` amended, its `:61` broadened) plus the THREE added. The parent block is `:53–:65` and carries no third scenario, so **nothing was silently dropped**. Landed by `07a8a45b`, +47 lines, the file's only commit.
- **2.2 — ticked.** `proposal.md`'s SECOND heading is `## THIS FILING AMENDS A RATIFIED DECISION (N-4) BY SUPERSESSION, AND SAYS SO HERE` (line 98, after `# Proposal:` at line 7); N-4 quoted VERBATIM as a block quote at lines 107–111; the clause named at line 113.
- **2.3 — ticked.** `.openspec.yaml` carries all five elements under their own leads: the finding with its figures (line 7), the two records (31), the authorizing SELECTION verbatim with time and place (38), the parent's box 3.6 open and an OBSERVATION box (49), filing ≠ ratifying (58). `approved_by` (98) / `approved_on` (127) were ADDED beside the unmoved `proposed_by` (69) / `proposed_on` (97) by the ratifying commit `c521504c` — task 1.3's act, not this one's.
- **2.4 — ticked.** `07a8a45b`'s README hunk is `@@ -530,6 +530,21 @@`: fifteen lines added immediately after `Active changes:` and therefore **at the HEAD**, one row and no other README line moved, naming the status (`Status: draft`), the lane, the authority (the SELECTION *"Accept the finding; file a successor"*, #745 comment 5632569506) and **FILING ≠ RATIFYING**. Two things have moved since, both by design: task 1.3 moved the row's status (so it now closes **RATIFICATION ONLY**), and later filings have been prepended above it (`README.md:1057` today). "At the HEAD" is a statement about the ACT, which the diff proves.
- **2.5 — ticked, re-measured in a fresh clone at `main` = `93a5ce2b`.** Figures below. The two bookkeeping rows stand at `tests/sequenced_after/corpus-ledger.yaml:203` (this packet) and `:238` (the parent, `sole` → `co-modifier`), both `moved_by: "#959"`. **No ledger row moves by this act**, so the ledger is NOT re-seeded — `--ledger-diff` exits 0 after the tick exactly as before it.

## Boxes ANNOTATED and deliberately LEFT OPEN

- **3.1, 3.2, 3.3 — annotated, NOT ticked.** Their DONE criterion is a **codexFactory byte** (the corrected banner and the companion declarations in `.github/merge-approval-envelope.yml`; the conformance test and its `identifier -> argv` table under `tests/merge-master/`), and this lane authors none of it — § 3's own heading, `proposal.md`'s `code_surface` and `design.md` D-5 each say so independently. Each box now carries a dated 2026-09-21 annotation recording **what openxFactory has discharged, as TEXT**: the declaration SITE and GRAMMAR (`design.md` D-2, lines 153–240 — the comment-block site, the withdrawn sibling-file option, `# companion:` at function grain, `# companion-artefact: … regenerate: <identifier>` at file grain, the path constraint and the one refusal set repeated at its three sites); the FIVE-STEP PROCEDURE (this packet's single statement of it, in box 3.2 itself); the same invariants stated normatively at `specs/roles-authority-model/spec.md:11` with scenarios at `:31` and `:44`; and `design.md` D-2e's line between those invariants and *"THE EXACT COMMANDS, FLAGS AND HELPER LAYOUT [which] ARE THE codexFactory COMPANION CHANGE'S DESIGN TO SPECIFY"*. Each annotation states what the box **TICKS ON**. A § 3 preamble note reconciles them with that section's *"No byte below is written by this lane"*: what is added is a RECORD, not a realization, and not one byte of it is a codexFactory byte.

## Deliberately NOT done

- **§ 4 (4.1–4.5) is not reached and not ticked.** It owes a throw, an observation, a restore and a second observation on a **real bot cycle**, which does not exist (hourly floor-regeneration has reported "nothing owed" since 2026-09-10T17:22Z) and which **no agent may manufacture** — the class pins `expected_author: openxfactory[bot]`. § 5.1 (archive) likewise untouched; the parent's box 3.6 stays OPEN and is not ticked here or anywhere by this pull request.
- **The codexFactory companion is not authored here.** No envelope byte, no banner sentence, no comment block, no allowlist row, no conformance test. Verified read-only: `.github/merge-approval-envelope.yml` on codexFactory `main` is byte-identical to the blob the packet recorded — `fa8773628ef69dceab3a912740850c0432ffbce3`, re-read 2026-09-21 — so **nothing is thrown and nothing is touched**.
- **No README edit, no ledger re-seed, no spec/proposal/design text changed.** The ratified requirement, scenarios and design decisions are untouched; this pull request moves task state and adds dated realization annotations only.

## Validation — all foreground, in the fresh clone, on the committed text

| check | result |
| --- | --- |
| `OPENSPEC_TELEMETRY=0 openspec validate amend-kill-switch-to-declared-test-companion --strict` | **valid**; one INFO — *"Archive would refuse this delta … not found"* — the expected reading of a `## MODIFIED` over a sibling's UNARCHIVED addition, the same fact `sequenced_after` and task 5.1(c) already record |
| `OPENSPEC_TELEMETRY=0 openspec validate --all --strict` | **106 passed, 1 failed (107 items)** — `add-chain-attestation`, pre-existing, **identical to the `main` baseline measured before the edit** |
| `python3 scripts/proposal-support.py . verify` | `proposal support verification ok`, exit 0 |
| `python3 scripts/validate-sequenced-after.py . --ledger-diff` | *"per-change sweep ledger consistent with the corpus (222 rows)"*, exit 0; deepest declared chain resolved at 4 hops |
| `python3 scripts/doc-health.py --single-repo . --family modified-block-currency` | exit 0; **12** findings, every one `severity=info class=contested`, **finding set byte-identical to the pre-edit baseline**, none naming this packet |
| `pytest -q -p no:cacheprovider tests/doc-health/test_modified_block_currency_self_gate.py tests/sequenced_after` | **306 passed**, exit 0 |

Lands under Rule 6 on Brett Heap's landing word when the eight required checks are green and Copilot is clean.

refs #745
refs #959

🤖 Generated with [Claude Code](https://claude.com/claude-code)

## Summary by Sourcery

Record the filing-side realization of § 2 and define the remaining codexFactory and real-bot-cycle work without performing either cross-repository implementation.

Enhancements:
- Record completion evidence for all § 2 filing requirements and document the openXfactory contribution to the cross-repository realization procedure.
- Annotate §§ 3.1–3.3 with the declaration grammar, five-step conformance procedure, realization boundaries, and remaining codexFactory responsibilities while leaving those boxes open.
- Explicitly preserve the separation between filing, codexFactory realization, bot-cycle validation, and archival work.

Tests:
- Document the fresh-clone validation results and unchanged baseline status for OpenSpec validation, sequencing, documentation health, and targeted tests.

Chores:
- Update the task checklist to reflect the realized filing state without modifying production code, repository specifications, or ledger entries.
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