Skip to content

Seal 2.2.0: carry the serve unit and both product code legs (#1161 follow-up) - #1179

Merged
brettheap merged 28 commits into
mainfrom
feat/seal-2.2.0-serve-unit
Sep 27, 2026
Merged

brettheap merged 28 commits into
mainfrom
feat/seal-2.2.0-serve-unit

Conversation

@brettheap

@brettheap brettheap commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Lane: openxfactory-5 (openXfactory-5)

This PR moves the refresh lane's source seal to 2.2.0. The seal now carries the serve unit: the runtime tree the post-shed served-image recipe copies. With it, the context the refresh worker assembles from the seal satisfies Omnigent-Install#322's recipe (landed at 6b7da477).

That recipe starts openxFactory's own scripts/ideation-dashboard-serve.py from a runtime tree it copies out of the worker's ctx/. #1166's 2.1.0 seal carries every path of that tree except the entry itself, so no image built from a 2.1.0 seal could start.

2.2.0 also does two more things:

This is the openxFactory half of the #1161 follow-up pair. It was derived from lane openxfactory-4's prepared seal-2.2.0-abf77701.patch (opensoft/brett-wip d4ed130d) and rebuilt on #1166's head 40d6aa18.

Stacked on #1166

Pairs with

  • Omnigent-Install#322, landed at 6b7da477. This is the recipe whose runtime tree this seal carries. Its body section "The build context this recipe expects" lists the sources. containers/ideation-dashboard/Dockerfile lines 82-108 are the list this PR's SERVE_UNIT is held to.
  • xFactory#535, the worker child on xFactory#526's line, by seat z of this lane.
    • It adds openDox and openXdox to the worker's CONTEXT_ROOTS, copied from the sealed corpus and never from the aggregation root's gitlinks.
    • It requires the serve unit at intake, and mirrors SERVE_LEG_MODULES under the same name.
    • The validator_corpus_schemas names are published in the lane's seal contract (section 4c) for it to mirror.

Manifest 2.2.0

Version. schema_version is "2.2.0". It is a minor move: the major stays 2, and every 2.1.0 field keeps its name, place and meaning.

2.2.0 is the floor. A 2.1.x seal is refused by its named lacks, not by a version comparison: serve_entry and serve_unit (refusals a and c below), and validator_corpus_schemas (refusal h). That is the same pattern as 2.1 refusing 2.0. Since #322 the recipe copies and starts openxFactory/scripts/ideation-dashboard-serve.py, and no 2.1 seal carries it, so the worker could not build a starting image from any 2.1 seal. The existing tests never held a 2.1.x seal verifiable. A new test holds a coherent 2.1.0 seal refused for exactly those three reasons.

New manifest fields, all top-level:

"serve_entry": "scripts/ideation-dashboard-serve.py",
"serve_unit": [
  "contracts/domain-profiles/openxfactory-engineering.yaml",
  "docs/opendox-carve-manifest.yaml",
  "openDox/code/src/",
  "openXdox/code/src/",
  "scripts/carved_reach.py",
  "scripts/doc_health/",
  "scripts/ideation-dashboard-serve.py",
  "scripts/ideation_dashboard/",
  "scripts/opendox_host.py",
  "scripts/profile_openxfactory.py",
  "scripts/wire_messages.py"
],
"validator_corpus_schemas": {
  "<schema file name under validator/contracts/schemas/>": "<path relative to the seal's openxFactory/>"
}
  • The module constants are SERVE_ENTRY and SERVE_UNIT.
  • serve_unit paths are relative to the seal's openxFactory/, and sorted. A trailing / names a tree, as the recipe spells one. The unit is exactly the recipe's runtime-tree COPY sources. The /source roots are unchanged and are not in it.
  • validator_corpus_schemas is {} when the unit takes nothing from the corpus. A real seal of this checkout records 49 of its 55 schemas, each as contracts/schemas/<same name>. The other six come from the legs.

Listing rows and digests. There is no new digest field.

  • Every serve-unit file is a row of the existing files index ("openxFactory/<path>": "<sha256>"), and every tree has at least one row under it. All of them are covered by tree_digest under the unchanged tree_digest_spec.
  • The two legs are also in render_legs, in the unchanged 2.1 shape. That shape records:
    • gitlink_revision, the commit source_head pins the product at (openxFactory's own nested pin, RULED Q7);
    • leg_revision, the commit that product pins its code leg at.
  • seal_paths and corpus_baked_paths each gain scripts/ideation-dashboard-serve.py. It is the one corpus file the 2.1.0 seal lacked. The rest of the unit was already sealed, either as the render unit or as corpus paths.

Intake refusals. These are in verify_seal, the reference the worker mirrors.

  • Refusals h and i come right after the validator_revision check. Refusals a to g come after the 2.1 render-unit problems and before the recipe check.
  • Each path is required once, so a missing path is one problem, not two.
Condition Problem, verbatim
a serve_entry is not SERVE_ENTRY serve_entry is {value!r}, expected 'scripts/ideation-dashboard-serve.py' — the image the child builds could not start
b else, the entry is not indexed the seal does not carry openxFactory/scripts/ideation-dashboard-serve.py, the entry the served image starts
c serve_unit is not a list serve_unit is {value!r} — the seal records no serve unit, so the image the child builds could not start
d a list, but not list(SERVE_UNIT) serve_unit records {value!r}, expected {list(SERVE_UNIT)!r}
e a SERVE_ONLY file is not indexed the seal does not carry openxFactory/{path}, which the served image's recipe copies
f a SERVE_ONLY tree has no indexed file the seal indexes no file under openxFactory/{path}, which the served image's recipe copies
g a SERVE_LEG_MODULES module is not indexed, in a leg that holds any module the seal does not carry {modules}{module}, which the serve entry imports by name, where modules is openxFactory/<gitlink>/<leg>/src/<package>/
h validator_corpus_schemas is not an object of string to string (absent included) validator_corpus_schemas is {value!r} — the manifest does not record which of the sealed validator's schemas came from the corpus
i a recorded pair is not indexed under one digest validator_corpus_schemas records {name!r} as the corpus's {relpath!r}, but the seal does not carry validator/contracts/schemas/{name} and openxFactory/{relpath} as the same bytes — the child would judge the render with a schema from another corpus revision
  • SERVE_ONLY is the unit less its entry and less what the unchanged render-unit checks already require. That leaves contracts/domain-profiles/openxfactory-engineering.yaml, docs/opendox-carve-manifest.yaml, scripts/doc_health/ and scripts/ideation_dashboard/. The other six keep their 2.1 messages: the four RENDER_BOOTSTRAP files, and both legs' src/ through the render_legs checks.
  • Refusals e, f and g check the reader's own constants, whatever the manifest records.
  • SERVE_LEG_MODULES is {("openDox", "code"): ("serve.py",)}: the product modules the serve entry and its bootstrap import by name, less the render unit's RENDER_LEG_MODULES. A test derives it with an ast read. A leg with no module at all remains the render unit's one problem.
  • Refusal i is a lookup only. Both paths are files keys, so a .. or absolute value is simply not indexed. The digests are compared from the index, which the digest rule has already held to the bytes.
  • What the child cannot check is whether the record is complete. Which schemas came from the corpus is the parent's attestation, derived from where each link of the unit resolves.

Parent-side refusals. The seal refuses first what the intake refuses, and in each case no manifest is written.

  • The serve unit (seal_source, by the intake's own rule _serve_paths_absent). After the corpus archive is extracted, each unit path the archive holds (_SERVE_UNIT_ARCHIVED: all but the two legs, which the leg sealer seals whole) must be present as the kind the unit names it. A file must be a regular file at exactly that path; a directory there is refused, although the archive's pathspec admits one (Copilot, review 5328998696). A tree must hold at least one file. Otherwise:
    • the sealed corpus does not carry openxFactory/{path}, which the served image's recipe copies — the image the child builds could not start
    • the sealed corpus carries no file under openxFactory/{path}, which the served image's recipe copies — the image the child builds could not start
  • The serve module (seal_render_legs, after the render-module check):
    • the sealed openDox code leg carries no src/opendox/serve.py, which the serve entry imports by name, so the image the child builds could not start
  • A corpus schema (seal_validator). It is recorded only if the sealed corpus carries its path as the bytes just sealed. A schema linked from, say, experiments/, which the archive never seals, is refused:
    • the validator unit takes {name} from the corpus at {relpath}, which the sealed corpus does not carry as the same bytes — the child could not hold the validator to the render's corpus

The decision scope.

  • CORPUS_COPIED_PATHS becomes the recipe's 15 git-log scopes. A test derives them from SERVE_UNIT and the six /source roots.
  • CORPUS_BAKED_PATHS is that set plus the render entry: 16 paths, one more than 2.1's.
  • That is a scope change, so it costs exactly one rebuild against a pin recorded with either earlier scope (the eight-path one or 2.1's). This is measured for both.

Unchanged.

  • The probe and precheck verdict pairing (VALIDATOR_VERDICT_RETURNCODES, _a_verdict_with_its_returncode), render_entry, render_legs, precheck, every 2.1 validator field, the digest rule and the artifact name.
  • No OpenSpec surface is touched. This realizes the ratified doc-health requirement to "build from the bundled Dockerfile with the assembled workspace shape as context", as the 2.0 and 2.1 moves did.
  • There is no Rule 6 window, because nothing under openspec/changes/ or the README Records block moves.

Evidence

Failing-first. Each rule's tests were run against the module as it stood before that rule.

  • At the base 40d6aa18, for the serve unit: 30 failed, 294 passed. Quoted:
    • test_the_serve_unit_is_the_recipes_runtime_tree and test_the_manifest_carries_every_field_the_child_reads: AssertionError: assert '2.1.0' == '2.2.0'
    • test_verify_refuses_the_2_1_layout_that_carried_no_serve_unit: assert [] == ['serve_entry...ld not start']
    • test_verify_holds_the_serve_record_to_the_readers_own[...], all 6 cases: assert [] == ['serve_unit ...ld not start'] and similar
    • test_verify_refuses_a_serve_entry_the_seal_does_not_carry: AssertionError: assert [] == ['the seal do...image starts']
    • test_verify_refuses_a_seal_missing_a_serve_only_path[...], all 4 cases: assert [] == ['the seal do...ecipe copies'] and ['the seal in...ecipe copies']
    • test_every_serve_unit_path_is_required_once[...], for the entry and the 4 serve-only paths: assert [] != []
    • test_a_corpus_without_a_serve_unit_file_is_refused[...], both cases: Failed: DID NOT RAISE SealRefused
    • test_the_copied_scope_is_exactly_what_the_dockerfile_copies and test_the_baked_scope_is_the_copied_set_plus_the_render_unit: tuple inequality
    • test_the_widened_scope_costs_exactly_one_rebuild[the-render-unit-pin]: AssertionError: assert False is True, because at the base the 2.1 scope reads as unchanged
    • test_the_serve_start_reads_nothing_outside_the_serve_unit, test_the_copied_scope_is_the_git_log_scope_of_all_the_recipe_copies and test_the_served_image_starts_from_a_seal_of_this_checkout: AttributeError: ... no attribute 'SERVE_ENTRY' or 'SERVE_UNIT', and KeyError: 'serve_unit'
  • At 6ad5dafa, for the kind check: 5 failed first. test_a_serve_unit_file_that_is_a_directory_is_refused failed with Failed: DID NOT RAISE SealRefused for the entry and the four bootstrap files. The two SERVE_ONLY files were already refused.
  • At 4d595247, for SERVE_LEG_MODULES: 3 failed first:
    • the ast test: AttributeError (no SERVE_LEG_MODULES);
    • the intake test: assert [] == ['the seal do...orts by name'];
    • the leg-sealer test: Failed: DID NOT RAISE SealRefused.
  • At f4605173, for validator_corpus_schemas: 11 failed, 2 passed:
    • the manifest test and the five tamper cases: KeyError: 'validator_corpus_schemas';
    • the parent refusal: Failed: DID NOT RAISE SealRefused;
    • the 2.1 layout test: At index 0 diff: "serve_entry is None, ..." != "validator_corpus_schemas is None — ...".

The two modules (test_dashboard_source_seal.py and test_dashboard_refresh_lane.py): 352 passed at 275fed7d, as at 9d370e5c. That is 340 at 48393908, plus the 12 #1166 added in its last two rounds. The base 40d6aa18 had 287.

The serve unit, measured.

  • test_the_serve_start_reads_nothing_outside_the_serve_unit runs the serve's start over this checkout under an audit hook. The start is the recipe's build step (the entry loaded as a module, then the composed web root) plus the two profile facets the server reads when it is built.
  • Every checkout path it opens, lists or links is inside the unit. Every unit file is read, and every tree is reached.

The image can start from a real seal. test_the_served_image_starts_from_a_seal_of_this_checkout seals this checkout for real, with both legs at HEAD's pins and the real validator.

  • It copies serve_unit out of the sealed corpus path by path, then runs the recipe's own build step plus the facet reads over that tree, with no PYTHONPATH. The index and views/intent-feed.js compose.
  • Every module of the unit's own packages is imported from the tree. This check is proven to bite: with the checkout's scripts/ on PYTHONPATH it refuses with ideation_dashboard was imported from outside the runtime tree.
  • It also asserts that validator_corpus_schemas is not empty, and that each recorded schema matches the sealed corpus's bytes.

Mutations: 27 of 27 killed at dde2a3b6. Each mutation drops one 2.2.0 rule. Under each, every named test FAILED (pytest exit 1), and the file was restored byte for byte.

  • The serve unit (17): version-back-to-2.1.0, serve-entry-not-in-the-copied-scope, manifest-names-no-serve-entry, manifest-names-no-serve-unit, intake-drops-the-serve-entry-name-check, intake-drops-the-serve-entry-carried-check, intake-drops-the-serve-unit-record-check, intake-accepts-any-serve-unit-list, intake-drops-the-serve-only-paths, a-tree-is-always-held, a-file-is-always-held, serve-only-repeats-what-the-render-requires, the-seal-skips-the-serve-check, the-seal-checks-only-serve-only, the-copied-scope-drops-a-host-file, the-serve-unit-drops-the-carve-manifest, the-serve-unit-drops-the-domain-profile.
  • SERVE_LEG_MODULES (3): leg-sealer-drops-the-serve-module-check, intake-drops-the-serve-module-check, serve-leg-modules-emptied.
  • validator_corpus_schemas (7): seal-records-no-corpus-schemas, seal-skips-the-corpus-bytes-check, seal-records-no-schema-from-the-corpus, intake-drops-the-corpus-schema-pairs, intake-reads-an-absent-record-as-empty, intake-accepts-any-path-value, intake-holds-only-that-the-schema-is-sealed.

Full suite (pytest tests/ -q -m "not postgres", as pytest-suite runs it):

  • CI pytest-suite on this PR at 275fed7d: success. 8698 passed, 6 skipped, 338 deselected, 412 subtests passed, in 23m43s. Its floors check read selected=9116 passed=9110 skipped=6 failures=0 errors=0.
  • At 275fed7d, in this clone: 8696 passed, 7 skipped, 338 deselected, 391 subtests passed, 1 failed (the path artifact below), in 28m31s.
  • At 9d370e5c, from a worktree whose path has no one: 8683 passed, 21 skipped, 338 deselected, 391 subtests passed, 0 failed, in 28m57s.
    • It had 14 more skips than the clone. Those tests look for sibling checkouts (LedgerxFactory, and the pinned openxFactory validators), which are unreachable from a scratch path. The clone runs them.
  • At 41e6cb3b, in this clone: 8673 passed, 7 skipped, 390 subtests passed, 1 failed.
  • The one clone failure is a path artifact, not this change. tests/doc-health/test_tag_hygiene_pinned_targets.py::test_a_lexically_malformed_value_builds_no_path_and_reads_nothing asserts that no argument contains "one", and this clone's directory is clone-seal220.
    • It fails the same way at the base 40d6aa18 in the same clone.
    • It passes from a path without one, at 41e6cb3b and at 275fed7d.

Gates at 275fed7d, as at 9d370e5c and 41e6cb3b:

  • validate-openspec-cli-pin.py --all: exit 0, with 0 undisposed failures and the tree's one accepted exception.
  • doc-health.py --single-repo .: exit 0. It reports 26 errors, none in a file this PR touches, and the set is identical to the one at 6ad5dafa and at 41e6cb3b. They are in archived specs, ideation docs and four unrelated scripts. The brief's path scripts/doc_health/doc-health.py does not exist; the entry point is scripts/doc-health.py.
  • validate-code-surface.py: exit 0.
  • validate-estate-inventory.py: exit 0. Run again with --estate-tree opensoft/xFactory=<fresh clone at a3f9cb3>: exit 0. Of 34 gitlink rows (the merge brought four more from main), 23 are named in the verified tree, 0 are absent and 11 are not re-checked.
  • pyflakes: clean on both test modules. The lane module reports one warning, redefinition of unused 'build' in main(), which is present unchanged at the base.

SonarCloud: quality gate passed, with 6 open code smells (as of 10:3xZ).

Copilot, all overview-only with no inline threads:

  • 5328998696 at 6ad5dafa found a directory at the entry's path passing the seal. Fixed at 4d595247 and answered in a PR comment.
  • 5329029952 at 4d595247 and 5329051903 at f4605173: no findings.
  • 5329795454 at dde2a3b6 suggested keeping validator_corpus_schemas in the 2.1.0 fixture. The fixture is kept as written, because a real 2.1 seal predates the field, and the docstrings are corrected at 41e6cb3b. Answered in a PR comment.
  • 5329835946 at 41e6cb3b opened 3 threads, each answered and resolved:
    • route_extension "omitted" from the unit: not a defect. At start it resolves to the openXdox replica inside the unit, because carved_reach.install() puts the legs ahead of scripts/, and the audit test would fail otherwise. The missing guard is added at 48393908.
    • completeness of validator_corpus_schemas: declined as proposed. A count or digest in the unsigned manifest would be rewritten along with the record. Completeness is derived by the parent. A child-side rule would need a new parent refusal of name-shadowing leg schemas, which is raised with the lane coordinator.
    • the stale 2.1 description: fixed here.

Deferred

Follow-up hardening, not in this PR: a child-side completeness rule for validator_corpus_schemas. It was raised by Copilot on review 5329835946 (thread PRRT_kwDOTAvnrs6mZXgf). The lane coordinator deferred it.

  • Why it is not in 2.2.0. The child holds each pair the manifest records to the sealed corpus's bytes. It cannot tell whether a pair was left out. A count or digest of the record, kept in the same unsigned manifest, would be rewritten along with it, so it is not the fix.
  • The rule. The parent would refuse a unit that takes a schema from a leg while the sealed corpus also carries contracts/schemas/<same name>. The child could then require every sealed schema that the sealed corpus carries at contracts/schemas/<name> to be recorded. Today the two sources are disjoint by name: the 6 schemas the legs supply are all absent from the corpus's contracts/schemas/. So the rule would hold at the current pins.
  • The cost. A future carve that leaves a duplicate of a schema in both a leg and the corpus would stop the nightly refresh, at the parent, until the duplicate is removed.

Held for

🤖 Generated with Claude Code

brettheap and others added 20 commits September 25, 2026 13:45
…n the nightly (#1161)

The nightly dashboard refresh has been broken end to end since the
split-opendox section 5.2 shed (cc4ae9d). This is openxFactory's half of
the repair tracked in #1161; the aggregation's worker
child is the other half.

- scripts/ideation-dashboard-cli.py is the host entry the child renders
  through: carved_reach.require/install, opendox_host.register_openxfactory,
  then the product's own opendox.cli.main.
- The seal (manifest 2.1.0) carries the render unit: that entry, the host
  bootstrap files, and both products' code legs, archived at the commits the
  sealed corpus pins them at. A parent that holds the products at any other
  commit refuses and names both, and nothing is fetched.
- Before it dispatches, the parent renders the child's snapshot from the
  seal and runs the sealed validator over it under --strict. A rejection is
  recorded as strict_failed with the validator's findings, and a finding
  that has a tracking issue is cited against it (#1159 today). The refresh
  stage stays continue-on-error and after report delivery, so this stops
  only the stage's own dispatch.
- The finalize job mounts openDox and openXdox and their spec and code
  legs, by name, which also restores the snapshot, ideation-readiness and
  derive-possibles lanes that failed or skipped for their absence.
- The decision scope names the render unit, which costs exactly one
  rebuild against the live pin (a test measures it).

Lane: openxfactory-4

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…er environment, a citation over every finding

Copilot's three threads on the first head (1036c18), all taken:

- Every git read and archive the seal's record depends on now runs as an
  exact-content read: `git --no-replace-objects -C <repo> ...` in
  carved_reach's scrubbed environment, reused rather than copied. That
  covers the revision reads, the committer date, the gitlink reads and
  both archives. A test gives the pinned leg commit a replace ref with
  other bytes and points the environment at another repository and
  object store, and the seal still holds the pinned commit's own bytes.
- The pre-dispatch render's environment is built from an allowlist
  (PATH, LD_LIBRARY_PATH, the locale, the temp directories and the
  Windows system variables) instead of filtered by a denylist, so a
  credential nobody named never reaches it. The test adds AWS, Docker,
  kube and npm variables and asserts that nothing outside the allowlist
  arrives.
- The known-finding citation reads every validator line, and only the
  detail the verdict carries is capped afterwards. A test puts the one
  tracked finding past the cap.

Lane: openxfactory-4

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…nvironment, and the manifest is created exclusively

Copilot's second review of PR #1166 found two gaps.

The sealed validator inherited the job's credentials. The product's
`validate_snapshot` launches it with no environment of its own, so both
parent-side runs of the sealed copy (the probe and the pre-dispatch
--strict) handed it GH_TOKEN and everything else the finalize job exports.
`validate_in_render_environment` now makes the product's own call in a
fresh interpreter whose whole environment is the render's allowlist, from a
scratch directory, with git fenced out of the seal and out of that
directory. The three-outcome reading stays the product's: the harness hands
the result back as one JSON line whose shape is checked. The run is bounded
too, since the product's call has no timeout.

The render could plant `manifest.json`. The index excludes that one path, so
a link left there would have had the manifest written wherever it pointed.
Anything at that path now refuses the seal, and the manifest is created with
O_CREAT|O_EXCL, which never follows a link.

A defect of this PR's own, found while testing the first: the nightly names
its seal `dfr-seal`, relative to the job's working directory, and the render
runs from inside the seal. The render was handed relative paths, so every
nightly seal would have been refused as a render that could not run
(measured at 1036c18). The pre-dispatch render now makes the seal root absolute.
Sealing this checkout under a relative name, with fake tokens exported,
answers the tracked strict rejection (3 of 3 findings cited against
#1159).

SonarCloud rated the seal-result read a path-injection risk (pythonsecurity
S8707). `--seal-result-in` is now read only from inside `--repo-root`, which
is where the seal phase writes it.

Tests: the environment the validator PROCESS saw, for the probe and for the
precheck; the fenced call held equal to the product's in-process call over
every outcome; a hang, a launch failure, no verdict, a malformed verdict and
a non-zero harness exit; a relative seal; four shapes planted at the
manifest path and an exclusive-create race; a seal result outside the
checkout. Each of 14 mutations that undoes part of this fails a named test.

Lane: openxfactory-4
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…n, and the intake requires the render's bootstrap

Copilot's third review of PR #1166: `Path.is_file()` follows a link, so a
sealed render could make its `snapshot.json` a link, and the parent would
validate, and quote in its findings, whatever file on the host it named.

The output is now read only when it is a regular file with one link: never
a symbolic link, a hard link, a directory or a FIFO. It is opened without
following a link and checked again through the descriptor, so a swap after
the first check is refused too. The validator then judges a copy of exactly
those bytes, in a directory made after the render exited.

The same verifier gap Copilot found in the child's intake (opensoft/xFactory
PR #526) is in this reference verifier too. The entry imports its host
bootstrap before it reaches either product, and a seal missing one of those
four files passed an intake that checked the entry alone, failing only once
the render started. `verify_seal` now requires each of them
(`RENDER_BOOTSTRAP`).

Tests: four output shapes refused with nothing validated; a swap after the
check; the validator handed a copy of the render's bytes from outside its
output directory; each bootstrap file's absence reported by name. Each of 5
mutations that undoes part of this fails a named test. A real seal of this
checkout under a relative name still answers the tracked rejection, 3 of 3
findings cited against #1159.

Lane: openxfactory-4
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…ifest, through directories held before sealed code runs

Copilot's fourth review of PR #1166: checking only the output's last path
component leaves the directory above it open. Sealed code could move the
scratch directory aside, put a link to another directory in its place, and
the parent would read a valid snapshot the render never wrote there.

- The scratch directory is held by a handle taken before the render runs.
  The output is looked up and read relative to that handle, so whatever the
  scratch path names afterwards, the parent reads only the directory it
  made. A render that swapped it leaves no output there, and is refused as
  a render that could not render.
- The seal directory has the same exposure for the manifest. Its identity
  is taken when the lane creates it (a seal path that is itself a link is
  refused), and the manifest is created relative to a handle on it, opened
  without following a link and compared by identity. A seal directory
  moved aside and replaced, by a link or by a copy the index would match,
  gets no manifest anywhere.

The render's run moves into `_run_the_sealed_render`, so the precheck reads
as its steps.

Tests: a render that swaps its scratch directory for a link to a valid
snapshot; a seal directory replaced by a link and by a copy; the write
handed another directory or a link; a seal path that is a link. Each of 5
mutations that undoes part of this fails a named test.

Lane: openxfactory-4
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…e sealed product module

Copilot's fifth review of PR #1166: the harness imported the product's
`snapshot` module from this parent's own checkout. That worktree could be
dirty, or differ from the archived leg, so the pre-dispatch verdict was not
read end to end by the sealed code.

The harness now imports it from the seal's own openXdox leg
(`sealed_product_module`), for both runs: the probe and the pre-dispatch
--strict. The legs are sealed before either runs. The parent's `product`
now supplies only the result record's type and the outcome spellings. A
sealed leg that carries no product module leaves nothing to classify with,
and the seal is refused, naming the import that failed.

Tests: a recording product module in the seal shows it is the one that
classified, for the probe and for the verdict; a leg without the module is
refused. The stand-in legs and the fake products' openXdox legs now carry
the real module. Each of 2 mutations that reads the parent's copy instead
fails a named test.

Lane: openxfactory-4
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…roduct's schema leg to its pin

Copilot's sixth review of PR #1166 found two gaps.

- The probe runs the sealed validator with the seal writable, and it runs
  before the seal's index is taken. A validator that rewrote or added a file
  while it ran would have had the altered tree indexed and published. The
  tree is now indexed around the probe as well, and a probe that changed it
  refuses the seal.
- The sealed validator's schemas are composed from each product's `spec`
  leg, and only the `code` legs were held to their pins. Each product's spec
  leg must now be materialized at exactly the commit the product pins it at,
  or the seal is refused naming both commits, as a code leg is. Its revision
  is recorded beside the code leg's (`schema_leg`, `schema_leg_revision`).
  Nothing of it is sealed as a leg: the schemas travel as bytes in the
  validator unit.

Tests: a probe that rewrites a sealed file and one that adds one; a schema
leg not materialized and one at another commit; the recorded schema-leg
revision read against the product's own pin. Each of 4 mutations that
undoes part of this fails a named test. A real seal of this checkout under a
relative name still answers the tracked rejection, 3 of 3 findings cited
against #1159.

Lane: openxfactory-4
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…le, and require each leg's schema provenance

Copilot's seventh review of PR #1166 found two gaps, and a third came from
the same check in the child's intake (opensoft/xFactory PR #526).

- The seal result sits outside the seal, at the one path the workflow
  gates the dispatch on, and it was written with `write_text`, which follows
  a link. Sealed code runs before it is written. Its path is now cleared
  before the seal starts, and an entry found there afterwards was made by
  sealed code: the seal is refused, the entry is removed without being
  followed, and the lane's own result is created exclusively in its place.
  The manifest and the result share one exclusive-create primitive.
- `verify_seal` now requires each leg record's schema provenance: `schema_leg`
  must be `spec`, and `schema_leg_revision` a full revision.
- A leg is sealed as its `src/` alone, so a file of the leg indexed outside
  `src/` is refused, even when `file_count` counts it.

Tests: a link and a file planted at the result path during the seal; a stale
result and a stale link cleared before it; four schema-provenance tampers; a
leg carrying a file beside its `src/`. Each of 5 mutations that undoes part
of this fails a named test.

Lane: openxfactory-4
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…itted bytes

Copilot's eighth review of PR #1166 raised one earlier miss. The coherence
check holds the validator's revision equal to the sealed openXdox leg's,
but it compares HEADs. The composed unit is built from worktrees: the
script is copied from the product's code leg, and each schema is a link into
a product's spec leg or into this checkout. Uncommitted bytes in any of them
would have been sealed under a revision that does not hold them.

Before the unit is copied, each file it was composed from is now asked of
its own repository (`git status` over exactly those paths, untracked and
ignored included), and the copied script is held equal to the file it was
copied from. A modified, untracked or ignored source, or one in no
repository, refuses the seal, naming it. A stand-in unit with no product
tree is not asked, as it records no revision.

Tests: the script edited, the copy differing from it, a schema edited, a
schema untracked. Each of 3 mutations that undoes part of this fails them.
A real seal of this checkout still answers the tracked rejection, 3 of 3
findings cited against #1159.

Lane: openxfactory-4
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
… only what must

Copilot's ninth review of PR #1166: the render-unit checks read only the
manifest's `files` map, so a regular file present in the seal but absent
from that map was invisible. The child renders, validates and bakes out of
that tree, and an extra module under a leg's `src/` would be importable
with bytes the digest never covered.

`verify_seal` now walks the tree and refuses every entry the index does not
name, the manifest itself excepted, reporting the first ten and a count of
the rest. The child's intake makes the same check (opensoft/xFactory PR
#526). The render-unit comment now counts its files right: the entry, and
the four its host bootstrap is made of.

Tests: an unindexed file beside the corpus, a module in a leg, and a
standard-module shadow in a leg's `src/`; the bound on how many are named.
The mutation that accepts them fails both tests.

Lane: openxfactory-4
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…idator_revision

Copilot's review of PR #1166 at 2c4520e (thread PRRT_kwDOTAvnrs6mEqv5):
`verify_seal` accepted `validator_revision: null`. Every 2.1 seal carries
the openXdox code render leg, so a null let a tampered manifest erase the
check that holds the validator to the render: a validator copied from
another product commit, prechecked and indexed, then this field nulled,
still verified.

- The intake (`verify_seal`) now requires a full revision. A null is
  refused like every other value that is not one, and a revision is
  compared with the openXdox code leg's `leg_revision` whenever both are
  full revisions. A malformed one is reported once, never also compared.
- The seal refuses to write what the intake refuses. `seal_source` refuses
  a validator with no product revision (only an injected stand-in resolves
  from no product tree), and a render unit with no openXdox code leg to
  hold it to. Both used to seal with the check skipped.

The stand-in validator in the tests is now a committed product tree, as
every unit the real resolver answers is, and the stand-in legs record the
HEAD of whichever tree the seal resolved its validator from, as a real
parent's legs and validator share one checkout. The real-leg fixture's
openXdox code leg commits a stand-in unit for the same reason.

Tests: a null, abbreviated, empty and non-string revision refused by the
intake; a unit with no product tree and a render unit with no openXdox leg
refused by the seal. At 2c4520e the null verified and both sealed.

Refs #1161

Lane: openxfactory-5 (openXfactory-5)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…de the checkout

Copilot's review of PR #1166 at 2c4520e, under "Previously missed": a real
directory at `--seal-result-out` survived `_clear_result_path`, so the
lane's own result could not be created there. No seal result was written,
and the record step fell back to `unknown`. The dispatch was still
withheld, because `sealed` falls back to false.

- `_clear_result_path` now removes a directory with everything under it,
  with `shutil.rmtree`, which removes a link inside the tree as a link and
  refuses a directory swapped for a link. Where the platform's rmtree could
  follow a link swapped in while it runs, the directory is refused instead.
  So a directory planted during the seal is removed and the planted-path
  refusal is written, and a stale one is cleared before the seal starts.
- A recursive removal at a command-line path needs a bound. The path is
  held first (`_seal_result_path`): every directory above its last
  component resolves inside `--repo-root`, which is where the record step
  already reads the result (`read_strict_verdict`), and the last component,
  never followed, names a `.json` file, so it can never be the checkout or
  a real directory in it. A path it refuses gets nothing removed and
  nothing written, and nothing is sealed. Before this, the lane unlinked
  and replaced whatever file it was named, outside the checkout too.

Tests: a directory holding links out, planted during the seal and left
stale before it; a result path beside the checkout, climbing out of it,
reaching out through a link, naming a real directory in it, and naming
the checkout itself; rmtree following no link, and refused where it could;
the workflow's own relative spelling still sealing. At 52f341b the
directory cases wrote no result, and the outside file was overwritten.

Refs #1161

Lane: openxfactory-5 (openXfactory-5)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…eal and at the intake

Copilot raised this on the child's intake (opensoft/xFactory PR #526,
thread PRRT_kwDOTK9OtM6mEotr): `validator_probe` and `precheck` were
checked on their outcome alone, so an internally inconsistent record such
as `{"outcome": "validated", "returncode": 2}`, or one with no return code,
passed. The parent's reference intake had the same gap, so it is closed
here before it is asked.

The validator's contract is "0 ok, 1 findings, 2 harness error", and the
product reads a verdict on a readable document from that number alone.
Both documents the parent validates are readable JSON by construction: the
probe is the parent's own, and the render's output is parsed before a copy
of it is judged. So a verdict and its exit code are one fact.

- `verify_seal` requires `validated` with 0 or `not-conformant` with 1 for
  the probe, and `validated` with 0 for the pre-dispatch render, each as a
  real `int` and not a `bool` (`True == 1`). `VALIDATOR_VERDICT_RETURNCODES`
  is held equal to the product's own by a test.
- The seal refuses first what the intake refuses. A probe verdict beside
  another code is refused rather than recorded. The pre-dispatch answer
  must be a verdict before either branch, with its pass flag agreeing, so
  it is neither recorded as a pass nor reported as `strict_failed` unless
  the validator reached one. The sealed product module the runs are
  classified with could otherwise print any pairing.

Tests: eleven probe records and seven precheck records at the intake,
bools, a float, a string and a missing code among them; a sealed product
module answering a mismatched probe verdict, a mismatched pass, and a
finding passed as ok. At e88ea23 every mismatch verified or sealed.

Refs #1161

Lane: openxfactory-5 (openXfactory-5)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…heckout's HEAD

Copilot's review of PR #1166 at 52f341b (thread PRRT_kwDOTAvnrs6mXKyz):
the committed-bytes check did not bind the composed validator's schemas to
`source_head`. `doxbench_contracts._composed_validator` fills in, from this
checkout's own `contracts/schemas/`, each schema the carve legs do not
supply, and the check only asked `git status` of those files. A real
parent's checkout sits at the aggregation's pin while the seal is of
`source_head`, so a schema clean at the checkout's HEAD could be another
corpus revision's bytes, and the child would validate the render of
`source_head` with them. Measured on this checkout: 49 of the real unit's
56 sources come from the corpus checkout itself.

- `seal_validator` now also asks, of every unit source whose repository
  is the corpus checkout, whether `source_head` holds it as it is
  (`git diff --name-only <source_head> -- <paths>`, an exact-content read),
  and refuses the seal naming each one that is absent there or differs. A
  leg's sources were already held to `source_head`'s pins where the legs
  are sealed; this holds the corpus's own to `source_head` itself.
- `_unit_sources` is the one list of the unit's sources both checks walk.

Tests: a unit linking a schema from the corpus checkout, sealed at the
checkout's HEAD (seals, carrying those bytes), at an older revision whose
schema differs, and at a revision without it (both refused). At 8a20c6e
both of the last sealed. Against the parent of f59a587 the real unit's
check names contracts/schemas/consent-instrument.schema.yaml.

Refs #1161

Lane: openxfactory-5 (openXfactory-5)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…eg sealer and at the intake

Copilot's review of PR #1166 at 52f341b (thread PRRT_kwDOTAvnrs6mXKy7):
the intake asked each product's package for SOME `.py`, so a coherently
rewritten artifact that had lost `opendox/cli.py`, or an `openxdox` module
the entry or the verdict classifier imports, verified, and the child then
failed at import.

The intake cannot attest a leg's whole `src/` against a coherent rewrite:
the file index, `file_count` and `tree_digest` are all the manifest's own,
and nothing outside the artifact anchors a leg's file list. What it can
refuse is a leg without a module the verifier names itself. So:

- `RENDER_LEG_MODULES` names, per code leg, the product modules the render
  unit's own corpus side imports by name: `opendox.cli` (the entry), the
  host bootstrap's imports (`opendox.domain_profile`, and `openxdox`'s
  `domain_profile`, `serve_gate`, `serve_projection`, `view_extensions` and
  `cli_gate`), and `openxdox.snapshot`, which classifies the sealed
  validator's runs. A test holds it equal to an `ast` read of the entry and
  its four bootstrap files, and proves each is in the real legs.
- `verify_seal` requires each one, as it requires the bootstrap by name, and
  `seal_render_legs` refuses a pinned leg without one, so the parent never
  writes what its intake refuses.

The stand-in legs and the real-leg fixture now carry those modules.

Tests: the named set against the `ast` read; each of the eight modules
removed coherently from a seal; a pinned leg without one refused by the
leg sealer. At 7d142ac every removal verified and both legs sealed.

Refs #1161

Lane: openxfactory-5 (openXfactory-5)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…runs

Copilot's review of PR #1166 at 7d142ac (thread PRRT_kwDOTAvnrs6mXVdo):
the result's path was resolved before the sealed render ran, but its
directory was never held. Sealed code could move the checkout aside and
put a link to another directory in its place, and the clearing and the
exclusive create would then follow the link, removing and writing the
dispatch result outside the checkout.

- `_HeldResultPath` holds the directory by a handle taken before any sealed
  code runs, as the manifest's write and the render's scratch directory
  already are. Looking at the result's name, clearing it (a directory with
  `rmtree`, now relative to the handle too) and creating the lane's own
  result are all relative to that handle, never through the path.
- Before the result is written, the path must still lead to the held
  directory. If it does not, the seal is refused
  (`SEAL_RESULT_DIRECTORY_REPLACED`) and the refusal is written only into
  the directory the lane held.
- A `--seal-result-out` whose directory cannot be held is refused like any
  other path the lane may not write at, and nothing is sealed.

Tests: sealed code moving the checkout aside and linking another
directory holding a `seal-result.json` in its place; a result path in a
directory that does not exist. At 113c2dd the file behind the link was
removed and rewritten, and the seal went ahead with no writable result.

Refs #1161

Lane: openxfactory-5 (openXfactory-5)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The validator's probe runs sealed code with the seal writable before the
recipe is written, and the probe's after-index cannot see what a process
it left behind puts at recipe/ later. The recipe was written with
mkdir(exist_ok=True) and write_text, which follow links: at 40d6aa1 a
link-out Dockerfile had the host file overwritten and a linked recipe/
had host-dir/Dockerfile created (both refused only afterwards, by the
index), a hard-linked Dockerfile overwrote the host file and sealed, a
recipe/ the lane did not make was adopted and sealed, and a replaced seal
directory received the recipe before the manifest refused.

The recipe is now written the way the manifest is (Copilot, PR #1166):
recipe/ is made exclusively relative to a handle on the seal directory as
created, opened without following a link, and the Dockerfile is created
O_EXCL|O_NOFOLLOW inside it. Anything already at either path refuses the
seal and nothing is written through it. The replaced-directory refusal
now names what it declines to write, the manifest's text unchanged.

Refs #1161
Lane: openxfactory-5 (openXfactory-5)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…er-through-products

Takes main 4663e9e (21 commits since 57af692, 33 files, none of them
this pull request's files or its directories).

Refs #1161
Lane: openxfactory-5 (openXfactory-5)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The follow-up to #1166 that pairs with Omnigent-Install#322 (landed at
6b7da477). That recipe starts openxFactory's own
scripts/ideation-dashboard-serve.py from a runtime tree it copies out of the
context the refresh worker assembles from the seal. #1166's 2.1.0 seal
carries every path of that tree but the entry itself, so no image built from
it could start.

- SEAL_SCHEMA_VERSION moves to 2.2.0, a minor move. SERVE_ENTRY and
  SERVE_UNIT name the recipe's runtime tree (eleven corpus-relative paths, a
  trailing slash naming a tree), and the manifest records both as
  serve_entry and serve_unit. Each path is rows of the existing files index,
  and the two legs stay render_legs, at openxFactory's own nested pins.
- CORPUS_COPIED_PATHS becomes the git-log scope of everything the recipe
  copies, fifteen scopes, and a test derives them from SERVE_UNIT and the
  six /source roots. The decision scope gains exactly the serve entry, which
  costs one rebuild against a pin recorded with either earlier scope.
- verify_seal requires each serve-unit path once: the entry through
  serve_entry, the host bootstrap and both legs through the unchanged render
  unit checks, and the other four (SERVE_ONLY) through the serve unit's own
  check. A 2.1 seal is refused by its named lacks, so 2.2.0 is the floor.
  The seal refuses first a corpus that lacks a SERVE_ONLY file, by the same
  rule.
- Tests: the constants, every refusal, an audit-hook measurement of the
  serve's start against the unit, and the recipe's own build step plus the
  server's profile facets over the runtime tree copied out of a real seal of
  this checkout.

Derived from lane openxfactory-4's prepared seal-2.2.0-abf77701.patch
(brett-wip d4ed130d), rebuilt on #1166's head 40d6aa1.

Lane: openxfactory-5 (openXfactory-5)
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A mutation check of the recipe write found guards that no test reached.
One is the identity check on the seal directory: the planted link was
refused earlier, by the no-follow open. The other is the no-follow open of
recipe/ with the refusal at the recipe's own name, which only a process
acting between the lane's mkdir and its create reaches. A copy standing in
for the seal directory now reaches the first. A link swapped in as the
lane's own mkdir of recipe/ returns, for the directory or at the recipe,
reaches the second. The tests only; the lane is unchanged.

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

sourcery-ai Bot commented Sep 27, 2026

Copy link
Copy Markdown

Reviewer's Guide

Moves the refresh lane to seal schema 2.2.0 by carrying and validating the served image’s entry and runtime tree, expands decision scopes to cover every recipe input and both product legs, and adds tests demonstrating exact refusal behavior and successful startup from a real sealed corpus.

Sequence diagram for serve-unit sealing and intake verification

sequenceDiagram
    participant Parent as Seal producer
    participant Corpus as Sealed corpus
    participant Worker as Refresh worker
    participant Verifier as verify_seal
    participant Recipe as Served-image recipe

    Parent->>Corpus: archive SERVE_UNIT paths
    Parent->>Corpus: _serve_only_paths_absent
    alt serve-only path missing
        Corpus-->>Parent: SealRefused
    else corpus complete
        Parent->>Parent: write manifest.json
        Parent-->>Worker: schema 2.2.0 seal
        Worker->>Verifier: verify_seal(seal_dir)
        Verifier->>Verifier: _serve_unit_problems(manifest, files)
        alt serve_entry or serve_unit invalid
            Verifier-->>Worker: intake problems
        else serve unit carried
            Worker->>Recipe: assemble context from sealed corpus
            Recipe->>Recipe: copy SERVE_UNIT
            Recipe->>Recipe: start SERVE_ENTRY
            Recipe-->>Worker: served image can start
        end
    end
Loading

Entity relationship diagram for the 2.2.0 seal manifest

erDiagram
    SEAL_MANIFEST {
        string schema_version
        string serve_entry
        string[] serve_unit
        string tree_digest
    }
    FILE_INDEX {
        string path
        string sha256
    }
    RENDER_LEG {
        string gitlink_revision
        string source_head
        string leg_revision
    }
    SEAL_MANIFEST ||--o{ FILE_INDEX : indexes
    SEAL_MANIFEST ||--o{ RENDER_LEG : records
    SEAL_MANIFEST ||--o{ SERVE_PATH : names
    SERVE_PATH {
        string relative_path
        string file_or_tree
    }
Loading

File-Level Changes

Change Details Files
Extend the source seal from schema 2.1.0 to 2.2.0 with the complete runtime tree required to build and start the served image.
  • Define the serve entry and sorted serve-unit paths based on the post-shed Dockerfile runtime copies.
  • Add the serve unit to corpus copied/baked scopes, seal paths, and manifest generation.
  • Add parent sealing checks and child-side verification for missing, malformed, or uncarried serve-unit records.
  • Preserve single-problem reporting when paths are already covered by render-unit validation.
scripts/ideation_dashboard/dashboard_refresh_lane.py
Expand refresh-lane scope tracking to account for all product legs and host files copied by the served-image recipe.
  • Derive the copied scope from source roots and serve-unit paths, using product gitlinks for the two code legs.
  • Assert the baked scope is the copied scope plus only the render entry.
  • Verify the widened 2.2.0 scope requires exactly one rebuild from both legacy pin scopes.
scripts/ideation_dashboard/dashboard_refresh_lane.py
tests/ideation-dashboard/test_dashboard_refresh_lane.py
Add comprehensive tests proving manifest compatibility, seal completeness, runtime-tree coverage, and image startup from a real seal.
  • Test 2.1 seals are rejected for the two missing serve-unit fields and validate exact intake refusal messages.
  • Test missing files and trees are refused at both corpus sealing and seal verification stages.
  • Measure serve startup file access and run the recipe build step against a runtime tree copied from a real seal.
  • Update render and source-seal fixtures and assertions for the 2.2.0 fields and expanded scopes.
tests/ideation-dashboard/test_dashboard_source_seal.py
tests/ideation-dashboard/test_dashboard_refresh_lane.py

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

The parent-side seal check can accept a directory in place of the required serve entry, allowing an invalid manifest to be published.

Review effort: Lite
Findings: None

What changed in this PR

Updates refresh-lane seals to schema 2.2.0 so served images carry and validate their complete runtime tree.

Changes:

  • Adds serve_entry and serve_unit metadata and validation.
  • Expands corpus sealing and refresh scopes.
  • Adds tests for seal integrity, scope changes, and startup from a sealed tree.
File Summary
tests/​ideation-dashboard/​test_dashboard_source_seal.py Tests serve-unit metadata, sealing, validation, and runtime completeness.
tests/​ideation-dashboard/​test_dashboard_refresh_lane.py Tests expanded decision scopes and rebuild behavior.
scripts/​ideation_dashboard/​dashboard_refresh_lane.py Implements 2.2.0 serve-unit sealing and verification; the parent-side check does not independently validate the exact serve entry file.

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

…Copilot, #1179)

Copilot's review of 6ad5daf: "The parent-side seal check can accept a
directory in place of the required serve entry, allowing an invalid manifest
to be published."

The seal checked only SERVE_ONLY and left the serve entry and the host
bootstrap to the corpus archive's pathspec. A pathspec admits a directory at
a file's path, so a corpus with a directory named
scripts/ideation-dashboard-serve.py was sealed and given a manifest the
intake refuses ("the seal does not carry openxFactory/scripts/
ideation-dashboard-serve.py, the entry the served image starts").

The seal now checks every path of the unit its archive holds, all of it but
the two legs, which the leg sealer seals whole, as the kind the unit names it
(_SERVE_UNIT_ARCHIVED), by the intake's own rule (_serve_paths_absent, one
rule for both). The intake is unchanged: it already required the file itself.

Failing-first: test_a_serve_unit_file_that_is_a_directory_is_refused failed
for the entry and the four bootstrap files with "DID NOT RAISE SealRefused";
the two SERVE_ONLY files were already refused.

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 review requested due to automatic review settings September 27, 2026 05:46

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 schema, sealing, and runtime-tree changes require final human review.

Review effort: Lite
Findings: None

@brettheap

Copy link
Copy Markdown
Contributor Author

Lane: openxfactory-5 (openXfactory-5)

This answers Copilot's review 5328998696 at 6ad5dafa. Its overview reads: "The parent-side seal check can accept a directory in place of the required serve entry, allowing an invalid manifest to be published." It left no inline thread, so the answer is here.

Real, and fixed at 4d595247.

  • The defect. The seal checked only SERVE_ONLY itself, and left the serve entry and the four host-bootstrap files to the corpus archive's pathspec. A pathspec admits a directory at a file's path. So a corpus with a directory named scripts/ideation-dashboard-serve.py was sealed, and given a manifest the intake refuses: the seal does not carry openxFactory/scripts/ideation-dashboard-serve.py, the entry the served image starts. That broke the rule the seal keeps everywhere else, that it refuses first what the intake refuses.
  • The fix. The seal now checks every path of the unit its archive holds, as the kind the unit names it: a file must be a file at exactly that path, and a tree must hold a file. That is all of the unit except the two legs, which the leg sealer seals whole (_SERVE_UNIT_ARCHIVED). The check uses the intake's own rule, now one function for both (_serve_paths_absent). The intake is unchanged, because it already required the file itself.
  • Failing-first. test_a_serve_unit_file_that_is_a_directory_is_refused puts a directory at each file path of the unit, 7 cases. At 6ad5dafa it failed for the entry and the four bootstrap files with Failed: DID NOT RAISE SealRefused; the two SERVE_ONLY files were already refused. At 4d595247 all 7 pass.
  • Mutation. the-seal-checks-only-serve-only restores the narrower check, and the named cases fail under it. The full set is 17 of 17 killed at 4d595247.
  • Counts. The two modules: 331 passed.
  • The intake contract (names and refusal strings) is unchanged. Only the parent-side refusal widened.

Copilot AI review requested due to automatic review settings September 27, 2026 05:55
Copilot AI review requested due to automatic review settings September 27, 2026 09:55
… from the sealer in its refusal test (Copilot, #1179)

Copilot's review 5329795454 at dde2a3b suggested that the downgraded 2.1.0
fixture keep validator_corpus_schemas and assert only the two serve lacks.
It keeps the field out on purpose: a real 2.1.0 seal predates it, so the
fixture keeps that shape and is refused for all three lacks, each named. The
docstrings of the 2.0 and 2.1 layout tests now say so. Each lack is also
refused alone, by the serve record's and the corpus schemas' own tests.

SonarCloud python:S5778 on the serve-module refusal test: HEAD was read
inside pytest.raises, so two calls could raise there. It is read before.

Lane: openxfactory-5 (openXfactory-5)
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
@brettheap

Copy link
Copy Markdown
Contributor Author

Lane: openxfactory-5 (openXfactory-5)

This answers Copilot's review 5329795454 at dde2a3b6, which opened no inline threads. It said: "Update the downgraded 2.1.0 test fixture to retain validator_corpus_schemas and assert only the two intended serve-related refusals."

Disposition: the fixture is kept, and the docstrings are corrected at 41e6cb3b.

  • Why the fixture stays. A real 2.1.0 seal (Render the refresh lane through the pinned products, and mount them in the nightly (#1161) #1166) predates validator_corpus_schemas, which 2.2.0 adds at dde2a3b6. The layout test shows how a seal a 2.1 parent actually wrote is refused, so retaining the field would test a layout no parent ever wrote. Such a seal is refused for all three lacks, each named:

    • validator_corpus_schemas is None — ...
    • serve_entry is None, ...
    • serve_unit is None — ...

    This is the same pattern as 2.1 refusing a 2.0 seal.

  • Each lack is also refused alone, with the other fields present:

    • the serve record: test_verify_holds_the_serve_record_to_the_readers_own[no-serve-entry] and [no-serve-unit];
    • the corpus-schema record: test_verify_holds_each_corpus_schema_to_the_sealed_corpus[no-record].
  • What was stale. The docstrings of the 2.1 and 2.0 layout tests still said only that the image could not start (or the child could not render). They now name the corpus-schema lack too.

The same commit fixes SonarCloud python:S5778 in the serve-module refusal test: HEAD is now read before pytest.raises, so only the leg sealer can raise inside it.

Copilot's reviews 5329029952 (at 4d595247) and 5329051903 (at f4605173) reported Findings: None and opened no threads.

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

Critical completeness and runtime-unit validation issues remain unresolved.

Review effort: Lite
Findings: 2 High severity · 1 Low severity

Open (3)

Copilot AI review requested due to automatic review settings September 27, 2026 10:25
…al-seal start (Copilot, #1179)

Copilot's review 5329835946 at 41e6cb3: the lane column imports
route_extension by its bare name, the checkout also has
scripts/route_extension.py, and the serve unit does not carry it.

The unit is right, and this is measured. The entry puts scripts/ on the path
first, but carved_reach.install() then inserts both legs' src/ ahead of it.
So during the entry's own bootstrap, the import resolves to the openXdox
leg's replica, which is inside the unit. The audit test over this checkout,
where the scripts/ copy exists, reads nothing outside the unit. The recipe
does not copy that file either.

What was missing was a guard. The real-seal build step's own-module origin
check did not name route_extension, so a copy imported from outside the tree
passed it. It now names route_extension. Seeded from outside the tree, the
old check exits 0; the new one exits 1 with "route_extension was imported
from outside the runtime tree, from <stray>/route_extension.py".

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

Resolve the validator corpus schema compatibility and update the affected refusal expectations.

Review effort: Lite
Findings: 2 High severity · 1 Low severity

Open (3)

@brettheap

Copy link
Copy Markdown
Contributor Author

Lane: openxfactory-5 (openXfactory-5)

This answers Copilot's review 5329924610 at 48393908. It opened no new threads.

Its overview lists the three threads of review 5329835946 (at 41e6cb3b) as open. The overview was generated at 10:28:29Z, before those threads were resolved. All three are now answered and resolved:

  • route_extension omitted from the unit (reply 4114987078): not a defect.
    • At start, the import resolves to the openXdox replica, which is inside the unit. This was measured, and the audit test would fail otherwise.
    • The missing guard is added at 48393908.
  • Completeness of validator_corpus_schemas (reply 4114987141): declined as proposed.
    • A count or digest in the unsigned manifest would be rewritten along with the record.
    • A child-side completeness rule would need a new parent-side refusal. That design decision is raised with the lane coordinator.
  • The stale 2.1 compatibility description (reply 4114987200): fixed in the PR description.

The "refusal expectations" it mentions are already correct at this head. A real 2.1.0 seal is refused for three lacks: validator_corpus_schemas, serve_entry and serve_unit. test_verify_refuses_the_2_1_layout_that_carried_no_serve_unit holds exactly that.

This merges fix/refresh-lane-render-through-products at a895e27, on the
lane coordinator's word. It carries seat y's last two rounds: the recipe
write that is exclusive and follows no link, and the mutation evidence. It
is a merge, not a rebase, and nothing is force-pushed. Both #1166's rules and
the 2.2.0 additions are kept.

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 review requested due to automatic review settings September 27, 2026 10:35

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🔵 Needs a closer look

The stacked seal-contract upgrade has broad integration implications and warrants final human review.

Review effort: Lite
Findings: None

Resolved since last review (3)

brettheap added a commit that referenced this pull request Sep 27, 2026
…n the nightly (#1161) (#1166)

Brings the nightly dashboard refresh back to working end to end after the split-opendox shed, on the openxFactory side, on Brett Heap's word of 2026-09-27, verbatim "land #1166, #526 and #322 when green" (issue #1161, taken over by lane openXfactory-5 from lane openxfactory-4's released draft). The refresh renders through the pinned openDox/openXdox products, not the shed path. The seal and its intake now: require a full validator_revision and a product tree to hold it to; remove a real directory planted at the seal result path, with the path confined to the checkout; require the probe and precheck verdicts to pair with their exit codes as integers (mirrored from the aggregation side); hold corpus-side validator sources to the bytes source_head holds; require by name every product module the render unit imports; hold the result directory open from before sealed code runs; write the recipe create-exclusive without following links; and fail closed with exit 3 when a seal phase cannot write its own result, so the workflow never reads a planted result. 36 of 36 mutants killed; 26 review threads resolved. Refs #1161, #1164. Omnigent-Install#322 (the recipe) landed at 6b7da477 before this; the aggregation child opensoft/xFactory#526 re-points at this landed sha and lands after it; the seal 2.2.0 pair (#1179, xFactory#535) follows.

Lane: openxfactory-5 (openXfactory-5)
Co-Authored-By: Claude Fable 5.1 <[email protected]>
#1166 landed on main by squash at 8fb505a. This merges main into the seal
2.2.0 branch before the PR is re-targeted to main. It is a merge, not a
rebase, and nothing is force-pushed.

Three files conflicted:
- scripts/ideation_dashboard/dashboard_refresh_lane.py
- tests/ideation-dashboard/test_dashboard_refresh_lane.py
- tests/ideation-dashboard/test_dashboard_source_seal.py

Each conflict comes from the squash, not from a difference in content. The
merge base is main before #1166, so #1166's changes and this branch's
additions touch the same hunks.

Main's versions of all three files, and of
scripts/dashboard-refresh-nightly.py, are byte-identical to #1166's final
head a895e27. This branch already merged
that head, cleanly, at 9d370e5. So each conflict is resolved to this
branch's side, which is #1166's content plus the 2.2.0 additions. The
resolution keeps both, and each file's diff against main is exactly the
diff it had against a895e27.

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 review requested due to automatic review settings September 27, 2026 11:03
@brettheap
brettheap changed the base branch from fix/refresh-lane-render-through-products to main September 27, 2026 11:03

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 stacked seal-contract and runtime changes require final human review.

Review effort: Lite
Findings: None

@sonarqubecloud

Copy link
Copy Markdown

@brettheap
brettheap marked this pull request as ready for review September 27, 2026 11:31

@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 3 days and 9 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-27T11:33:50Z, PR #1179 into opensoft/openxFactory main

@brettheap
brettheap merged commit 133e37d into main Sep 27, 2026
21 of 22 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-27T11:34:09Z, PR #1179 into opensoft/openxFactory main → merge 133e37d; Seal 2.2.0: carry the serve unit and both product code legs (#1161 follow-up)

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