Skip to content

Repair the three dangling cl-plane-1 cluster refs in the corpus snapshot (#1159) - #1184

Merged
brettheap merged 1 commit into
mainfrom
fix/1159-plane-1-cluster-refs
Sep 27, 2026
Merged

brettheap merged 1 commit into
mainfrom
fix/1159-plane-1-cluster-refs

Conversation

@brettheap

@brettheap brettheap commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Lane: openxfactory-5 (openXfactory-5)

The real corpus snapshot failed strict contract validation with three snapshot-dangling-cluster-ref findings to cl-plane-1. This PR restores the cluster those refs intend; it does not retarget them. The change is one whitespace-only reflow of one brainstorm header. With it, the real seal's pre-dispatch validator passes at this head.

What was wrong

At main (133e37d9), the refresh lane's real seal (render plus --strict validator, run the way the worker runs them) refused the snapshot:

ERROR [snapshot-dangling-cluster-ref] snapshot.json: possible 'pos-derived-cross-domain-persona-framework-package' claiming_clusters references unknown cluster 'cl-plane-1'
ERROR [snapshot-dangling-cluster-ref] snapshot.json: possible 'pos-derived-cross-layer-cost-accountability-pipeline' claiming_clusters references unknown cluster 'cl-plane-1'
ERROR [snapshot-dangling-cluster-ref] snapshot.json: possible 'pos-derived-roster-promotion-conformance-checklist' claiming_clusters references unknown cluster 'cl-plane-1'
validate-ideation-dashboard-contracts: 3 error(s), 0 warning(s)

The three records are possibles in the possibles_register of ideation/cross-reference.yaml. Derive run derive-possibles-30186143362-1 (job DPOSS-d347d926a111, source revision 41e005ff) proposed them for cl-plane-1, and 02bec9e8 (2026-08-26) landed them. Each one carries claiming_clusters: [cl-plane-1] and provenance.section: derived-from cluster cl-plane-1.

cl-plane-1 was not renamed, merged or split, and it was always defined. Its record is still in the index (topic_entries, "Plane 1", three members). What the snapshot lost is the ability to derive it, because two readers parse the same headers differently:

  • The snapshot generator (openXdox/code/src/openxdox/generator.py) makes a cluster cl-<topic> for every topic a document declares. It reads only the first line of a Topics: header, and only inside the 15-line lifecycle header window (parse_topics → _header_value, HEADER_SCAN_LINES = doc_health.corpus.STATUS_SCAN_LINES = 15).
  • The readiness scorer that writes the index (scripts/doc_health/ideation_readiness.py::_parse_header) reads the whole header block, continuation lines included.

The drift commit is b75d7ee5 ("The 24 domain files leave openxFactory…"), PR #785, merged as 97f14f76 on 2026-09-08. It removed the only three documents that declared plane-1 where the generator reads it: ideation/brainstorm/codexfactory-domain-roster-draft.md and the two staged *-domain-hermes-content.md fragments.

The same PR regenerated the index (60ed7db7), which kept cl-plane-1 with the three remaining members. All three declare plane-1, but none where the generator reads:

member (ideation/brainstorm/) Topics: on line plane-1 on the generator reads
client-layer-roster-draft.md 16 the first line nothing (past the window)
client-layer-scaffold.md 16 the third line nothing (past the window)
project-layer-scaffold.md 15 the third line the first line only

Measured with each revision's own in-tree generator and validator:

revision cl-plane-1 in the snapshot validator
02bec9e8 (the possibles land) yes, 3 edges 0 error(s), 0 warning(s)
b75d7ee5^ (543d47a9) yes, 3 edges 0 error(s), 0 warning(s)
b75d7ee5 no the three findings
97f14f76 (#785's merge) no the three findings
133e37d9 (main) no the three findings

What this changes

The PR touches one file, ideation/brainstorm/client-layer-roster-draft.md, the Client Plane-1 roster itself. Its Summary: paragraph is reflowed, whitespace only, so its Topics: header moves from line 16 to line 15, inside the window. plane-1 was already on that header's first line.

  • Not one word changes. The document's whitespace-normalized text is identical, and so is its byte length (17045). The first Summary: line is byte-identical, so the snapshot's summary for this document does not move.
  • The header keeps the order ideation/README.md requires. § "Ideation Header Format" lists the fields "in this order", with Summary: before Topics:. That is why this is a reflow and not a move of Topics: above Summary:; no corpus document has that order (0 of the 253 with a Topics: header).
  • The index needs no regeneration. The readiness scorer's _parse_header returns an identical dict for this document before and after.

Why restore rather than retarget. Nothing replaced cl-plane-1: it is still defined, and this document is one of its members. The three possibles record what derive run DPOSS-d347d926a111 read, so rewriting their claiming_clusters would falsify that record. 60ed7db7 names this trap when it keeps eight possibles that cite departed files: "Rewriting provenance.document would falsify the record of a run".

This document is the remaining member closest to the three possibles. It is the Plane-1 roster, it is the provenance and evidence of pos-derived-cross-layer-cost-accountability-pipeline, and it is the kind of roster the other two describe.

Snapshot delta (this head against main, same anchors):

  • One document entry changes: this document gains its six first-line topics (client, client-hermes, company-policy, plane-1, house-team, authority-personas).
  • cl-plane-1 is added: name "Plane 1" (read from the index), one document edge, possible_links: 3.
  • Five existing clusters (cl-authority-personas, cl-client, cl-client-hermes, cl-company-policy, cl-house-team) each gain this document's edge.
  • The keyword index gains plane-1, and the same five keywords' counts rise by one.
  • possibles, staged_topics and changes are identical.

Evidence

  • Real seal, via seat z's kit measure-real-seal.py (the real leg sealer, the real pre-dispatch render and the --strict validator):
    • at 133e37d9: "sealed": false, "strict_failed": true, with the three findings above;
    • at 76d52bf2: "sealed": true, "precheck": {"entry": "scripts/ideation-dashboard-cli.py", "documents": 400, "strict": true, "outcome": "validated", "returncode": 0}.
  • The product validator, run directly: CONTRACTS_DIR=openXdox/spec/contracts python3 openXdox/code/scripts/validate-ideation-dashboard-contracts.py --strict <snapshot>.
    • main: rc 1, 3 error(s);
    • head: rc 0, validate-ideation-dashboard-contracts: 0 error(s), 0 warning(s).
    • snapshot-dangling-cluster-ref count: 3 → 0.
  • doc-health (python3 scripts/doc-health.py --single-repo .): rc 0 at both base and head, with "Findings: 31 critical, 26 error, 49 warning, 21 info. New regressions vs previous report: 0." The critical/error/warning set is identical, and no finding names the touched file.
  • OpenSpec pin gate (python3 scripts/validate-openspec-cli-pin.py --all): rc 0 at both, output identical apart from a node process id ("every target validated --strict with 0 UNDISPOSITIONED failures … 1 finding(s) are ACCEPTED EXCEPTIONS").
  • Cross-reference validator (python3 scripts/validate-ideation-cross-reference.py): output identical at both, rc 1 from three pre-existing errors, all in tests/ideation-dashboard/fixtures/base-repo/ and none in the real index.
  • Ideation-dashboard modules (python3 -m pytest -q -p no:cacheprovider tests/ideation-dashboard): 1383 passed.
  • Full suite as CI runs it (python3 -m pytest tests/ -q -m "not postgres" -p no:cacheprovider, from a checkout path without "one"): 8682 passed, 21 skipped, 338 deselected, 391 subtests passed. One test failed: tests/hermes_runtime_contracts/test_validator_cli.py::test_release_mode_field_is_preserved_on_the_real_repository[--require-realization-realization], a subprocess.TimeoutExpired on its fixed 30 s timeout while the machine's load average was near 11. Re-run alone, it fails the same way at base 133e37d9 in the same checkout kind (1 failed, 1 passed at both), and it passes in CI.
  • CI at this head: pytest-suite success ("8725 passed, 6 skipped, 338 deselected, 9 warnings, 412 subtests passed"; failures=0 errors=0), and all 14 check-runs completed with success.
  • The literal root invocation (python3 -m pytest -q -p no:cacheprovider) stops at the same 10 collection errors at base and head, so it does not measure this change. Nine are in the product legs' own test trees, and one is an AlreadyRegistered collision those trees cause in tests/ideation-dashboard.
  • No test or fixture encodes the dangling state. test_this_checkout_seals_and_its_corpus_renders_from_the_seal accepts either verdict by design ("Whether the verdict is validated is a property of the corpus, not of the seal"), and it now takes its validated branch. The cl-plane-1 citation tests use stand-in validators with synthetic findings.

Left for the coordinator (outside #1159 as filed)

  • The Corpus snapshot: 3 dangling cluster refs to cl-plane-1 #1159 row in KNOWN_STRICT_FINDINGS (scripts/ideation_dashboard/dashboard_refresh_lane.py) stays. The row is built to go quiet on its own once the finding is gone, so it is harmless. Removing it, and pointing the three citation tests at a synthetic row, is a separate call.
  • The two-reader divergence is the root condition, and it is wider than this issue. Of the 253 corpus documents with a Topics: header, 38 place it past line 15 and 99 continue it onto a following line. The generator reads neither; the scorer reads both. So the index can hold clusters the snapshot never derives. cl-plane-1's snapshot cluster now has one edge where the index lists three members.
    • Only a possible that claims such a cluster fails validation, and cl-plane-1 was the only one.
    • Aligning the two readers is a product-level decision for openXdox, not a corpus edit.

Held for

Closes #1159

🤖 Generated with Claude Code

…ow (#1159)

The corpus snapshot's three possibles that claim cl-plane-1
(pos-derived-cross-domain-persona-framework-package,
pos-derived-roster-promotion-conformance-checklist,
pos-derived-cross-layer-cost-accountability-pipeline) dangle because no
document still declares plane-1 where the snapshot generator reads it.
The generator derives a document's clusters from the FIRST line of its
Topics: header, and only inside the 15-line lifecycle header window
(openxdox/generator.py: parse_topics -> _header_value, HEADER_SCAN_LINES =
doc_health.corpus.STATUS_SCAN_LINES = 15).

The drift is b75d7ee (PR #785, merged as 97f14f7, 2026-09-08). The 24
domain files left for their destination repositories, and with them went
the only three documents that declared plane-1 inside that window:
codexfactory-domain-roster-draft.md and the two *-domain-hermes-content
staged fragments. Measured with each revision's own generator and
validator: at 02bec9e, where the three possibles landed, and at
b75d7ee^ the snapshot carries cl-plane-1 and validates 0/0; at b75d7ee
and at 97f14f7 it carries no cl-plane-1 and fails with exactly the
three findings.

The cluster record itself never went away. The readiness index that the
same PR regenerated (60ed7db) keeps cl-plane-1 with three members,
because the readiness scorer reads the whole header block, continuation
lines included. This document is one of those members, and it declares
plane-1 on the first line of its Topics: header. Its eleven-line Summary
pushed that line to line 16, one past the window.

This commit reflows the Summary paragraph so the Topics: header sits on
line 15. It is whitespace only: not one word changes, the first Summary
line is byte-identical, and the header keeps the order ideation/README.md
requires. The snapshot then derives cl-plane-1 from this document again,
and the strict validator reports 0 errors, 0 warnings. The possibles are
untouched, because they record what derive run DPOSS-d347d926a111 read.
The index is untouched, because the readiness scorer's parse of this
header is identical before and after.

Refs #1159

Lane: openxfactory-5 (openXfactory-5)
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Copilot AI lite review requested due to automatic review settings September 27, 2026 16:39
@sourcery-ai

sourcery-ai Bot commented Sep 27, 2026

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

This PR fixes the three strict dangling cl-plane-1 references by whitespace-only reflow of the existing Plane-1 roster, moving its Topics header into the snapshot generator’s scan window. Regeneration restores the already-defined cluster and preserves all provenance and semantic document content, with strict validation and the real seal passing at the head.

Flow diagram for restoring the Plane-1 cluster reference

flowchart LR
    A["Whitespace-only reflow"] --> B["Topics header enters 15-line scan window"]
    B --> C["Snapshot generator derives cl-plane-1"]
    C --> D["Three existing possible references resolve"]
    D --> E["Strict validation passes"]
Loading

File-Level Changes

Change Details Files
Restores generator visibility of the existing Plane-1 roster without changing corpus semantics.
  • Reflows the Summary paragraph so the Topics header moves from line 16 to line 15, within the generator’s 15-line scan window.
  • Preserves all words, normalized content, byte length, topic ordering, and readiness-scorer output.
  • Allows the snapshot to regenerate the existing cl-plane-1 cluster and its related topic edges, resolving the three dangling possible references.
ideation/brainstorm/client-layer-roster-draft.md
Repairs strict snapshot validation while retaining the original provenance and cluster references.
  • Restores cl-plane-1 with the roster document edge and three possible links.
  • Leaves the three possibles’ claiming_clusters and provenance unchanged rather than retargeting them.
  • Produces no changes to possibles, staged topics, or changes data.
ideation/brainstorm/client-layer-roster-draft.md
Provides validation evidence for the corpus-only repair.
  • Strict contract validation changes from three dangling-cluster errors to zero.
  • Ideation-dashboard tests pass (1383 tests), while documented pre-existing checks remain unchanged.
  • The real seal passes at the PR head; broader reader divergence and the stale known-findings row remain outside this PR.
ideation/brainstorm/client-layer-roster-draft.md

Assessment against linked issues

Issue Objective Addressed Explanation
#1159 Restore the missing cl-plane-1 cluster to the generated corpus snapshot so the three existing possibles referencing it no longer produce snapshot-dangling-cluster-ref validation errors. ✅

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

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.

Copilot review overview

🔵 Needs a closer look

Add a regression assertion covering cl-plane-1 derivation and strict precheck validation.

Review effort: Lite
Findings: None

What changed in this PR

This PR restores cl-plane-1 cluster derivation through a whitespace-only header reflow, resolving strict snapshot validation failures.

Changes:

  • Moves Topics: within the generator’s scan window.
  • Preserves document content and readiness-index data.
File Summary
ideation/​brainstorm/​client-layer-roster-draft.md Reflows the header to restore cluster discovery.

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

@sonarqubecloud

Copy link
Copy Markdown

@brettheap

Copy link
Copy Markdown
Contributor Author

Lane: openxfactory-5 (openXfactory-5)

Answering Copilot's review 5331187088 at 76d52bf2 ("Findings: None", 0 threads). Its overview asks to "Add a regression assertion covering cl-plane-1 derivation and strict precheck validation."

Not added in this PR, on purpose; raised to the coordinator instead.

  • This PR repairs the corpus; it does not change what the suite gates. The one real-corpus check the suite already has, test_this_checkout_seals_and_its_corpus_renders_from_the_seal, accepts either verdict by design ("Whether the verdict is validated is a property of the corpus, not of the seal, so both are accepted here"). At this head it takes its validated branch, and the strict precheck over the real seal returns "outcome": "validated", "returncode": 0.
  • A regression assertion here would be a new gate on every corpus PR. It would assert, on the real corpus and in the required pytest-suite, that every cluster a possible claims is one the snapshot derives. It would fail at 133e37d9 with these three refs and pass at this head.
    • It would also fail any future PR that removes a claimed cluster's last generator-visible declarer.
    • That includes the derive-possibles lane's own PRs, because the index can hold clusters the generator never derives: 38 documents put Topics: past line 15, and 99 continue it onto a following line.
  • Who gets blocked is a policy choice, not a defect in this change. Today the designed detector is the refresh lane's nightly strict precheck, and it passes at this head.
  • The test-first design is ready: it fails at 133e37d9 with the three findings and passes at 76d52bf2. It can be added on the coordinator's word.

@brettheap
brettheap marked this pull request as ready for review September 27, 2026 17:05

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

Sorry @brettheap, you've used your own review budget of 250,000 diff characters for the last 7 days.

You can request another review in 1 day and 4 hours by commenting @sourcery-ai review. Upgrade to get a review now.

@brettheap

Copy link
Copy Markdown
Contributor Author

Lane: openxfactory-5 (openXfactory-5)

LANDING — lane openXfactory-5, session b254fdd5-0bdf-44e0-bb45-5a780234009f@Eagle, 2026-09-27T17:06:54Z, PR #1184 into opensoft/openxFactory main

@brettheap
brettheap merged commit a9e7db7 into main Sep 27, 2026
16 checks passed
@brettheap

Copy link
Copy Markdown
Contributor Author

Lane: openxfactory-5 (openXfactory-5)

LANDED — lane openXfactory-5, session b254fdd5-0bdf-44e0-bb45-5a780234009f@Eagle, 2026-09-27T17:07:11Z, PR #1184 into opensoft/openxFactory main → merge a9e7db7; Repair the three dangling cl-plane-1 cluster refs in the corpus snapshot (#1159)

@brettheap
brettheap deleted the fix/1159-plane-1-cluster-refs branch September 27, 2026 17:07
brettheap added a commit that referenced this pull request Sep 27, 2026
Brings in #1175 and #1184 (a9e7db7). #1184 repairs the three dangling
cl-plane-1 cluster refs (#1159), so the real seal of this branch runs
over the corpus the nightly will seal next. Neither touches a file of
this change.

Lane: openxfactory-5 (openXfactory-5)
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
brettheap added a commit that referenced this pull request Sep 27, 2026
Drops the idle #1159 entry from KNOWN_STRICT_FINDINGS in the dashboard refresh lane: #1184 repaired the three dangling cl-plane-1 cluster refs, so the real snapshot validates and the row is never consulted. The table is now empty with its row shape kept in the annotation; the citation tests run against a stand-in row so the citation code stays covered, and a new test asserts nothing is tracked today. No regression gate added, per Brett Heap's word "remove the idle #1159 row, skip the gate for now". Real seal: precheck validated, 400 documents, no citation consulted. Refs #1159. Landed on the word of 2026-09-27, verbatim "land #1188 when green".

Lane: openxfactory-5 (openXfactory-5)
Co-Authored-By: Claude Fable 5.1 <[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.

Corpus snapshot: 3 dangling cluster refs to cl-plane-1

2 participants