Repository navigation
doc-health-nightly: mint one App token per foreign owner (xFactory#366) - #831
Conversation
…odule owner The nightly has produced 0 artifacts since 2026-09-05, from two defects in the same block of `doc-health-reusable.yml` — the credential rewrites that let `Init governed submodules only` clone a submodule set that spans organizations. Both are fixed here; neither alone would return the run to green. DEFECT A, opensoft/xFactory#366 — one foreign owner only. `Detect foreign submodule owners` refused any count above one, because `actions/create-github-app-token` mints ONE owner per step and the second mint+rewrite pair "has to be written by hand". The aggregation then admitted a second: commit 99f1643 ("Repoint the LedgerxFactory submodule at ledgerXfactory, its own enterprise org", 2026-09-07 16:49Z) left `xFactories/MedxFactory` and `xFactories/MedxEHR` on `MedxSoft` and moved `xFactories/LedgerxFactory` to `ledgerXfactory`, so from 2026-09-08 the nightly died in that step before a single bundle was built (opensoft/xFactory runs 34180399272, 34303636250). The pairs are now written: three numbered mint slots, guarded on their own slot output, and one rewrite step that credentials every filled slot. Above the slot count it still refuses, still names the owners, and now names the exact edit that raises the ceiling. DEFECT B — one URL FORM only. Both rewrites keyed on `[email protected]:`, and `xFactories/MedxEHR`'s own `.gitmodules` declares its `spec`/`code` legs as `https://github.com/MedxSoft/MedxEHR-{spec,code}.git`. So the first nightly after the nested-leg init landed (#651, `b4216821`, 2026-09-04 13:30Z) died `fatal: could not read Username for 'https://github.com': No such device or address` — runs 33939303830 (09-05), 34006720351 (09-06), 34076748501 (09-07), the three nightlies before defect A moved the failure one step earlier. `.gitmodules` is the authority on the URL as well as the owner and is free to spell either form, so each owner is credentialed in both. WHAT IS NOT CHANGED. The broad `[email protected]:` org rewrite stays and stays broad — longest prefix wins, so the per-owner keys narrow it rather than replace it, and the zero-foreign and one-foreign paths behave exactly as before. The App's permissions are untouched: the same `XFACTORY_APP_ID` / `XFACTORY_APP_PRIVATE_KEY` pair, no `permission-*` inputs, no `|| github.token` fallback on any foreign mint. The self owner is deliberately NOT given an https key: every `opensoft`-owned governed submodule and every nested leg the init touches under one is declared `[email protected]:`, and a narrow `https://github.com/opensoft/` key would also capture the checked-out repository's own origin URL that the report-delivery lanes push through. ONE OPERATOR ACT REMAINS, AND IT NOW SAYS SO. Measured 2026-09-09 as an admin of all three organizations: the `openxfactory` App (id 4253636) is installed on `opensoft` (installation 145372182, all repositories) and on `MedxSoft` (157085693, all repositories) — and `ledgerXfactory` has NO App installations at all (`GET /orgs/ledgerXfactory/installations` → `total_count: 0`). `create-github-app-token` cannot mint for an organization it is not installed on, so slot 2 will not resolve until someone installs the App on `ledgerXfactory`. `LedgerxFactory` is private, so there is no anonymous fetch to fall back to, and `SUBMODULE_TOKEN` is not configured on opensoft/xFactory. Rather than sweep a corpus with a governed repository silently missing — a gate, quietly narrowed — the rewrite step fails the run with a finding that names the organization, the slot, and the operator act. The mint steps carry `continue-on-error` for exactly that reason: it is not a fallback, it is what lets the failure be named instead of being this action's own API error. VALIDATION. `tests/doc-health/test_submodule_owner_tokens.py` (19 tests): structural assertions that the slot count is written in ONE place and equals the mint steps present in BOTH jobs, that each mint reads its own slot and defers its failure, that both URL forms are written per owner with `--add` (`insteadOf` is multi-valued), that the broad rewrite stays broad, and that the two jobs' blocks are byte-identical after a YAML round trip; plus behavioral tests that RUN the two shell steps against synthetic `.gitmodules` trees and read the resulting git config back through `git ls-remote --get-url`, because "longest prefix wins" is a property of git. Zero, one, two and four foreign owners are all exercised, as is a filled slot whose token is empty. 19 passed, 0 skipped; the 277 tests of every module that reads this workflow pass unchanged. Refs opensoft/xFactory#366, opensoft/xFactory#346, #591 Lane: openxfactory-3 Co-Authored-By: Claude Fable 5.1 <[email protected]> Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01YCvrAkCLaytaYBMtZbQwun
There was a problem hiding this comment.
Hi @brettheap! 👋
Your private repo does not have access to Sourcery.
Please upgrade to continue using Sourcery ✨
|
@codex review |
…ive is its own refusal `SLOTS` reaches the rewrite step from the detection's output. An empty or non-numeric value would make the loop a no-op — `[ 0 -lt "" ]` aborts under `set -e` with git's own "integer expression expected", and `[ 0 -lt 0 ]` simply loops zero times — and in the second shape the step reports SUCCESS having credentialed no owner at all. That is a silent pass on exactly the path opensoft/xFactory#366 is about, so the step now refuses by name instead, in both jobs. Two tests, one behavioral over the empty/zero/non-numeric values and one structural for the twin. Lane: openxfactory-3 Co-Authored-By: Claude Fable 5.1 <[email protected]> Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01YCvrAkCLaytaYBMtZbQwun
There was a problem hiding this comment.
🟡 Changes recommended
The new tests embed token-like literals and compare full credential-bearing URLs, which can trigger secret masking/scanning noise; the assertions should be adjusted to use neutral placeholders and validate routing without embedding full credentialed URLs.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR updates the reusable doc-health workflow to support multiple governed submodule owners by minting one GitHub App installation token per foreign owner (in fixed “slots”), and adds a dedicated test suite to pin the workflow’s structural wiring and the behavior of the two critical shell steps (detect + rewrite).
Changes:
- Extend
.github/workflows/doc-health-reusable.ymlto detect up toFOREIGN_OWNER_SLOTSforeign owners, mint up to N per-owner app tokens, and rewrite both[email protected]:andhttps://github.com/URL forms. - Fail closed with a targeted, owner-naming error when a required foreign-owner token cannot be minted (e.g., App not installed).
- Add
tests/doc-health/test_submodule_owner_tokens.pywith structural assertions and behavioral execution of the workflow’s shell scripts.
File summaries
| File | Description |
|---|---|
.github/workflows/doc-health-reusable.yml |
Implements slot-based per-owner token minting and dual-form URL rewrites in both prepare and finalize jobs. |
tests/doc-health/test_submodule_owner_tokens.py |
Adds structural + behavioral tests to prevent regressions in the per-owner token mechanism and URL rewrite behavior. |
Review details
Suppressed comments (2)
tests/doc-health/test_submodule_owner_tokens.py:347
- Same token-like placeholder issue here:
ghs_*values and full URL equality assertions can trip secret masking/scanning and make failures harder to interpret. Use non-token-like placeholders and assert routing via substring/suffix checks instead of embedding full credentialed URLs.
"https://x-access-token:[email protected]/opensoft/codexFactory.git"
def test_an_unmintable_owner_fails_the_run_naming_the_owner(tmp_path):
done, resolve = run_rewrite(tmp_path, {
tests/doc-health/test_submodule_owner_tokens.py:334
- This test also uses
ghs_*-prefixed token placeholders and compares full rewritten URLs. Using neutral placeholders and checking token selection + suffix keeps the intent while avoiding token-like literals in the repository and reducing masking noise in logs.
"ledgerXfactory/LedgerxFactory.git")
def test_the_broad_rewrite_still_serves_every_other_owner(tmp_path):
- Files reviewed: 2/2 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…eticity shim lives in TWO REVIEW NOTES, ONE OF THEM DECLINED IN HALF. Copilot asked for two things about the behavioral tests: stop using `ghs_`-shaped placeholder tokens, and stop asserting the full rewritten URL. The first is taken. A `ghs_`-prefixed literal reads as a real installation token to a secret scanner and to a human, and neither cost is worth the realism; the placeholders are now `medx-installation-token`, `ledger-installation-token` and `caller-org-token`, which also say what they are at the point of failure. The second is declined, with the reason written next to the fixture: "longest prefix wins" is precisely a claim about the WHOLE resolved string, so a substring or suffix check would still pass for a rewrite that routed the right owner to the WRONG token — the exact failure this file exists to catch. `x-access-token:` stays in the expectation because it is the literal git rewrite target, not a credential. Separately, the two subprocess fixtures no longer hand the steps a hardcoded `PATH`. `tests/hermeticity.py` works BY PATH, so replacing the environment stepped around the shim, and a hardcoded PATH is also how a suite that passes on a runner fails on a developer's machine. They now inherit the environment and remove only what could leak in — the ambient git config vars and every name the steps themselves read. Lane: openxfactory-3 Co-Authored-By: Claude Fable 5.1 <[email protected]> Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01YCvrAkCLaytaYBMtZbQwun
|
Lane: openxfactory-3 (openXfactory-3) Head is now @codex review |
|
Codex Review: Didn't find any major issues. You're on a roll. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
There was a problem hiding this comment.
🟢 Approval recommended
The workflow change is well-scoped, duplicated safely across both jobs, and is backed by targeted structural and behavioral tests that guard against the known failure modes.
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0 new
- Review effort level: Lite
There was a problem hiding this comment.
🟢 Approval recommended
The workflow and tests appear internally consistent and address the stated failure modes; the remaining feedback is limited to test output/log maintainability.
Review details
Suppressed comments (2)
tests/doc-health/test_submodule_owner_tokens.py:365
- These equality asserts will cause pytest to dump the full resolved URL values on failure; in environments that redact
x-access-token:URLs this tends to replace the sensitive portion with******, obscuring what changed. Prefer comparing against an expected URL built at runtime and raising a custom AssertionError so failures stay readable without printing credential-bearing URLs.
assert resolve("[email protected]:MedxSoft/MedxEHR.git") == \
"https://x-access-token:[email protected]/MedxSoft/MedxEHR.git"
assert resolve("[email protected]:opensoft/codexFactory.git") == \
"https://x-access-token:[email protected]/opensoft/codexFactory.git"
tests/doc-health/test_submodule_owner_tokens.py:380
- Same issue as above: this assert will print credential-bearing URLs on failure (and may be redacted to
******..., which hides useful diffs). Use a custom AssertionError and build the expected URL at runtime to preserve strict equality without exposing the full URL in test output.
assert resolve("[email protected]:MedxSoft/MedxEHR.git") == \
"https://x-access-token:[email protected]/MedxSoft/MedxEHR.git"
- Files reviewed: 2/2 changed files
- Comments generated: 1
- Review effort level: Lite
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4ccc586a63
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Copilot's second round (it recommends approval; this was its remaining note): the three behavioral tests each typed a full credential-bearing URL as a literal, which some review and CI environments redact to `******github.com/...` and which is three places for the expectation to drift from the rewrite it checks. A `credentialed(token, owner, repo)` helper now builds it, so the routing a test claims is readable as "this owner routes to this token" instead of having to be reassembled by eye. The half asked for and NOT taken: raising a custom AssertionError that does not print the URLs. Strict equality on the WHOLE string is the "longest prefix wins" claim, and pytest's own diff is the most useful thing a reader gets when it breaks; suppressing it would trade a real diagnostic for the appearance of a secret that is not one — these are placeholder strings that never leave a `GIT_CONFIG_GLOBAL` under `tmp_path`. Lane: openxfactory-3 Co-Authored-By: Claude Fable 5.1 <[email protected]> Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01YCvrAkCLaytaYBMtZbQwun
Codex, on PR #831: when `XFACTORY_APP_PRIVATE_KEY` is absent but the caller supplies the documented `SUBMODULE_TOKEN`, every per-owner mint is skipped by its `HAS_APP_KEY` guard — and with it the only step that wrote an `https://github.com/<owner>/` rewrite. The pre-checkout broad rewrite gives the PAT the ssh form ONLY, so a private https leg such as MedxEHR's `spec` stayed unauthenticated and `Init governed submodules only` still failed despite a valid fallback credential. That is defect B of xFactory#366 living on in the fallback path, and the finding is correct. Codex offered two remedies and this takes the first: honor the fallback rather than delete it from the contract. A new step, guarded on `HAS_APP_KEY != 'true'`, credentials the https form for every owner `.gitmodules` declares, from `SUBMODULE_TOKEN || github.token` — the same chain the broad step uses. A PAT is not an installation token, so it needs no slot, only the owner list; the detection now also emits `owners_all` (self and foreign, deduplicated) for exactly this reader. SCOPED TO DECLARED OWNERS, WHICH IS WHY IT IS A SEPARATE STEP rather than a second line in the pre-checkout rewrite. A broad `https://github.com/` key would also capture the checked-out repository's own origin URL that the report-delivery lanes push through; per-owner keys cannot reach it — and `.gitmodules` is not readable before the checkout anyway. Seven tests, four of them behavioral over the real step: the private https leg resolves to the fallback token, a self-owned https leg does too, an owner nobody declared is left untouched (the origin case), an empty owner list is a no-op rather than a failure, and the App path and the fallback path are proven mutually exclusive. 28 passed / 0 skipped; 187 more in every module coupled to this workflow, including the openXwallet lane-wiring order guard around `Init governed submodules only`. Lane: openxfactory-3 Co-Authored-By: Claude Fable 5.1 <[email protected]> Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01YCvrAkCLaytaYBMtZbQwun
|
Lane: openxfactory-3 (openXfactory-3) Head is now @codex review |
There was a problem hiding this comment.
🟢 Approval recommended
The workflow changes are internally consistent across both jobs and are backed by targeted structural + behavioral tests that exercise the critical detection and URL rewrite logic.
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0 new
- Review effort level: Lite
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Lane: openxfactory-3 (openXfactory-3) The whole credential sequence, run against
|
URL as .gitmodules declares it |
resolves to |
|---|---|
[email protected]:opensoft/openxFactory.git |
…:[email protected]/opensoft/openxFactory.git |
[email protected]:MedxSoft/MedxFactory.git |
…:[email protected]/MedxSoft/MedxFactory.git |
[email protected]:MedxSoft/MedxEHR.git |
…:[email protected]/MedxSoft/MedxEHR.git |
[email protected]:ledgerXfactory/LedgerxFactory.git |
…:[email protected]/ledgerXfactory/LedgerxFactory.git |
https://github.com/MedxSoft/MedxEHR-spec.git |
…:[email protected]/MedxSoft/MedxEHR-spec.git |
https://github.com/MedxSoft/MedxEHR-code.git |
…:[email protected]/MedxSoft/MedxEHR-code.git |
[email protected]:opensoft/openXwallet.git |
…:[email protected]/opensoft/openXwallet.git |
https://github.com/opensoft/xFactory (the checkout's own origin) |
unchanged |
Rows 5 and 6 are defect B — the two nested legs that reddened 2026-09-05..07 — and the last row is the reason the https keys are per-owner rather than broad: the origin URL the report-delivery lanes push through is never captured.
The token values above are placeholders; nothing here reached the network or a real App.
There was a problem hiding this comment.
🟢 Approval recommended
The workflow changes are internally consistent, validated by extensive new tests that execute the key shell logic, and no correctness issues were found in the updated steps.
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0 new
- Review effort level: Lite
|
Lane: openxfactory-3 (openXfactory-3) |
Lane: openxfactory-3 (openXfactory-3)
Authority. Brett Heap, 2026-09-09 ~05:5xZ, recorded on #591: "do 364, 365 and 366".
Where this lands, and why not the aggregation. opensoft/xFactory#366 names
.github/workflows/doc-health-nightly.yml. That caller is 76 lines and owns only scheduling, dispatch and permissions; the failing step lives in the reusable workflow it calls —opensoft/openxFactory/.github/workflows/doc-health-reusable.yml@main, resolved in the failing run as870727fd. The aggregation repository contains no step namedDetect foreign submodule ownersand nocreate-github-app-tokenstep for a submodule owner (grepover its.github/andscripts/finds neither), so there is nothing there to change. The caller pins@main, so this change takes effect on the next nightly with no aggregation pin-sync — nothing in xFactory is touched, and in particular nothing nearreview-lane.yml,merge-master-approval.yml,council-convening-lane.yml, the codexFactory pin triple orMIGRATION_PIN.Root cause — two defects, not one
The issue reports the nightly "always at the same step". Measured per run, it is two defects in the same block, and neither alone returns the run to green:
Init governed submodules onlyInit governed submodules onlyInit governed submodules onlyDetect foreign submodule ownersDetect foreign submodule ownersDefect A — one foreign owner only (what xFactory#366 names). From run 34303636250:
The step refused any count above one by design, on the reasoning that a second pair "has to be written by hand". The aggregation then admitted a second owner: commit
99f1643("Repoint the LedgerxFactory submodule at ledgerXfactory, its own enterprise org", 2026-09-07 16:49Z) leftxFactories/MedxFactoryandxFactories/MedxEHRonMedxSoftand movedxFactories/LedgerxFactorytoledgerXfactory. From the next nightly the run died there, in both theprepareandfinalizejobs, before a single bundle was built — 0 artifacts, which is also why the cataloger and organizer lanes'GITHUB_SHA != source_shaprovenance gate could not be passed in the xFactory#346 re-run.Defect B — one URL form only (not named in the issue; it is what the three earlier nightlies died of, and it is uncovered the moment defect A is fixed). Both rewrites keyed on
[email protected]:, andxFactories/MedxEHR's own.gitmodulesdeclares its two legs as https:An ssh-keyed
insteadOfnever matched those, so the first nightly after the nested-leg init landed (openxFactory#651,b4216821, 2026-09-04 13:30Z — the green 09-04 run was at 02:32Z, before it) died withfatal: could not read Username for 'https://github.com': No such device or addressonxFactories/MedxEHR/spec. A private repository, made to look like an anonymous fetch.Design
FOREIGN_OWNER_SLOTSnumbered mint slots, three today for two owners, in both jobs:Detect foreign submodule ownerskeeps reading owners from.gitmodules(never a hardcoded organization) and now emitscount,slotsandowner_1..owner_N— every slot written, filled or empty. It refuses only above the slot count, still naming every owner, and now naming the exact edit that raises the ceiling.Mint app token for foreign submodule owner N× 3, each guarded onowner_N != '', eachcontinue-on-error: true. That is not a fallback — there is still no|| github.tokenon any foreign mint. It is what lets the next step turn "no token for owner X" into a finding that names X, instead of stopping on the action's own API error, which names neither the submodule that needed the token nor any remedy.Rewrite foreign-owner submodule URLsstep credentials every filled slot, in both URL forms, withgit config --add(insteadOfis multi-valued, so the second form would otherwise replace the first).slotsoutput. A slot count that did not arrive is its own refusal: an empty or non-numericSLOTSwould leave the loop a no-op with the step reporting SUCCESS having credentialed nobody.Rewrite governed submodule https URLs for the fallback token, guarded onenv.HAS_APP_KEY != 'true', honors the documentedSUBMODULE_TOKENpath (Codex's P2, taken). With no App key every per-owner mint is skipped, and with it the only step that wrote an https key, so a private https leg stayed unauthenticated behind a perfectly good PAT. A PAT is not an installation token, so it needs no slot, only the owner list — the detection also emitsowners_allfor exactly this reader. It is scoped to the owners.gitmodulesdeclares, not tohttps://github.com/at large, precisely so the checked-out repository's own origin URL cannot be captured.Two alternatives were considered and not taken. A matrix job would have to pass installation tokens between jobs as outputs. Signing the App JWT by hand in shell would scale to N owners with no slots, but puts the private key on disk and hand-rolls RS256 in a nightly gate; the slots are literally what the existing error message asked for. The issue's option (b), narrowing the nightly's submodule-owner scope, is available to an operator as a stopgap but is not taken here: it narrows the swept corpus, which is a gate.
App-installation measurement, per owner
Measured 2026-09-09 as an admin of all three organizations (
GET /user/memberships/orgs/ledgerXfactory→{"role":"admin","state":"active"}, so the empty reading below is authoritative and not a permissions artifact). The App behindXFACTORY_APP_IDisopenxfactory, app id 4253636, owneropensoft— the MedxSoft installation id matches the one the workflow's own comment records.openxfactoryApp installationopensoftMedxSoftspec/codelegs)ledgerXfactoryGET /orgs/ledgerXfactory/installations→{"total_count":0,"installations":[]}So one operator act remains, and the workflow now says so by name.
create-github-app-tokencannot mint for an organization the App is not installed on, so slot 2 will not resolve until someone installsopenxfactoryonledgerXfactory(all repositories, contents: read is enough for this lane).ledgerXfactory/LedgerxFactoryis private ("private": true), so there is no anonymous fetch to fall back to, andSUBMODULE_TOKENis not configured on opensoft/xFactory (its secret list isCOUNCIL_LANE_APP_ID,COUNCIL_LANE_APP_KEY,HERMES_READINESS_TOKEN,MERGE_MASTER_APP_KEY,OPENROUTER_API_KEY,XFACTORY_APP_ID,XFACTORY_APP_PRIVATE_KEY), so the documented PAT path is dead too. Rather than sweep a corpus with a governed repository silently missing from it, the rewrite step fails the run with:That is a deliberate trade and it is stated plainly: after this lands the nightly is still red until that installation exists — but red at a named step, naming one organization and one remedy, with the multi-owner mechanism and defect B both behind it, instead of red at a step that named no remedy and 0 artifacts either way. No gate is weakened to buy a green.
What stays unchanged
[email protected]:org rewrite stays and stays broad. Longest prefix wins, so the per-owner keys narrow it; removing it would strand every same-org submodule. Verified by running the real step and reading the config back withgit ls-remote --get-url: with both present,[email protected]:MedxSoft/MedxEHR.gitresolves to the MedxSoft token and[email protected]:opensoft/codexFactory.gitto the caller-org token.permission-*inputs, no widened scope, no new secret.opensoft-owned governed submodule and every nested leg the init touches under one (openxFactory/openXwallet) is declared[email protected]:; a narrowhttps://github.com/opensoft/key would also capture the checked-out repository's own origin URL, which the report-delivery lanes push through, for no failure anyone has observed..gitmodules, which is all that exists before the init runs. Measured at today's pins, every leg the init touches belongs to an owner the top level already declares.Validation
tests/doc-health/test_submodule_owner_tokens.py, 28 passed / 0 skipped. Structural: the slot count is written once and equals the mint steps present, in both jobs; each mint reads its own slot, carries the App secrets, has nogithub.tokenfallback and defers its failure; both URL forms are written per owner with--add; the refusal is bounded by the slots and no longer by one; the broad rewrite stays broad; and the two jobs' whole owner-token blocks are byte-identical after a YAML round trip (they are twins, and they drift because nothing compared them). Behavioral: the two shell steps are run against synthetic.gitmodulestrees and the resulting git config is read back throughgit ls-remote --get-url— zero, one, two and four foreign owners,installs/correctly not governed, and a filled slot with an empty token (exit 1, owner named, the owner that could be served still served). A second commit adds the review note that a slot count which did not arrive is its own refusal:SLOTSreaches the rewrite step from the detection's output, and an empty or non-numeric value would leave the loop a no-op with the step reporting SUCCESS having credentialed no owner — a silent pass on exactly this path — so it refuses by name instead.tests/doc-health— 1628 passed / 0 skipped — and every existing module that reads this workflow:tests/doc-health/{test_workflow_contract,test_workflow_guards,test_neutrality_dispatch,test_readiness_output_fail_closed,test_modified_block_currency_reporting}.py,tests/openxwallet_pin/test_aggregation_lane_wiring.py,tests/avatar_runtime/test_ruled_values_pinned.py,tests/ideation-dashboard/{test_nightly_lane,test_dashboard_source_seal}.py— 187 passed, unchanged, including the openXwallet lane-wiring order guard aroundInit governed submodules only.actionlintis not available in this environment; the workflow is validated byyaml.safe_load(the same parse every structural test above performs) and both changedrun:scripts passbash -n. No skips are added, sopytest-suite's exactEXPECT_SKIPPEDpin is unaffected and itsMIN_SELECTED/MIN_PASSEDfloors only rise.Review rounds
d54a6675ghs_*placeholder tokens — taken (4ccc586a); "don't assert the full URL" — declined, longest-prefix-wins is a claim about the whole string and a substring check passes for the right owner routed to the wrong tokenbdc3f8c74ccc586afaac639f, acredentialed()helper); suppress pytest's diff behind a customAssertionError— declined, that trades a real diagnostic for the appearance of a secret that is not one4ccc586aSUBMODULE_TOKENfallback never got the https form — taken in full (4fdfc94c), with seven testsAll three bot threads are replied to and resolved.
The nightly is not dispatched from this branch. The orchestrator will dispatch it once after landing (
doc-health-nightly.ymldoes carryworkflow_dispatch), which is also when theledgerXfactoryfinding above will be observed on a real run rather than in simulation.Refs opensoft/xFactory#366, opensoft/xFactory#346, #591
🤖 Generated with Claude Code
https://claude.ai/code/session_01YCvrAkCLaytaYBMtZbQwun