Skip to content

Seal the refresh lane's validator from the openxdox product, not the shed path (#1158) - #1162

Merged
brettheap merged 4 commits into
mainfrom
fix/refresh-lane-seal-product-validator
Sep 24, 2026
Merged

brettheap merged 4 commits into
mainfrom
fix/refresh-lane-seal-product-validator

Conversation

@brettheap

@brettheap brettheap commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

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.

The defect, measured at main 1edbb3dd

seal_source asked git archive for scripts/validate-ideation-dashboard-contracts.py. openxFactory has not carried that file since cc4ae9d3 (#940):

REFUSED: git archive failed at 1edbb3dd0634: fatal: pathspec 'scripts/validate-ideation-dashboard-contracts.py' did not match any files

That is the archive call at :1199. The presence check at :1221 named the same path, so no post-shed corpus could seal.

The change

  • The corpus half is exactly the baked set. The git archive pathspec is CORPUS_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.
  • One resolver for the validator. The seal uses the snapshot lane's own resolver, 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 by doxbench_contracts._composed_validator. It is called before anything is archived, so a refusal leaves no seal directory.
  • The composed unit is sealed under a new root. It lands as regular files under validator/, with scripts/ beside contracts/schemas/. The validator looks for ROOT/contracts/schemas first, so it finds its own schemas and CONTRACTS_DIR can never stand in. The unit sits beside the corpus, so it is sealed but never baked.
  • The parent runs the sealed copy once. The run goes through the product's own 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 seal still fails closed, and every refusal names its cause:
    • Nothing resolves: the pinned openxdox validator was not found (<where>) — …. <where> comes from nightly_lane._pinned_validator_missing(). That helper was extracted from run_lane's skip, and both lanes now call it. The skip text is unchanged.
    • The carve legs are not materialized: the pinned openxdox validator cannot be resolved on this parent (CarveReachUnavailable: …).
    • An entry in the composed unit is not a regular file, such as a dangling link or a directory: 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.
    • The product tree's HEAD does not read as a full revision: 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 copy cannot run: the sealed validator could NOT RUN, …, followed by the validator's own last line.
  • Manifest.
    • New fields: 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. 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:

      • 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 a verdict, either validated or not-conformant.

      It also rejects a validator_revision that is present but not a full revision.

Measured over the real corpus

At this head, 9f37701f, sealing that commit's own tree:

SEALED: 3976 files, 45055728 bytes, tree_digest e4581177e81d1ebd0e38e1021cb021336e08c7af7d738dcfa614f4ef189ab315
  schema_version: 2.0.0
  validator_relpath: validator/scripts/validate-ideation-dashboard-contracts.py
  validator_revision: e28930bf052febff0c7bdd0463a72ce3c4f5e8fe
  validator_schema_count: 55
  validator_probe: {"kind": "ideation-dashboard-snapshot", "outcome": "not-conformant", "returncode": 1}
verify_seal: 0 problem(s)

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. 9800caf4 gave it too: 45,053,246 bytes, 0 problems. At every head the byte difference is this PR's growth of the two baked modules; between 1edbb3dd and 9800caf4 it 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-conformant with 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:

ERROR [snapshot-dangling-cluster-ref] …: possible 'pos-derived-cross-domain-persona-framework-package' claiming_clusters references unknown cluster 'cl-plane-1'
ERROR [snapshot-dangling-cluster-ref] …: possible 'pos-derived-cross-layer-cost-accountability-pipeline' claiming_clusters references unknown cluster 'cl-plane-1'
ERROR [snapshot-dangling-cluster-ref] …: 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)

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 --strict is what reports them.

Production shape. The finalize job does not mount the openXdox and openDox gitlinks. A clone without them, running --phase seal, gives:

::warning::ideation-dashboard-refresh: NOT SEALED — the pinned openxdox validator cannot be resolved on this parent (CarveReachUnavailable: openxdox is read from a pinned carve leg, and no leg in this checkout carries it: the `openDox` and/or `openXdox` gitlinks are not materialized. […] Run `git submodule update --init --recursive openDox openXdox` from the repository root.) — the child's validator would be unreachable and --strict would fail with no finding to read; nothing dispatched, next run catches up in one hop

It reports sealed: false and 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 against 504cbac64947, the module at this PR's head. All seventeen mutations were caught.

test mutation how the test failed
test_a_post_shed_corpus_seals_with_the_products_own_validator (real resolver, real legs) main's module SealRefused: git archive failed … pathspec 'scripts/validate-ideation-dashboard-contracts.py' did not match any files
test_a_genuinely_missing_validator_still_refuses_naming_where_it_looked (both params: without-its-validator, not-a-source-checkout) main's module the refusal names the shed path, not where it looked
same, both params the runnable is None refusal removed TypeError on None
same, both params the where-clause dropped the where-clause assertion fails
test_unmaterialized_carve_legs_refuse_naming_the_legs the ImportError catch narrowed a raw CarveReachUnavailable, not a SealRefused
test_a_sealed_validator_that_cannot_run_is_refused (both params) the availability gate removed DID NOT RAISE SealRefused
test_the_one_run_is_of_the_sealed_copy_over_the_probe the probe runs the composed farm, not the sealed copy the run's path assertion fails
test_a_unit_entry_that_is_not_a_regular_file_is_refused_by_name (both params: a-dangling-link, a-directory) the refusal turned back into a skip DID NOT RAISE SealRefused
test_a_product_revision_that_cannot_be_read_refuses_the_seal (both params: git-fails, not-a-full-revision) the pre-review silent null restored DID NOT RAISE SealRefused
test_verify_refuses_a_validator_revision_that_is_not_a_full_revision the shape check removed the verify assertion fails
test_verify_refuses_a_validator_unit_that_is_not_whole (params: schemas-removed, count-disagrees, snapshot-schema-renamed, probe-unavailable) each of the four unit checks removed in turn (four mutations, each run against the one param it guards) that param's exact problem list is not produced
test_verify_refuses_the_1x_layout_that_sealed_the_validator_in_the_corpus the validator_relpath check removed; the carriage check removed; the major left at 1 (three mutations) its exact seven problems are not produced

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_pushes runs twice: over a stub unit and over the real resolver.

Gates, versus main

The required pytest-suite check, at this head 9f37701f, is SUCCESS. It ran as CI run 36050592000, over merge commit 2b5e7d8f, which is this head merged into main 138a4722:

selected=8878 passed=8872 skipped=6 failures=0 errors=0
freshness verifier: passed · vector replay: passed
floors: selected>=7050 (margin 1828) passed>=7044 (margin 1828) skipped==6

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:

this branch 9800caf4 main 1edbb3dd
selected 8874 8860
passed 8867 8853
skipped 6 6
failed 1 1
freshness verifier, vector replay passed, passed passed, passed
  • The one failure is the same on both trees. It is test_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.
  • The extra 14 selected and 14 passed are this PR's new seal tests at 9800caf4: 83 in the seal file against main's 69.
  • The head adds four more. Those are the parameters of the intake-tamper test, so CI's 8878 is main's 8860 plus 18. 9800caf4 differs from this head only in verify_seal and the seal tests.
  • An earlier local run is superseded. Its TMPDIR sat beside a clone named 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.
gate this branch main 1edbb3dd
validate-openspec-cli-pin.py --all --no-cache, locally at 17679e32 exit 0: 0 UNDISPOSITIONED, 1 ACCEPTED EXCEPTION exit 0, identical output
every required check at this head 9f37701f SUCCESS —

SonarCloud is advisory, and its Quality Gate passed. It raises two new code smells, which this PR does not change:

  • S3776: seal_validator's cognitive complexity is 17, against an allowance of 15.
  • S5778: one pytest.raises block in the seal tests wraps two calls.

Targeted runs:

at run passed
9f37701f the seal file 87
9f37701f the seal file, test_nightly_lane, test_dashboard_refresh_lane, test_b4_boundary_repoint and test_import_direction 161
b1774bf2 17 files: the 14 that read doc-health-reusable.yml, plus test_dashboard_refresh_lane, test_b4_boundary_repoint and test_import_direction 478

Commits

  • 17679e32 is the change.
  • b1774bf2 came out of self-review before this PR opened.
    • seal_validator used 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.
    • Four comments were corrected to match what was measured. One had said "~35 MB"; the corpus half at 1edbb3dd is 44,492,413 bytes.
  • 9800caf4 answers Copilot's round-one finding.
    • A product tree whose HEAD cannot be read now refuses the seal, instead of recording a null validator_revision.
    • verify_seal rejects a recorded revision that is not a full one.
  • 9f37701f answers Copilot's round-two finding: the intake now requires the whole validator unit, as listed under Manifest.
    • The round-two overview also said "Narrow the ImportError handling". That item is answered by measurement in a PR comment, with no code change.
  • Copilot's round three at 9f37701f (review 5309433050) 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.

  1. The aggregation child cannot render since the shed. In opensoft/xFactory dashboard-image-worker.yml, generate over the post-shed corpus exits 1 with No module named ideation_dashboard.cli. Its intake also hard-codes the 1.x layout: openxFactory/scripts/validate-ideation-dashboard-contracts.py and major 1. It would therefore refuse a 2.0.0 seal on the major. That refusal is intended, because the child rework reads 2.x.
  2. Production never reaches the seal. The dfr-seal step runs only when dfr-readiness reports ready. xFactory nightly run 35947804907 (2026-09-24) reports SKIPPED — worker unavailable: heartbeat_labels_missing.
  3. The finalize job does not mount openxFactory's openXdox and openDox gitlinks, and the validator is resolved through them. Until the job mounts them, the seal step refuses and names them, as the production-shape measurement above shows. The step's comment in doc-health-reusable.yml now 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-164 cites scripts/ideation_dashboard/snapshot.py::find_validator and tests/ideation-dashboard/test_snapshot.py::test_find_validator_locates_pinned_checkout. Neither exists in openxFactory since the shed. openxdox's own find_validator has searched only its own product tree since e28930bf.

Scope

  • Four files:
    • scripts/ideation_dashboard/dashboard_refresh_lane.py
    • scripts/ideation_dashboard/nightly_lane.py
    • tests/ideation-dashboard/test_dashboard_source_seal.py
    • .github/workflows/doc-health-reusable.yml, a comment-only change
  • Touches nothing under openspec/changes/ and not the README OpenSpec Records block, so no Rule 6 landing window applies.
  • Moves nothing else: no pin, gitlink or carve manifest, and not the split-opendox tasks.md.
  • Tools: the measurement, mutation and gate tools are persisted in brett-wip at 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:

  • Seal the pinned openxdox validator and its schemas alongside the corpus, and validate the sealed copy before dispatching it.

Bug Fixes:

  • Allow post-shed refresh-lane source sealing to succeed without looking for the validator removed from the openxFactory corpus.
  • Fail closed with actionable errors when the validator, its schemas, provenance, or execution is unavailable.

Enhancements:

  • Move the seal manifest to schema version 2.0.0 with validator location, revision, schema count, and probe verdict metadata.
  • Share the pinned-validator lookup and missing-location reporting between the nightly and refresh lanes.

Deployment:

  • Document that the finalize job must materialize the openXdox and openDox gitlinks before this seal can run.

Documentation:

  • Update workflow and module documentation to describe the product-owned validator seal layout and its current deployment limitation.

Tests:

  • Expand seal coverage for post-shed corpora, validator resolution and execution failures, incomplete validator units, provenance validation, and rejection of the legacy 1.x layout.

🤖 Generated with Claude Code

Footnotes

  1. The recipe: the checkout nested under openxFactory/, the venv from requirements/hermes-runtime-contracts.lock, the pinned openspec CLI, and PINNED_CORE_CHECKOUT at b21f0100. It runs tests/ -q -m "not postgres". ↩

brettheap and others added 2 commits September 24, 2026 18:51
…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]>
Copilot AI lite review requested due to automatic review settings September 24, 2026 19:22
@sourcery-ai

sourcery-ai Bot commented Sep 24, 2026

Copy link
Copy Markdown

Reviewer's Guide

The 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 sealing

sequenceDiagram
    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
Loading

Flow diagram for fail-closed refresh sealing

flowchart 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
Loading

File-Level Changes

Change Details Files
Resolve and seal the refresh lane’s validator from the pinned openxdox product instead of the shed openxFactory corpus path.
  • Reuse nightly_lane._pinned_validator() and centralize missing-validator diagnostics.
  • Copy the composed validator and schemas as regular files beneath validator/.
  • Run the sealed validator once against a probe before allowing the seal to complete.
  • Refuse unresolved carve legs, incomplete validator units, and non-runnable sealed copies with explicit causes.
scripts/ideation_dashboard/dashboard_refresh_lane.py
scripts/ideation_dashboard/nightly_lane.py
Version and validate the new seal layout and validator metadata.
  • Keep the corpus archive exactly equal to CORPUS_BAKED_PATHS while carrying the validator beside it.
  • Move the manifest schema to 2.0.0 and record validator path, product revision, schema count, and probe result.
  • Make verify_seal require the 2.x validator location and reject the legacy 1.x corpus layout.
scripts/ideation_dashboard/dashboard_refresh_lane.py
Expand coverage around post-shed sealing, fail-closed behavior, and validator provenance.
  • Update fixtures and assertions for a post-shed corpus with an injected or real composed validator unit.
  • Test missing validators, unmaterialized carve legs, incomplete/non-regular units, non-runnable copies, sealed-copy execution, and legacy-layout rejection.
  • Retain bounds, scope, manifest, locator-confinement, and no-build/no-push guarantees under the new layout.
tests/ideation-dashboard/test_dashboard_source_seal.py
Document the production dependency on materialized openxdox/openDox carve legs.
  • Clarify that only the corpus and recipe are already available in the finalize job.
  • Explain that validator resolution currently refuses until the required gitlinks are mounted, tracked as follow-up work.
.github/workflows/doc-health-reusable.yml

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

🟡 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 Medium severity

Open (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]>
Copilot AI review requested due to automatic review settings September 24, 2026 19:38

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

🟡 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 High severity

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]>
Copilot AI review requested due to automatic review settings September 24, 2026 19:48
@brettheap

Copy link
Copy Markdown
Contributor Author

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.

resolve_pinned_validator catches ImportError, not only CarveReachUnavailable, on purpose. Its contract is that every way this parent can fail to resolve the pinned validator becomes a SealRefused. That refusal names the exception's type and message, and chains it as __cause__, so nothing is masked. Measured at 9f37701 (measure-importerror.py, persisted with the lane tools):

a missing third-party module:
  SealRefused: the pinned openxdox validator cannot be resolved on this parent (ModuleNotFoundError: No module named 'yaml') — the child's validator would be unreachable and --strict would fail with no finding to read
  __cause__: ModuleNotFoundError: No module named 'yaml'
the carve-leg refusal:
  SealRefused: the pinned openxdox validator cannot be resolved on this parent (CarveReachUnavailable: no leg in this checkout carries it) — the child's validator would be unreachable and --strict would fail with no finding to read
  __cause__: CarveReachUnavailable: no leg in this checkout carries it

Narrowing the catch would change only the framing. The --phase seal CLI already catches any other exception and records it as <Type>: <message>, so a narrowed miss would still refuse, just without the refusal's own account of what could not run and why that matters to the child. A code defect on that import path is not hidden by the broad catch: its type and text lead the refusal, and the tests import the real resolver.

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

The changes affect sealing, provenance, manifest compatibility, and cross-repository validator resolution; final human review is prudent.

Review effort: Lite
Findings: None

Resolved since last review (1)

@brettheap

Copy link
Copy Markdown
Contributor Author

Lane: openxfactory-4 (openXfactory-4-openDox_extraction)

This answers Copilot's third review, 5309433050 at 9f37701f: 🔵 Needs a closer look, Findings: None, with round two's finding listed under Resolved since last review. It has no finding to fix, so it gets one answer by measurement and no head move. What follows makes the closer look cheap, covering the four areas the review names.

  • Scope. The PR changes 4 files, +886/−131, all under scripts/ideation_dashboard/, tests/ideation-dashboard/ and one workflow comment.
    • No gitlink moves: git diff --raw over origin/main...9f37701f shows 0 mode-160000 entries.
    • .gitmodules, openspec/changes/ and README.md are not touched.
  • Sealing. No production outcome changes.
  • Provenance. Each seal records validator_revision, the product leg's HEAD: e28930bf052febff0c7bdd0463a72ce3c4f5e8fe, measured over the real corpus.
    • A product tree whose HEAD cannot be read refuses the seal (round one).
    • The intake requires the whole unit (round two).
    • All 17 mutations are caught against the module at this head.
  • Manifest compatibility. schema_version moves to 2.0.0.
  • Cross-repository validator resolution. The seal resolves through nightly_lane._pinned_validator(), the function the snapshot lane already validates with since Consume the confined snapshot-validator locator: openXdox pin 2f3f857d → 069fe471, with its two consumers (RULED 5815412869 C3) #1157. No second resolver exists to drift.
    • The confined locator never adopts the sealed copy, from any of three start points, and a test asserts that.
  • Human review. Required, and already arranged. reviewDecision is REVIEW_REQUIRED, and the claim (5819559535) says the holder lands this PR. This writer does not merge.

@sonarqubecloud

Copy link
Copy Markdown

@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 12 hours and 38 minutes by commenting @sourcery-ai review. Upgrade to get a review now.

@brettheap

Copy link
Copy Markdown
Contributor Author

Lane: openxfactory-4 (openXfactory-4-openDox_extraction)

READY #1162 @9f37701f 2026-09-24T21:32Z

  • Every required check is SUCCESS at 9f37701f. pytest-suite gives selected 8878, passed 8872, skipped 6 and 0 failed; freshness and vector replay passed.
  • 0 of 2 review threads are unresolved.
  • Copilot's review 5309433050 at this head reads 🔵 with Findings: None and no suppressed block. It is answered in comment 5821162183.
  • There are no closing keywords in the body or in the 4 commits.
  • Not merged. The claim (5819559535) says the holder lands this PR.

@brettheap

Copy link
Copy Markdown
Contributor Author

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

@brettheap
brettheap merged commit 57af692 into main Sep 24, 2026
17 checks passed
@brettheap

Copy link
Copy Markdown
Contributor Author

Lane: openxfactory-4 (openXfactory-4-openDox_extraction)

LANDED — lane openxfactory-4, 2026-09-24T21:33:17Z, PR #1162 → 57af692 (opensoft/openxFactory main; squash)

brettheap added a commit that referenced this pull request Sep 25, 2026
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]>
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