Skip to content

Set the retired marker's reason to None in the added test (the Copilot nit refused on #719, now on Brett's word) - #733

Merged
brettheap merged 1 commit into
mainfrom
fix/retired-reason-none-in-added-test
Sep 6, 2026
Merged

brettheap merged 1 commit into
mainfrom
fix/retired-reason-none-in-added-test

Conversation

@brettheap

Copy link
Copy Markdown
Contributor

Lane: openxfactory-1

This one line sets the hand-built retired marker's .reason to None in test_a_reason_quoting_a_REAL_canon_unit_suppresses_it_under_the_retired_rule. That test emulates the RETIRED names rule (every code span in the tail is a name) by overriding retired.names after re-parsing the paragraph with the AMENDED parser, but it left .reason as the amended parser computed — a value the retired rule would not produce. Under the retired rule, reason is everything after the LAST code span's following —; in this paragraph nothing follows the last span (`**THEN** the run reports`) but " bullet, which carries the obligation whole", with no — in front of it, so the retired reading's reason is None. .reason is read only inside _pairing_state, which handles the Modified over (pairing) form exclusively — suppression never reads it — and this marker is a Removed from canon marker, so no assertion in the test (names, suppressed, defective) can move on this change.

This finding was left by Copilot on PR #719 (amend-marker-reason-boundary, merged 0d009d97) and was REFUSED there, not because it was wrong, but because the file is inside the ratified baseline named by review/ratification-2026-09-06.md (the four packet files, the delta, and the code surface: scripts/doc_health/modified_block_currency.py and this test file) — editing a baseline file after the ratifying word, on the lane's own judgement, would make the record untrue of what landed. It is taken now on Brett Heap's word, 2026-09-06, multiple choice, label verbatim "Archive; nit as its own PR first": the nit lands first as its own plain-fix PR, then the amend-marker-reason-boundary packet archives.

Verification (verbatim):

$ python3 -m pytest tests/doc-health/test_modified_block_currency.py -q
........................................................................ [ 56%]
........................................................                 [100%]
128 passed in 1.86s

$ python3 -m pytest tests/doc-health -q
...
1587 passed, 7 warnings in 341.73s (0:05:41)

$ python3 scripts/doc-health.py --family modified-block-currency --single-repo .
Findings: 0 critical, 0 error, 0 warning, 8 info. New regressions vs previous report: 0.
(unchanged)

$ python3 scripts/validate-sequenced-after.py .
sequenced_after validation passed (38 active changes, 3 declaring the field).

No OpenSpec change — plain fix.

Refs #692

🤖 Generated with Claude Code

https://claude.ai/code/session_01JZqmqSDBCmY4cfhPbxN9Xb

In test_a_reason_quoting_a_REAL_canon_unit_suppresses_it_under_the_retired_rule,
the hand-built `retired` marker emulated the retired names rule but left
`.reason` as the AMENDED parser computed it. Under the retired rule reason is
everything after the LAST code span's following ` — `; no ` — ` follows the
last span here, so the retired reading's reason is None. `suppression` never
reads `.reason` on this Removed-from-canon marker, so no assertion moves.

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

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hi @brettheap! 👋

Your private repo does not have access to Sourcery.

Please upgrade to continue using Sourcery ✨

@brettheap

Copy link
Copy Markdown
Contributor Author

Lane: openxfactory-1 (openXfactory-1)

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

The change is a narrowly-scoped test correction that aligns the test fixture with the intended retired-rule semantics and does not introduce functional risk.

Pull request overview

This PR updates an existing doc-health regression test to more faithfully emulate the retired marker parsing semantics by ensuring the hand-constructed “retired” marker has a None reason, matching what the retired rule would yield for that paragraph shape.

Changes:

  • In test_a_reason_quoting_a_REAL_canon_unit_suppresses_it_under_the_retired_rule, explicitly set retired.reason = None after overriding retired.names, aligning the marker object with the retired rule’s reason extraction behavior for the test paragraph.
File summaries
File Description
tests/doc-health/test_modified_block_currency.py Adjusts the constructed “retired” marker in a regression test so its reason matches the retired rule (None for this paragraph), avoiding a mixed amended/retired marker state.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Lite

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

@brettheap

Copy link
Copy Markdown
Contributor Author

Lane: openxfactory-1 (openXfactory-1)

FROZEN at f4f318a2 — all nine required checks green, no further commits from this lane. Review threads: 0. Copilot: approval recommended, 0 comments. Codex absent ×1 (usage-limited) — recorded as ABSENCE, not clearance.

Provenance for the admin merge of #733 (one-line plain fix in a test; no OpenSpec change). Word: Brett Heap, 2026-09-06T23:10Z, in session, by multiple choice, label verbatim "Archive; nit as its own PR first" — recorded on #692; this PR is the "nit as its own PR first" half, landing ahead of the archive of amend-marker-reason-boundary. The finding was REFUSED on #719 as inside the ratified baseline and is taken here on that word. Self-authored PR (brettheap) → REVIEW_REQUIRED structural → admin merge (B2). No Rule 6 window (no openspec/changes/ path).

🤖 Generated with Claude Code

https://claude.ai/code/session_01JZqmqSDBCmY4cfhPbxN9Xb

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