Skip to content

doc-health: promote gate-intent-snapshot-rev to a live pin class with historical-evidence reachability (ruling D-8 a) - #816

Merged
brettheap merged 4 commits into
mainfrom
fix/gate-intent-snapshot-rev-pin-class-live
Sep 9, 2026
Merged

brettheap merged 4 commits into
mainfrom
fix/gate-intent-snapshot-rev-pin-class-live

Conversation

@brettheap

@brettheap brettheap commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

Lane: openxfactory-4-opendox-extraction (formerly openxfactory-opendox)

Refs #656 — ruling D-8 (a), 2026-09-08.

The defect

The live intent-plane dispatch exercise landed committed gate-intent records under ideation/dashboard/intents/, and doc-health's pin class reported three failures against them on the custody PR:

test what it said
test_every_current_member_of_the_declared_class_is_carried_somewhere declared FUTURE member(s) now carry committed pins; promote the row: gate-intent-snapshot-rev
test_every_declared_repo_local_pin_in_this_repository_resolves the 2026-08-15 refusal's snapshot_rev_seen 66ca33fd… resolves to no ref
test_the_pin_counts_did_not_move_and_no_site_is_classified_twice the frozen census moved: 71/24 → 75/25

The first is the declaration working exactly as designed. The other two are the class asking a question this member does not owe an answer to.

What changed

1. The row is promoted, and it moves. gate-intent-snapshot-rev goes presence=FUTURE → CURRENT by the registry's own arrival path, and out of the # ---- FUTURE members block into the current section — a promotion that flips the flag and leaves the row under a heading saying "no committed real pin yet" is how a reader learns to stop trusting the headings.

2. reachability, stated per member. Every other member records "I was derived from this repository at X", so an unreachable X makes its central claim uncheckable. snapshot_rev_seen records the revision the actor was looking at, and the apply lane's job is to refuse an intent whose view went stale — so this repository's 2026-08-15 refusal cites 66ca33fd… precisely because nothing resolves it, and says so in its own refusal_reason. Neither repair route on offer means anything for it: retaining the commit would not make the recorded view any more or less what it was, and re-pinning would make the record state something nobody read.

So the expectation is declared: MUST_RESOLVE (the default, and every other row) or HISTORICAL_EVIDENCE. A historical pin main still reaches is still PASS — a true and free observation. One it does not reach is HISTORICAL, a verdict of its own beside reachable and orphaned, without consulting the retention namespace at all: the question is not asked of this class, so no remote read happens on its behalf and an unconsultable remote cannot turn a conforming record into an INCONCLUSIVE that holds fully_verified open.

3. population, and the frozen census. Intents are written on the dashboard's rolling branch, land through a custody PR and are consumed — main carries none at one revision and four at the next. A STANDING member's artifacts persist once written, so their absence is drift; a ROLLING member's census moves by design. A rolling member is exempt from the vanished direction and is counted by standing_census() instead of in the frozen totals.

The exclusion is from the arithmetic alone. The sites are still swept, still verified, still reported, still shape-checked, and "no site is classified twice" stays fully in force over all of them. The exclusion also lives in one place (rolling_members()), so a row promoted to ROLLING later joins it without anybody hand-editing a census.

The proof

Measured both ways rather than reasoned, against a throwaway tree carrying the four real records from origin/intents/rolling:

tree sites / members standing census gate-intent verdicts
plain main (eea40d1) 71 / 24 (71, 24) —
+ the four real intents 75 / 25 (71, 24) 3 × pass, 1 × historical
  • Before-control: on that tree with stock origin/main code, all three named tests fail. With the change, all three pass — and the whole pin suite passes on both trees (108 passed each).
  • Mutation, one flag at a time: revert presence → the arrival direction reddens; revert reachability → the acceptance signal reddens; revert population → the frozen census reddens on the intents tree and the vanished direction reddens on plain main. Restoring all three goes green.

Regression tests

Seven, planted with a synthetic unreachable revision so the proof does not depend on the four real records staying where they are. The one that matters most is the differential — one unreachable revision cited by both a gate intent and a readiness record, where the intent is HISTORICAL and the readiness record still ORPHANs. The exemption belongs to the class, never to the commit, and that test is what reddens if it ever widens. The others cover: the historical verdict and its shape checks; the free PASS when main still reaches; no remote read for the class, asserted differentially against a MUST_RESOLVE pin that does go INCONCLUSIVE; the rolling exemption from vanished, differential against a standing member deleted the same way; the census exclusion being arithmetic-only; and the exclusion being read from the declaration.

Fix round — two LOW items

An independent verifier PASSED the promotion and named two LOW items, both taken here without touching anything else (standing_census stays (71, 24) on plain main; the four real records still verify as 3 × pass, 1 × historical):

  1. Copilot thread, pin_class.py:~2170. The HISTORICAL_EVIDENCE branch answered every intent site HISTORICAL even when main_ref is None — measured: all four intent pins historical on a main-less clone while the other 55 repo-local pins correctly go inconclusive. That reported "not reached by main" on a question a main-less clone never actually asked. Fixed: main_ref is None now returns INCONCLUSIVE, the identical answer every MUST_RESOLVE member already gives that condition; HISTORICAL is reserved for the concrete "asked of main, not reached" outcome, and the branch still performs no remote read. New test: one fixture, three states — no main at all → INCONCLUSIVE; main created and reaching the cited revision → PASS; a later view past main's frozen tip → HISTORICAL.
  2. Verifier finding, pin_class.py:~879-881. The exemption keyed on the path glob (ideation/dashboard/intents/**/*.yaml) plus the snapshot_rev_seen key alone, so any record dropped in that directory — of any kind — inherited the historical exemption. PinMember gains a general requires_field/requires_value companion check, reused by both the commit-shaped sweep (_sites_in) and the non-commit-value sweep (covering_member's new optional text argument); gate-intent-snapshot-rev is the only row that states it, requiring kind: gate-intent — verified against all four real records via git show origin/intents/rolling:.... A record whose kind doesn't match is no longer attributed to this member at all: it lands UNCOVERED (clean=False) instead of silently exempt. New test: a stray record under the intents tree with kind: something-else and an unreachable snapshot_rev_seen, planted alongside a genuine gate intent citing the same revision — the stray is UNCOVERED, the genuine one still HISTORICAL.
  3. Copilot thread, pin_class.py:~1727 (also ~1913), fixed in ba1f3765. uncovered_sites/non_pin_sites now fetch a candidate's committed text via covering_member only when the already path+key-matched member declares requires_field (today, only gate-intent-snapshot-rev) instead of on every path swept_sites/swept_non_pin_sites had already read once, re-verified unchanged against the same four-real-intents-plus-stray throwaway tree (standing_census still (71, 24), 3 pass + 1 historical, the stray still uncovered) and covered by two new tests asserting the exact committed_text call count per path.
  4. Copilot thread, pin_class.py:~1940, fixed in 3574437e. member_non_pin_sites() attributed a non-commit value to a member on path+key alone with no requires_field check at all, so a wrong-kind record under the intents tree could be pre-classified covered before non_pin_sites's own resolution loop ever ran it; it now applies the same record_matches() gate _sites_in() already uses, verified with a new test planting a kind: something-else non-pin site that now lands UNCOVERED while a genuine gate-intent one stays covered.

Re-ran the whole matrix once more against a fresh throwaway tree: plain origin/main → (71, 24); + the four real intents → (71, 24) unchanged, 3 pass + 1 historical; + a planted kind: something-else record → (71, 24) still unchanged, the stray reported uncovered.

Validators

  • python3 -m pytest -q tests/doc-health — 1602 passed.
  • python3 -m pytest -q tests/ideation-dashboard tests/doc-health tests/review_lane_pin — see the run summary in the thread; only tolerated failure is the environmental test_snapshot.py::test_find_validator_locates_pinned_checkout.
  • OPENSPEC_TELEMETRY=0 openspec validate --all --strict — 100 passed, 1 failed: the tolerated disposition-codexfactory-declared-renames.

Scope

Three files. No workflow, no envelope, no contract, and no intent record touched — the four real records were read from origin/intents/rolling into a throwaway worktree and never modified.

Reserved acts: none taken. No merge, no auto-merge, no ruleset, no force-push, no workflow dispatch. Awaiting Brett's word.

🤖 Generated with Claude Code

https://claude.ai/code/session_018Yt7feEjmZ3SPeU2wsBDDJ

… historical-evidence reachability (ruling D-8 a)

The live intent-plane dispatch exercise for openxFactory #656 landed committed
gate-intent records under `ideation/dashboard/intents/`, and the pin class's own
arrival direction reported it: `gate-intent-snapshot-rev` was declared FUTURE,
which is exactly what that direction exists to catch. Promoting the row is the
first half. The second half is that the question the class asks every other
member is the WRONG question for this one, and answering it anyway produced two
findings against records doing their job.

A GATE INTENT TESTIFIES; IT DOES NOT DERIVE. Every other member records "I was
derived from this repository at X", so an unreachable X makes the artifact's
central claim uncheckable. `snapshot_rev_seen` records the revision the actor
was LOOKING AT, and the apply lane's whole job is to refuse an intent whose view
has gone stale — so this repository's 2026-08-15 refusal cites `66ca33fd…`
precisely because nothing resolves it, and says so in its own refusal reason.
Reported as an orphan it offers two repair routes, and neither means anything:
retaining the commit would not make the recorded view any more or less what it
was, and re-pinning would make the record state something nobody read. So
`reachability` is stated PER MEMBER — `MUST_RESOLVE` for a derivation pin,
`HISTORICAL_EVIDENCE` for testimony about a past view. A historical pin `main`
still reaches is still reported PASS, because that is a true and free
observation; one it does not reach is reported HISTORICAL without consulting the
retention namespace at all, so an unconsultable remote cannot turn a conforming
record into an INCONCLUSIVE that holds `fully_verified` open.

AND ITS POPULATION ROLLS. Intents are written on the dashboard's rolling branch,
land through a custody PR and are consumed, so `main` carries none at one
revision and four at the next. The presence check that serves every other row
would report this one VANISHED whenever the queue drained, and the frozen
sentinel census would move with every intent — a red whose only available repair
is to bump the number, which is the reflex a frozen census exists to prevent. So
`population` is stated too: a ROLLING member is exempt from the vanished
direction and counted in `standing_census` rather than in the frozen totals. It
is excluded from the ARITHMETIC ALONE — the sites are still swept, still
verified, still reported, and "no site is classified twice" stays in force over
all of them.

MEASURED BOTH WAYS RATHER THAN REASONED. On `main` (eea40d1, no intents
committed) `verify()` reads 71 sites / 24 members with a standing census of
(71, 24); on a tree carrying the four real records from `origin/intents/rolling`
it reads 75 / 25 with the SAME standing census of (71, 24), three of the four
pins PASS and the 2026-08-15 refusal HISTORICAL. Before the change that tree
fails all three of the tests this repairs. Each of the three declared flags is
mutation-checked: reverting `presence` reddens the arrival direction, reverting
`reachability` reddens the acceptance signal, and reverting `population` reddens
the frozen census on the intents tree AND the vanished direction on plain main.

The row also moves OUT of the "FUTURE members" block it was written in, because
a promotion that flips the flag and leaves the row under a heading saying "no
committed real pin yet" is how a reader learns to stop trusting the headings.

Seven regression tests are added, planted with a SYNTHETIC unreachable revision
so the proof does not depend on the four real records staying where they are.
The one that matters most is the differential: one unreachable revision cited by
BOTH a gate intent and a readiness record, where the intent is HISTORICAL and
the readiness record still ORPHANS — the exemption belongs to the class, never
to the commit, and that test is what reddens if it ever widens.

Refs #656

Lane: openxfactory-4-opendox-extraction
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_018Yt7feEjmZ3SPeU2wsBDDJ
Copilot AI lite review requested due to automatic review settings September 8, 2026 15:00

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

🟡 Changes recommended

HISTORICAL_EVIDENCE pins are currently classified as HISTORICAL when main can’t be resolved, conflating “not reached by main” with “branch half not consultable” and potentially misleading report consumers.

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

Pull request overview

Updates doc-health’s derivation-pin class to treat gate-intent-snapshot-rev as a live, committed member with semantics tailored to gate-intent refusal records: the pinned revision is historical evidence (not a derivation claim) and the committed population is rolling (so absence/drift checks shouldn’t behave like standing artifacts).

Changes:

  • Promote gate-intent-snapshot-rev to presence=CURRENT and add per-member semantics: reachability=HISTORICAL_EVIDENCE, population=ROLLING, plus a new HISTORICAL verdict path.
  • Exempt rolling members from “vanished” checks and from the frozen census arithmetic via rolling_members() / standing_census().
  • Add targeted regression tests for historical-evidence reachability and rolling-population behavior; adjust the sentinel vocabulary frozen-count assertion to use the standing census.
File summaries
File Description
tests/doc-health/test_sentinel_vocabulary.py Switches the frozen count assertion to standing_census() and asserts the rolling-member set.
tests/doc-health/test_pin_reachability.py Adds regression coverage for historical-evidence pins and rolling members (including a synthetic unreachable commit differential).
scripts/doc_health/pin_class.py Introduces reachability/population member attributes, implements HISTORICAL verdict handling, rolling exclusions, and standing-only census helpers.
Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 1
  • Review effort level: Lite

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

Comment thread scripts/doc_health/pin_class.py Resolved
… require kind: gate-intent for the historical exemption

Two LOW items an independent verifier confirmed on PR #816:

1. The HISTORICAL_EVIDENCE reachability branch answered every intent
   site HISTORICAL even when this clone resolves no `main` at all,
   conflating "asked of main, not reached" with "the branch half of
   the ref set could not be consulted" (Copilot review,
   pin_class.py:~2170). `main_ref is None` now returns INCONCLUSIVE,
   the same answer every MUST_RESOLVE member already gives that
   condition; HISTORICAL is reserved for the concrete outcome. The
   branch still performs no remote read.

2. The exemption keyed on the path glob
   (ideation/dashboard/intents/**/*.yaml) plus the `snapshot_rev_seen`
   key alone, so any record dropped in that directory -- of any
   `kind` -- inherited the historical exemption (verifier finding,
   pin_class.py:~879-881). PinMember gains a general requires_field /
   requires_value companion check, reused by both the commit-shaped
   sweep (_sites_in) and the non-commit-value sweep
   (covering_member's new optional text argument);
   gate-intent-snapshot-rev is the only row that states it, requiring
   kind: gate-intent -- verified against all four real records on
   intents/rolling. A record whose kind does not match is no longer
   attributed to this member: it lands UNCOVERED instead of silently
   exempt.

Neither change moves standing_census (71, 24) on plain main nor the
four real records' verdicts (3 pass, 1 historical). New tests added
for both: a main-less clone reporting INCONCLUSIVE (with a
main-created/main-frozen follow-up proving PASS and HISTORICAL still
work), and a stray kind: something-else record under the intents tree
landing UNCOVERED beside an unaffected genuine gate intent.

Lane: openxfactory-4-opendox-extraction
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_018Yt7feEjmZ3SPeU2wsBDDJ
Copilot AI review requested due to automatic review settings September 8, 2026 15: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.

🟡 Changes recommended

The new requires_field enforcement introduces avoidable extra git show reads in uncovered_sites() and non_pin_sites() that should be tightened to reduce unnecessary work during verification.

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

Review details

Suppressed comments (1)

scripts/doc_health/pin_class.py:1917

  • non_pin_sites() now calls committed_text() again for each candidate site path solely to enforce requires_field, even though swept_non_pin_sites() already had to read the same file text to discover the site. To avoid the extra git show calls, only read the text when the matching member declares requires_field (the uncommon case).
    for site in swept_non_pin_sites(repo, rev, paths=paths):
        if (site.path, site.key, site.line) in known:
            continue
        if site.path not in text_cache:
            text_cache[site.path] = committed_text(repo, rev, site.path)
  • Files reviewed: 3/3 changed files
  • Comments generated: 1
  • Review effort level: Lite

Comment thread scripts/doc_health/pin_class.py Resolved
Copilot review, PR #816, pin_class.py:1727 (and ~1913). uncovered_sites
and non_pin_sites re-read every candidate's committed text via
text_cache to resolve covering_member, even though swept_sites and
swept_non_pin_sites just above them had already read the same file
once to find the site in the first place. That second `git show` was
paid by every ordinary member, though only gate-intent-snapshot-rev's
requires_field companion check ever consults the text at all.

_member_for() splits covering_member's cheap path+key match out from
its requires_field check, so a caller can decide whether the extra
read is worth doing before fetching anything. Both resolution loops
call it first and only fetch committed_text (still cached per path)
when the matched member actually declares requires_field; behaviour
is unchanged either way. Two new tests spy on committed_text and
assert the call count per path directly: 1 (swept only) for an
ordinary member's file, 2 (swept + resolution) for
gate-intent-snapshot-rev's.

Re-verified against a throwaway clone carrying the four real
gate-intent records from origin/intents/rolling plus a planted
`kind: something-else` stray: standing_census unchanged at (71, 24);
the three reachable records still PASS, the 2026-08-15 refusal still
HISTORICAL, and the stray still UNCOVERED.

Lane: openxfactory-4-opendox-extraction
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_018Yt7feEjmZ3SPeU2wsBDDJ
Copilot AI review requested due to automatic review settings September 9, 2026 00: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.

🟡 Changes recommended

requires_field matching is not consistently applied in the non-pin classification path, allowing wrong-kind intent-tree records to be pre-classified as covered and bypass becoming UNCOVERED.

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

Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 1
  • Review effort level: Lite

Comment thread scripts/doc_health/pin_class.py Resolved
… check

member_non_pin_sites() attributed a non-commit value to a member on
path+key alone, with no companion requires_field/requires_value check —
so a record under ideation/dashboard/intents/** whose kind was not
gate-intent could be reported COVERED by gate-intent-snapshot-rev before
non_pin_sites' own (correct) resolution loop ever ran, since a covered
site is removed from consideration before that loop sees it. Reuse the
same PinMember.record_matches() gate _sites_in() already applies on the
commit-shaped pin path, so a record disclaiming the companion field is
skipped for both attribution and the absent-key report rather than
silently covered.

Copilot review, PR #816, pin_class.py:~1940.

Lane: openxfactory-4-opendox-extraction
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_018Yt7feEjmZ3SPeU2wsBDDJ
Copilot AI review requested due to automatic review settings September 9, 2026 00:58

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 Needs a closer look

It changes core doc-health verification semantics (new verdict category and census rules) that can affect repository-wide gating behavior and merits final human review despite strong test coverage.

Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

@brettheap
brettheap merged commit 8924230 into main Sep 9, 2026
11 checks passed
brettheap added a commit that referenced this pull request Sep 9, 2026
…1/5.2 ticked on the D-2 evidence) (#832)

Path A PR-5, the last of the 2026-09-06 plan memo's sequence, on Brett Heap's word "merge pr-5 when green" (2026-09-09). Authority: his ruling of 2026-09-05T23:38Z "rule path A, 4.5 is a deferred successor" (#656) and ruling D-2 (the live exercise).

- tasks.md: § 4.4 / § 5.1 / § 5.2 ticked on the D-2 evidence (three `- [ ]` heads removed, every ratified sentence kept byte-identical); § 4.5 untouched as a DEFERRED SUCCESSOR (#714 → 3d1b8cc).
- Archived WITH promotion via `scripts/proposal-support.py . archive --date 2026-09-09` under the pinned @fission-ai/[email protected] (never a bare `openspec archive`); origin retained (declaration unchanged since da1b0e9); six frozen files R100.
- Promoted: `openspec/specs/ideation-intent-plane/spec.md` NEW (7 requirements / 11 scenarios, every block byte-identical to the archived delta) and `openspec/specs/document-lifecycle/spec.md` 18 → 19 requirements ("Gates happen on main"); the new capability's `## Purpose` written by this act (no SHALL; replaces the CLI's TBD stub). openspec/specs 60 → 61; floor regeneration OWED (GRACED covered-pending 1, `created_by_candidate`), `contracts/review-lane-floor-snapshot.yaml` deliberately not edited here.
- README OpenSpec Records row → archived; sweep-ledger row re-seeded with the tool (`--seed-ledger --moved-by '#832'`, one line moved); no thirteenth archive-date disposition.
- Evidence (merged + green): #718 d179cc0, #727 07624d5, #735 6d3237e, xFactory #304 b2db7e47, #313 ddd19650, #345 90435875, #781 450bb60, #808 2ef7d8c, #814 c991c0f, #816 8924230, xFactory #362 119280a8, #830 202c170, xFactory #369 c2313277; D-2 live exercise: act B refusal 36d07ec, act A apply e970dfe, first autonomous merge #176 → 7681e40 (codexfactory[bot] APPROVED 2026-09-09T06:37:22Z).
- Copilot round 1: one factual finding taken (a missing "where" in Purpose); two wording findings answered and resolved.

Refs #656 (stays OPEN). Rule 6 LANDING window observed.

Lane: openxfactory-4-opendox-extraction
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_012LiNG5Ume1boEfxSNeCmpu
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