Repository navigation
Seal the refresh lane's validator from the openxdox product, not the shed path (#1158) - #1162
Conversation
…shed path (#1158) The nightly dashboard-refresh lane's parent seal has refused every real corpus since the split-opendox § 5.2 shed (cc4ae9d, #940). The seal asked `git archive` for scripts/validate-ideation-dashboard-contracts.py, which openxFactory no longer carries. Measured at 1edbb3d: git archive failed at 1edbb3d: fatal: pathspec 'scripts/validate-ideation-dashboard-contracts.py' did not match any files That is the :1199 archive call. The :1221 presence check behind it named the same shed path. The seal now takes the validator from where it has lived since the shed: - The corpus git-archive set is exactly CORPUS_BAKED_PATHS. It no longer names the shed path, and the decision scope does not move. - The validator is resolved by the snapshot lane's own resolver, nightly_lane._pinned_validator() (#1157). That is openxdox's own validator, composed with its schemas by doxbench_contracts._composed_validator. It is resolved BEFORE the corpus is archived. - The composed unit is sealed as regular files under a new seal root, validator/ (scripts/ beside contracts/schemas/), so it runs against the right schemas. It sits beside the corpus, so it is sealed and never baked. - The parent RUNS the sealed copy once, through the product's own snapshot.validate_snapshot, over a minimal snapshot-kind probe. It refuses unless the validator reached a verdict. The probe never judges the corpus; that stays the child's --strict. - The seal still fails closed. If nothing resolves it refuses, naming where it looked in the snapshot lane's own words: nightly_lane gains _pinned_validator_missing(), now used by both lanes. Unmaterialized carve legs refuse by name. An unrunnable sealed copy refuses in the validator's own words. - The manifest records validator_relpath, validator_revision (the product leg's HEAD), validator_schema_count and validator_probe. schema_version moves to 2.0.0 because the validator left the corpus, so a 1.x reader refuses on the major rather than over a "missing" file. verify_seal, the reference intake, checks the new place. Measured with this change over the real corpus at 1edbb3d: SEALED, 3976 files, 45,039,060 bytes. The validator is from openXdox-code e28930bf, with 55 schemas. The probe ran: rc 1, not-conformant, so available. verify_seal reports 0 problems. The sealed unit, run over a snapshot rendered from the sealed tree, reports 3 x snapshot-dangling-cluster-ref to cl-plane-1. That is #1159's data, which is out of scope and untouched here. Tests, all in tests/ideation-dashboard/test_dashboard_source_seal.py: - test_a_post_shed_corpus_seals_with_the_products_own_validator uses the real resolver. Against main's module it fails with the shed-path git-archive refusal. - test_a_genuinely_missing_validator_still_refuses_naming_where_it_looked covers a product tree without its validator, and no source tree at all. It fails with the refusal removed, with the where-clause dropped, and against main's module. - New tests cover a carve leg that is not materialized, an unrunnable sealed copy, the one run of the sealed copy over the probe, and the 1.x layout, which the reference intake refuses. All are proven by mutation. - The seal-set, decision-scope, confined-locator and bounded-seal tests now point at the new layout. The seal-step comment in doc-health-reusable.yml said the seal set was one file WIDER than the baked set; it now says what the seal carries. It also names the gap tracked in #1161: the finalize job does not mount the openXdox/openDox gitlinks, so in production this step refuses by name until it does. Not changed here, tracked in #1161: the aggregation child cannot render since the shed ("No module named ideation_dashboard.cli"), and its intake reads a 1.x layout. So this change alone does not make the refresh chain run end to end. Lane: openxfactory-4 Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…it (#1158) seal_validator copied the composed unit's schemas through their links, and silently left out any entry that was not a regular file. The probe could not see the gap. The validator asks for a family schema only when an instance needs it, and the probe is a bare snapshot-kind document. So a dangling link would have sealed a narrower unit than the one the snapshot lane validates with. The seal now refuses such an entry, by name. The new test is test_a_unit_entry_that_is_not_a_regular_file_is_refused_by_name, which covers a dangling link and a directory. It is proven by mutation: with the refusal turned back into a skip, both cases fail with DID NOT RAISE. Prose is corrected to match what was measured: - The comment before the resolver said "~35 MB". The corpus half of the seal at 1edbb3d is 44,492,413 bytes, in 3919 files. - The probe comments said a verdict on the probe meant "exactly" that the child's --strict can validate a snapshot. It means the sealed copy runs, over the snapshot schema. The copy itself guarantees that it carries the whole unit; the probe does not. - The module docstring and the seal step's workflow comment said the child's --strict is "known to be runnable". The parent runs the copy under its own interpreter, not the child's. What the run proves is that a copy which cannot run never reaches the child. - The confined locator "never adopts a copy wherever a seal puts one" now reads "a copy a seal puts outside that tree", which is what confinement gives. Lane: openxfactory-4 Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Reviewer's GuideThe PR repairs parent refresh sealing after the openxFactory/openxdox split by sourcing the validator from the pinned openxdox product, sealing its composed schemas beside the corpus, probing the sealed copy before publication, and introducing a 2.0.0 manifest layout with comprehensive fail-closed tests. Sequence diagram for refresh lane validator sealingsequenceDiagram
participant Parent as Refresh lane parent
participant Resolver as nightly_lane._pinned_validator()
participant Product as Pinned openxdox product
participant Seal as seal_validator()
participant Snapshot as snapshot.validate_snapshot
participant Artifact as Seal artifact
Parent->>Resolver: Resolve pinned validator
Resolver->>Product: Compose validator with schemas
Product-->>Resolver: PinnedValidator
Resolver-->>Parent: Return composed runnable unit
Parent->>Artifact: Archive CORPUS_BAKED_PATHS
Parent->>Seal: Copy validator and schemas under validator/
Seal->>Snapshot: Validate one-field snapshot probe
Snapshot-->>Seal: Verdict or unavailable
alt Validator reached a verdict
Seal-->>Parent: Return validator manifest fields
Parent->>Artifact: Write manifest.json and publish seal
else Validator cannot run
Seal-->>Parent: Raise SealRefused
Parent-->>Artifact: Create no seal directory
end
Flow diagram for fail-closed refresh sealingflowchart TD
Start["seal_source"] --> Resolve["Resolve pinned openxdox validator"]
Resolve -->|missing or unreachable| Refuse["SealRefused with lookup cause"]
Resolve --> Archive["Archive exact CORPUS_BAKED_PATHS"]
Archive --> Copy["Copy validator and schemas under validator/"]
Copy -->|non-regular entry| RefuseEntry["SealRefused naming the entry"]
Copy --> Probe["Run sealed copy with snapshot.validate_snapshot"]
Probe -->|unavailable| RefuseRun["SealRefused with validator output"]
Probe -->|verdict reached| Manifest["Write 2.0.0 manifest"]
Manifest --> Publish["Publish seal for child"]
Refuse --> None["No seal directory"]
RefuseEntry --> None
RefuseRun --> None
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Invalid product HEAD revisions must cause SealRefused instead of producing a seal with a null validator_revision.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
What changed in this PR
This PR updates refresh-lane sealing to use and validate the pinned openxdox validator.
Changes:
- Seals the validator and schemas beside the corpus.
- Adds validator metadata and 2.0.0 seal verification.
- Expands failure-mode tests and workflow guidance.
- A moderate issue remains around invalid product revision handling.
| File | Summary |
|---|---|
tests/ideation-dashboard/test_dashboard_source_seal.py |
Tests sealing, validation, failure modes, and manifest layout. |
scripts/ideation_dashboard/nightly_lane.py |
Centralizes pinned-validator lookup diagnostics. |
scripts/ideation_dashboard/dashboard_refresh_lane.py |
Implements validator sealing, probing, metadata, and verification. |
.github/workflows/doc-health-reusable.yml |
Documents required product gitlinks. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
seal_validator recorded validator_revision as null and sealed anyway when the pinned product tree's HEAD could not be read as a full revision. That drops the provenance the manifest promises (Copilot review of #1162). The revision is now read first. A product tree whose HEAD cannot be read refuses the seal, naming the tree and what was read. Only a unit with no product tree at all, an injected stand-in, still records null. verify_seal, the reference intake, now rejects a validator_revision that is present but not a full revision. Null still verifies, for the same stand-in units. The new tests are each proven by mutation: - test_a_product_revision_that_cannot_be_read_refuses_the_seal covers git failing and git answering a short revision. With the pre-review silent null restored, both cases fail with DID NOT RAISE. - test_verify_refuses_a_validator_revision_that_is_not_a_full_revision fails when the shape check is removed. Lane: openxfactory-4 Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Narrow the ImportError handling and verify schema integrity and probe metadata during seal intake.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
Open (1)
Resolved since last review (1)
verify_seal, the reference intake, checked that a 2.x seal carried the validator script, and nothing else about the unit (Copilot review of #1162). The script alone validates nothing: without its schemas it exits 2 before it reads a snapshot. So a seal whose schemas had been removed, with the index and the tree digest recomputed to match, verified clean. The intake now also requires: - at least one schema indexed under validator/contracts/schemas/; - validator_schema_count equal to the number indexed; - the snapshot schema the child validates against, among them; - validator_probe recording that the parent's one run reached a verdict, either validated or not-conformant. The snapshot schema's name and the two verdict outcomes are spelled out in the module, because it must import without the carve legs. Tests hold them to the product: - the outcomes are asserted equal to snapshot.VALIDATED and snapshot.NOT_CONFORMANT; - dropping exactly that schema makes the product's own validator refuse, naming it. The new test is test_verify_refuses_a_validator_unit_that_is_not_whole, which applies four coherent tampers. Each check is proven by its own mutation. The 1.x-layout test now asserts its exact seven problems. Lane: openxfactory-4 Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
|
Lane: openxfactory-4 (openXfactory-4-openDox_extraction) On the round-two overview's "Narrow the ImportError handling". That line has no inline finding, so it is answered here, by measurement. There is no code change for it.
Narrowing the catch would change only the framing. The |
|
Lane: openxfactory-4 (openXfactory-4-openDox_extraction) This answers Copilot's third review,
|
|
There was a problem hiding this comment.
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 12 hours and 38 minutes by commenting @sourcery-ai review. Upgrade to get a review now.
|
Lane: openxfactory-4 (openXfactory-4-openDox_extraction) READY #1162 @9f37701f 2026-09-24T21:32Z
|
|
Lane: openxfactory-4 (openXfactory-4-openDox_extraction) LANDING — lane openxfactory-4, session faabad8b-8c31-4958-abd5-b35bdc9cd282@Eagle, 2026-09-24T21:33:03Z, PR #1162 into opensoft/openxFactory main |
Brings in the packet this pull request realizes, now landed by squash as daca0b8 (#1156, ratified): openspec/changes/admit-code-leg-under-pinned-root/. Also brings in the refresh lane's validator seal (#1162, 57af692). Neither touches the four files this realization edits. Refs #1150 Lane: openxfactory-5 (openXfactory-5) Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>





Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
The refresh lane's parent seal now takes the snapshot validator from the pinned openxdox product. The validator has lived there since the split-opendox shed. Until now the seal asked the corpus for a path the shed removed. This is for #1158, which is referenced here but not closed: the holder closes it and lands this PR.
mainat1edbb3dd. That commit is Consume the confined snapshot-validator locator: openXdox pin 2f3f857d → 069fe471, with its two consumers (RULED 5815412869 C3) #1157, the openXdox re-pin this consumes.The defect, measured at main
1edbb3ddseal_sourceaskedgit archiveforscripts/validate-ideation-dashboard-contracts.py. openxFactory has not carried that file sincecc4ae9d3(#940):That is the archive call at
:1199. The presence check at:1221named the same path, so no post-shed corpus could seal.The change
git archivepathspec isCORPUS_BAKED_PATHS, which no longer names the shed path. The decision's scope does not move, so no recorded pin reads as a scope change.nightly_lane._pinned_validator()from Consume the confined snapshot-validator locator: openXdox pin 2f3f857d → 069fe471, with its two consumers (RULED 5815412869 C3) #1157. That resolver returns openxdox's own validator, composed with its schemas bydoxbench_contracts._composed_validator. It is called before anything is archived, so a refusal leaves no seal directory.validator/, withscripts/besidecontracts/schemas/. The validator looks forROOT/contracts/schemasfirst, so it finds its own schemas andCONTRACTS_DIRcan never stand in. The unit sits beside the corpus, so it is sealed but never baked.snapshot.validate_snapshot, over a one-field snapshot-kind probe. The seal refuses unless the validator reached a verdict. The probe does not judge the corpus; that stays with the child's--strict.the pinned openxdox validator was not found (<where>) — ….<where>comes fromnightly_lane._pinned_validator_missing(). That helper was extracted fromrun_lane's skip, and both lanes now call it. The skip text is unchanged.the pinned openxdox validator cannot be resolved on this parent (CarveReachUnavailable: …).the composed validator unit carries <name>, which does not resolve to a regular file (…). The seal refuses it rather than skipping it. A skip would seal a narrower unit than the snapshot lane validates with, and the probe could not see that, because the validator asks for a family schema only when an instance needs it.could not resolve the pinned product's revision at <tree> to a commit (read …) — the sealed validator's provenance would go unrecorded. Only a unit with no product tree at all, an injected stand-in, records a null revision.the sealed validator could NOT RUN, …, followed by the validator's own last line.New fields:
validator_relpath,validator_revision(the product leg's HEAD),validator_schema_countandvalidator_probe.schema_versionmoves to2.0.0because the validator left the corpus. A 1.x reader therefore refuses on the major, not over a "missing" file.verify_seal, the reference intake, looks for the validator only where a 2.x seal carries it, and refuses the 1.x layout. It requires the whole unit, not only the script:validator/contracts/schemas/;validator_schema_countequal to the number indexed;validator_proberecording a verdict, eithervalidatedornot-conformant.It also rejects a
validator_revisionthat is present but not a full revision.Measured over the real corpus
At this head,
9f37701f, sealing that commit's own tree:The first commit, sealing main's tree at
1edbb3dd, gave the same verdict: 3976 files and 45,039,060 bytes, with the same validator revision, schema count and probe outcome, and 0 problems.9800caf4gave it too: 45,053,246 bytes, 0 problems. At every head the byte difference is this PR's growth of the two baked modules; between1edbb3ddand9800caf4it is exactly 14,186 bytes. The validator unit (56 files, 546,625 bytes) and the recipe are identical in every seal.The probe is deliberately not a conformant snapshot, so
not-conformantwith exit 1 is the right verdict: it shows the validator ran against its schemas. An exit of 2, or "unavailable", would have refused the seal.The sealed unit's verdict on the corpus. A snapshot rendered from the sealed tree has 397 documents. The sealed unit reports the same result with and without
--strict, over both seals:These three are #1159's data, expected, and out of scope. This PR does not touch, suppress or disposition them. The seal does not judge corpus content, so they do not stop it sealing. The child's
--strictis what reports them.Production shape. The finalize job does not mount the openXdox and openDox gitlinks. A clone without them, running
--phase seal, gives:It reports
sealed: falseand creates no seal directory.Tests, each proven by mutation
The tests are in
tests/ideation-dashboard/test_dashboard_source_seal.py, where 87 pass. For each row, the mutation was applied to the module and the named test was run. The module was then restored, with its sha256 checked after every run against504cbac64947, the module at this PR's head. All seventeen mutations were caught.test_a_post_shed_corpus_seals_with_the_products_own_validator(real resolver, real legs)SealRefused: git archive failed … pathspec 'scripts/validate-ideation-dashboard-contracts.py' did not match any filestest_a_genuinely_missing_validator_still_refuses_naming_where_it_looked(both params:without-its-validator,not-a-source-checkout)runnable is Nonerefusal removedTypeErroronNonetest_unmaterialized_carve_legs_refuse_naming_the_legsImportErrorcatch narrowedCarveReachUnavailable, not aSealRefusedtest_a_sealed_validator_that_cannot_run_is_refused(both params)DID NOT RAISE SealRefusedtest_the_one_run_is_of_the_sealed_copy_over_the_probetest_a_unit_entry_that_is_not_a_regular_file_is_refused_by_name(both params:a-dangling-link,a-directory)DID NOT RAISE SealRefusedtest_a_product_revision_that_cannot_be_read_refuses_the_seal(both params:git-fails,not-a-full-revision)DID NOT RAISE SealRefusedtest_verify_refuses_a_validator_revision_that_is_not_a_full_revisiontest_verify_refuses_a_validator_unit_that_is_not_whole(params:schemas-removed,count-disagrees,snapshot-schema-renamed,probe-unavailable)test_verify_refuses_the_1x_layout_that_sealed_the_validator_in_the_corpusvalidator_relpathcheck removed; the carriage check removed; the major left at1(three mutations)The existing seal-set, decision-scope, confined-locator, bounded-seal and manifest tests now follow the new layout.
test_the_seal_speaks_only_git_and_never_builds_or_pushesruns twice: over a stub unit and over the real resolver.Gates, versus main
The required
pytest-suitecheck, at this head9f37701f, is SUCCESS. It ran as CI run 36050592000, over merge commit2b5e7d8f, which is this head merged into main138a4722:The same suite run locally, branch against main. This used the CI recipe1, with a TMPDIR whose ancestors hold no directory named
openxFactory. The junit reports compare as follows:9800caf41edbb3ddtest_validator_cli::test_release_mode_field_is_preserved_on_the_real_repository[--require-realization-realization], which hit its 30-second subprocess timeout on a loaded host. It passes in CI.9800caf4: 83 in the seal file against main's 69.9800caf4differs from this head only inverify_sealand the seal tests.openxFactory, and four "no checkout anywhere" tests found that clone by walking up. Under a load average near 60, git also failed to spawn (EAGAIN), and together these read as 11 failures on the branch against 7 on main. All eleven were re-run with a clean TMPDIR and gave identical results on both trees.1edbb3ddvalidate-openspec-cli-pin.py --all --no-cache, locally at17679e329f37701fSonarCloud is advisory, and its Quality Gate passed. It raises two new code smells, which this PR does not change:
seal_validator's cognitive complexity is 17, against an allowance of 15.pytest.raisesblock in the seal tests wraps two calls.Targeted runs:
9f37701f9f37701ftest_nightly_lane,test_dashboard_refresh_lane,test_b4_boundary_repointandtest_import_directionb1774bf2doc-health-reusable.yml, plustest_dashboard_refresh_lane,test_b4_boundary_repointandtest_import_directionCommits
17679e32is the change.b1774bf2came out of self-review before this PR opened.seal_validatorused to skip, silently, a unit entry that is not a regular file. It now refuses it by name, with a test and a mutation for that.1edbb3ddis 44,492,413 bytes.9800caf4answers Copilot's round-one finding.validator_revision.verify_sealrejects a recorded revision that is not a full one.9f37701fanswers Copilot's round-two finding: the intake now requires the whole validator unit, as listed under Manifest.9f37701f(review5309433050) reads 🔵 Needs a closer look, with Findings: None. It is answered by measurement in a PR comment, with no head move. All review threads are resolved.Not fixed here: #1161
This PR repairs the parent seal only. The refresh chain still cannot run end to end. The reasons below were measured today and are filed as #1161.
opensoft/xFactorydashboard-image-worker.yml, generate over the post-shed corpus exits 1 withNo module named ideation_dashboard.cli. Its intake also hard-codes the 1.x layout:openxFactory/scripts/validate-ideation-dashboard-contracts.pyand major1. It would therefore refuse a 2.0.0 seal on the major. That refusal is intended, because the child rework reads 2.x.dfr-sealstep runs only whendfr-readinessreports ready. xFactory nightly run 35947804907 (2026-09-24) reportsSKIPPED — worker unavailable: heartbeat_labels_missing.doc-health-reusable.ymlnow says so.So no production outcome changes. The seal step is still skipped. If it ran, it would still refuse, naming the unmounted gitlinks instead of the shed path.
Also observed and not changed: the comment at
.github/workflows/pytest-suite.yml:153-164citesscripts/ideation_dashboard/snapshot.py::find_validatorandtests/ideation-dashboard/test_snapshot.py::test_find_validator_locates_pinned_checkout. Neither exists in openxFactory since the shed. openxdox's ownfind_validatorhas searched only its own product tree sincee28930bf.Scope
scripts/ideation_dashboard/dashboard_refresh_lane.pyscripts/ideation_dashboard/nightly_lane.pytests/ideation-dashboard/test_dashboard_source_seal.py.github/workflows/doc-health-reusable.yml, a comment-only changeopenspec/changes/and not the README OpenSpec Records block, so no Rule 6 landing window applies.tasks.md.handoffs/xFactory/attachments/lane-opendox/fix1158/.Summary by Sourcery
Seal and verify the pinned openxdox validator as a self-contained companion to the baked corpus instead of relying on the removed corpus copy.
New Features:
Bug Fixes:
Enhancements:
Deployment:
Documentation:
Tests:
🤖 Generated with Claude Code
Footnotes
The recipe: the checkout nested under
openxFactory/, the venv fromrequirements/hermes-runtime-contracts.lock, the pinned openspec CLI, andPINNED_CORE_CHECKOUTatb21f0100. It runstests/ -q -m "not postgres". ↩