Skip to content

Refresh lane: the credentialed parent seals the bounded source artifact (nightly-refresh re-realization S2; lands after #641) - #648

Merged
brettheap merged 14 commits into
mainfrom
feat/nightly-refresh-s2-parent-seal
Sep 4, 2026
Merged

brettheap merged 14 commits into
mainfrom
feat/nightly-refresh-s2-parent-seal

Conversation

@brettheap

@brettheap brettheap commented Sep 4, 2026 •

Copy link
Copy Markdown
Contributor

Lane: openxfactory-f2

Slice S2 of the add-nightly-dashboard-refresh re-realization: the credentialed hosted parent seals the bounded source artifact the credential-free child consumes. #641 merged 19a777d8; this PR now carries only S2.

Realizes the parent half of the re-ratified delta on main since #595 (92e662cf): "The credentialed hosted parent SHALL then materialize fresh openxFactory main … plus the Omnigent-Install recipe at ITS main into a bounded sealed source artifact carrying the source HEAD, source committer timestamp, and both path-scoped input revisions."

Why

worker_readiness.py fails the lane's readiness gate closed with repository_credentials_present unless the heartbeat attests repository_credentials_absent: true — while the pre-amendment recipe had the child git cloneing two private repositories. The lane could be ready or it could fetch; never both. The parent already holds an installation token and already has the openxFactory submodule initialised with full history for the decision above, so sealing costs a git archive of a revision in hand plus one contents read of the single-file recipe. Nothing is cloned, and no working tree is mutated.

What landed

scripts/ideation_dashboard/dashboard_refresh_lane.py — a --phase seal and its helpers (seal_source, seal_file_index, tree_digest, git_archive_revision, git_commit_datetime, verify_seal, seal_artifact_name, seal_result_payload). Pure stdlib; the only binary it speaks is git, asserted over the recorded argv.

.github/workflows/doc-health-reusable.yml — three steps in finalize, between dfr-decide and the dispatch: the seal (id: dfr-seal), the upload (id: dfr-upload, actions/upload-artifact@v4), and a record-skip for an unsealed or un-uploaded source. The dispatch's if: gains dfr-seal.outputs.sealed == 'true' && dfr-upload.outcome == 'success'.

tests/ideation-dashboard/test_dashboard_source_seal.py — 65 tests, hermetic (a real git init under tmp_path; the recipe read is always injected, and gh is unreachable by the suite's own hermeticity guard).

Three properties worth reading the diff for

1. The seal set is not the decision set — the #179 trap, refused at the seal. snapshot.find_validator walks UP for openxFactory/scripts/validate-ideation-dashboard-contracts.py, a TOP-LEVEL scripts/*.py that CORPUS_BAKED_PATHS does not name; the child's sparse-cone checkout carried it only as a side effect of cone mode, and git archive over a path list does not. A seal without it fails --strict with "validator unavailable" and no finding to read, so seal_source refuses outright. Hence CORPUS_SEAL_PATHS = CORPUS_BAKED_PATHS ∪ {the validator} while CORPUS_BAKED_PATHS is byte-unchanged — widening the decision scope would make _same_scope fire REASON_SCOPE_CHANGED against every recorded pin and force one rebuild for nothing (design open question 7). Both halves are asserted, and the layout is proven by running the real locator over a real sealed tree rather than by restating a path.

2. The revision is proven, not asserted (design open question 1, taken as recommended). After this change the child's source_revision == HEAD check reads two fields of one manifest and is tautological on its own, so the parent keeps the end that still touches a repository: git archive's tar output carries the commit it was made from in a global extended pax header (comment=<sha>, written by git itself), and the seal refuses unless that header equals the source_head it is about to record. The child's recomputation of tree_digest is the other half, and the digest rule is written into the manifest so the artifact carries its own verification rule. A test recomputes the digest from that prose by an independent implementation — which is what makes S3's side authorable from the manifest alone.

3. --generated-at gets the commit's date, never a wall clock. generation.generated_at is defined as the source revision's committer date and the snapshot render is canonical precisely because nothing in it reads the clock. So the manifest names the field it feeds (generated_at_field: "source_committed_at"), and git_commit_datetime makes byte-for-byte the call generator.RealGitDates.commit_date makes — -- end-of-options marker included — so the stamp the child receives is the SAME STRING the pre-seal child derived inside its own checkout. The change moves where the value comes from, never what it says; the snapshot stays byte-identical across it. The parent's own wall clock is sealed_at and is diagnostic only.

Failure semantics are the lane's, unchanged. A refused seal is a recorded SKIP and exit 0: no manifest is written (every refusal path asserts its absence), nothing is dispatched, the nightly continues, and the next run catches up in one hop. The dispatch reads the upload's outcome and not merely sealed, because continue-on-error makes its conclusion always success and a child dispatched against an artifact that never uploaded would fail on the download with nothing here saying why.


THE S3 CONTRACT — everything the child needs, so S3 can be authored from this section alone

Artifact

Name dashboard-image-source-<correlation_id> — SEAL_ARTIFACT_PREFIX + the dfr-readiness correlation id (dashboard-refresh-<run_id>-<run_attempt>), which the child already receives as its correlation_id dispatch input. No new dispatch input is passed — deliberately, so S2 can land before S3 without breaking the live dispatch.
Download actions/download-artifact@v4 with name: as above, github-token: ${{ github.token }}, repository:, run-id: ${{ inputs.source_run_id }}. permissions: actions: read is already present at dashboard-image-worker.yml:130-132. Same cross-run shape as doc-health-analysis-worker.yml:140-147.
Retention 1 day. The child consumes it inside the same nightly.
Upload flags include-hidden-files: true, if-no-files-found: error.
Measured size 3511 files, 35,123,275 bytes on the real corpus at 3e5a3090 (recorded in every manifest as file_count / total_bytes — this is the measurement design open question 2 asks for at task 7.6; note it is ~35 MB, not the design's ~8 MB estimate, because ideation/ and openspec/ dominate).

Layout, once extracted

<seal>/manifest.json                 the manifest below
<seal>/openxFactory/…                the corpus at ONE revision (the seal path set)
<seal>/recipe/Dockerfile             the recipe at recipe_revision
  • --repo-root <seal>/openxFactory is what makes find_validator resolve (it walks up to <seal> and finds openxFactory/scripts/validate-…py), and corpus_root_refusal accepts that tree because docs/, ideation/ and openspec/ are in it.
  • The validator is invoked as [sys.executable, <validator>, …], so the lost execute bit does not matter — do not chase it.
  • Build with -f <seal>/recipe/Dockerfile and <seal> as context (the Dockerfile COPYs openxFactory/… roots; manifest.json and recipe/ in the context are inert).

manifest.json (file name is SEAL_MANIFEST_NAME; JSON, indent=2, sort_keys=True)

field type value / meaning
schema_version string "1.0.0". Compare the MAJOR only.
kind string "ideation-dashboard-sealed-source-manifest"
artifact_name string dashboard-image-source-<correlation_id>
correlation_id string matches the child's correlation_id input
parent_repository string | null GITHUB_REPOSITORY of the parent run
parent_run_id string | null GITHUB_RUN_ID of the parent run
sealed_at string parent wall clock, YYYY-MM-DDTHH:MM:SSZ. Diagnostic only — never --generated-at.
source_repo string "opensoft/openxFactory"
source_ref string "origin/main"
source_head string 40 lowercase hex. → generate --source-revision
source_committed_at string RFC 3339, git show -s --format=%cI <source_head> --. → generate --generated-at
generated_at_field string "source_committed_at" — the machine-readable statement of the line above
corpus_relpath string "openxFactory"
corpus_revision string 40 hex — the path-scoped BAKED-input revision from the parent decision (not source_head; they differ whenever HEAD carries commits touching nothing baked)
corpus_baked_paths array[string] the DECISION scope (8 entries)
seal_paths array[string] the SEAL scope (9 entries = the 8 + the validator)
recipe_repo string "opensoft/Omnigent-Install"
recipe_revision string 40 hex, from the parent decision
recipe_path string "containers/ideation-dashboard/Dockerfile" (path in the recipe repo)
recipe_relpath string "recipe/Dockerfile" (path in the seal)
decision object {outcome, reason, corpus_revision, recipe_revision}
digest_algorithm string "sha256"
tree_digest_spec string the rule below, verbatim, so the artifact carries it
tree_digest string 64 lowercase hex
file_count integer len(files)
total_bytes integer sum of sealed file sizes
files object {<posix relpath from seal root>: <sha256 hex>}, excluding manifest.json

Digest algorithm (recomputable in ~6 lines)

sha256 of the concatenation of one line per sealed file, each line '<sha256-hex><two spaces><posix-relative-path><LF>', ordered by the UTF-8 bytes of the relative path, over every regular file under the seal root EXCEPT manifest.json itself.

The two-space separator makes each line a sha256sum line, so the per-file index is also checkable with sha256sum -c unchanged.

Verification steps, in order, all of them BEFORE the ACR login step (:353-367)

That ordering is spec.md:22-23 — "fail before strict generation and before any registry credential is used."

  1. manifest.json present and parses as an object; kind equals the value above; schema_version major equals 1.
  2. files is a non-empty object.
  3. Every key in files exists on disk and its sha256 equals the recorded value. A missing path is exactly spec.md:21's "a required path is absent".
  4. Recompute tree_digest per the rule above and compare.
  5. manifest.correlation_id == the child's correlation_id input; manifest.corpus_revision and manifest.recipe_revision == the revisions the parent decision carried. (This is the scenario's "its recorded revisions do not match the parent decision".)
  6. openxFactory/scripts/validate-ideation-dashboard-contracts.py and recipe/Dockerfile are both in files.
  7. Exit non-zero on any of the above, reporting all problems — a seal missing four files and disagreeing about the revision is one diagnosis, not four runs.
  8. Then generate with --source-revision <source_head> --generated-at <source_committed_at> --strict, and keep the existing child-side source_revision == source_head assertion (cheap; catches a malformed manifest). Design open question 4's recommendation also applies: add a child-side check that the generated snapshot carries generation.generated_at — but do not make the schema field required, which would be a contract change this packet does not need.

lane.verify_seal(seal_dir, correlation_id=…, corpus_revision=…, recipe_revision=…) is the unit-tested reference implementation of steps 1–6 and returns the list of problems. Note the caveat in its docstring: it lives INSIDE the corpus the seal carries, so calling it from the seal is the artifact vouching for itself. S3 should implement the check in the child workflow's own inline python, from the child's own checkout; this function is the shape it implements and the authoritative definition of the digest rule.

Also for S3 (from the plan's §S3, unchanged by this PR)

Edit dashboard-image-worker.yml in place — it is a FROZEN member of .github/clearing/grandfather-enumeration.yaml and of GRANDFATHER_ORIGIN in tests/test_clearing_dispatch_boundary.py:77; a second host-touching file is refused as a second door. Keep the job id build-and-push. Delete the CORPUS_URL/RECIPE_URL env, the whole "Fetch the corpus…" step (:239-310) and the deploy-key header block (:96-104). test_private_inputs_use_distinct_read_only_ssh_aliases must be deleted and replaced by its inverse (no git clone, no ssh://, no GIT_SSH_COMMAND, no deploy-key reference anywhere in the file).


Substrates (Rule 7)

S2 moves no substrate row — confirmed. No openspec/specs/** path moves (row 1 untouched), no contract cut (row 4 untouched), and the change's own OpenSpec directory is explicitly not a substrate. Row 5 (the codexFactory pin trio) is an aggregation concern and is not touched. The plan's §3 says exactly this for S1/S2/S4, and this PR matches it.

Packet ticks are S6's, not this PR's

This PR deliberately does not touch openspec/changes/add-nightly-dashboard-refresh/. What S6 must record against this PR number:

  • 3.2 — its AMENDED 2026-09-01 note ("the credentialed parent now owns the sparse fresh checkouts and seals only those roots plus manifest + recipe into the source artifact") is realized on the PARENT side here. The worker half of that sentence is S3.
  • 3.3 — the parent-side half is realized here (the recipe is read through the contents API at the pinned recipe revision and sealed at recipe/Dockerfile); the note's "the child clones Omnigent-Install main" sentence is retired by S3.
  • 3.4 — the amendment ("the child downloads the parent run's sealed source artifact … performs no repository clone or fetch") is S3's to record; S6 should note that its producer exists as of this PR.
  • 4.1 — the refresh stage gains the seal/upload/skip steps; the [x] stands, and §9's adoption record should carry this act.
  • §9 adoption record — add the S2 act (this PR + its merge commit), beside S1 (ideation-dashboard: explicit --generated-at for sealed-artifact runs (add-nightly-dashboard-refresh task 3.6; re-realization S1) #642 bbc21e41) and S4 (Retire the refresh lane's raw-clone --phase build recipe (nightly-refresh re-realization S4) #641).
  • Also worth recording in the design: the asymmetry open question 7 names (the validator's revision is sealed but not baked), and open question 2's measurement — 3511 files / 35,123,275 bytes — beside the staleness bound at task 7.6.

One deviation to note

The plan's §S2 names the manifest manifest.json; a later instruction to this lane said manifest.yaml. manifest.json was implemented, per the plan: it is stdlib on both sides (the child's verification is inline python with no PyYAML dependency in that step), and it keeps the digest-stable canonical serialization the rest of this package already uses. The manifest does carry schema_version + kind as the house convention requires.

Validation

python3 -m pytest -q tests/ideation-dashboard/test_dashboard_source_seal.py   →  65 passed
python3 -m pytest -q tests/ideation-dashboard/test_dashboard_refresh_lane.py  →  39 passed (unchanged by this PR)
python3 -m pytest -q tests/ideation-dashboard tests/doc-health                →  6292 passed, 18 skipped, 0 failed (16m50s)
python3 -m pytest -q tests/ideation-dashboard                                 →  4754 passed, 18 skipped, 0 failed (11m24s)
python3 -W error -m py_compile scripts/ideation_dashboard/dashboard_refresh_lane.py
                               tests/ideation-dashboard/test_dashboard_source_seal.py   →  clean
actionlint .github/workflows/doc-health-reusable.yml                          →  exit 0
OPENSPEC_TELEMETRY=0 openspec validate --all --strict                         →  89 passed, 0 failed

CI at 63586454: all seven checks GREEN. pytest-suite (run 33844976330, 22m09s): selected=9493 passed=9472 skipped=21 failures=0 errors=0 — floors: selected>=7090 (margin 2403) passed>=7070 (margin 2402) skipped==21. clearing-dispatch-gate, signed-execution-chain-gate, wallet-validation, openreposhape-pin, lane-line, merge-master-approval all pass.

Run in a worktree named openxFactory, which matters: tests/ideation-dashboard/test_snapshot.py::test_find_validator_locates_pinned_checkout asserts that walking UP from the repo root reaches a sibling openxFactory/ — true in CI (/home/runner/work/openxFactory/openxFactory) and in the aggregation workspace, false in an isolated clone whose directory is named anything else. Not touched by this PR; recorded here so the next isolated-clone lane does not chase it.

pytest-suite's EXPECT_SKIPPED is pinned EXACTLY at 21, and the CI run confirms 21 skipped with the new file in place: its _git helper fails rather than skips when git will not run, because twenty silent skips would red that pin with the wrong reason. MIN_SELECTED/MIN_PASSED are floors (9412 passed against a 7070 floor) and need no edit.

The one CI-only failure, fixed

The first CI run went red on two of the new assertions: git show -s --format=%cI renders a ZERO offset as +00:00 on git 2.43 (local) and as Z on the Actions runner's git, and the tests pinned the literal 2026-09-04T01:02:03+00:00. They pinned a git version, not a property. The manifest records whatever git said verbatim — deliberately, since the --generated-at contract is that the value is "recorded in the snapshot EXACTLY as given … never normalised", and normalising here would be this module inventing a stamp. Both spellings are RFC 3339 and both pass generator.is_rfc3339_datetime, which is the property the child depends on, so the tests now assert the INSTANT plus RFC-3339 conformance (59796348). Byte-identity across runs is unaffected: one parent's git renders one spelling, so two seals of one revision still name the same stamp — which test_the_tree_digest_of_one_revision_is_stable_across_two_seals holds.

Bot round

Codex: rate-limited ("You have reached your Codex usage limits for code reviews") — a non-review, not a verdict. Sourcery: the known private-repo upsell stub. Copilot: 2 findings, both TAKEN in e87ed668, both replied to and resolved:

  1. The tar-extraction fallback was unguarded. _extract_seal_archive extracts under the data filter where the interpreter has one and fell back to a bare extractall where it does not — which would write an absolute or ..-bearing member outside the seal. Member names are now checked BEFORE anything is extracted (absolute, traversing, and any name whose resolved target is not under the destination), so the guarantee holds on both branches. Regression: test_a_member_path_that_could_escape_the_seal_is_refused, three cases, each asserting the escape target is not written.
  2. correlation_id was canonicalized in one place of two. seal_artifact_name stripped it, the manifest recorded the raw value, and the child compares the two — so a padded id would have made the child refuse a good seal over a space. Stripped once at the top of seal_source. Regression: test_the_correlation_id_is_canonicalized_once.

Round 2 (b805e611, disposition comment on the PR): 1 TAKEN, 1 DECLINED.

  1. TAKEN — verify_seal suppressed the tree_digest check whenever any earlier problem existed. The guard was and not problems, so a wrong kind or a correlation-id disagreement dropped the recomputation — contradicting the function's own "report all problems in one pass" contract and dropping the most useful line in the list. It now recomputes whenever every indexed path WAS hashed. Regression: test_the_digest_check_is_not_suppressed_by_an_unrelated_problem.
  2. DECLINED — main()'s exit-0 docstring versus argparse's non-zero. Already fixed on this branch before the finding: Retire the refresh lane's raw-clone --phase build recipe (nightly-refresh re-realization S4) #641's b23e3381 (merged at ee53065a) rewrote that paragraph to scope the contract to VALID phases and to state that a phase argparse refuses "is a USAGE error … exits non-zero (SystemExit(2)) … deliberately outside this contract"; b8c88456 added seal to its enumeration. Copilot labelled it "previously missed — in code that hasn't changed", which is how it reads from a review pinned to the pre-merge head.

🤖 Generated with Claude Code

https://claude.ai/code/session_01TqM41pKPnpz7utYe8vanuE

Brett Heap and others added 5 commits September 4, 2026 00:20
…efresh re-realization S4)

`dashboard_refresh_lane.py` carried a SECOND, independent realization of the
pre-amendment build recipe: `build_and_push()`, reached only by `--phase build`
and configured by `BuildPlan.corpus_url/corpus_ref/corpus_paths`. Its first
step was a raw `git clone --filter=blob:none` of the corpus onto the worker,
followed by sparse-checkout, `--strict` generation, `docker build`,
`az acr login` and `docker push`.

Nothing reaches it. `doc-health-reusable.yml` invokes this module four times —
`--phase decide` twice, `--phase pin`, `--phase record-pr` — and passes none of
the six build-only flags; the aggregation's `dashboard-image-worker.yml` does
the whole recipe in bash inside the child. But the re-ratified amendment to
`add-nightly-dashboard-refresh` prohibits the worker from holding a Git
credential at all, so a module-side path that clones contradicts a ratified
requirement whether or not a caller exists today — and two realizations of one
recipe are how the pair drifted apart in the first place. The plan's
recommendation is delete, not port: a ported copy would be a third place the
recipe lives.

Deleted: `build_and_push`, `BuildPlan`, `default_tag`, `_digest_from_push`,
`_digest_from_inspect`; the `build` phase and the six flags that fed it
(`--corpus-url`, `--dockerfile`, `--context-root`, `--registry`, `--tag`,
`--acr-login`); the three `BuildPlan`-only constants and the now-unused
`shlex` import.

Kept: `--phase pin`'s synthesized `BuildResult` path byte-for-byte;
`verify_one_revision`/`OneRevisionViolation`, whose caller moved to the child
but whose property is the contract's; `git_head_revision`, a `rev-parse` read
over a checkout the caller already has, which the parent's sealing step will
need; and `run_refresh_lane`'s injected-build seam, retyped to an opaque
handle. `--corpus-ref` stays — `--phase decide` reads with it.

Tests: the three that drove `build_and_push` directly are removed with their
`FakeBuildWorld`/`_plan` fixtures, and two take their place — an `ast`-based
assertion that no code string literal in the module names `clone`,
`sparse-checkout`, `docker` or `az`, and one that the CLI now refuses
`--phase build` loudly instead of skipping silently.

No packet file, no spec, no contract and no substrate row is touched; slice S6
records the acts and corrects task 3.4's note, which still describes the child
as running `dashboard-refresh-nightly.py --phase build`.

Lane: openxfactory-f2
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_013f11Yb8DF5FTL6NuV7xWYb
Bot round 1, Copilot (TAKEN): "THIS MODULE HOLDS THE PREDICATE AND NOTHING
ELSE" reads as literally false — the module still holds the decision core, the
pin rendering and the report section. The sentence was scoped to the recipe the
paragraph describes, but nothing said so. It now does: of that recipe the module
holds only `verify_one_revision`, never the generation, the build, or the
assertion's call site.

Lane: openxfactory-f2
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_013f11Yb8DF5FTL6NuV7xWYb
…age errors

Bot round 2, Copilot: main()'s docstring said every path "falls through" and
the process "exits 0" without qualifying that against the CLI's own usage-
error path. The module's FAILURE SEMANTICS paragraph ("every error path is a
recorded outcome and exit 0") was always scoped to the lane's own runtime
logic for decide/pin/report/record-pr, never to CLI parsing, so this makes
main()'s docstring say that precisely instead of changing behaviour: exit-0
covers every valid phase's own failure path; an unrecognized phase --
including the retired `build` -- is a usage error argparse itself refuses
with SystemExit(2) before any lane logic runs, and that exit code is
deliberately outside the void-by-contract promise. test_the_cli_refuses_a_
build_phase already pins the SystemExit behaviour this describes.

Lane: openxfactory-f2
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01TqM41pKPnpz7utYe8vanuE
…onsumes

The re-ratified requirement prohibits a Git repository credential, deploy key,
credential helper or repository network access on the artifact worker, and the
worker's own readiness gate fails closed unless its heartbeat attests
`repository_credentials_absent`. The lane's recipe, meanwhile, had the child
raw-cloning two private repositories. The lane could be READY or it could
fetch; never both. This is the parent half of the fix: the credentialed hosted
parent materializes the source, and the child will consume only that
(re-realization S2 of add-nightly-dashboard-refresh).

WHAT THE PARENT SEALS. `--phase seal` takes the decide phase's own decision
file and produces one directory: the corpus at ONE revision under
`openxFactory/`, the pinned build recipe at `recipe/Dockerfile`, and
`manifest.json` carrying the source head, that commit's own committer date,
both path-scoped input revisions, the seal and baked path sets, a per-file
sha256 index, and one `tree_digest` over that index. The workflow uploads it as
`dashboard-image-source-<correlation_id>` and the dispatch is gated on it.

THE SEAL SET IS NOT THE DECISION SET, and PR #179 already paid for that once.
`snapshot.find_validator` walks UP for `openxFactory/scripts/
validate-ideation-dashboard-contracts.py` — a TOP-LEVEL `scripts/*.py` that
`CORPUS_BAKED_PATHS` does not name. The child's sparse-cone checkout carried it
as a side effect of cone mode; a `git archive` over a path list does not, and a
seal without it fails `--strict` with "validator unavailable" and no finding to
read. So the seal set is `CORPUS_BAKED_PATHS ∪ {the validator}` and the
DECISION set stays exactly `CORPUS_BAKED_PATHS`: widening the decision scope
would make `_same_scope` fire `REASON_SCOPE_CHANGED` against every recorded pin
and force one rebuild for nothing. Both halves are asserted, and the layout is
proven by running the real locator over a real sealed tree.

THE REVISION IS PROVEN, NOT ASSERTED. Today the child proves snapshot
`source_revision == HEAD` against a real `.git`; after this change both sides
come from one manifest and that check is tautological on its own. So the parent
keeps the end that still touches a repository: `git archive` records the commit
it was made from in a global extended pax header, and the seal refuses unless
that header equals the `source_head` it is about to record. The child's own
recomputation of `tree_digest` is the other half, and the rule is written INTO
the manifest (`tree_digest_spec`) so the artifact carries its own verification
rule. A test recomputes the digest from that prose by an independent
implementation, which is what makes the child's side authorable from the
manifest alone.

`--generated-at` GETS THE COMMIT'S DATE, NOT A WALL CLOCK. The manifest names
the field (`generated_at_field: source_committed_at`), and `git_commit_datetime`
makes byte-for-byte the call `generator.RealGitDates.commit_date` makes, `--`
included: the change moves where the stamp comes from, never what it says, so
the snapshot stays byte-identical across it. The parent's own wall clock is
`sealed_at` and is diagnostic only.

FAILURE SEMANTICS, unchanged from the rest of the lane. A refused seal is a
recorded SKIP and exit 0 — no manifest is written, nothing is dispatched, and
the next run catches up in one hop. The dispatch reads the upload step's
`outcome` and not merely `sealed`, because `continue-on-error` makes its
`conclusion` always success and a child dispatched against an artifact that
never uploaded would fail on the download with nothing here saying why.

Retention is one day and `include-hidden-files: true`: v4 drops dotfiles by
default and the manifest's index is the authority on what the download must
contain, while a private corpus should not sit in artifact storage for ninety
days to be read once inside the same nightly.

No contract byte moves and no substrate row moves. The child's own intake is
S3, in the aggregation; this lands first so the artifact exists before anything
downloads it. Measured on the real corpus: 3511 files, 35,123,275 bytes.

Lane: openxfactory-f2
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01TqM41pKPnpz7utYe8vanuE
Copilot AI lite review requested due to automatic review settings September 4, 2026 05:53

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

Hi @brettheap! 👋

Your private repo does not have access to Sourcery.

Please upgrade to continue using Sourcery ✨

@brettheap

Copy link
Copy Markdown
Contributor Author

Lane: openxfactory-f2

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

Two holes in the first cut, both of the same shape — something that is not
part of the sealed revision reaching the `files` index, which is the authority
on what the child must find after download.

The intermediate tar was written beside the seal directory, which for the
workflow's `--seal-out dfr-seal` means a dotfile in the checkout root. It is
now staged in a `TemporaryDirectory` outside both the seal and the checkout,
so it cannot be swept into the index (a 35 MB `.tar` in there would be the
whole corpus downloaded twice) and it is cleaned up on every path including a
refusal, rather than by an `unlink` at each `raise`.

And a seal is now refused into a NON-EMPTY directory. A leftover from an
earlier attempt would otherwise be indexed, digested and shipped as though the
parent had sealed it. `finalize` runs on `ubuntu-latest` so the live workspace
is always fresh; the refusal is for the library caller and the re-run nobody
plans.

Lane: openxfactory-f2
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01TqM41pKPnpz7utYe8vanuE

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.

🟡 Changes recommended

It introduces a tar extraction path with an unsafe fallback (path traversal risk) and a correlation-id canonicalization mismatch that can break seal/verification consistency.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR adds a new parent-side “seal” phase for the ideation-dashboard refresh lane, producing a bounded, content-addressed source artifact (corpus subset + pinned recipe + manifest) that the credential-free worker child can consume without any repository access.

Changes:

  • Implement --phase seal in dashboard_refresh_lane.py, including manifest creation, git archive-based materialization, and seal verification helpers.
  • Update the reusable doc-health workflow to run seal + upload steps and gate dispatch on a successful upload.
  • Add a comprehensive hermetic test suite covering sealing semantics, manifest fields, digest rules, and workflow step ordering/gating.
File summaries
File Description
scripts/ideation_dashboard/dashboard_refresh_lane.py Introduces the parent-side sealed-source artifact implementation (--phase seal) and supporting helpers/manifests.
.github/workflows/doc-health-reusable.yml Adds seal + artifact upload steps and gates worker dispatch on seal/upload success.
tests/ideation-dashboard/test_dashboard_source_seal.py New hermetic tests for sealing, manifest contents, digest/revision proofs, and workflow gating expectations.
tests/ideation-dashboard/test_dashboard_refresh_lane.py Updates tests to assert the build recipe is absent from the lane module and CLI refuses --phase build.
Review details
  • Files reviewed: 4/4 changed files
  • Comments generated: 2
  • Review effort level: Lite

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

Copilot AI review requested due to automatic review settings September 4, 2026 05:56
Brett Heap and others added 3 commits September 4, 2026 01:57
…om:opensoft/openxFactory into feat/nightly-refresh-s2-parent-seal
#641's `b23e3381` scoped `main`'s exit-0 contract to the VALID phases and
enumerated them; this slice adds a fifth. The enumeration is the point of that
docstring — a phase missing from it reads as one argparse refuses — so it
carries `seal`, and says explicitly that a refused seal is one of the SKIPPED
outcomes the contract covers.

Lane: openxfactory-f2
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01TqM41pKPnpz7utYe8vanuE
…id once

Both findings from Copilot's round on #648, both taken.

THE EXTRACTION FALLBACK WAS UNGUARDED. `_extract_seal_archive` extracts under
the `data` filter where the interpreter has one and falls back to a bare
`extractall` where it does not — and the fallback would happily write an
absolute or `..`-bearing member outside the seal. "git produced this archive so
its names are fine" is exactly the assumption an extraction hazard is made of.
The member names are now checked BEFORE anything is extracted — absolute,
traversing, and any name whose resolved target is not under the destination —
so the guarantee holds on both branches rather than on one.

THE CORRELATION ID WAS CANONICALIZED IN ONE PLACE OF TWO.
`seal_artifact_name` strips, the manifest recorded the raw value, and the child
compares the artifact name against the manifest field — so a value arriving
with surrounding whitespace would have made the child refuse a perfectly good
seal over a space. It is stripped once, at the top of `seal_source`, and both
now come from the same string.

Lane: openxfactory-f2
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01TqM41pKPnpz7utYe8vanuE

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.

🔵 Needs a closer look

verify_seal() currently suppresses tree_digest verification when any earlier manifest issues exist, and main()’s docstring incorrectly claims exit-0 behavior despite argparse rejecting invalid phases with non-zero exit.

Review details

Suppressed comments (2)

Previously missed (2) — in code that hasn't changed since the last review.

scripts/ideation_dashboard/dashboard_refresh_lane.py:1723

  • main()’s docstring claims the process always exits 0, but invalid CLI usage (e.g. --phase build) is rejected by argparse with SystemExit(2) (non-zero). This is especially relevant now that build was removed from the --phase choices and there are tests asserting the non-zero behavior.
        if note:
            outcome.detail.append(note)

        if pin_out is not None and inputs.overlay_text is not None:
            pin_dir = Path(pin_out)

scripts/ideation_dashboard/dashboard_refresh_lane.py:1261

  • verify_seal() only recomputes and checks tree_digest when there are no prior problems at all (and not problems). This can suppress a real tree_digest mismatch whenever the manifest has other issues (e.g., wrong kind/schema_version), contradicting the function’s documented goal of reporting all problems it can detect in one run.
  • Files reviewed: 4/4 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

Copilot AI review requested due to automatic review settings September 4, 2026 06:00

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.

🔵 Needs a closer look

verify_seal() currently skips tree_digest recomputation whenever any earlier problem is present, which contradicts its stated “report all problems” behavior and can hide useful diagnostics.

Review details

Suppressed comments (1)

Previously missed (1) — in code that hasn't changed since the last review.

scripts/ideation_dashboard/dashboard_refresh_lane.py:1291

  • verify_seal() says it reports all problems before failing, but tree_digest recomputation is currently skipped whenever any earlier problem exists (e.g., kind/schema/revision mismatches). That can hide a digest mismatch that would be useful to diagnose in the same run. Consider recomputing tree_digest whenever the files index is complete and the per-file hashes match, regardless of other manifest-level problems.
  • Files reviewed: 4/4 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

…s git's

Two of the new tests pinned `source_committed_at` to the literal
`2026-09-04T01:02:03+00:00` and went red on the Actions runner, which returned
`2026-09-04T01:02:03Z` for the same commit: `git show -s --format=%cI` renders
a ZERO offset as `+00:00` on git 2.43 and as `Z` on the runner's git. The
assertions pinned a git version, not a property.

The manifest records whatever git said VERBATIM, and that is deliberate — the
`--generated-at` contract is that the value is "recorded in the snapshot
EXACTLY as given … never normalised", and normalising here would be this
module inventing a stamp. Both spellings are RFC 3339 and both are accepted by
`generator.is_rfc3339_datetime`, which is the property the child depends on.
So the tests now assert the INSTANT (and RFC-3339 conformance) rather than the
rendering, with the measurement of both spellings recorded beside the helper.

Byte-identity across runs is unaffected: one parent's git renders one spelling,
so two seals of one revision still name the same stamp — proven by
`test_the_tree_digest_of_one_revision_is_stable_across_two_seals` and by
`test_the_manifest_carries_every_field_the_child_reads`.

Lane: openxfactory-f2
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01TqM41pKPnpz7utYe8vanuE
Copilot AI review requested due to automatic review settings September 4, 2026 06:31
Brett Heap and others added 2 commits September 4, 2026 02:34
Copilot round 2, taken. `verify_seal` guarded the digest recomputation with
`and not problems`, so a wrong `kind`, an unreadable `schema_version` or a
correlation-id disagreement suppressed it — contradicting the function's own
contract, which is to report ALL of what is wrong in one pass because "a seal
that is missing four files and disagrees about the revision is one diagnosis,
not four runs". The whole-tree disagreement is the most useful line in that
list and it was the one being dropped.

It now recomputes whenever every indexed path WAS hashed. A per-file mismatch
then shows up twice, as its own line and again in the digest line; that is the
right side of the trade for a diagnosis a human reads once.

Lane: openxfactory-f2
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01TqM41pKPnpz7utYe8vanuE
Cosmetic only, no behaviour: the `seal` insertion into `main`'s docstring left
one line running past the file's width, and four of the new statements were
82-90 columns. The `..` membership test also reads better as `".." in parts`
than as the generator it was.

Lane: openxfactory-f2
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01TqM41pKPnpz7utYe8vanuE
@brettheap

Copy link
Copy Markdown
Contributor Author

Lane: openxfactory-f2

Bot round 2 — dispositions

Copilot finding 1: verify_seal suppressed the tree_digest check whenever any earlier problem existed. TAKEN — b805e611. The guard was and not problems, so a wrong kind, an unreadable schema_version or a correlation-id disagreement dropped the recomputation — contradicting the function's own contract ("a seal that is missing four files and disagrees about the revision is one diagnosis, not four runs") and dropping the single most useful line in the list. It now recomputes whenever every indexed path WAS hashed. A per-file mismatch consequently shows up twice, as its own line and again in the digest line; that is the right side of the trade for a diagnosis a human reads once. Regression: test_the_digest_check_is_not_suppressed_by_an_unrelated_problem.

Copilot finding 2: main()'s docstring claims exit-0 while argparse rejects an invalid phase non-zero. DECLINED — already fixed on this branch, before the finding. #641's b23e3381 (merged here at ee53065a) rewrote exactly that paragraph: it now says the contract holds "only for a VALID phase", enumerates them, and states that a phase argparse itself refuses "is a USAGE error: argparse prints the fixed choice set and exits non-zero (SystemExit(2)) before any lane logic runs. That exit code is deliberately outside this contract". b8c88456 added seal to that enumeration and 63586454 reflowed the paragraph. Copilot labelled the finding "previously missed — in code that hasn't changed since the last review", which is what it looks like from a review pinned to the pre-merge head.

Codex: rate-limited, both rounds — "You have reached your Codex usage limits for code reviews". A non-review, not a verdict; recorded rather than counted. Sourcery: the known private-repo upsell stub.

Two rounds run; stopping here per the lane's bot-round discipline. Head 63586454.

🤖 Generated with Claude Code

https://claude.ai/code/session_01TqM41pKPnpz7utYe8vanuE

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.

🟡 Changes recommended

verify_seal() currently allows unsafe/absolute/traversing/symlink paths from the manifest index and compares correlation_id case-insensitively, which can undermine the child-side safety gate and correctness checks.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details

Suppressed comments (1)

Previously missed (1) — in code that hasn't changed since the last review.

scripts/ideation_dashboard/dashboard_refresh_lane.py:1298

  • verify_seal() compares the manifest's correlation_id case-insensitively by lowercasing it along with the two revision fields. Unlike SHAs, correlation_id is an opaque dispatch correlation token (and also participates in the artifact name), so case changes should be detected rather than silently accepted.
  • Files reviewed: 4/4 changed files
  • Comments generated: 1
  • Review effort level: Lite

Copilot AI review requested due to automatic review settings September 4, 2026 06: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.

🔵 Needs a closer look

verify_seal() currently treats correlation_id mismatches case-insensitively, which can let an incorrect manifest correlation_id pass the intended identity check.

Review details

Suppressed comments (1)

Previously missed (1) — in code that hasn't changed since the last review.

scripts/ideation_dashboard/dashboard_refresh_lane.py:1308

  • verify_seal() compares the dispatch correlation_id case-insensitively by lowercasing both sides. Correlation IDs are used verbatim to name the Actions artifact, so treating them case-insensitively can allow accepting a seal whose manifest correlation_id does not exactly match the dispatch input (only differs by case), which undermines the intended identity check.
  • Files reviewed: 4/4 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

Pulls in #641 (nightly-refresh re-realization S4, retire the raw-clone
`--phase build` recipe) now landed on main at 19a777d, plus everything
merged since. Two conflicts in scripts/ideation_dashboard/dashboard_refresh_lane.py
and tests/ideation-dashboard/test_dashboard_refresh_lane.py, both from S2
having branched off #641's own PR branch before its final polish:

- scripts/ideation_dashboard/dashboard_refresh_lane.py (6 hunks): S2's
  branch tip already carries a seal-aware rewrite of the same docstring/CLI
  text #641 touched (the "AND IT DOES NOT BUILD" paragraph, the `--phase`
  choices and help text, the module docstring) — resolved by keeping S2's
  wording throughout, since it is a strict superset that already states
  #641's fact (no repository is cloned, no container build, no CLI phase for
  it) while also being consistent with the new seal paragraph in the same
  docstring (main's "the fresh materialization ... belongs to the worker
  child" would now be false: the parent does the sealing).
- tests/ideation-dashboard/test_dashboard_refresh_lane.py (1 hunk): kept
  origin/main's hardened `_code_string_literals` helper (whitespace-split
  token matching, AST-position-based docstring exclusion) over S2's inherited
  earlier draft of the same helper — a pure #641 hardening unrelated to the
  seal phase.

Verified the resolved dashboard_refresh_lane.py is byte-identical to the S2
branch tip (6358645), and the resolved test file is byte-identical to
origin/main's version, confirming no unintended content loss.

Lane: openxfactory-f2

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01TqM41pKPnpz7utYe8vanuE
Copilot AI review requested due to automatic review settings September 4, 2026 12:45
@brettheap
brettheap marked this pull request as ready for review September 4, 2026 12:45

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

Hi @brettheap! 👋

Your private repo does not have access to Sourcery.

Please upgrade to continue using Sourcery ✨

@brettheap

Copy link
Copy Markdown
Contributor Author

Lane: openxfactory-f2

Merged origin/main (which now carries #641's squash 19a777d8) into this branch, no rebase. Two conflicts, both from S2 having branched off #641's own PR branch before its final polish — resolved and detailed in the merge commit message:

New head: cf9b3bb3 (merge commit on top of 63586454). git diff origin/main --stat now shows only S2's three files (dashboard_refresh_lane.py seal additions, doc-health-reusable.yml's three finalize steps, test_dashboard_source_seal.py) — 1509 insertions / 21 deletions, nothing of #641's left in the diff.

Validated on the merged head: pytest tests/ideation-dashboard/test_dashboard_source_seal.py tests/sequenced_after → 227 passed; py_compile on dashboard_refresh_lane.py clean; doc-health-reusable.yml parses as YAML; OPENSPEC_TELEMETRY=0 openspec validate --all --strict → 89 passed, 0 failed.

Marked ready for review; PR body's landing-status line updated to reflect #641 merged.

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.

🟡 Changes recommended

verify_seal() currently trusts manifest file paths and can follow ..//absolute paths outside the seal root, which is a security boundary violation for the reference intake verification logic.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details

Suppressed comments (1)

scripts/ideation_dashboard/dashboard_refresh_lane.py:1283

  • verify_seal() treats manifest["files"] keys as trusted paths and does root / relpath, which allows ../ (or absolute / backslash) entries in a tampered manifest to escape the seal root and be hashed/validated from outside seal_dir. Since this function is the reference implementation for the child-side intake check, it should explicitly reject unsafe paths before touching the filesystem, similar to _refuse_unsafe_member().
    for relpath in sorted(files):
        path = root / relpath
        if not path.is_file():
            problems.append(f"a required path is absent: {relpath}")
            continue
  • Files reviewed: 3/3 changed files
  • Comments generated: 1
  • Review effort level: Lite

…riter never emits them (#648)

`verify_seal` is the reference for S3's child-side intake gate, so it must
not trust `manifest["files"]` keys as safe relative paths before joining
them under the seal root. Add `_contained_relpath(root, relpath)`, which
refuses an absolute path, a `.`/`..`/empty component, a backslash, a
symlink at any path component, or a resolved location outside the seal
root — BEFORE any join or open — and route every manifest-file lookup in
`verify_seal` through it. Apply the same helper on the writer side
(`seal_file_index`, and the `seal_paths`/validator joins in `seal_source`)
so the writer and the reference verifier enforce one rule rather than two
that could drift apart. Manifest schema and `tree_digest_spec` unchanged.

Add regression tests: a tampered `files` index that escapes via `..` (with
the outside file present and `tree_digest` recomputed to match), an
absolute path, a symlinked entry, and a `..`-free path that escapes through
a symlinked directory are all refused; the honest seal still verifies
(existing coverage).

Lane: openxfactory-f2
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01TqM41pKPnpz7utYe8vanuE
Copilot AI review requested due to automatic review settings September 4, 2026 13:12

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.

🟡 Changes recommended

The tar-member safety guard and the reference verifier’s correlation-id comparison should be tightened to match the intended security/verification contract.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details

Suppressed comments (1)

Previously missed (1) — in code that hasn't changed since the last review.

scripts/ideation_dashboard/dashboard_refresh_lane.py:1376

  • verify_seal() lower-cases the correlation_id when comparing it to the dispatch input. Correlation IDs are used verbatim in the artifact name and in workflow inputs, so this check should be case-sensitive (revisions can remain case-insensitive). Keeping this strict avoids the reference implementation diverging from the stated S3 verification contract (exact correlation_id match).
  • Files reviewed: 3/3 changed files
  • Comments generated: 1
  • Review effort level: Lite

Comment on lines +1077 to +1083
if not name or name.startswith("/") or name.startswith("\\"):
raise SealRefused(
f"the source archive holds an absolute member path: {name!r}")
parts = PurePosixPath(name).parts
if ".." in parts or PurePosixPath(name).is_absolute():
raise SealRefused(
f"the source archive holds a traversing member path: {name!r}")
@brettheap

Copy link
Copy Markdown
Contributor Author

Lane: openxfactory-f2

Provenance for the admin merge. RULING for lane openxfactory-f2's PR #648 (head 5628fab1): Brett Heap, 2026-09-04 ~13:05Z, in-session, verbatim: "merge 648 when green" — following "go S2 to S7" and "lets go". This is slice S2 of the nightly-refresh re-realization plan: the credentialed parent seals the bounded source artifact (--phase seal, manifest with tree_digest, revision assertion, the validator file in the seal set) and the finalize stage uploads it and gates dispatch on it; the S3 contract is in this body. Merge basis: ALL checks SUCCESS on 5628fab1 — pytest-suite, wallet-validation, signed-execution-chain-gate, merge-master-approval, openreposhape-pin, clearing-dispatch-gate, lane-line; Copilot rounds: five findings TAKEN incl. the two path-containment findings hardened in 5628fab1, one reasoned DECLINE left open (Windows-only tar backslash normalization; the seal is extracted only on the Linux child and every member is re-checked by the containment helper); Codex rate-limited (provider non-review). No substrate register row moved. --admin satisfies only the review-count rule. Squash merge at 2026-09-04T13:34Z. Session: https://claude.ai/code/session_01TqM41pKPnpz7utYe8vanuE

@brettheap
brettheap merged commit 96aa61a into main Sep 4, 2026
8 checks passed
brettheap added a commit that referenced this pull request Sep 4, 2026
…dxchart-overlay-boundary (64 -> 65)

Lane: openxfactory-max001

STEP (2) OF THE TWO-REPOSITORY ACT THIS PACKET'S OWN PROMOTION FORCED, on
Brett Heap's word "land it when green then do medxpractice" (2026-09-04).

Archiving `create-medxchart-overlay-boundary` promotes
`openspec/specs/medxchart-overlay-boundary/spec.md`, and codexFactory's
`repository_gate_floor` for this repository ENUMERATES that surface exactly,
so the new spec arrived OFF the floor and reddened the REQUIRED `pytest-suite`
in THREE places — `tests/review_lane_pin/test_floor_snapshot.py`'s LQ-A7
coverage assertion AND both of its negative controls, which guard the ordering
of that same surface and fail with it by construction — plus the advisory
`merge-master-approval` lane at stage `floor_incomplete`. That is the guard
working: a spec the floor does not carry is a spec the floor does not protect.

THE ORDER IS FORCED AND IT IS THE RUNBOOK'S
(`docs/repository-gate-floor-repair-runbook.md` in the pinned core):
codexFactory regenerates at an openxFactory commit that ALREADY carries the
new path, and only then may this pin advance onto it. codexFactory's half
landed as PR #197, MERGE COMMIT (not squash) `bfb8bde39f61d3eb4a768cdc7117a3bbc1418d2d`,
2026-09-04T14:05:07Z, regenerated by
`scripts/merge_master/generate_specs_floor_block.py` at openxFactory
`2a3b29c8` — THIS pull request's own archive commit, the first tree in
existence carrying the new path. codexFactory `main` was re-verified at that
same commit by `git ls-remote` immediately before this advance rather than
assumed: it returned `bfb8bde39f61d3eb4a768cdc7117a3bbc1418d2d refs/heads/main`.

FIVE SITES MOVE, IN ONE LOGICAL CHANGE, because the tests fail if any of them
disagree:

  contracts/review-lane-pin.yaml               core_commit  79198ac4 -> bfb8bde3
  .github/workflows/merge-master-approval.yml  PINNED_CORE_COMMIT (same)
  .github/workflows/merge-master-approval.yml  core checkout ref: (same)
  .github/workflows/pytest-suite.yml           core checkout ref: (same)
  contracts/review-lane-floor-snapshot.yaml    re-copied at the new commit

and the snapshot's declared witnesses move with it: `entry_count` 64 -> 65,
`sha256` 07e9f64d... ->
13f650b663f5dc836fa268ada40d5e5de7c38c8ede337d840f8004aeefd7312a.

THE SNAPSHOT IS A WITNESS AND WAS NOT HAND-EDITED (CSC-C7). It is a byte copy
of the floor at the pinned core, and BYTE IDENTITY WAS GATED, not asserted:
the completion script REFUSES unless (a) `bfb8bde3` is an ancestor of
codexFactory `origin/main` and (b) the sha256 of
`git show <sha>:scripts/merge_master/openxfactory-review-authority-floor.yaml`
equals the recorded value. Both gates passed. Verified three independent ways:
sha256 as above over 12599 bytes; GIT'S OWN CONTENT ADDRESSING — the vendored
file's blob sha equals the one codexFactory's tree carries at that path and
commit, `39289deafa9cce609e2f7600a8996cac683cad1e`; and the freshness
comparison in `test_floor_snapshot.py` — which SKIPS when the core is absent —
was additionally run WITH the core on disk (`PINNED_CORE_CHECKOUT=...`):
56 passed, ZERO skipped, so the byte-for-byte assertion CI performs actually
ran here.

THE FLOOR GREW BY EXACTLY ONE AND IT IS THE SPEC. No chokepoint arrives with
it. The whole diff against `79198ac4`: one added entry line, the generated
block's three regeneration fields (`generated_at` and its `--ref`
`c236c6b1` -> `2a3b29c8`, `entry_count` 56 -> 57), and the document's two
"8 + 1" self-descriptions moving 64 -> 65. The EIGHT hand-reasoned chokepoints
are untouched. Coverage MEASURED on this branch's tree: 57 tracked paths under
`openspec/specs`, all 57 floored, 0 uncovered, 0 dead.

THE PIN NAMES `bfb8bde3` WHILE THE FLOOR WAS GENERATED AT `2a3b29c8`, AND THE
BRANCH HEAD IS LATER THAN BOTH — the same shape #647 shipped, and MEASURED
rather than waved through: `git ls-tree -r --name-only <ref> openspec/specs`
returns the IDENTICAL 57-path set at `2a3b29c8` and at the head (the commit
between them is a Copilot fix to one archived-change file, which promotes
nothing), and `2a3b29c8` is an ancestor of the head.

NO COLLISION, MEASURED. `main` (`96aa61a3`) carries 56 tracked spec paths and
this branch 57 — main's set is a PROPER SUBSET, so no spec exists on main that
`2a3b29c8` failed to enumerate. The two commits main gained since this branch
was cut (#651 doc-health preflight, #648 nightly-refresh source seal) promote
no capability and add no spec, so neither can shorten the floor. One
regeneration at one tree is sufficient and the second-lander remedy is not
engaged.

HISTORICAL PROSE PRESERVED. The four live literals moved; every remaining
`79198ac4` in these files is history describing the 12:25 advance (PR #195,
its regeneration tree, the ancestry chain) and was left standing. The prior
notes gained a forward pointer rather than a rewrite.

LIVE CLAIMS RE-MEASURED, NOT CARRIED OVER. The divergence paragraph's counts
(sixty-four -> sixty-five, fifty-six -> fifty-seven spec paths), the
`pinned_members` counts (SIXTY-FOUR -> SIXTY-FIVE, FIFTY-SIX -> FIFTY-SEVEN),
and the snapshot's `generated_at` non-member note (`c236c6b1` -> `2a3b29c8`)
all move with the pin. Historical sentences do not.

LOCKSTEP RE-MEASURED RATHER THAN CARRIED OVER: both xFactory judging surfaces
still name `f4702f64`, read 2026-09-04 AT THIS ADVANCE directly off xFactory
`main` (`merge-master-approval.yml` line 146 and `council-convening-lane.yml`
line 302), so `lockstep.status` stays `diverged` and the obligation to
converge at a future re-point ceremony stands undischarged. THE GAP WIDENED BY
ONE MORE ENTRY, not by a new kind of divergence. That value is written SHORT
in the prose on purpose: this file's own guard
`test_the_pin_carries_exactly_one_commit_shaped_value` permits exactly ONE
40-hex token in it, and that one is `core_commit` — writing `f4702f64` in full
reds the required suite, which is how the constraint was found rather than
assumed.

TWO ADVANCES IN ONE DAY IS THE FEATURE'S CADENCE AND A THIRD IS ALREADY OWED.
Every openxFactory archive promoting a NEW capability owes one, because the
floor is an EXACT ENUMERATION. `add-subject-establishment` paid it at
12:25:19Z and this packet at 14:05:07Z, one hundred minutes apart. The sibling
`create-medxpractice-overlay-boundary` will take the floor 65 -> 66; folding
it into #197 would have put a DEAD entry on this tree, which is the state
LS-A2 exists to prevent. One regeneration per landed tree, in order.

Validated: `pytest tests/review_lane_pin` = 55 passed, 1 skipped, 18 subtests
(that one skip being the freshness comparison, separately exercised green with
the core present: 56 passed, 0 skipped); `openspec validate --all --strict` =
90 passed, 0 failed; `scripts/validate-sequenced-after.py .` passed and
`--ledger-diff` consistent (165 rows); `pytest tests/sequenced_after` = 162
passed; doc-health `--single-repo` finding set still BYTE-IDENTICAL to main
(6 critical / 4 error / 27 warning / 16 info, 0 new regressions); all four
YAML files re-parse.

Refs #608

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01H9aKd8YF3ktcLmVJJxQYKv
Lane: openxfactory-max001
brettheap added a commit that referenced this pull request Sep 4, 2026
…lay-boundary

Lane: openxfactory-max001

MERGED, NOT REBASED — force-pushing is forbidden here and this branch carries
merged bot rounds. Taken because #654 read CONFLICTING at `dd76e7fe`, and a
conflicting pull request does not DISPATCH its `pull_request` workflows at all:
only `merge-master-approval` (a `pull_request_target` lane) ran at that head,
which is why the REQUIRED `pytest-suite` never appeared rather than never
finished.

MAIN GAINED THREE COMMITS since `48dc9b67`: #651 (doc-health preflight
initializing MedxEHR's nested submodules), #648 (nightly-refresh source seal)
and #643 (ARCHIVE of `add-consumer-identity-namespace`). Only the third
collides, and only in two files.

ONE CONFLICT, IN README.md, AND BOTH SIDES ARE KEPT. Two archives landed the
same day and each inserted its row at the top of `Archived changes:`. Resolved
by keeping BOTH rows — this packet's above `add-consumer-identity-namespace`'s,
newest-lander first, which is the order that list already reads in. Neither
row is edited, shortened or merged into the other. The two ACTIVE-section
removals (one per side) sat in different regions and auto-merged; verified
after the fact that neither active row survives.

THE LEDGER AUTO-MERGED AND THE ROWS ARE NAMED RATHER THAN COUNTED. Against
`origin/main` the merged ledger differs in EXACTLY ONE row, and it is ours:

  create-medxchart-overlay-boundary: active -> archived, moved_by "#654"

Main's own row from #643 —
`add-consumer-identity-namespace: {state: archived, class: co-modifier, ..., moved_by: "#643", moved_on: "2026-09-04"}`
— is carried verbatim from main's side, unstamped by this lane. No partner
flipped on either side, so NO MOVEMENT LOG ENTRY IS OWED by this merge, and
`tests/sequenced_after/test_sweep.py` is byte-identical to main's copy, so
main's MOVEMENT LOG lines are retained verbatim rather than re-derived.

THE FIVE PIN SITES ARE KEPT AT OURS, DELIBERATELY. Main did NOT advance its
review-lane pin in these three commits: it still names `79198ac4` with the
64-entry floor. `bfb8bde3` is STRICTLY AHEAD of it (codexFactory PR #197 merged
at 14:05:07Z, with `79198ac4` as an ancestor), and taking main's side would
re-introduce the very `floor_incomplete` refusal this branch exists to repair.
So `core_commit`, both `merge-master-approval.yml` literals,
`pytest-suite.yml`'s core checkout `ref:` and the vendored snapshot
(`entry_count` 65, `sha256` 13f650b6…) all stand at ours. Nothing of main's is
discarded by that: `bfb8bde3` contains `79198ac4` by ancestry.

NO FLOOR COLLISION, MEASURED. #643 promotes into an EXISTING capability
(`credential-contracts`, a MODIFIED block) and adds NO spec path, so `main`
still carries 56 tracked paths under `openspec/specs` against this branch's 57
— main's set remains a PROPER SUBSET, no spec exists on main that `2a3b29c8`
failed to enumerate, and the second-lander regeneration remedy is not engaged.

Gates on the merged tree: `openspec validate --all --strict` 89 passed, 0
failed (32 active + 57 specs — one fewer active than before the merge because
#643 archived its own); `validate-sequenced-after.py .` passed (32 active, 2
declaring); `--ledger-diff` consistent, 165 rows, active co-modified/sole
20/13 -> 19/13 on #643's archive; `pytest tests/review_lane_pin
tests/sequenced_after` 217 passed, 1 skipped, 18 subtests, and
`tests/review_lane_pin` 56 passed / ZERO skipped with `PINNED_CORE_CHECKOUT`
set, so the byte-for-byte snapshot comparison ran here too.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01H9aKd8YF3ktcLmVJJxQYKv
Lane: openxfactory-max001
brettheap pushed a commit that referenced this pull request Sep 4, 2026
…file

Bot round 1 (Copilot), one thread, PARTIALLY TAKEN.

Copilot: the note asserts the child keeps `manifest.json` and `recipe/` out of
the Docker build context, which "isn't established elsewhere in this packet
(and could be false if the seal root is used as the build context)".

The factual half is DECLINED — the claim is true. But the grounding half is
TAKEN, and it caught a real ambiguity: openxFactory #648's own S3 contract had
proposed the SEAL ROOT as the build context with `manifest.json` and `recipe/`
merely "inert" in it, so a reader following that contract would conclude
exactly what Copilot suspected. #243 chose the leaner assembled shape instead.

Settled against the LANDED file rather than either PR body:
`.github/workflows/dashboard-image-worker.yml` at `84dbbb24` runs
`docker build -f "$GITHUB_WORKSPACE/$SEAL_DIR/recipe/Dockerfile" -t "$REF"
"$GITHUB_WORKSPACE/ctx"` — the context is `ctx/`, assembled by copying
`CONTEXT_ROOTS` out of `<seal>/openxFactory` — and the file carries the
assertion in its own comment ("the daemon receives a lean tree and neither
manifest.json nor recipe/ reaches it"), plus a guard that fails when the
assembled context is missing the renderer packages.

The note now states the mechanism, names the divergence from #648's contract
and why #243's shape is also what the ratified requirement's "the assembled
workspace shape as context" says, and cites the landed file and its comment.

Lane: openxfactory-f2
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01X5cVGVtCbMg1WBwU7AbMZq
brettheap added a commit that referenced this pull request Sep 4, 2026
…d; S7 and the first nightly owed before archive) (#655)

* add-nightly-dashboard-refresh: record the re-realization (S1-S5 landed; S7 and the first nightly owed)

Slice S6 of plan-nightly-refresh-rerealization-2026-09-04.md, doc-only.
Brett's words: "go S2 to S7", then "lets go".

The re-ratified amendment created a code/spec disagreement its own proposal
declined to assess. Five PRs closed it; this records them in the packet, with
every squash sha verified merged at the gate rather than read out of a handoff:

  S1  openxFactory #642  bbc21e4  --generated-at on the generate CLI
  S4  openxFactory #641  19a777d  the module's raw-clone --phase build retired
  S2  openxFactory #648  96aa61a  the parent seals the bounded source artifact
  S3  opensoft/xFactory #243  84dbbb24  the child consumes it, holds no Git credential
  S5  Omnigent-Install #211  cdfe3152  the worker profile describes the sealed intake

tasks.md — no checkbox moves (3.2/3.3/3.4/4.1/3.6 were already ticked; 3.6 by
#642). Each of those five gains a dated REALIZED evidence note naming the PR
and its squash. The stale note in 3.4 that still described the child as running
`dashboard-refresh-nightly.py --phase build` is CORRECTED by an appended,
dated note rather than an edit — the sentence is retained text, and #641's body
flagged it for this slice. Task 7.6 gains the size measurement and stays
UNTICKED, because its staleness half needs a live run. New § 9a records the five
acts, the four remaining S7 host acts (act D is DELETED, not deferred), and
§ 9's not-re-verified list carried forward.

design.md — three notes. (a) The disambiguation owed to PR #595's DECLINED
review thread: "host clone" in the sealed-artifact failure scenario means a
clone on the WORKER host, and the parent's materialization is the prior
scenario's requirement, so the two scenarios do not contradict when read in
order. (b) What the manifest attests versus corroborates: verification step 5
is an INTERNAL-CONSISTENCY check (both sides come from one manifest), and the
independent anchors are correlation_id, artifact_name, parent_run_id and
parent_repository (#243's finding) — plus open question 7's sealed-but-not-baked
validator asymmetry and #243's equality-not-presence check on generated_at.
(c) The sealed source measures 3511 files / ~35.1 MB, recorded beside the
design's ~8 MB estimate, which is low by a factor of four.

proposal.md — § AMENDED AFTER RATIFICATION gains a dated REALIZED subsection
listing the five PRs and stating what S7 still owes. Status: ratified and the
single Ratified: citation line are untouched (grep -c = 1).

README.md — the OpenSpec Records entry's lifecycle sentence gains the
re-realization state; no entry added, removed or reordered. Substrate row 3
claimed on issue #630 before the push, per protocol Rule 7.

The ARCHIVE GATE STAYS OPEN. S1-S5 make the lane exercisable, which is not
exercised: the evidence is one real nightly's pin PR merged and reconciled plus
one wider diff refused and parked, and that is S7's.

Refs #591

Lane: openxfactory-f2
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01X5cVGVtCbMg1WBwU7AbMZq

* Ground the build-context claim in task 3.2 against the landed worker file

Bot round 1 (Copilot), one thread, PARTIALLY TAKEN.

Copilot: the note asserts the child keeps `manifest.json` and `recipe/` out of
the Docker build context, which "isn't established elsewhere in this packet
(and could be false if the seal root is used as the build context)".

The factual half is DECLINED — the claim is true. But the grounding half is
TAKEN, and it caught a real ambiguity: openxFactory #648's own S3 contract had
proposed the SEAL ROOT as the build context with `manifest.json` and `recipe/`
merely "inert" in it, so a reader following that contract would conclude
exactly what Copilot suspected. #243 chose the leaner assembled shape instead.

Settled against the LANDED file rather than either PR body:
`.github/workflows/dashboard-image-worker.yml` at `84dbbb24` runs
`docker build -f "$GITHUB_WORKSPACE/$SEAL_DIR/recipe/Dockerfile" -t "$REF"
"$GITHUB_WORKSPACE/ctx"` — the context is `ctx/`, assembled by copying
`CONTEXT_ROOTS` out of `<seal>/openxFactory` — and the file carries the
assertion in its own comment ("the daemon receives a lean tree and neither
manifest.json nor recipe/ reaches it"), plus a guard that fails when the
assembled context is missing the renderer packages.

The note now states the mechanism, names the divergence from #648's contract
and why #243's shape is also what the ratified requirement's "the assembled
workspace shape as context" says, and cites the landed file and its comment.

Lane: openxfactory-f2
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01X5cVGVtCbMg1WBwU7AbMZq

* Copilot round 2: reconcile the README amendment dates, qualify the readiness paths by repository

Four findings, all in Copilot's suppressed set (no new inline threads).
Two TAKEN as reported, one TAKEN with the remedy corrected, one TAKEN.

1. README amendment dates CONFLICT — TAKEN, and it was a REAL pre-existing
   contradiction my sentence made visible. The entry said "WAS AMENDED
   2026-09-04 AND RE-RATIFIED THE SAME DAY" while its very next sentence said
   "authored 2026-09-01", and `proposal.md`'s front-matter `Amended:` line —
   the authoritative one — reads 2026-09-01. Reconciled to the real sequence:
   RULED 2026-09-01, reached this repository 2026-09-04 by rescue (PR #595),
   re-ratified that same day. Both halves of the entry now say it, and the
   entry names the front-matter line as authoritative.

2 + 4. `worker_readiness.py` "does not exist in this repository" — the
   observation TAKEN, the proposed remedy DECLINED. Measured, not assumed:
   `scripts/worker_readiness.py` AND `scripts/check-worker-readiness.py` both
   live in `opensoft/xFactory`, and NEITHER is a path in openxFactory. They are
   not two spellings of one entrypoint to be unified — `check-worker-readiness`
   is the CLI and imports `from worker_readiness import evaluate`, and the gate
   predicate this packet is about (`repository_credentials_present`) is in the
   module. openxFactory's `doc-health-reusable.yml` invokes the CLI by a
   relative path that resolves in the CALLER's checkout, because it is a
   REUSABLE workflow — which is exactly why neither file is here. So both
   references are now qualified by repository and the CLI/module relationship
   is stated, rather than one name being rewritten into the other and losing
   the distinction.

3. "STILL STAYS OPEN" redundant — TAKEN, now "STAYS OPEN".

Validation on this head: openspec validate <change> --strict valid;
--all --strict 89 passed / 0 failed; pytest -q tests/doc-health
tests/sequenced_after 1714 passed; grep -c on the Ratified: line = 1.

Lane: openxfactory-f2
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01X5cVGVtCbMg1WBwU7AbMZq

* Copilot round 3: the phase list matches the CLI's own order

One finding, TAKEN. The 3.4 correction note listed the surviving phases as
`decide | pin | report | seal | record-pr`, but `dashboard_refresh_lane.py`
declares `choices=("decide", "seal", "pin", "report", "record-pr")` — so a
reader who hit `--phase build` would see a usage error listing them in a
different order than this note. Matched to the tuple verbatim, and the note now
says that is where the order comes from, so the next edit has a reason to keep
them in step.

Validation on this head: openspec validate <change> --strict valid;
--all --strict 89 passed / 0 failed; pytest -q tests/doc-health
tests/sequenced_after 1714 passed; grep -c on the Ratified: line = 1.

Lane: openxfactory-f2
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01X5cVGVtCbMg1WBwU7AbMZq

---------

Co-authored-by: Brett Heap <[email protected]>
Co-authored-by: Claude Fable 5.1 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants