Repository navigation
Confine --seal-out to the checkout and create it fresh before sealed code runs (#1182) - #1185
Conversation
The refresh lane's --seal-out path was unconfined (#1182). These tests state the rules it is now held to, and every one of them fails against the lane module at 133e37d, which this commit leaves untouched: - `--seal-out` resolves inside `--repo-root`, through no link at any component, names nothing that exists yet, in a directory that does, and a path that breaks any of that is refused before the seal starts, as a recorded outcome (exit 0), with nothing of the seal run; - the seal directory is made by the lane itself, exclusively: an existing directory, empty or not, a file, or a link, dangling or not, is refused before the validator is resolved, and one that appears in between, or is swapped as it is made, is refused too; - the lane walks from `--repo-root` to make it, so a directory on the way swapped for a link after the check is never made through; - every later write under it goes through the handle the lane holds, so a swap of its path redirects nothing, and a swapped seal gets nothing more. The CLI tests now name their seal inside the checkout, as the workflow's own `--seal-out dfr-seal` does, and the workflow's spelling is held to the rule. The fix follows in the next commit. Refs #1182 Refs #1161 Lane: openxfactory-5 (openXfactory-5) Co-Authored-By: Claude Fable 5.1 <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
The refresh lane's --seal-out was unconfined (#1182, Copilot thread PRRT_kwDOTAvnrs6mX2tk on #1166). At 133e37d a seal was made beside the checkout, out of it by `..` or through a link, in an empty directory the lane found, and in a directory `mkdir(parents=True)` made on the way; a dangling link escaped as a bare FileExistsError; and a seal directory swapped after the lane made it had the corpus and the validator extracted through the swap, with the probe run from the other directory. - `main` holds `--seal-out` before the seal starts (`_seal_out_path`): its canonical path must be inside `--repo-root`, must be its own spelling (no link at any component, the last included, dangling or not), must not exist, and must be in a directory that does. A path that breaks any of that is a recorded refusal: nothing of the seal runs, the result is written, and the step exits 0 as before. - `seal_source` refuses an existing path before the validator is resolved, then makes the directory itself (`_new_seal_directory`): a plain `mkdir` relative to a handle, reached by walking from `--repo-root` without following a link, then opened without following one and required empty. It holds that handle until the seal is done. - Every write and read the lane makes under the seal goes through the handle (`/proc/self/fd/<fd>` on Linux, the checked path elsewhere); the recipe and the manifest are written through it, once the name is held to still lead to it; and the name is held again before the corpus is extracted. A swapped seal gets nothing more written and is refused. The eight SonarCloud pythonsecurity:S8707 findings on this module whose taint source is args.seal_out (_open_directory, _create_new_file, _write_new_recipe, file_sha256, _extract_seal_archive x3, seal_source) now only see the checked path, or the handle's own path. Tests: the 22 new cases of the previous commit fail against 133e37d's module and pass here; both modules 371 passed (352 at 133e37d). Refs #1182 Refs #1161 Lane: openxfactory-5 (openXfactory-5) Co-Authored-By: Claude Fable 5.1 <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
Reviewer's GuideThe PR hardens Sequence diagram for confined seal creation and materializationsequenceDiagram
participant Main
participant SealPath as _seal_out_path
participant SealSource as seal_source
participant NewDir as _new_seal_directory
participant Held as _HeldSealDirectory
participant SealedCode
participant Manifest as _write_new_manifest
Main->>SealPath: _seal_out_path(args.seal_out, repo_root)
SealPath-->>Main: Path inside checkout
Main->>SealSource: seal_source(seal_dir, seal_within=repo_root)
SealSource->>NewDir: _new_seal_directory(seal_dir, within=repo_root)
NewDir->>NewDir: Walk from repo_root without links
NewDir->>NewDir: mkdir(path.name, dir_fd=parent)
NewDir->>NewDir: Open and verify fresh directory
NewDir-->>SealSource: _HeldSealDirectory
SealSource->>Held: refuse_if_replaced(corpus)
SealSource->>Held: Write legs and extract corpus via root
SealSource->>SealedCode: precheck_render(held.path)
SealedCode-->>SealSource: Render and validator result
SealSource->>Held: refuse_if_replaced(recipe)
SealSource->>Held: _write_new_recipe(held, recipe)
SealSource->>Held: refuse_if_replaced(manifest)
SealSource->>Manifest: _write_new_manifest(held, text)
Manifest-->>SealSource: Manifest created
SealSource->>Held: close()
Flow diagram for --seal-out validation and refusalflowchart TD
A[main receives --seal-out] --> B[_seal_out_path]
B --> C{Canonical path inside repo-root?}
C -- No --> R[Record refusal; do not run seal]
C -- Yes --> D{Absolute spelling equals canonical path?}
D -- No --> R
D -- Yes --> E{Path does not exist and parent exists?}
E -- No --> R
E -- Yes --> F[seal_source]
F --> G{Path still absent?}
G -- No --> R
G -- Yes --> H[_new_seal_directory]
H --> I{Walk and mkdir without links succeeds?}
I -- No --> R
I -- Yes --> J{New directory is still the held, empty directory?}
J -- No --> R
J -- Yes --> K[Write seal data through held.root]
K --> L{Seal name still resolves to held identity?}
L -- No --> R
L -- Yes --> M[Run sealed code and write recipe/manifest]
M --> N[Seal result recorded]
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Critical race and execution-path issues, plus incomplete symlink-component validation, remain unresolved.
Review effort: Lite
Findings: 2
Open (2)
What changed in this PR
Hardens --seal-out against path traversal, symlink redirection, and directory swaps during seal creation.
Changes:
- Confines destinations to the checkout and requires fresh directories.
- Uses held directory handles for seal reads and writes.
- Adds coverage for unsafe paths, links, replacements, and races.
| File | Description |
|---|---|
scripts/ideation_dashboard/dashboard_refresh_lane.py |
Implements confined, handle-backed seal creation and writing. |
tests/ideation-dashboard/test_dashboard_source_seal.py |
Tests confinement, links, freshness, and replacement scenarios. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Copilot's review of #1185 at 8180706 (review 5331245942) found two gaps, and these tests state the rules that close them. All six new cases fail against the lane module at 8180706, which this commit leaves untouched: - a directory on the seal's way that is moved out of the root, and replaced, as the seal is made gets nothing written into the seal made inside it, and the seal is refused (thread PRRT_kwDOTAvnrs6mcgSB): at 8180706 the legs were written there, out of the root, and with a link put in its place the whole seal was completed out of the root; - a directory on the way swapped for a link after the seal is made, as the legs are sealed or as the render runs, refuses the seal: at 8180706 each check of the name looked through the link; - the render is handed the directory the lane made, not its name (thread PRRT_kwDOTAvnrs6mcgSK): at 8180706 a name moved aside and replaced once the recipe was written had the render run from the replacement. The stand-in render that replaces the seal now moves it by its name, since the render is no longer handed the name. SonarCloud's two new S5778 findings on this module (lines 3682 and 4232 at 8180706), and a third block of the same shape, now make one call inside each pytest.raises block. Refs #1182 Refs #1161 Lane: openxfactory-5 (openXfactory-5) Co-Authored-By: Claude Fable 5.1 <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
Copilot's review of #1185 at 8180706 (review 5331245942): - The walk from the root held each directory on the way by a handle only while it went through it, so one moved out of the root after it was opened, and replaced, had the seal made inside the moved one, and the legs written there before any check of the name (PRRT_kwDOTAvnrs6mcgSB). Once the seal is made, its way is now walked again from the root, by name and through no link, and must reach the directory just made, or the seal is refused before anything is written into it. - Every later check of the name walks the same way (`_HeldSealDirectory.leads_here`), so a directory on the way swapped for a link no longer satisfies it, as it did when the check was an lstat of the name, which looks through every link but the last. - The pre-dispatch render is handed the directory the lane holds, as the validator's probe already was, never the name, which the probe's sealed code could have pointed anywhere (PRRT_kwDOTAvnrs6mcgSK). A child cannot use this process's handle, so it is handed where that directory is when it starts, read through the handle, and the name is held to the directory again before the manifest. `_new_seal_directory` is split into its parts (`_seal_directory_way`, `_walked_down`, `_made_and_opened`, `_new_seal_directory_by_path`), which also answers SonarCloud's new S3776 cognitive-complexity finding on it. Tests: the six new cases of the previous commit fail against 8180706's module and pass here. Refs #1182 Refs #1161 Lane: openxfactory-5 (openXfactory-5) Co-Authored-By: Claude Fable 5.1 <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
Brings in #1175 and #1184 (a9e7db7). #1184 repairs the three dangling cl-plane-1 cluster refs (#1159), so the real seal of this branch runs over the corpus the nightly will seal next. Neither touches a file of this change. Lane: openxfactory-5 (openXfactory-5) Co-Authored-By: Claude Fable 5.1 <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
Copilot's review of #1185 at 725f92e (review 5331401098) found two more gaps, and these tests state the rules that close them. All seven new cases fail against the lane module at 725f92e, which this commit leaves untouched: - a `--seal-out` that overlaps `--seal-result-out` (the same path, one inside the other, or a link to it) is never touched, and nothing is sealed (thread PRRT_kwDOTAvnrs6mc4kl). At 725f92e the result's path was cleared first, so an existing seal, or what it held, was removed as a stale result, a directory on a free seal's way was removed with it, the directory a linked seal led to was removed, and a free path was sealed into; - where the platform opens nothing relative to a handle, a seal confined to a root is refused before anything is made (thread PRRT_kwDOTAvnrs6mc4kc). At 725f92e it was made, written and checked by its path alone. A direct call that confines nothing still seals by the path. Refs #1182 Refs #1161 Lane: openxfactory-5 (openXfactory-5) Co-Authored-By: Claude Fable 5.1 <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
Copilot's review of #1185 at 725f92e (review 5331401098): - `main` clears the seal result's path before the seal runs, since whatever sits there is the lane's to remove (#1166). A `--seal-out` that named the same path, held it, or lay inside it lost an existing seal, or what it held, and then passed as fresh (PRRT_kwDOTAvnrs6mc4kl). The two paths are now compared first, as spelled and as resolved (`_seal_paths_overlap`). On an overlap nothing is cleared and nothing is sealed. The refusal is written only where the result's path is free, and the step fails where it is not. A `--seal-out` refused on its own keeps its own reason. - Where the platform opens nothing relative to a handle, a seal confined to a root is refused before anything is made (PRRT_kwDOTAvnrs6mc4kc), since it could only be made, written and checked by its path. `main` always confines it to `--repo-root`, and the nightly's parent runs on Linux, where the handle is taken. A direct call that confines nothing is still made by its path, as the manifest's write always has been there. Tests: the seven new cases of the previous commit fail against 725f92e's module and pass here. Refs #1182 Refs #1161 Lane: openxfactory-5 (openXfactory-5) Co-Authored-By: Claude Fable 5.1 <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
Copilot's review of #1185 at c3829b6 (review 5331459386, thread PRRT_kwDOTAvnrs6mdCHa): directory handles alone do not route the seal's writes. Where the platform opens a directory relative to a handle but names no path through one (no /proc/self/fd), the seal's root fell back to its name, and the corpus, the validator, the index and the byte count followed that name, which sealed code may swap. `test_a_confined_seal_is_never_written_by_its_path` points the handles' path at nothing and seals with `seal_within`, as `main` does. It fails against the lane module at c3829b6, which this commit leaves untouched (`Failed: DID NOT RAISE SealRefused`). A direct call that confines nothing still seals through its name. Refs #1182 Refs #1161 Lane: openxfactory-5 (openXfactory-5) Co-Authored-By: Claude Fable 5.1 <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
Copilot's review of #1185 at c3829b6 (review 5331459386, thread PRRT_kwDOTAvnrs6mdCHa). With `within`, `_new_seal_directory` now requires a path through a handle on the directory the seal goes in (`_path_through_handle`) before it makes anything, and refuses the seal where there is none. The seal would otherwise be written, indexed and counted through its name. `main` always confines the seal to `--repo-root`, and the nightly's seal step runs on ubuntu-latest, which has /proc/self/fd. A direct call that confines nothing still falls back to the name, as the manifest's write always has where no handle serves. Tests: the new case of the previous commit fails against c3829b6's module and passes here. Refs #1182 Refs #1161 Lane: openxfactory-5 (openXfactory-5) Co-Authored-By: Claude Fable 5.1 <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
…, first Copilot's review of #1185 at 5aa2193 (review 5331632101) found two more gaps, and these tests state the rules that close them. The five cases below fail against the lane module at 5aa2193, which this commit leaves untouched: - a seal whose name is swapped as its manifest is written is not published, and its manifest is withdrawn from the directory the lane made (thread PRRT_kwDOTAvnrs6mdeRY). At 5aa2193 nothing looked at the name after the manifest was written (`Failed: DID NOT RAISE SealRefused`, for a link and for a copy); - on an overlap of `--seal-out` and `--seal-result-out` the result is written nowhere, and the step fails (the review's summary: "overlap refusal can write into an existing seal"). At 5aa2193 the refusal was created at a free result path, even one inside an existing seal directory, and so inside the checkout when `--seal-out` named the checkout itself. That case moves from the recorded-refusal test to the overlap test, since the checkout overlaps every result path inside it. Refs #1182 Refs #1161 Lane: openxfactory-5 (openXfactory-5) Co-Authored-By: Claude Fable 5.1 <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
Copilot's review of #1185 at 5aa2193 (review 5331632101): - The manifest is the seal's publication marker, and once the seal is recorded sealed the workflow uploads whatever its name leads to. The name is now held to the directory once more after the manifest is written. A seal whose name no longer leads there is refused, and its manifest is withdrawn through the handle (`_withdraw_manifest`), so the directory the lane made never carries a manifest the lane does not stand behind (thread PRRT_kwDOTAvnrs6mdeRY). - On an overlap of `--seal-out` and `--seal-result-out`, neither path is touched. The result is no longer created even where its path is free, since that path could lie inside an existing seal (the review's summary). The held directory is let go (`_HeldResultPath.release`), and the step fails (`SEAL_RESULT_UNWRITTEN_EXIT`). `write` is back to its one form. Tests: the five cases of the previous commit that fail against 5aa2193's module pass here. Refs #1182 Refs #1161 Lane: openxfactory-5 (openXfactory-5) Co-Authored-By: Claude Fable 5.1 <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
There was a problem hiding this comment.
Sorry @brettheap, you've used your own review budget of 250,000 diff characters for the last 7 days.
You can request another review in 4 days and 18 hours by commenting @sourcery-ai review. Upgrade to get a review now.
|
Lane: openxfactory-5 (openXfactory-5) LANDING — lane openXfactory-5, session b254fdd5-0bdf-44e0-bb45-5a780234009f@Eagle, 2026-09-27T19:57:06Z, PR #1185 into opensoft/openxFactory main |
Brings in #1185 (d90df42); no overlap with the catalog scan. Lane: openxfactory-1 Co-Authored-By: Claude Opus 5.5 <[email protected]>




Lane: openxfactory-5 (openXfactory-5)
What was open
The refresh lane's
--seal-outwas unconfined (#1182). #1166 (landed8fb505ab) bound--seal-result-outand the seal'srecipe/, but left--seal-outas it was: Copilot threadPRRT_kwDOTAvnrs6mX2tkon #1166 was scoped out, and SonarCloud kept reportingpythonsecurity:S8707findings reached through it. Measured at133e37d9:.., or through a link on the way;mkdir(parents=True)made missing directories on the way;FileExistsError;SonarCloud's analysis of
mainshows eight open S8707 findings onscripts/ideation_dashboard/dashboard_refresh_lane.pywhose taint source isargs.seal_out(seal_dir=Path(args.seal_out), line 4211 at133e37d9), not only the two #1182 names:_open_directory(1405-1406,AaDiiKjiuh_NfUB9MPP8),_create_new_file(1452,AaDiiKjiuh_NfUB9MPP7),_write_new_recipe(1519,AaDiiKjiuh_NfUB9MPP9),file_sha256(1310,AaCIil7G1WTeVOIYRVvd),_extract_seal_archive(1780, 1791, 1793:AaCIil7G1WTeVOIYRVvj,AaCIil7G1WTeVOIYRVvW,AaCIil7G1WTeVOIYRVvi) andseal_source(2907,AaCIil7G1WTeVOIYRVvk). Each flow was read from the SonarCloud issue API. This change removes that source, so all eight are in scope.What this changes
--seal-outis held before the seal starts (_seal_out_path, inmain). Its canonical path (os.path.realpath) must be inside--repo-root(startswith(root + os.sep), the rule's own sanitizer form). It must be its own spelling made absolute, so there is no link at any component, the last included, dangling or not, even one leading back inside. Nothing may exist at the path, and its directory must exist (nomkdiron the way). Anything else is refused as a recorded outcome: nothing of the seal runs, sealed code least of all, the result is written, and the step exits 0. The exit-3 fail-closed path from Render the refresh lane through the pinned products, and mount them in the nightly (#1161) #1166 (a result the lane could not write) is unchanged.--seal-outand--seal-result-outare two paths (_seal_paths_overlap, inmain; Copilot, this PR). They are compared before the result's path is cleared. They overlap if they are the same path, or one is inside the other, in any of three spellings: absolute, with the directories above the last component resolved, or resolved whole. On an overlap neither path is touched: nothing is cleared, sealed or written, and the step fails (SEAL_RESULT_UNWRITTEN_EXIT). A--seal-outrefused on its own keeps its own reason.--seal-out .overlaps every result path inside the checkout, so it fails the step too._new_seal_directory, inseal_source). An existing path is refused before the validator is resolved. Then comes a plainmkdir, relative to a handle reached by walking from--repo-root, with each directory opened relative to the one before and without following a link. The new directory is opened the same way and must be empty. Once it is made, its way is walked again by name, through no link, and must reach it (Copilot, this PR). A confined seal is refused before anything is made where the platform opens nothing relative to a handle, or names no path through one (no/proc/self/fd), since it would then be written through its name (Copilot, this PR). A direct call that confines nothing keeps the path fallback the manifest's write always had._HeldSealDirectory.root:/proc/self/fd/<fd>). This covers the legs, the corpus, the validator copy, the index and the manifest's byte count. The sealed code the lane runs, the validator's probe and the pre-dispatch render, is handed that directory too, never the name (Copilot, this PR). Before the corpus, the recipe and the manifest, the name is held to the directory by walking its way from the root through no link, by identity (leads_here). After the manifest is written, the name is held once more. A seal whose name no longer leads there is refused, and its manifest is withdrawn through the handle (Copilot, this PR).scripts/dashboard-refresh-nightly.pypasses argv through unchanged..github/workflows/doc-health-reusable.ymlruns the seal step from the checkout root with--repo-root . --seal-out dfr-seal --seal-result-out dfr-seal-result.json. That is one relative name inside the checkout, which no earlier finalize step makes or names, apart from its result, so it satisfies every rule unchanged.test_the_workflows_own_relative_spelling_sealsholds it to that. The upload step reads the same name, gated onsealed == 'true'. The aggregation's worker intake is untouched.test_a_non_empty_seal_directory_is_refusedbecametest_a_seal_directory_that_already_exists_is_refused: an empty directory and a file are refused too, before the validator is resolved.test_a_seal_directory_that_is_a_link_is_refusednow covers three targets.81807067are fixed._new_seal_directoryis split into its parts (S3776), and threepytest.raisesblocks now make one call each (S5778).Code-only under
add-nightly-dashboard-refresh(ratified); no OpenSpec change. Seal schema unchanged (2.2.0).Evidence
Failing-first at
133e37d9The 22 new cases were run against
133e37d9's lane module (commit1a9d1a27adds only the tests). All 22 fail there and pass at the head.133e37d9test_a_seal_out_the_lane_may_not_make_is_refused_before_anything_is_sealed[beside-the-checkout]assert True is False(sealed beside the checkout)…[climbing-out-of-it]assert True is False…[through-a-link-out-of-it]assert True is False(sealed where the link points)test_a_seal_directory_that_is_a_link_is_refused[an-empty-directory]assert 'the seal dir...ctory at all)' == 'the seal dir...hrough a link'(refused late, after the validator was resolved)…[a-directory-holding-files]'…is not empty — a seal must be materialized into a fresh tree'(it looked through the link)…[nothing]FileExistsError: [Errno 17] File exists: '<tmp>/seal'(escapedseal_source)…[a-link-at-its-own-name]the seal directory …/aggregation/dfr-seal is not a directory of its own (a link, or not a directory at all), after the seal had started…[a-dangling-link-at-its-own-name]FileExistsError: [Errno 17] File exists: '…/aggregation/dfr-seal'test_a_seal_directory_that_already_exists_is_refused[an-empty-directory]Failed: DID NOT RAISE SealRefused(adopted)…[a-directory-holding-files]'…is not empty — a seal must be materialized into a fresh tree'…[a-file]NotADirectoryError: [Errno 20] Not a directory: '<tmp>/seal'…[an-existing-directory-inside-it]assert True is False(adopted and sealed)…[the-checkout-itself]the seal directory …/aggregation is not empty — …test_a_seal_directory_that_appears_before_the_lane_makes_it_is_refusedFailed: DID NOT RAISE SealRefused…[through-a-link-inside-it]assert True is False(sealed where the link points)test_a_link_put_on_the_seal_out_path_after_its_check_is_never_made_throughassert ['dfr-seal'] == [](made through the link, outside)…[in-a-directory-that-does-not-exist]assert True is Falsetest_a_seal_directory_swapped_after_the_lane_made_it_gets_nothing_moreassert ['openxFactory', 'validator'] == [](extracted through the swap)test_a_seal_directory_swapped_while_the_lane_writes_it_keeps_the_writesassert ['openxFactory', 'validator'] == []test_a_seal_directory_swapped_as_the_lane_makes_it_is_refused[a-link-out]Failed: DID NOT RAISE SealRefused…[a-directory-holding-files]Failed: DID NOT RAISE SealRefusedtest_the_workflows_own_relative_spelling_sealsAttributeError: … has no attribute '_seal_out_path'Failing-first for each Copilot round (each at the head the review was made at)
81807067PRRT_kwDOTAvnrs6mcgSB: a directory on the way swapped as the seal is madetest_a_directory_on_the_way_swapped_as_the_seal_is_made_gets_nothing[a-fresh-directory]assert ['openxFactory'] == []: the legs were written into the seal made inside the moved directory, out of the root…[a-link-to-the-moved-one]Failed: DID NOT RAISE SealRefused: the whole seal completed out of the roottest_a_directory_on_the_way_swapped_for_a_link_gets_nothing_more[as-the-legs-are-sealed],[as-the-render-runs]DID NOT RAISE, twice: the name check (an lstat) looked through the linkPRRT_kwDOTAvnrs6mcgSK: the render was run from the nametest_the_render_is_handed_the_directory_the_lane_made_not_its_name[a-copy-in-its-place],[a-directory-of-its-own]assert [(181, 3376635)] == [(181, 3376574)]: the render resolved to the replacement725f92e0PRRT_kwDOTAvnrs6mc4kc: the no-handle fallbacktest_a_confined_seal_is_never_made_by_its_path_aloneDID NOT RAISEPRRT_kwDOTAvnrs6mc4kl: the result cleared before the fresh checktest_a_seal_out_that_overlaps_the_seal_result_is_never_touched, six cases thenNotADirectoryError … dfr-seal.json/kept.txt);seal_sourcerun on a free path; a stale result replaced; the directory at the result's path removed, twice; the directory a link led to removedc3829b64PRRT_kwDOTAvnrs6mdCHa: no path through a handletest_a_confined_seal_is_never_written_by_its_pathDID NOT RAISE5aa2193fPRRT_kwDOTAvnrs6mdeRY: no check of the name after the manifesttest_a_seal_directory_swapped_as_its_manifest_is_written_is_not_published[a-link-to-the-moved-seal],[a-copy-in-its-place]DID NOT RAISE, twice[one-free-path],[a-free-result-inside-an-existing-seal],[the-checkout-itself]Each round's tests were committed before its fix (
20f9fa35,08247617,26ae3b5f,58d93294), and each round's new cases fail against the module of the head before it.Mutation checks (each guard reverted by hand at
cf081af9, one at a time): 25 of 25 killedtest_a_seal_out_the_lane_may_not_make_is_refused_before_anything_is_sealed(beside-the-checkout, climbing-out-of-it, through-a-link-out-of-it)test_a_seal_out_the_lane_may_not_make_is_refused_before_anything_is_sealed(a-dangling-link-at-its-own-name, a-link-at-its-own-name, through-a-link-inside-it)test_a_seal_out_that_overlaps_the_seal_result_is_never_touched(a-free-result-inside-an-existing-seal, one-path-holding-a-seal, the-checkout-itself, the-result-inside-the-seal, the-seal-inside-the-result);test_a_seal_out_the_lane_may_not_make_is_refused_before_anything_is_sealed(an-existing-directory-inside-it)test_a_seal_out_the_lane_may_not_make_is_refused_before_anything_is_sealed(in-a-directory-that-does-not-exist)test_a_seal_out_the_lane_may_not_make_is_refused_before_anything_is_sealed(a-dangling-link-at-its-own-name, a-link-at-its-own-name, an-existing-directory-inside-it, beside-the-checkout, climbing-out-of-it, in-a-directory-that-does-not-exist, through-a-link-inside-it, through-a-link-out-of-it)test_a_seal_directory_that_already_exists_is_refused(a-directory-holding-files, a-file, an-empty-directory);test_a_seal_directory_that_is_a_link_is_refused(a-directory-holding-files, an-empty-directory, nothing)test_a_seal_directory_that_appears_before_the_lane_makes_it_is_refusedtest_a_link_put_on_the_seal_out_path_after_its_check_is_never_made_throughtest_a_seal_directory_swapped_as_the_lane_makes_it_is_refused(a-link-out)test_a_seal_directory_swapped_as_the_lane_makes_it_is_refused(a-directory-holding-files)test_a_seal_directory_swapped_while_the_lane_writes_it_keeps_the_writestest_a_seal_directory_swapped_after_the_lane_made_it_gets_nothing_moretest_a_seal_directory_swapped_while_the_lane_writes_it_keeps_the_writes;test_a_seal_directory_the_render_replaced_gets_no_manifest(a-copy-in-its-place, a-link-to-the-moved-seal);test_the_recipe_is_never_written_through_anything_sealed_code_left(the-seal-directory-replaced, the-seal-directory-replaced-by-a-copy)test_a_directory_on_the_way_swapped_as_the_seal_is_made_gets_nothing(a-fresh-directory, a-link-to-the-moved-one)test_a_directory_on_the_way_swapped_as_the_seal_is_made_gets_nothing(a-link-to-the-moved-one);test_a_directory_on_the_way_swapped_for_a_link_gets_nothing_more(as-the-legs-are-sealed, as-the-render-runs)test_a_directory_on_the_way_swapped_as_the_seal_is_made_gets_nothing(a-link-to-the-moved-one);test_a_directory_on_the_way_swapped_for_a_link_gets_nothing_more(as-the-legs-are-sealed, as-the-render-runs)test_the_render_is_handed_the_directory_the_lane_made_not_its_name(a-copy-in-its-place, a-directory-of-its-own)test_a_seal_out_that_overlaps_the_seal_result_is_never_touched(a-free-result-inside-an-existing-seal, a-free-seal-inside-the-result, a-link-to-the-result, one-free-path, one-path-holding-a-seal, the-checkout-itself, the-result-inside-the-seal, the-seal-inside-the-result)test_a_seal_out_that_overlaps_the_seal_result_is_never_touched(a-free-seal-inside-the-result, a-link-to-the-result, one-path-holding-a-seal, the-result-inside-the-seal, the-seal-inside-the-result)test_a_seal_out_that_overlaps_the_seal_result_is_never_touched(a-free-result-inside-an-existing-seal, a-free-seal-inside-the-result, a-link-to-the-result, one-free-path, one-path-holding-a-seal, the-checkout-itself, the-result-inside-the-seal, the-seal-inside-the-result)test_a_confined_seal_is_never_made_by_its_path_alonetest_a_seal_out_that_overlaps_the_seal_result_is_never_touched(a-link-to-the-result)test_a_confined_seal_is_never_written_by_its_pathtest_a_seal_directory_swapped_as_its_manifest_is_written_is_not_published(a-copy-in-its-place, a-link-to-the-moved-seal)test_a_seal_directory_swapped_as_its_manifest_is_written_is_not_published(a-copy-in-its-place, a-link-to-the-moved-seal)Real seal run (the lane's own CLI, the workflow's spelling)
A scratch driver adapted from seat z's read-only kit (
z526-kit/measure-real-seal.py) callsmain()from a fresh root, exactly as the seal step does:--repo-root . --phase seal --seal-out dfr-seal --seal-result-out dfr-seal-result.json --decision-in dfr-decision.json. It uses the real leg sealer, resolver, corpus archive, validator copy and probe, pre-dispatch render and sealed validator under--strict. As in the kit, the only stub is the recipe read.cf081af9(its corpus carries #1184's repair)SEALED …, 4133 files, 50950876 bytes, exit 0; precheckvalidatedunder--strictover 400 documents;verify_seal(...) == []; no substitution4a30ea63af4898f1…--seal-out ../outside-sealNOT SEALED — the seal cannot be made: --seal-out '../outside-seal' is not inside the checkout …, exit 0, nothing created--seal-out dfr-seal-result.jsonbeside that resultNOT SEALED — … overlap, and neither is touched …,::error::the result could not be written, exit 3; the root holds onlydfr-decision.json81807067and133e37d9, each sealing corpus revision133e37d9strict_failedverdict on #1159's three findings, exit 046a08c1e6c208963…for both: the same paths and the same bytes133e37d9,--seal-out ../outside-sealstrict_failedCounts
tests/ideation-dashboard/test_dashboard_source_seal.py+test_dashboard_refresh_lane.py: 388 passed atcf081af9(352 at133e37d9).cf081af9(-m "not postgres"): 8759 passed, 7 skipped, 391 subtests passed, 1 failed. The failure istests/doc-health/test_tag_hygiene_pinned_targets.py::test_a_lexically_malformed_value_builds_no_path_and_reads_nothing, which asserts that no argument on its read surface contains the substringone. This clone's path,…/clone-sealout/…, contains it, so the test fails here only. The same file passes 41 of 41 from a scratch worktree ofcf081af9whose path does not contain it.pytest-suite: atcf081af9, run 36343750922: selected=9181 passed=9175 skipped=6 failures=0 errors=0 (floors: selected>=7050, passed>=7044, skipped==6). Atc3829b64: selected=9175 passed=9169 skipped=6. At81807067: selected=9162 passed=9156 skipped=6.Gates at
cf081af9(all exit 0)scripts/validate-openspec-cli-pin.py --all: 0 UNDISPOSITIONED failures (1 accepted exception, named in its output).scripts/validate-code-surface.py: passed.scripts/validate-estate-inventory.py: passed.scripts/doc-health.py --single-repo .: "Findings: 31 critical, 26 error, 49 warning, 21 info. New regressions vs previous report: 0."redefinition of unused 'build', which main carries at line 4305.SonarCloud
At
cf081af9(analysis, 2026-09-27T19:21:08Z) the quality gate is OK. There are 0 new vulnerabilities, 0 security hotspots, 0 bugs and 0 code smells. The three code smells it reported at81807067are CLOSED/FIXED.No S8707 is reported in this PR's scope, open or closed. Of the eight on main reached through
--seal-out:_write_new_recipe(AaDiiKjiuh_NfUB9MPP9) andseal_source(AaCIil7G1WTeVOIYRVvk). A flow that still reached them would be reported here as new, and none is;_open_directory(AaDiiKjiuh_NfUB9MPP8),_create_new_file(AaDiiKjiuh_NfUB9MPP7),file_sha256(AaCIil7G1WTeVOIYRVvd), and_extract_seal_archivethree times (AaCIil7G1WTeVOIYRVvj,AaCIil7G1WTeVOIYRVvW,AaCIil7G1WTeVOIYRVvi). SonarCloud tracks these against main and does not re-report them on a pull request. Their flows now start at_seal_out_path'srealpath+startswith(root + os.sep)+ raise, and they close in the first analysis of main after the landing.Copilot
Five reviews: 5331245942 (
81807067, 2 threads), 5331401098 (725f92e0, 2), 5331459386 (c3829b64, 3), 5331632101 (5aa2193f, 1, plus its summary line), and 5331679024 (cf081af9: "Findings: None"). All 8 threads were answered, Lane line first, and resolved; 0 are unresolved. Six were fixed test-first. Two are answered as residuals, below.Residuals (answered, not changed)
mkdirand itsopen(PRRT_kwDOTAvnrs6mdCHH). No call makes a directory and returns a handle on it, so the lane usesmkdiratandopenat(O_NOFOLLOW)as two adjacent calls relative to a held parent. They run before any sealed code has run. A process able to act then could rewrite the lane itself, which runs from the checkout. An empty replacement brings nothing into the seal.PRRT_kwDOTAvnrs6mdCHP). A replaced checkout would also be the corpus the seal archives and the lane's own code. After the making, every check of the name requires the directory the lane holds, by identity.Out of scope (open S8707 on this module not reached through
--seal-out)These flows start at other arguments, so they are left as they are (lines at
133e37d9):main()4170--decision-in(AaCIil7G1WTeVOIYRVvZ),main()4293--digest-in(AaCIil7G1WTeVOIYRVvf),main()4330-4337--decision-out(AaCIil7G1WTeVOIYRVvb),run_refresh_lane()4001/4004/4006-4010--pin-out(AaCIil7G1WTeVOIYRVvY,…Vva,…VvV), andappend_report_section()3788/3791--report-in(AaCIil7G1WTeVOIYRVvc,…Vvg, and S2083AaCIil7G1WTeVOIYRVvU).Held for
DRAFT. It lands by the coordinator under Brett Heap's word to lane openXfactory-5, verbatim "land #1159 and #1182 when green", once the checks are green, Copilot is clean at the head, SonarCloud shows the S8707 findings reached through
--seal-outgone, and 0 threads are unresolved. #1159 landed as #1184 (a9e7db75).Refs #1182
Refs #1161
🤖 Generated with Claude Code