Skip to content

Propose add-unclassified-finding-class: an unclassifiable finding becomes one warning, not a silent text row - #446

Merged
brettheap merged 7 commits into
mainfrom
change/add-unclassified-finding-class
Aug 28, 2026
Merged

brettheap merged 7 commits into
mainfrom
change/add-unclassified-finding-class

Conversation

@brettheap

@brettheap brettheap commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

Commissioning

RATIFIED 2026-08-27 by Brett — in-session commissioning, verbatim: "Amend now".
The question put to him was a choice: the F4 report block's unclassified
residual row is text, not a finding — no severity, no ranked-plan reach, no
--fail-on reach — and making a nonzero count emit one warning adds a FIFTH
finding class. He chose the amendment.

The citation covers the DECISION TO BUILD and nothing else. The three design
decisions in § Orchestrator Decisions were taken by the authoring session under
standing patterns and are flagged there for veto (D3 rewritten at packet review;
the flag stays). No approving OpenSpec change exists to name, so the front-matter
cites the record in the sanction-ratified-record-spelling spelling, clearing its
three-way floor on two axes: approver (by Brett) and date (2026-08-27).

The shape: ADDED-only, and it was measured rather than preferred

The obvious shape for "a fifth finding class" is a ## MODIFIED Requirements
block on "Currency of an active change's MODIFIED requirement blocks", restating
all 14 of its scenarios and ~90 body lines byte-for-byte. It is not owed,
because canon does not enumerate the classes.

Grepped, not recalled: class map, finding classes, residual and
class summary occur in openspec/specs/doc-health/spec.md at exactly one line
between them
— 1530, the sentence stating the three comparison ARMS — and
unclassified occurs only at 1001 and 1153, describing two OTHER families'
resolution classification. The four-classes-to-three-arms gap is stated in
scripts/doc_health/modified_block_currency.py (CLASSES, and the comment "FOUR
ENTRIES FOR FIVE RULE SHAPES") and nowhere in the promoted spec.

The one sentence a strict reader might hold against ADDED-only is the advisory
paragraph's "Every finding carries warning severity for the
scenario-completeness and title-resolution arms and info for the carriage
ledger". That maps ARMS to bands and is already not exhaustive over emitted
findings: marker defects are not an arm, canon requires them reported and states
no band, and the module gives them info. A second non-arm finding at warning
— a band the gate-bearing arm already carries — leaves the sentence true word for
word and its operative claim (no --fail-on error/critical reds on the family)
unchanged.

And this capability has already argued the general case in canon: "A declared
unrecoverable pin loss is discharged by a superseding record" declines the same
restatement in these words — "a MODIFIED block over a requirement every new
family must restate in full is exactly the hazard this capability now carries a
family to police". So: one ADDED requirement on doc-health, no MODIFIED block,
no new check family, the enumeration and its numerals untouched.
The cost of a
veto on this is named in tasks.md § 1.3.

The requirement body is deliberately lean — 36 lines, down from 70. Every body
line of a promoted requirement is carriage-ledger surface a future MODIFIED block
must restate byte-for-byte, so the body keeps the SHALLs, the shape definition,
the anchor clause and the not-contested clause, and the rationale lives in
§ Orchestrator Decisions.

What the family emits

One warning per distinct unplaced rule SHAPE per run — not one per run, and
not one per repository. Two drifted shapes are two map entries to write, and a
ranked plan is a list of remedies; a per-repository emit would put one remedy into
an aggregation run's plan once per repository, which is the reading
family_enumeration already rejected for its own missing-direction invariant.
Shape identity is mechanical and stated in the delta — rule texts equal after every
quoted span and every digit run is masked, the same grammar _CLASS_PATTERNS is
written in — and the finding carries the FIRST instance's repo and delta path. At
warning that identity never reaches regressions(), which matches critical
and error only, so no issue is opened and no per-run churn can create one.

Action line: "extend the class map in
scripts/doc_health/modified_block_currency.py, or fix the drifted rule text the
finding names"
— the code path is named, and no delta path is interpolated,
because test_every_finding_carries_its_class_s_band_and_action compares each
finding's action against a per-class constant.

The six scenarios

  1. Every finding the family emits is placed by its map → no additional
    finding, and the rendered class counts still sum to the rows. (Today's state,
    pinned.)
  2. A rule text the class map does not place → one warning per distinct
    shape, naming that shape's count and the first instance's rule text verbatim,
    carrying its repo and path and the action line — and itself placed into the
    fifth class, so it is never counted by the residual it reports.
  3. Two unplaced findings differing only in a quoted span and a digit run → ONE
    finding naming the count two; two findings differing outside those → TWO.
  4. The quoted rule text begins in the shape of an arm → the finding is placed
    in the fifth class, never under the class its quotation resembles, and the
    unplaced finding it names is still counted by the residual.
  5. The warning is worked from the ranked plan → severity, repo, path and
    action, on the same terms as every other finding; the residual row still
    renders.
  6. The class map grows the pattern the drift named → the finding and the
    residual row are gone, and the disappearance is NOT an uncited resolution, the
    family being deliberately absent from FAMILY_RESOLUTION.

Realization surface, named rather than discovered

  • A FOURTH severity constant _DRIFT_SEVERITY = WARNING. Reusing
    _LAUNCH_SEVERITY would ride § 7.2's flip to error — contradicting this
    packet's own § 4.1 — and the drag would be invisible, because
    FindingClass.band reads the constant and the registry pin reads the band off
    the class. The module's :137 comment states exactly this reason for the
    existing three-way split.
  • Class id unplaced, label unplaced-finding drift, appended last, no
    gloss. Neither may contain the substring unclassified:
    test_a_finding_the_map_cannot_place_is_counted_and_named (:334) asserts its
    ABSENCE from a clean summary, and a class label renders even at zero.
  • Seven standing pins move by name: reporting :115, :150, :287-294
    (the verbatim four-row list), :422 (marker defects pinned as the LAST row),
    :429, :538-547, and len(block) == 5 → 6 at :707. Self-gate :661-702
    gains a FOURTH probe with its positive control. The FR-023 snapshot
    (:1127-1146) gains _DRIFT_SEVERITY; its public-callable list is unchanged
    — the emit adds no public callable. Eleven stale numerals swept as one task.
  • :538-547's all(checked.values()) gets a BEHAVIOURAL fixture tree,
    modified-block-currency-unplaced — not an exemption. The task records why its
    trigger is a removed pattern rather than a crafted title: every rule text is a
    fixed prefix plus {title!r} and _TITLE_REPR admits every repr Python can
    emit. Fuzzed at review: 13 adversarial + 4000 random titles × five rule shapes =
    20,065 rule texts, 0 unplaceable.
  • The byte-level report contract is AMENDED, not left to drift:
    specs/022-modified-block-currency-reporting/contracts/report-section.md
    enumerates the four classes four times (:17-24, :33-45, :98-109,
    :116-123); code_surface names it and § 2.15's mechanical "nothing else
    moves" pathspec can see it.

Predicted movement: ZERO in every band

python3 scripts/doc-health.py --single-repo . --family modified-block-currency,
before the packet and with it, is identical: 0 warning, 7 info; class
counts scenario-title completeness 0 / carriage ledger 7 / title
resolution and ordering 0 / marker defects 0; unclassified 0, the
residual row absent. (1/7/0/0 at the original base — see the catch-up note.)

What the family reports about this packet's own delta

Nothing — zero, as the ADDED-only shape predicts. The family reads
## MODIFIED Requirements blocks only; this packet carries an ADDED block and
none. Run with the packet present, no finding names any path under
openspec/changes/add-unclassified-finding-class/ (grep -c = 0), and the
whole-repo run is 5 critical / 7 error / 41 warning / 11 info, unmoved.
Re-measured at every catch-up merge rather than assumed.

Had D1 gone the other way, the carriage ledger would have named this packet's own
edits — which is exactly the trade the ADDED-only shape declines.

Catch-up merges, and one measurement that moved

origin/main moved twice during review and the branch went CONFLICTING both
times, on the same thing: the README "OpenSpec Records" active list, where new
entries race for the top. Merged d808974d and then 45ba637a (no rebase, no
force-push). Both conflicts were entries claiming that spot and all are kept,
newest first: create-ledgerxwallet-overlay-boundary (2026-08-28),
declare-sentinel-pin-vocabulary (2026-08-27), then this one. Nothing else
conflicted.

The second merge moved a number this packet quotes. PR #444 declared
add-composed-view-authoring's rename with a Merged into marker, discharging
the one scenario-arm finding this family had reported since launch, so
--family modified-block-currency now reads 0 warning, 7 info (classes
0/7/0/0) where it read 1/7/0/0 at the original base. That is the arm working as
designed, and it is unrelated to this change: unclassified read 0 before and
after
, because the residual has never depended on any arm reading anything.

The packet carries the correction where the number lives — § 3.1 now holds the
current baseline, the history that produced it, and an instruction NOT to copy
it: § 2.13's before figure is TAKEN at the realization branch point, since the
arms' population moves as active changes land and has already moved once under
this packet.

Also landed on main during review: 25ac3963, Brett affirming all eleven
add-modified-block-currency-check orchestrator decisions (D1–D5, O6–O11) —
the parent packet's flags, not this one's — and cadc05ec (#448), which pins
every family's action line in its own suite. § 7.2's flip is still open and this
change still does not touch it.

Gates

All measured at the current base 45ba637a.

  • OPENSPEC_TELEMETRY=0 openspec validate add-unclassified-finding-class --strict → valid
  • OPENSPEC_TELEMETRY=0 openspec validate --all --strict → 77 passed, 0 failed (77 items) = 25 active + 52 promoted specs
  • python3 -m pytest tests/doc-health -q -k "proposal_origin or lifecycle or corpus" → 68 passed, 1147 deselected
  • python3 scripts/doc-health.py --single-repo . → 5 critical, 7 error, 41 warning, 11 info, 0 new regressions, and 0 findings naming this packet
  • python3 -m pytest tests/doc-health -q → 1209 passed (at 69c4a218; this packet touches no code, and CI's pytest-suite is green on each pushed head)
  • README "OpenSpec Records" carries the entry alongside its active neighbours.

Ships ACTIVE; builds as one Speckit feature; archives after realization —
merge-plus-green on main, per add-modified-block-currency-check and
add-promotion-fidelity-check (01ff3434).

🤖 Generated with Claude Code

The modified-block-currency family already detects that its own class map has
drifted from its arms — `classify` is fail-closed and returns UNCLASSIFIED
rather than absorbing an unrecognized rule text into a neighbour — and then
reports it in PROSE. The residual row carries no severity, so no `--fail-on`
reaches it; it is not a finding, so "Health report contract"'s requirement that
every finding appear in the ranked plan as a ready-to-stage work item does not
reach it either. The one class of report content this capability produces that
cannot become work is the one reporting a defect in its own tooling.

One ADDED requirement on doc-health: a nonzero residual emits exactly ONE
`warning` per run, naming the count and the first unplaced rule text verbatim,
carrying that finding's repo and delta path and the action line "extend the
class map, or fix the rule text drift". The finding is itself placed by the map
into a FIFTH FindingClass — an unplaced finding about unplaced findings would be
counted by the residual it reports, so the count would name itself — and its
pattern is ANCHORED at the start of the rule text, because the finding quotes a
rule text that may itself begin in the shape of an arm. The residual row stays:
it is what makes the tally sum to the rows above it.

NO `## MODIFIED Requirements` block, and that is a measurement rather than a
preference. Canon states the family's three comparison ARMS and never enumerates
the classes, the class map, or the residual — `class map`, `finding classes`,
`residual` and `class summary` occur in openspec/specs/doc-health/spec.md at
exactly one line between them, the arms sentence. The four-classes-to-three-arms
gap lives in the module and nowhere in canon, and the advisory paragraph's
severity sentence is already an ARM-to-band map rather than an exhaustive one:
marker defects are not an arm, canon requires them reported and states no band.
So a second non-arm finding at `warning` leaves that sentence true word for word,
and restating 14 scenarios to add two would risk the defect the family exists to
catch. Adds no check family; the enumeration and its numerals are untouched.

Predicted movement: ZERO in every band. This tree reads `unclassified: 0` today,
and the packet carries an ADDED block only, which this family does not read.

Measured: `--family modified-block-currency` reads 1 warning / 7 info with and
without the packet, class counts 1/7/0/0 and no residual row, no finding naming
any path under the packet; `openspec validate --strict` valid and `--all
--strict` 75 passed / 0 failed; `pytest tests/doc-health` 1209 passed.

Ships ACTIVE; builds as one Speckit feature; archives after realization.

Co-Authored-By: Claude Opus 5 <[email protected]>
Copilot AI lite review requested due to automatic review settings August 27, 2026 23:36

@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

Adds a new OpenSpec active change packet (add-unclassified-finding-class) proposing to convert the modified-block-currency report’s non-finding unclassified residual into a single warning finding when nonzero, and registers the packet in the repository’s “OpenSpec Records”.

Changes:

  • Add a new OpenSpec change packet with proposal, spec delta (ADDED requirement), tasks, and .openspec.yaml origin.
  • Register the new active change in README.md under “OpenSpec Records”.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
README.md Adds the new active-change entry to the OpenSpec Records index.
openspec/changes/add-unclassified-finding-class/tasks.md Introduces the task plan and evidence structure for the change.
openspec/changes/add-unclassified-finding-class/specs/doc-health/spec.md Adds the doc-health spec delta defining the new behavior as an ADDED requirement.
openspec/changes/add-unclassified-finding-class/proposal.md Adds the proposal narrative, rationale, and claimed impact.
openspec/changes/add-unclassified-finding-class/.openspec.yaml Declares the machine-readable origin and approval metadata for strict validation.

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


## ADDED Requirements

### Requirement: A modified-block-currency finding its own class map cannot place is itself a finding
Comment on lines +3 to +4
Status: ratified
Ratified by: add-unclassified-finding-class
… body

Ten review items, applied in one pass.

THE BODY IS LEAN NOW — 70 lines to 36. Every body line of a promoted requirement
is carriage-ledger surface a future MODIFIED block must restate byte-for-byte, so
rationale a reader can get from the proposal does not belong in canon. The body
keeps the SHALLs, the shape definition, the anchor clause and the not-contested
clause; the arguments moved to § Orchestrator Decisions D2.

ONE FINDING PER DISTINCT UNPLACED RULE SHAPE, not one per run (ruled at packet
review). Two drifted shapes are two map entries to write, and a ranked plan is a
list of remedies. Shape identity is mechanical and stated in the delta — rule
texts equal after every quoted span and every digit run is masked, the same
grammar `_CLASS_PATTERNS` is written in. The emitted finding carries the FIRST
instance's repo and path; at `warning` that identity never reaches
`regressions()`, which matches `critical` and `error` only, so no issue churn.
D3 and scenario 2 rewritten; a third scenario pins the grouping both ways, and a
fifth pins the anchored pattern against a quotation that begins like an arm's.

A FOURTH SEVERITY CONSTANT, `_DRIFT_SEVERITY`. Reusing `_LAUNCH_SEVERITY` would
ride § 7.2's flip to `error` — contradicting this packet's own § 4.1 — and the
drag would be INVISIBLE, because `FindingClass.band` reads the constant and the
registry pin reads the band off the class. The module's `:137` comment ("THREE OF
THEM, NAMED APART ON PURPOSE") states exactly this reason for the existing split.

THE CLASS CANNOT BE CALLED `unclassified`. `test_a_finding_the_map_cannot_place_
is_counted_and_named` asserts that substring's ABSENCE from a clean summary and a
label renders even at zero, so id `unplaced` / label `unplaced-finding drift`,
appended last, no gloss.

THE PINS ARE NAMED, not discovered: reporting `:115`, `:150`, `:287-294`, `:422`,
`:429`, `:538-547`, `:707`; self-gate `:661-702` gains a fourth probe with its
positive control; the FR-023 snapshot gains `_DRIFT_SEVERITY` and keeps its
public-callable list unchanged, the emit adding no public callable. Eleven stale
numerals swept as one task.

`:538-547`'s `all(checked.values())` gets a BEHAVIOURAL fixture tree,
`modified-block-currency-unplaced`, not an exemption — and the task records why
its trigger is a removed pattern rather than a crafted title: every rule text is
a fixed prefix plus `{title!r}` and `_TITLE_REPR` admits every repr Python emits.
Fuzzed: 13 adversarial plus 4000 random titles times five rule shapes = 20,065
rule texts, 0 unplaceable.

THE BYTE-LEVEL REPORT CONTRACT IS AMENDED, not left to drift:
`specs/022-modified-block-currency-reporting/contracts/report-section.md`
enumerates the four classes four times (`:17-24`, `:33-45`, `:98-109`,
`:116-123`); `code_surface` names it and § 2.15's mechanical pathspec can see it.

Also: the action line names the code path ("extend the class map in
`scripts/doc_health/modified_block_currency.py`, …") and carries no interpolated
path, the per-class action being a constant the band/action pin compares against;
and the aggregation scope is 14 submodules carrying `openspec/changes/`, not 8.

Unchanged and re-measured: `--family modified-block-currency` reads 1 warning /
7 info, classes 1/7/0/0, no residual row, and no finding names any path under the
packet. `openspec validate --strict` valid; `--all --strict` 75 passed / 0 failed;
`pytest tests/doc-health -k "proposal_origin or lifecycle or corpus"` 67 passed.

Co-Authored-By: Claude Opus 5 <[email protected]>
Copilot AI review requested due to automatic review settings August 28, 2026 02:04

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

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

`origin/main` moved four merges ahead while this packet was in review, bringing
`create-ledgerxwallet-overlay-boundary` into the active set, so the measurement
the packet's zero-movement claim rests on was re-taken rather than assumed.

`--family modified-block-currency` at the merge (`d808974d`): 1 warning, 7 info,
classes 1/7/0/0, `unclassified` 0, no residual row, and no finding naming any
path under this packet — byte-identical to the `b5fb03f3` reading. Recorded in
the proposal's Why and Impact and in tasks § 3.1, with the merge named, because
a prediction whose base has moved is a prediction nobody re-checked.

`openspec validate --all --strict` now reads 76 (was 75): the ledgerxwallet
change added one active item, and this packet is still the other.

Co-Authored-By: Claude Opus 5 <[email protected]>
Copilot AI review requested due to automatic review settings August 28, 2026 02:08

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

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

…orrections

tasks.md only. No spec text, no measurement, no realization surface added.

§ 2.8 SAID SOMETHING FALSE BY IMPLICATION. "ALL_TREES globs
modified-block-currency*, so the tree joins every corpus-wide pin automatically"
reads as though adding the tree discharges reporting:538-547. It does not:
`_fixture_findings` calls the family with no seam, so over the unmodified map
the tree contributes only PLACED findings and `all(checked.values())` still
fails on `unplaced: 0`. The box now says the monkeypatched pass — one pattern
removed from `_CLASS_PATTERNS` — is what exercises the class, and that the
tree's presence in ALL_TREES does not by itself.

AND THAT PASS REDS AS A CRASH UNLESS IT IS WRITTEN FOR IT. `:542` is
`by_id[mbc.classify(f)]` and `UNCLASSIFIED` is deliberately not a class id, so
the induced-unplaced findings raise KeyError there rather than failing the
assertion the pin exists to make. The box now requires the pass to assert
explicitly over them, or skip them into the drift count.

THE TREE'S TITLES MUST BE PLAIN. F2's CLASSIFIERS
(test_modified_block_currency_fixtures.py:139-145) are UNANCHORED substring
probes and `test_every_finding_falls_into_exactly_one_class` asserts
`len(hits) == 1` over ALL_TREES, so a requirement title carrying another class's
phrase would fail that pin from the new tree — the same trap that narrowed F1's
`_ledger` helper. Named, with the five phrases.

AND IT CARRIES A PROVENANCE README, per F2's convention and its checker
`test_every_fixture_tree_this_feature_adds_carries_a_provenance_note`: line 3,
`SYNTHESIZED`, case-sensitive and whole-word — this tree is constructed for the
class, not reconstructed from history.

§ 2.7 DROPS `:429`. Its "All four counts read 0" is a DOCSTRING numeral; its
assertions survive the fifth class untouched, so it belongs to § 2.12's numeral
sweep and not to a roster of pins that red. Corrected in § 3.6's evidence
roster too, with the reason, because a pin roster that lists prose is a roster a
reader stops trusting.

Gates: `openspec validate add-unclassified-finding-class --strict` valid;
`--all --strict` 76 passed / 0 failed; `pytest tests/doc-health -k
"proposal_origin or lifecycle or corpus"` 68 passed.

Co-Authored-By: Claude Opus 5 <[email protected]>
Copilot AI review requested due to automatic review settings August 28, 2026 02:35

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

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

brettheap and others added 2 commits August 27, 2026 22:54
Second catch-up merge in review (`45ba637a`), and this time the arms' population
moved: PR #444 declared `add-composed-view-authoring`'s rename with a
`Merged into` marker, discharging the one scenario-arm finding this family had
been reporting since it launched. `--family modified-block-currency` now reads
**0 warning, 7 info**, classes 0/7/0/0, where it read 1/7/0/0 at `b5fb03f3` and
at the first catch-up merge.

THIS CHANGES NOTHING THIS PACKET CLAIMS, and the packet now says so where the
number lives: `unclassified` read 0 before and after, because the residual has
never depended on any arm reading anything. What moved is the figure § 2.13's
self-gate reproduces, so § 3.1 now carries the current baseline, the history that
produced it, and an instruction not to copy it — the before figure is TAKEN at
the realization branch point, since the arms' population moves as active changes
land and it has already moved once under this packet. § 2.13 says the same, and
"the SAME eight findings" is now seven.

The proposal's Impact and its own-delta measurement carry the same correction,
with the #444 discharge named as the arm working rather than as movement this
change caused.

Gates at `45ba637a`: validate --strict valid; --all --strict **77 passed, 0
failed** (25 active + 52 promoted); `pytest tests/doc-health -k "proposal_origin
or lifecycle or corpus"` 68 passed; whole-repo run 5 critical / 7 error / 41
warning / 11 info with **0 findings naming this packet**.

Co-Authored-By: Claude Opus 5 <[email protected]>
Copilot AI review requested due to automatic review settings August 28, 2026 02:55

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

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.


## ADDED Requirements

### Requirement: A modified-block-currency finding its own class map cannot place is itself a finding
Comment on lines +62 to +63
- **`doc-health` gains ONE ADDED requirement**, "A modified-block-currency finding
its own class map cannot place is itself a finding": an unplaced rule text emits
@brettheap
brettheap merged commit 86b7ca3 into main Aug 28, 2026
4 checks passed
brettheap added a commit that referenced this pull request Aug 28, 2026
… — an unplaceable rule shape becomes one warning per arm template (#466)

* A finding this family's own class map cannot place is now a warning, not a text row

Realizes `add-unclassified-finding-class` (ratified 2026-08-27 by Brett,
"Amend now"; PR #446, squash 86b7ca3) as Speckit feature
`026-unplaced-finding-drift`. The packet's tasks.md § 2 is the plan at task
grain and every task cites the box it realizes.

WHAT MOVED. `classify` was already fail-closed: a rule text no pattern of the
family's class map matches is not absorbed into a neighbouring class, it falls
to a named residual row in the report block. That row is PROSE — no severity, so
no `--fail-on` reaches it; not a finding, so the ranked plan never carries it.
The one thing the family reports that its own tooling is wrong about could not
become work.

Now a nonzero residual emits ONE `warning` per DISTINCT unplaced rule SHAPE per
run, naming that shape's count, quoting the first instance's rule text verbatim,
and carrying its repository and delta path. The map places that finding itself,
in a FIFTH class — `unplaced`, label `unplaced-finding drift` — so it is never
counted by the residual it reports; the residual row keeps rendering beside it,
counting the arms' unplaced findings only, and the tally still sums to the rows.

THE THREE DESIGN POINTS THAT ARE NOT DECORATION.

- A FOURTH severity constant, `_DRIFT_SEVERITY`, not a reuse of
  `_LAUNCH_SEVERITY`. § 7.2 of `add-modified-block-currency-check` flips that
  one to `error` together with a `contested` classification, and this finding is
  DESIGNED to disappear when somebody extends the map — `contested` would turn
  that disappearance into an error under the uncited-resolution rule. The drag
  would also be invisible, so it is pinned by a test that executes the module's
  own source with the flip applied and reads the two bands apart.
- The pattern is ANCHORED, and both directions are measured. The finding quotes
  a rule text that may itself begin in the shape of an arm's; and a requirement
  may be TITLED with the fifth class's own opening phrase, in which case an
  unanchored probe matches its ledger finding too — two patterns on one rule.
- The id and label carry no substring `unclassified`: a standing pin asserts
  that string's absence from a fully-classified summary, and a class label
  renders even at a count of zero.

EVIDENCE (specs/026-unplaced-finding-drift/evidence/). Test suite 1215 -> 1227
passed, +12, every one named and every one seen RED before the module moved.
Self-gate before/after over a FULL report: exactly one line differs, the fifth
class row reading 0 — zero movement in every band, which is what the proposal
predicted. `openspec validate --all --strict`: 77 passed, 0 failed. Mutation
round: 9 applied, 9 killed, 0 survivors — the unanchored-pattern mutant survived
the first attempt and exposed a near-miss adversarial title, now fixed and
commented. CI shape proved from a clean `git archive` extraction: the same seven
history-dependent tests fail there at the branch point and here, and 1199 ->
1211 is the same +12.

SCOPE. `git diff` against the merge base over `.github/` and `openspec/` is
EMPTY: no workflow file, and the packet's own task boxes tick at its archive
act, not here. Nothing else moves — no other family, no `report.py`, no
`families.py`, no `Finding` field, no registry, no threshold. The byte-level
report-section contract of `022-modified-block-currency-reporting` is amended at
all four of its class-enumeration sites, because a fifth class landing without
that would leave the corpus carrying a contract false about the code it
describes.

Co-Authored-By: Claude Opus 5 <[email protected]>

* Catch-up merge: both self-gate figures re-taken at the new base, and neither moved

`origin/main` advanced six commits during this feature, one of them a new
proposal, so the branch took a MERGE — never a rebase — and the evidence pair
was re-measured rather than carried over.

The before figure is re-taken from a clean `git archive` extraction of the NEW
merge base `22f15cdf`, and the after figure re-run on the merged branch. The
diff is still exactly one line: `- unplaced-finding drift: 0 (\`warning\`)`. Zero
movement in every band, over a full report, so the comparison still covers all
twenty-two families rather than this one's block.

Nothing else moved either: `git diff 86b7ca3 22f15cd -- tests/doc-health/
scripts/doc_health/` is EMPTY, so the 1215-test baseline still stands against
the merged base and 1227 is still +12. `openspec validate --all --strict` reads
78 passed where it read 77, the extra item being the packet the merge brought
in. `.github/` and `openspec/` diffs against the new merge base are still empty.

Recorded because packet § 3.1 warns this figure moves as active changes land.
Here it did not, and the reason is legible: the incoming packets carry no
`## MODIFIED Requirements` block, which is the only thing this family reads.

Co-Authored-By: Claude Opus 5 <[email protected]>

* Review fixes: the shape mask was wrong twice, and two mutants were living in the gap

Combined review reproduced every gate and confirmed the trigger claim
independently (20,040 fuzzed rule texts, 0 unplaceable). It found two defects in
`_shape` and two surviving mutants.

B2 — THE MASK PAIRED A PROSE APOSTROPHE WITH A `repr`'s OPENING QUOTE. These
rule texts are fixed prose interleaved with `repr` spans, and one of the fixed
strings carries an apostrophe: `_unresolved_finding`'s "no active sibling's
addition:". A global `re.sub` matched from THAT apostrophe to the opening quote
of the next `repr`, masked the prose between them, and left the repr's own
content — the capability name — exposed. Two unresolved blocks differing only in
capability read as two shapes, so the family would report two remedies for one.
Fixed in the MASK, never in the prose: a left-to-right consumer where a quote
opens a span only at the start or after a non-alphanumeric, `_TITLE_REPR`'s two
alternatives being first-char-disjoint and an accepted span jumped past whole.
RED test added; the mutant that restores the global sub now dies.

B1 — THE GRAIN IS NOT "ONE FINDING PER REMEDY", AND THIS BUILD SAID IT WAS. A
rule text's UNQUOTED parts are shape-bearing under the ratified identity rule —
the promoted spec's path, the `[body]`/`[bullet]` kind list, a change-id list,
an unresolved block's `why` clause. Measured: dropping `carriage-ledger` on this
repository leaves SEVEN unplaced findings in SIX shapes, where ONE new map entry
would place all seven. This is NOT fixable here: masking the arm's whole
template would contradict the delta's third scenario, which pins "differ outside
their quoted spans and digit runs → TWO". So every claim to the contrary is
struck (module docstring, test docstrings, fixture README, spec.md US4,
tasks.md), the real grain is stated in their place, and a new test MEASURES it
on the real tree against an independently written mask — with the six named in
its docstring as the figure an amendment would move. The amendment is recorded
OPEN in plan.md § OPEN-1 and tasks.md for Brett's ruling.

N1 — TWO MUTANTS SURVIVED, AND ONE OF THEM WAS A LINE THAT COULD NOT FAIL. The
trailing `findings.sort(key=_report_order)` is DELETED: `runner.run_suite` sorts
the whole result by `Finding.sort_key` and `report.render` sorts again before
printing, so the order this family returned in reached no reader. A line no test
can fail is a line that will later be trusted for a guarantee it does not give.
The sort BEFORE the emit stays, because it decides which finding each drift
warning names — and it is now pinnable, because the fixture grew a second change
directory (`add-a-drift-case/`) whose path sorts first while its title sorts
last. Emission order and report order now DISAGREE on that tree, which is the
only condition under which "the first of that shape in report order" can be
falsified at all; the pin asserts the disagreement itself so it cannot silently
stop biting. Mutants M8 and M9 both die.

N2 the skipped-block docstring reads five zeros. N3 `evidence/scope-diff.md` is
re-run and its output pasted, with the stale 492-line figure disclosed rather
than edited. N4 the tree-count comment says 14 on disk, as a floor. N5 F2's
`CLASSIFIERS` gains a `drift` key — and the other five needed a guard, because a
drift finding QUOTES an arm's whole rule text and every unanchored probe would
otherwise match it; the coupling to `_DRIFT_RULE` is declared in a comment and
asserted by a test.

GATES. `pytest tests/doc-health`: 1230 passed (1215 baseline, +15). Mutation
round 2: 12 applied, 12 killed, 0 survivors. CI shape from a clean extraction:
the same seven history-dependent tests fail as at the branch point, 1199 -> 1214
is the same +15. `openspec validate --all --strict`: 78 passed, 0 failed.
Full-report movement diff: still exactly one line. `.github/` and `openspec/`
diffs: empty.

Co-Authored-By: Claude Opus 5 <[email protected]>

* Shape is the arm template now, so one drifted shape is one remedy again

Brett ruled 2026-08-28, verbatim: "Amend: shape = arm template, all
interpolations masked". The delta amendment is a parallel branch
(`change/amend-unplaced-shape-rule`); this is its realization in 026.

WHAT THE OLD RULE COST, MEASURED. Shape identity masked quoted spans and digit
runs only, so every UNQUOTED interpolation was shape-bearing: the promoted
spec's repo-relative path, the `[body]`/`[bullet]` unit-kind list, a change-id
list, an unresolved block's `why` clause. Dropping ONE class pattern on this
repository emitted SIX findings for SEVEN unplaced ones, where a single new map
entry would have placed all seven. Nine unplaced findings on `-two-writers`
became four. This feature shipped that faithfully, measured it, declined to
widen it unilaterally because the delta's third scenario pinned it, and put the
amendment up. All four figures now read ONE.

THE MECHANISM, DERIVED AND NOT GUESSED. Each arm's rule text now renders through
one registered `_ArmTemplate`, so the family's fixed prose has exactly one
definition and the arm that prints it cannot drift from the mask that reads it —
`test_the_arm_templates_are_the_only_place_the_prose_lives` forbids an inline
f-string coming back. `_shape` is then two steps whose ORDER is load-bearing:
mask every `repr`-emitted span with the B2-safe left-to-right consumer, then
match the registered templates first-match-wins, the shape BEING the template's
id. A text no template claims falls back to the old lexical mask rather than
being merged into a neighbouring template — fail-closed, constitution VII. No
field was added to `Finding`: the report grammar is shared by twenty-two
families and a local identity is not a reason to move it.

WHY MASKING COMES FIRST, AND WHY THAT TOOK TWO ATTEMPTS TO PIN. Requirement
titles come from the corpus, so a title may contain another arm's whole fixed
prose; matched raw, a carriage-ledger finding titled with the titles template's
prose resolves to `scenario-titles`. The mutation round found no pin for that
and then found the first pin built in the wrong DIRECTION — a titles finding
with a ledger-shaped title still answers `scenario-titles` by luck of the
registry order, so it passed over the mutant. The pin now runs the ordering
against the answer and carries a guard that fails if the order ever stops
putting the wrong template first.

FIGURES, before -> after, with the pattern dropped named for each (a different
drop exercises a different arm, so the rows are not comparable without it):
this repository / `carriage-ledger`, 7 unplaced, 6 -> 1; `-two-writers` /
`title-resolution`, 9 unplaced, 4 -> 1; `-markers` / `carriage-ledger`, 3
unplaced, 3 -> 1; `-unplaced` / `carriage-ledger`, 3 unplaced, 1 -> 1.

Every claim about the grain is rewritten to the new truth — module docstrings,
test docstrings, the fixture README, `spec.md` US4, `tasks.md`, and the F4
byte-level contract, which gains a § 5b stating the template registry and the
two-step mask. `plan.md` § OPEN-1 moves from OPEN to RULED AND IMPLEMENTED.

GATES. `pytest tests/doc-health`: 1236 passed (1215 baseline, +21). Mutation
round 3: 15 applied, 15 killed, 0 survivors. CI shape: the same seven
history-dependent tests fail in a clean extraction as at the branch point, 1199
-> 1220 is the same +21. `openspec validate --all --strict`: 78 passed, 0
failed. Full-report movement diff: still EXACTLY ONE LINE — the amendment
changes how unplaced findings group and there are none where the map is
complete, which is every run today. `.github/` and `openspec/` diffs: empty.

Co-Authored-By: Claude Opus 5 <[email protected]>

* The feature's own spec was still asserting the mask the amendment replaced

Re-check found this feature's Speckit artifacts still stating the SUPERSEDED
identity rule as normative while the module implemented the amended one — the
same defect class the family this feature extends exists to catch, in the
feature's own documents.

Rewritten to the amended rule, which landed on `main` as `6d100e51` / PR #461:
`spec.md` FR-006 (now naming every interpolated field, and gaining FR-006a for
the derive-from-templates clause and FR-006b for the fail-closed fallback), the
US4 independent test and its first two acceptance scenarios (now the amended
delta's "same template, different interpolations → ONE; different templates →
TWO"), and the "Rule shape" key entity (now the arm template, with "Arm
template" added beside it). `data-model.md` § 4 is rewritten as the template
registry plus the three-step mask, with the lexical rule kept only as step 3's
fallback. `research.md` R3 is marked SUPERSEDED with the ruling and the commit,
kept rather than deleted because it is the reasoning the amendment overturned
and because two of its findings survive it — the left-to-right consumer and the
two-placeholder rule, now living inside steps 1 and 3.

ONE ASSERTION ADDED, and it kills a mutant nothing else could see: a drift rule
text QUOTES a ledger rule text, and `_ArmTemplate`'s pattern carries `\Z` but no
`^` — it relies on `re.match`. Switching that one call to `re.search` finds the
ledger template's segments inside the quotation and files a drift finding under
`carriage-ledger`, the ledger template being earlier in the registry. The
shipping path never shapes a drift finding at all (`_drift_findings` makes one
pass and its own output is never fed back), so the registry's drift entry was
defensive AND untested; it is now reachable in a test, and mutant MF dies.

Nits: the fixture README's one-shape sentence now says "same arm template"
rather than the old mask; tasks T014/T023/T024 carry the amended wording where a
reader meets them rather than only in the far-away § RULED block; `\Z` is
commented as near-inert (four of six templates end in a field, so it bites only
on the two that end in prose) with the note that `re.match` is the anchor that
carries the weight; and the "only place the prose lives" test now states its
reach limit — it catches a REVERTED arm, not a brand-new inline one firing on a
corpus-absent state, and what covers that case is measured instead: a rebuild
with an arm's prose drifted from its template reds 24 tests.

Mutation round: 16 applied, 16 killed, 0 survivors.

Co-Authored-By: Claude Opus 5 <[email protected]>

* Re-measure every gate at the amendment's own commit, and write the PR body

The catch-up merge takes this branch's base to `6d100e51` — PR #461, the
amendment Brett ruled — so every figure this feature records was re-taken there
rather than carried over.

The merge also brought a new doc-health family onto `main`, which moves the raw
suite total and would make a bare before/after count unreadable. So the +21 is
read from the CI-SHAPE PAIR instead, where both sides are extractions of the
SAME base: 1229 -> 1250 passed, with the eleven history-dependent failures
compared by name and found IDENTICAL. Eleven rather than the earlier seven
because four of them belong to the new family; not one is this feature's.

Self-gate: the before figure re-taken from a clean extraction of `6d100e51`, the
after re-run on the merged branch, and the diff is still exactly the one line —
the fifth class row reading zero, over a full report, so the comparison still
covers every family rather than this one's block. `openspec validate --all
--strict` reads 76 items where it read 78, packets having archived on `main`
between the two runs. `.github/` and `openspec/` diffs against the new base are
still empty.

`pr-body.md` is written against these figures: the mechanism in three sentences,
the grain table before and after the amendment with the dropped pattern named
per row, the sixteen mutants and the four that survived a first attempt, the
amendment named as a landed precondition, and `Refs #357` — the packet archives
under its own later commit, so this PR closes nothing.

Co-Authored-By: Claude Opus 5 <[email protected]>

---------

Co-authored-by: brettheap <[email protected]>
Co-authored-by: Claude Opus 5 <[email protected]>
@brettheap
brettheap deleted the change/add-unclassified-finding-class branch August 28, 2026 09:10
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