Skip to content

Realize align-status-reader-to-real-lines: one shared line rule for every lifecycle-header reader - #222

Merged
brettheap merged 6 commits into
mainfrom
change/align-status-reader-to-real-lines
Aug 20, 2026
Merged

brettheap merged 6 commits into
mainfrom
change/align-status-reader-to-real-lines

Conversation

@brettheap

Copy link
Copy Markdown
Contributor

Realizes the ratified change align-status-reader-to-real-lines (ratified 2026-08-19, PR #218), widened in-session by ruling: the delta's every-reader clause governs over the proposal's original narrow code_surface: enumeration.

What this does

  • New scripts/doc_health/lines.py carries the line rule (split on CR, LF, CRLF only; lossless rejoin, join(split(t)) == t), placed on the measured dependency direction (ideation_dashboard → doc_health). The reasoning docstring moved with the code.
  • Eleven readers now scan real lines through the shared primitive: corpus.parse_status/parse_kind, families._header_line/_scan_lines, inventory._header_value, organizer_dispatch._header_value, ideation_readiness._parse_header, doxbench_packet.lifecycle_status, authoring.missing_required_headers, generator._header_value, completeness._Prepared.lines — plus the standalone bootstrap twin (bootstrap-ideation-cross-reference.py), converted and pinned to agree by a companion test. round_trip.py imports the primitive instead of carrying its own copy; the writer's behavior is unchanged by construction (verified by object identity).
  • Demonstrated harms closed along the way: a false CRITICAL ratified-provenance finding manufactured by split readers on one window constant; a vacuous "SAME rule" agreement in doxbench; a fabricated Status: field read out of a form feed inside a different field's value that mis-clustered readiness; the completeness scoring module contradicting the agent gate on the same six header fields.
  • Deliberately deferred survivors are recorded with rulings, not silently skipped (tasks.md §7): families._template_gaps, ideation_routing._scan_lines, families._staged_exit_changes, and proposal-support.py's own status rules (out of the deterministic pass's boundary; the sibling PR Realize refine-demote-round-trip-mechanics: origin resolution, returned-artifact headers, fence-aware authorship, enriched demote slot #221 rewrites those sites with an agreement-tested local primitive). The code_surface: front matter states the actual boundary the delta draws.

Verification

  • Build → adversarial Opus review → fix, four laps; the reviewer independently demonstrated every finding and re-verified every closure, including running the sweep methods the change itself prescribes.
  • Every conversion is mutation-pinned: reverting any single reader to splitlines() fails a named test (verified one-at-a-time, live source reverts).
  • doc-health baseline byte-identical across all six branch tips — same report md5 at base and at every round, 324/324 files examined asserted nonzero each run; the reviewer extended the zero-movement measurement to all 1227 governed aggregation files across every converted reader.
  • Gates: openspec validate --all --strict 63/63; tests/ideation-dashboard 3491 passed; tests/doc-health exactly the four known pre-existing test_client_identity_composition failures, enumerated, nothing else.
  • Cross-branch: merges cleanly with change/refine-demote-round-trip-mechanics (PR Realize refine-demote-round-trip-mechanics: origin resolution, returned-artifact headers, fence-aware authorship, enriched demote slot #221) in both orders; merged-tree test runs green.

target_release: implementation_pending — the change stays ACTIVE until realization evidence is recorded at the archive gate; the banner states the surface is built on this branch.

🤖 Generated with Claude Code

brettheap and others added 6 commits August 19, 2026 15:56
Move the CR/LF/CRLF-only line-splitting rule out of
ideation_dashboard/round_trip.py's private copy into a new
scripts/doc_health/lines.py, and point corpus.parse_status /
parse_kind at it so the 15-line header window counts real lines
instead of str.splitlines() fragments. Closes the read half of the
divergence left open by align-demote-to-round-trip-rule: a header
carrying an exotic line-boundary character (form feed, U+2028, ...)
could previously make doc-health report a correct document as
lacking a status it plainly has.

round_trip.py now imports split_keepends/join_rows from the shared
module instead of defining them; gate_console._flip_status is
unchanged by construction since it already called round_trip's
re-exported names. Sweep for scripts/**/*.py using the same
text.splitlines()[:N] idiom recorded in corpus.py: six further call
sites share the pattern but are out of this change's ratified code
surface (doxbench_packet.lifecycle_status, authoring.
missing_required_headers, generator._header_value, inventory.
_header_value, families._header_line, organizer_dispatch.
_header_value) and are left for a follow-up change with its own
baseline diff.

Co-Authored-By: Claude Fable 5 <[email protected]>
Sections 1-5 (primitive, readers, writer re-export, tests, gates) and
6.1 (README record, already true at proposal time) are done; 6.2
(archive-gate realization evidence) stays open per
target_release: implementation_pending.

Co-Authored-By: Claude Fable 5 <[email protected]>
… every reader

Brett's same-day ruling (2026-08-19, in-session multiple choice, recommended
option adopted) resolved the adversarial review's spec contradiction WIDE:
the delta's "SHALL hold for every reader of that header" governs over the
first realization's narrower code_surface enumeration, on a measured zero
baseline cost (1227 governed aggregation files, zero exotic separators,
zero window differences, zero value changes).

Converts the six remaining pseudo-line readers the earlier sweep recorded
but deliberately left untouched, plus one unbounded sibling defect (C3) the
sweep's grep pattern could not match:
- doc_health.families._header_line and _scan_lines (the latter unbounded,
  disagreeing with round_trip.py on any exotic-boundary heading fixture)
- doc_health.inventory._header_value
- doc_health.organizer_dispatch._header_value
- ideation_dashboard.doxbench_packet.lifecycle_status
- ideation_dashboard.authoring.missing_required_headers
- ideation_dashboard.generator._header_value

All now scan through doc_health.lines.split_keepends, the same primitive
corpus.parse_status/parse_kind and round_trip.py already used.

Per-finding disposition:
- C1 (false ratified-provenance finding via families._header_line): closed;
  new mutation-checked test in tests/doc-health/test_families_real_lines.py.
- C2 (doxbench_packet's "SAME rule" comment claim, unfulfilled): closed;
  comment corrected, and its vacuous real-corpus-only agreement test gets a
  synthetic exotic-separator companion plus a mutation check.
- C3 (families._scan_lines, a live second Python line rule): closed; its
  fence-toggle predicate stays a separate, unconverted, textually-pinned
  rule (test_the_shared_predicate_is_spelled_the_same_in_all_three).
- C4 (stale sweep-justification comment in corpus.py): rewritten to record
  the ruling and the zero-cost measurement instead of a false cost claim.
- C5 (proposal.md's now-false APPROVED-BUT-NOT-YET-REALIZED banner): reworded
  truthfully rather than dropped; code_surface widened; Ratified: line gets
  the second ruling appended in house style.
- C6 (test_round_trip.py's stale "blocked" docstring): the scheduled
  form-feed/U+2028 ends_inside_fence fixtures are built; docstring corrected.

tasks.md section 2a records the conversion; section 4 adds 4.7-4.9 for the
new/upgraded tests and reworks 4.5 to state precisely what the fence-agreement
test now pins (one shared Python line-split + two independent fence-toggle
loops, vs. one independent JS implementation) rather than conflating the
line-split rule with the still-separate fence predicate. Section 7 records
the reviewer's optional P2 (a bounded first_rows split) as deliberately
deferred, with the real reason, not a gate excuse.

Co-Authored-By: Claude Fable 5 <[email protected]>
…se fixes

Four mechanical items from a focused re-verify of the wide-scope
conversion, no new ruling needed (F4 falls under the already-ruled every-
reader-of-a-lifecycle-header scope):

F4 (in scope): ideation_dashboard.completeness._Prepared.lines converts to
doc_health.lines.split_keepends. _has_header reads the same six lifecycle
header fields, in the same 15-line window, as authoring.
missing_required_headers and corpus.parse_status, and completeness.py's
own comment already claimed the mirror. Demonstrated: same document,
authoring said the header block COMPLETE, completeness said
governance_header_block ABSENT. Converting .lines itself (not _has_header
alone) fixes every consumer coherently, since _headings/_has_heading/the
h1_title and section checks/_open_question_items already treated .lines as
an opaque Sequence[str]. The module's "imports re and nothing else" purity
claim is corrected to admit doc_health.lines (itself pure), and the
AST-based purity test in test_completeness.py is updated to match and to
assert doc_health.lines's own import set stays {__future__, re}. The
sweep's blind spot that hid this (splitlines() and the [:N] slice on
different source lines) is recorded in corpus.py so the next sweep greps
bare splitlines() over document text too.

Mutation gap closed: inventory._header_value, organizer_dispatch.
_header_value, generator._header_value, and authoring.
missing_required_headers had no dedicated test, and reverting all four
simultaneously left the suite green. One shared exotic-fixture test per
package added (tests/doc-health/test_header_value_readers.py,
tests/ideation-dashboard/test_header_value_readers.py), each with an
embedded mutation-check; verified further with a live one-at-a-time
source-level revert of all four (each confirmed to fail exactly its own
test, then restored).

F1: corrected a false claim in test_round_trip.py that outline-model.js's
outlineSections splits on the same real-line regex as endsInsideFence/
insertSection — it is LF-only (text.split("\n") at outline-model.js:46);
the real-line regex lives only at :273/:319. Demonstrated divergent on a
CR-only document. The JS-internal inconsistency is pre-existing, out of
scope, and held by no test here; the JS itself is not touched.

F2/F3: softened three prose spots that overclaimed the Python line-split
side was now fully unified while families._template_gaps (two of its own
unbounded splitlines() loops, demonstrated divergent on a form-feed
fragment) survives unconverted: doc_health/lines.py's module docstring,
corpus.py's sweep comment, and families._scan_lines's own docstring (past
tense). _template_gaps recorded in tasks.md 7.2 as deliberately deferred —
not a lifecycle-header reader, so outside this change's every-reader
clause, latent (0 of 1227 files diverge).

Co-Authored-By: Claude Fable 5 <[email protected]>
… fixed

Four mechanical items from a second focused re-verify of the wide-scope
conversion (the reviewer ran the sweep method corpus.py's own comment now
prescribes -- bare splitlines() over document text, not just the [:N]-
windowed idiom):

F5 (in scope under the already-ruled wide scope): doc_health.
ideation_readiness._parse_header converts to doc_health.lines.
split_keepends. It reads Status:/Topics:/Target capabilities: for
derive_clusters, on a live path (ideation_readiness_dispatch,
readiness_dispatch.py) reading the same document corpus.parse_status
reads. Demonstrated: an exotic separator can embed a Status:-shaped
substring mid-line inside a DIFFERENT field's value; the old pseudo-line
scan extracted a false Status: staged field from it, clustering the
document as 'staged', while corpus.parse_status correctly finds no status
on the same document. Its standalone twin, scripts/bootstrap-ideation-
cross-reference.py's parse_header (the two docstrings each claim
"identical to" the other), converts too -- verified, not assumed, that the
script can import doc_health.lines (both live directly under scripts/, so
Python's own sys.path[0] insertion makes it reachable). A new agreement
test pins the two to match, including on the exotic fixture, plus a
revert-catching mutation-check test for _parse_header itself.

The sweep re-run and recorded so F5 is the last survivor found by this
method: verified the reviewer's pre-classification of the remaining hits
(report.py's own prior-report line syntax, .gitmodules parsing, subprocess
output, the neutrality register's section-heading convention, families.py's
blob-diff and register-table readers, and per-repo validators' own
first-line/output conventions) as genuinely out of scope -- none reads the
document-lifecycle header's six governed fields. families.
_staged_exit_changes (borderline: reads governed-document text via the
same naive idiom) is ruled OUT of scope with reasoning recorded: it reads
Proposed by:/Proposal:/Exit:/Exits via: and an ## Exit body section, none
of which is a lifecycle header field, over the whole document rather than
a header window.

F6 (recorded, not converted): doc_health.ideation_routing._scan_lines is
an unconverted byte-for-byte copy of families._scan_lines as it existed
before this change, with a docstring pointing at "families _scan_lines
precedent" as if that pointer led to matching (now-converted) behavior --
it does not. Docstring corrected; recorded in tasks.md 7.3 beside
_template_gaps (7.2) with the same disposition: not a lifecycle-header
reader, latent (0 of 1227 files diverge).

Four prose spots corrected that had gone stale or undercounted again:
proposal.md's code_surface "EVERY reader ... scans real lines through it"
(now true, verified, with _parse_header and the bootstrap twin added);
lines.py's module docstring (reader list, and the heading/fence-boundary
rule count corrected from "two Python plus one JS" to three Python --
this module's shared rule, _template_gaps, ideation_routing._scan_lines --
and two JS rules -- outlineSections's LF-only split at outline-model.js:46
vs. endsInsideFence/insertSection's real-line regex at :273/:319, per
finding F1); families.py's _scan_lines docstring (same undercount, same
fix); proposal.md's Ratified: line ("the one deliberately deferred
exception" corrected to name both _template_gaps and
ideation_routing._scan_lines).

Co-Authored-By: Claude Fable 5 <[email protected]>
Prose-only, per the reviewer's final pass and an explicit constraint:
scripts/proposal-support.py is NOT edited here, because the sibling branch
change/refine-demote-round-trip-mechanics (PR #221) has already rewritten
exactly the sites this finding names, and any edit here would manufacture
a merge conflict with work that supersedes it.

F7 (demonstrated, recorded in tasks.md 7.5, ruled out of scope for
conversion): proposal-support.py carries two lifecycle-Status: readers and
one writer on unshared rules -- proposed_content's reader (LF-only re.M,
raises SupportError on a plain CR-only file), the writer beside it
(LF-only re.sub), and _declares_staged_status (pseudo-line splitlines plus
its own fence toggle). Out of scope because the promoted delta's
requirement is titled "The deterministic pass reads a document's lifecycle
header by real lines" and its purpose clause is about what THE PASS
reports -- proposal-support is a standalone mover reporting nothing to the
pass, so it was never inside the requirement's boundary. Distinguished
from a broken twin on a second ground: the reader's 251-of-1227 divergence
from corpus.parse_status is its own pre-existing CONTRACT difference
(single-token/unbounded values), not a regression the line rule causes --
the line-rule divergence proper is the same 0-of-1227 latent shape as
every other deferred item.

Fetched and read the sibling branch's version of the file to confirm what
the merged tree will actually have: it carries its own fourth private
real-line/fence primitive (_split_keepends/_fenced_flags), a fence-aware
row-based _status_row/record_authorship pair replacing the LF-only re.M
reader/writer entirely, _declares_staged_status moved onto the same
primitive, and a new "FOURTH implementation" entry in
test_round_trip.py's shared-fixture fence agreement test. One stale spot
survives even there -- _declares_staged_status's docstring still points at
"families._scan_lines already tracks fences for the same reason" without
saying which aspect (fence-tracking, not the real-line split) is meant --
recorded as a one-line follow-up for after both branches merge, not fixed
on either branch now.

code_surface: the unqualified "EVERY reader of a governed document's
lifecycle header" replaced with the actual boundary the delta draws --
the deterministic pass and the dashboard readers scan real lines through
the shared primitive -- pointing at tasks.md 7 for the recorded
exceptions, so this archive-gate input stops overclaiming past what the
requirement's own title and purpose clause cover.

Co-Authored-By: Claude Fable 5 <[email protected]>
Copilot AI lite review requested due to automatic review settings August 20, 2026 01:15

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

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.

Pull request overview

This pull request realizes the ratified change align-status-reader-to-real-lines by introducing a shared “real line” splitting primitive (CR/LF/CRLF only, lossless rejoin) and migrating lifecycle-header readers to use it, preventing false findings and reader/writer disagreements caused by str.splitlines() treating “exotic” separators as line breaks.

Changes:

  • Add scripts/doc_health/lines.py with split_keepends / join_rows and migrate the previously-local round_trip.py implementation to this shared home.
  • Convert lifecycle-header readers across doc_health and ideation_dashboard to scan via the shared real-line primitive (including corpus.parse_status / parse_kind, families/header readers, readiness/header parsing, and related dashboard readers).
  • Add mutation-pinned tests and new synthetic exotic-separator fixtures to ensure regressions back to splitlines() are caught.

Reviewed changes

Copilot reviewed 23 out of 23 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/ideation-dashboard/test_round_trip.py Updates fence/line-split agreement documentation and adds exotic-separator fence fixtures.
tests/ideation-dashboard/test_header_value_readers.py New tests to pin ideation-dashboard header-value readers to real-line scanning (mutation-checked).
tests/ideation-dashboard/test_doxbench_packet.py Adds non-vacuous synthetic exotic-separator agreement tests and mutation check for lifecycle_status.
tests/ideation-dashboard/test_completeness.py Adds exotic-header agreement coverage and mutation check for completeness’ prepared-line splitting.
tests/doc-health/test_status_reader_real_lines.py New tests pinning parse_status/parse_kind real-line window semantics and split/join identity.
tests/doc-health/test_ideation_readiness.py Adds exotic-separator regression coverage for readiness header parsing and bootstrap agreement.
tests/doc-health/test_header_value_readers.py New tests pinning doc-health header-value readers to real-line scanning (mutation-checked).
tests/doc-health/test_families_real_lines.py New end-to-end and mutation-pinned tests preventing false ratified-provenance findings.
scripts/ideation_dashboard/round_trip.py Imports shared split_keepends/join_rows from doc_health.lines instead of defining a private copy.
scripts/ideation_dashboard/generator.py Converts _header_value to scan via split_keepends for real-line window consistency.
scripts/ideation_dashboard/doxbench_packet.py Converts lifecycle_status to scan via split_keepends and clarifies rule comments.
scripts/ideation_dashboard/completeness.py Converts _Prepared.lines to real lines via split_keepends and updates purity claims accordingly.
scripts/ideation_dashboard/authoring.py Converts missing_required_headers header-window scan to use split_keepends.
scripts/doc_health/organizer_dispatch.py Converts _header_value to scan via split_keepends.
scripts/doc_health/lines.py New shared real-line splitting primitive with extensive rationale and constraints.
scripts/doc_health/inventory.py Converts _header_value to scan via split_keepends.
scripts/doc_health/ideation_routing.py Clarifies _scan_lines intentionally remains pseudo-line based (out of lifecycle-header scope).
scripts/doc_health/ideation_readiness.py Converts _parse_header to scan via split_keepends and documents bootstrap agreement.
scripts/doc_health/families.py Converts _header_line and _scan_lines to real lines via split_keepends.
scripts/doc_health/corpus.py Converts parse_status/parse_kind to real-line scanning and updates sweep records.
scripts/bootstrap-ideation-cross-reference.py Converts parse_header to use shared split_keepends and documents importability rationale.
openspec/changes/align-status-reader-to-real-lines/tasks.md Expands tasks to reflect wide-scope conversion, focused re-verifies, and deferred items.
openspec/changes/align-status-reader-to-real-lines/proposal.md Updates code_surface, ratification/rulings, and the realization banner to match built scope.

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

@brettheap
brettheap merged commit c379a09 into main Aug 20, 2026
1 check passed
brettheap pushed a commit that referenced this pull request Aug 21, 2026
6.1: README's Active row was stale (still named edit-apply as Q4's verb,
silent on sections 1-4 landing and the two follow-on changes task 4.2's
driven round trip spawned). Updated with the Amendment 1 correction,
sections-1-4-realized status, and the align-demote-to-round-trip-rule /
refine-demote-round-trip-mechanics / align-status-reader-to-real-lines
chain (PR #221, #222).

6.2: the staging fragment itself was already consumed by the 2026-08-15
forward transition (folder empty, supporting-docs copy already carries
Status: draft + Proposed by: + its own exit note) — that half discharges
by verification. INDEX.md's summary row and detail-section Q4 mention
were still stale; both corrected to name edit-document and record the
exit/ratified/realized status.

6.3: Amendment 1's Q4 correction (edit-document, not edit-apply, which
cannot reach a session branch) was never handed to doxbench-editing-model.
Phase A shipped without the upgrade and Phase B's tasks don't mention it
either, so — following the F2 carve-out precedent already in this corpus —
the handoff note lands on the staged topic's own fragment for a successor
change to find.

Co-Authored-By: Claude Fable 5 <[email protected]>
brettheap pushed a commit that referenced this pull request Aug 21, 2026
Copilot's review comment on PR #225 is right, and the false claim was mine —
introduced in `b6b2e16`, this branch's own 7.5 follow-up, not carried in from
PR #221. Confirmed by `git log -S "cannot import the primitive"`, which returns
that one commit.

WHAT WAS FALSE. The docstring said "this module cannot import the primitive",
which reads as a hard technical constraint. It is not one.
`scripts/bootstrap-ideation-cross-reference.py` is a standalone script living
directly under `scripts/` exactly as this one does, and it imports
`doc_health.lines` at module level on Python's own `sys.path[0]` insertion —
with its own comment recording that the reachability was verified rather than
assumed, during finding F5 on PR #222.

TWO CANDIDATE DISTINCTIONS CHECKED AND BOTH REJECTED, so the reword rests on
measurement rather than on preferring a nicer sentence:

* A copy-out script maintained byte-identical in a repo without this layout
  would genuinely be unable to import. DTN-019 in the neutralization register
  looks like exactly that case — it names
  `xFactories/codexFactory/scripts/proposal-support.py` as evidence. It is
  stale: that file does not exist, because DTN-019's own implementation note
  records the codexFactory SHED (`change/shed-neutral-utility-pack`,
  2026-08-03) that moved the tool here. No sibling copy remains.
* Even if one did, codexFactory carries `scripts/doc_health/`, so the import
  would resolve there too.

So nothing real separates this script's import situation from the bootstrap
twin's, and the honest reason for the local copy is a RULING, not a
limitation: finding F7 in `align-status-reader-to-real-lines` tasks.md 7.5
ruled conversion out of scope because the promoted requirement governs how the
deterministic pass reads a lifecycle header, and this is a standalone mover
that reports nothing to that pass. The docstring now says that, names the
sibling that proves the import is available, and points at what actually makes
the choice safe — the agreement tests
(`test_the_mover_agrees_with_the_other_fence_implementations`,
`test_the_movers_line_split_is_the_three_real_endings_and_nothing_else`) that
pin the local copy to the shared rule.

The script is NOT converted. That stays the recorded F7 boundary and would be a
code change beyond an archive branch.

Prose only, one docstring. `openspec validate --all --strict` exit 0 at 62/62;
`tests/proposal-support` plus `tests/ideation-dashboard/test_round_trip.py`
exit 0 at 103 passed.

ONE ADJACENT CLAIM LEFT ALONE, recorded rather than quietly fixed: the
block comment at lines 32-45 (PR #221's, not mine) says sharing the code "is
not available ... this file is a standalone script a human runs against a
checkout that may not have the dashboard package importable". That is hedged
("may not") and is a claim about a checkout state rather than an impossibility,
so it is not the same defect; it also names the dashboard package rather than
`doc_health`. Left for whoever revisits the F7 boundary, since this commit is
scoped to the one false sentence.

Co-Authored-By: Claude Fable 5 <[email protected]>
brettheap pushed a commit that referenced this pull request Aug 21, 2026
…ndings moved)

The release-realization archive gate is satisfied: the code is merged on the
implemented target as PR #222 (merged 2026-08-20T01:24:14Z, rebase-merge, so the
branch's six commits landed on main directly) and green there. Re-verified at
`7312c25` rather than taken from the PR run: `openspec validate --all --strict`
exit 0 at 64/64, `tests/doc-health` clean over 691 items,
`tests/ideation-dashboard` + `tests/proposal-support` exit 0 at 3729 passed / 14
skipped.

THE GATE THAT CARRIES THIS CHANGE'S REAL INFORMATION is task 5.3, not the test
counts: a doc-health report IDENTICAL to its baseline, because this change
rewrites the reader behind sixteen check families and a MOVED finding would mean
the zero-exotic-separator measurement had gone stale. Discharged on the branch at
all three re-run points and confirmed byte-identical across every branch tip by
the adversarial review; that claim is cited here rather than re-derived, because
reproducing it needs a checkout predating both merged PRs.

What IS measured here is this archive branch against its own base: two
`--single-repo` doc-health runs from identically-named clean-path checkouts of
`7312c25` and of this branch tip, diffed raw. ZERO findings move — every finding
line, family, severity and class identical. The report differs in exactly two
lines, both the promotion doing its job: canon share by words 29.6% -> 29.8% and
the promoted-specs word total 102125 -> 103788, the 1663 words being the
requirements these two archives promoted. Recorded as measured rather than as
"byte-identical", because it is not byte-identical and claiming so would be the
overclaim this change's own §2c.5 exists to correct.

MECHANICS, same precedent as the sibling archive in the commit before this one:

* `OPENSPEC_TELEMETRY=0 openspec archive align-status-reader-to-real-lines --yes`
  from the openxFactory root — bare CLI; ad_hoc origin, no `supporting-docs/`.
* Folder moved to `openspec/changes/archive/2026-08-21-align-status-reader-to-real-lines/`.
* One ADDED requirement promoted into `openspec/specs/doc-health/spec.md`: the
  deterministic pass reads a lifecycle header by REAL lines, that rule holds for
  EVERY reader of the header, and the rule is shared with the writers rather
  than reimplemented per reader — with cross-language divergence held by an
  explicit agreement test rather than by convention.
* Origin-retention gate checked, not assumed: the archived `.openspec.yaml`
  diffs clean against its pre-archive bytes.
* Task 6.2 ticked with the evidence inline. 38 of 43 ticked; §7's five stay open
  as recorded dispositions rather than gaps — four readers that are deliberately
  NOT converted because none reads the six lifecycle header fields, so each sits
  honestly outside the every-header-reader clause instead of inside it by
  omission, plus one skipped optimization whose cost was stated rather than
  dressed as a gate refusal.
* The banner is rewritten to state realization, per the precedent the sibling
  archive commit describes.

Task 5.2's "four known pre-existing failures" instruction is recorded as WRONG
rather than satisfied; the full measurement lives once, in the sibling change's
tasks.md 7.2, rather than duplicated here.

Co-Authored-By: Claude Fable 5 <[email protected]>
brettheap pushed a commit that referenced this pull request Aug 21, 2026
…follow-up

Two pieces of bookkeeping that could only land once both parents had merged.

README "OpenSpec Records": `refine-demote-round-trip-mechanics` and
`align-status-reader-to-real-lines` move out of the "Active changes:" block into
"Archived changes:", ahead of `align-demote-to-round-trip-rule` so the three read
newest-first as the thread they are. Links repointed at the dated archive paths.
Each row keeps the RULINGS recorded on it rather than being trimmed to a
summary: refine's §8 pair stay visible as rulings and not gaps (the
shallowest-markdown selection arm deferred until a real topic reaches it, 0 of 31
do; the read-side half handed to the sibling), and align's wide-scope ruling
keeps both halves — the delta's every-reader clause governing over a narrower
first-draft `code_surface:`, and the four readers deliberately left unconverted
because none reads the six lifecycle header fields. Each row closes with the
realization and archive sentence the precedent row uses.

THE 7.5 FOLLOW-UP, which is the reason this waited. `align-status-reader-to-real-lines`
task 7.5 recorded one stale docstring line and explicitly deferred it: reword it
"after BOTH branches merge, whichever lands second — not on this branch, per an
explicit constraint: editing `scripts/proposal-support.py` here would manufacture
a merge conflict with work that already supersedes it." PR #221 merged at
2026-08-20T01:23:54Z and PR #222 twenty seconds later, so this archive branch is
the first place the edit cannot manufacture that conflict.

`_declares_staged_status`'s docstring claimed
"`doc_health.families._scan_lines` already tracks fences for the same reason;
this mirrors it rather than inventing a second convention." Written for
fence-tracking, before `families` was converted to real lines — so a reader could
not tell WHICH convention was being mirrored, and after the conversion both
readings were arguably true, which is worse than one being false. Now it says
which: what is mirrored is the FENCE-TRACKING convention alone, and the line
split underneath is a separate and shared rule — the three real endings — whose
agreement is held by
`test_the_mover_agrees_with_the_other_fence_implementations` and
`test_the_movers_line_split_is_the_three_real_endings_and_nothing_else` rather
than by the docstring's word.

Prose only. One docstring, no behavior change, no test change. F7's
out-of-scope-for-conversion ruling is untouched: this closes the STALE-CLAIM half
of the finding, not the conversion half, which stays ruled out. `tests/proposal-support`
exit 0 at 29 passed.

Co-Authored-By: Claude Fable 5 <[email protected]>
brettheap pushed a commit that referenced this pull request Aug 21, 2026
Copilot's review comment on PR #225 is right, and the false claim was mine —
introduced in `b6b2e16`, this branch's own 7.5 follow-up, not carried in from
PR #221. Confirmed by `git log -S "cannot import the primitive"`, which returns
that one commit.

WHAT WAS FALSE. The docstring said "this module cannot import the primitive",
which reads as a hard technical constraint. It is not one.
`scripts/bootstrap-ideation-cross-reference.py` is a standalone script living
directly under `scripts/` exactly as this one does, and it imports
`doc_health.lines` at module level on Python's own `sys.path[0]` insertion —
with its own comment recording that the reachability was verified rather than
assumed, during finding F5 on PR #222.

TWO CANDIDATE DISTINCTIONS CHECKED AND BOTH REJECTED, so the reword rests on
measurement rather than on preferring a nicer sentence:

* A copy-out script maintained byte-identical in a repo without this layout
  would genuinely be unable to import. DTN-019 in the neutralization register
  looks like exactly that case — it names
  `xFactories/codexFactory/scripts/proposal-support.py` as evidence. It is
  stale: that file does not exist, because DTN-019's own implementation note
  records the codexFactory SHED (`change/shed-neutral-utility-pack`,
  2026-08-03) that moved the tool here. No sibling copy remains.
* Even if one did, codexFactory carries `scripts/doc_health/`, so the import
  would resolve there too.

So nothing real separates this script's import situation from the bootstrap
twin's, and the honest reason for the local copy is a RULING, not a
limitation: finding F7 in `align-status-reader-to-real-lines` tasks.md 7.5
ruled conversion out of scope because the promoted requirement governs how the
deterministic pass reads a lifecycle header, and this is a standalone mover
that reports nothing to that pass. The docstring now says that, names the
sibling that proves the import is available, and points at what actually makes
the choice safe — the agreement tests
(`test_the_mover_agrees_with_the_other_fence_implementations`,
`test_the_movers_line_split_is_the_three_real_endings_and_nothing_else`) that
pin the local copy to the shared rule.

The script is NOT converted. That stays the recorded F7 boundary and would be a
code change beyond an archive branch.

Prose only, one docstring. `openspec validate --all --strict` exit 0 at 62/62;
`tests/proposal-support` plus `tests/ideation-dashboard/test_round_trip.py`
exit 0 at 103 passed.

ONE ADJACENT CLAIM LEFT ALONE, recorded rather than quietly fixed: the
block comment at lines 32-45 (PR #221's, not mine) says sharing the code "is
not available ... this file is a standalone script a human runs against a
checkout that may not have the dashboard package importable". That is hedged
("may not") and is a claim about a checkout state rather than an impossibility,
so it is not the same defect; it also names the dashboard package rather than
`doc_health`. Left for whoever revisits the F7 boundary, since this commit is
scoped to the one false sentence.

Co-Authored-By: Claude Fable 5 <[email protected]>
brettheap pushed a commit that referenced this pull request Aug 21, 2026
The README row and the PR description disagreed about which PRs realized this
change. Neither list was right, so neither was adopted: the answer was
re-derived mechanically from gh pr view --json files, asking of every
candidate whether it edits a file under
openspec/changes/add-staged-topic-outline-template/.

Eight PRs pass that test and are this change's own chain: #193, #195, #198,
#208, #211, #217, #224, #227. The PR description omitted the first three -
they predate the session handoff it was written from - and wrongly claimed
#215, #221 and #222, which fail the test: each touches only its own change's
documents and code, so each belongs to align-demote-to-round-trip-rule,
refine-demote-round-trip-mechanics and align-status-reader-to-real-lines
respectively, all three of which already have archive records carrying their
own evidence. What #217 contributes here is task 4.2 and the archiving of the
first of them, not the fix.

The README row, the proposal banner and the tasks.md evidence section now
state the two categories explicitly and name the test, so the chain can be
re-derived rather than trusted. One exception is recorded rather than left to
surprise a reader: #228 also edited this change's tasks.md, to repoint 5.3 and
6.3 after the doxbench topic exited staging - a cross-change bookkeeping
repoint that discharges no task here.

Co-Authored-By: Claude Fable 5 <[email protected]>
brettheap pushed a commit that referenced this pull request Aug 21, 2026
The README row and the PR description disagreed about which PRs realized this
change. Neither list was right, so neither was adopted: the answer was
re-derived mechanically from gh pr view --json files, asking of every
candidate whether it edits a file under
openspec/changes/add-staged-topic-outline-template/.

Eight PRs pass that test and are this change's own chain: #193, #195, #198,
#208, #211, #217, #224, #227. The PR description omitted the first three -
they predate the session handoff it was written from - and wrongly claimed
#215, #221 and #222, which fail the test: each touches only its own change's
documents and code, so each belongs to align-demote-to-round-trip-rule,
refine-demote-round-trip-mechanics and align-status-reader-to-real-lines
respectively, all three of which already have archive records carrying their
own evidence. What #217 contributes here is task 4.2 and the archiving of the
first of them, not the fix.

The README row, the proposal banner and the tasks.md evidence section now
state the two categories explicitly and name the test, so the chain can be
re-derived rather than trusted. One exception is recorded rather than left to
surprise a reader: #228 also edited this change's tasks.md, to repoint 5.3 and
6.3 after the doxbench topic exited staging - a cross-change bookkeeping
repoint that discharges no task here.

Co-Authored-By: Claude Fable 5 <[email protected]>
@brettheap
brettheap deleted the change/align-status-reader-to-real-lines branch August 21, 2026 23:57
brettheap pushed a commit that referenced this pull request Aug 22, 2026
The register `docs/archive-record-discrepancies.md` enumerated seven classes of
archived-record discrepancy and said each needed a Brett ruling or an OpenSpec
change to close it. Brett ruled every class in-session on 2026-08-22, a
multiple-choice round in which the recommended option was adopted on each. This
slice executes those rulings and records the per-item outcomes in the register.

C7 AND C3'S ACCOUNT-MENU HALF, closed on a fact Brett declared rather than one
found in the archive. He ratified add-dashboard-account-menu in-session on
2026-08-21, its authoring date. The proposal's Status flips draft -> ratified
with a `Ratified:` citation line, the change gains the `.openspec.yaml` it never
had (ad_hoc origin, approved_by Brett Heap, approved_on 2026-08-21), and the
tasks.md note that recorded the flip being DECLINED is kept word for word with a
resolution appended after it, per Brett's 2026-08-10 append discipline. Three
things are said plainly in all three places because they are easy to lose: the
fact is a declaration, not a discovery; re-reading the record still turns up no
contemporaneous trace; and the citation names this ruling round rather than the
new origin file, since citing a file written in the same act from the same
declaration would be circular. That is a deliberate departure from B1, whose
origin file predated its correction and was independent evidence.

C1, FOUR OF SIX FIXED AND THE TEMPLATE CORRECTED THREE TIMES. d9b80c1's spelling
does not transplant: its "cut as contract-v1.35" clause is specific to
add-roster-device-admission-surface, and three of the four fixed changes cut no
contract bundle at all, their surfaces being code-only. What was copied is the
shape, not the sentence. align-demote-to-round-trip-rule (PR #215),
align-status-reader-to-real-lines (PR #222) and refine-demote-round-trip-mechanics
(PR #221) each name their own merge-plus-green discharge in their own banner and
tasks.md and are rewritten from it. add-client-identity-roster is rewritten from
its archive commit and README row and NOT from its tasks.md, whose archive-gate
boxes are still unticked - recorded rather than papered over. Also recorded:
contract-v1.33 and contract-v1.35 are bundles, not git tags, so the rewritten
value says bundle and the register carries the tag gap.

Two of the six are untouched. split-ideation-book-per-repo is genuinely
ambiguous - its only realization statement is "discharged by the archive commit
itself", which is circular, since the archive is the act the token was gating.
add-worker-credential-by-reference is a different case and the one thing this
round needs a word back on: its evidence is adequate on its own terms, but the
same ruling round said "do not touch it" while closing C3, and two ruled
sentences point opposite ways over one file. The conservative reading was taken
because the cost of being wrong that way is one more sentence from Brett.

C2, TWO OF SEVEN BACKFILLED. add-governed-derived-model gets a date-only
citation in the spelling add-roster-device-admission-surface already uses; no
approver is named anywhere in its record and none is claimed, and the header is
added as bare lines because that proposal has no front-matter fences.
add-lens-gate-verbs gets an approver and a date from its 3.3 disposition, with
the caveat written into the citation itself that the record's own word is
"disposition" and never "ratified". Five are left headerless: the three
2026-07-25 changes carry origin-approval pairs that approve AUTHORING ad hoc and
are dated at creation, so reading them as ratification would date each
ratification to its proposal day; add-propose-verb has nothing; and
add-workbench-integrated-editor-chat must stay headerless because its own
archive commit records a decision against writing a status value.

C5 recorded as ruled legacy, no file touched. C6 annotates the four avatar
ledgers with a trailing section each, ticking nothing - the counts re-verified
at 8/0, 11/0, 4/0, 14/1, and the annotations able to say where the evidence
lives because the ticking happened in the Speckit ledgers (54/54, 65/65, 37/37)
and was never mirrored back. One of the four is named as not belonging to the
class as stated: clarify-avatar-revocation-client-enforced makes no realization
claim to disagree with.

TWO CORRECTIONS TO THE REGISTER'S OWN CLAIMS. A4 said each of six open boxes
carries its own reason; two of them, add-crystallizer-contracts 3.1 and
add-capability-steward 3.1, are bare. And the "Why this file exists" section
said a dispositions entry is a way to revise a record document - half wrong,
measured below.

THE RECORD-IMMUTABILITY COST, MEASURED IN-TREE RATHER THAN ASSUMED, because a
git archive export loses the git-dependent families and this register records
that trap. Before: 3 critical, this file not among them. After: 4 critical, the
fourth being this file, exactly as predicted. A health/dispositions.yaml entry
does NOT silence it - a run with the entry is BYTE-IDENTICAL to a run without,
because fam_record_immutability emits unconditionally and the dispositions set
feeds only report.uncited_resolutions. What it does buy was measured end to end:
against a previous report carrying the four contested findings, a run in which
they are absent emits 4 uncited-resolution ERRORs with an empty file and 0 with
the entries present. So no disposition is claimed as a mute button, and the
entry is not written here at all: it lives at the AGGREGATION root, is never
loaded on the --single-repo run a pull request self-gates with, and editing the
shared aggregation checkout carries the sweep hazard. The ready-to-paste entry
and the whole measurement are recorded in the register.

Gates, exit codes read directly and never through a pipe:
openspec validate --all --strict 67/67 exit 0, unchanged from baseline;
pytest tests/doc-health 704 passed exit 0, unchanged;
pytest tests/ideation-dashboard -k workbench 140 passed exit 0;
doc-health single-repo full run 4 critical / 6 error / 69 warning / 4 info
against a 3/7/69/4 baseline - the one new regression is this register's own
expected critical, and the error count FELL by one because the account-menu
origin declaration cleared a proposal-origin ERROR (2 error -> 1 error on that
family, 30 warnings unmoved);
presence sweep exact, 86 archived dirs to 86 README rows and 18 to 18.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants