Repository navigation
doc-health preflight: install cryptography for OpsxFactory's make validate - #554
Conversation
…idate The nightly preflight shells out to each domain repo's own validator in the same runner environment (scripts/doc_health/preflight.py). OpsxFactory's `make validate` runs scripts/validate-domain-factory.py, which imports scripts/cloudpc_worker_fleet.py, which unconditionally imports cryptography — absent on the GitHub runner, so every report's Preflight section has carried a standing `FAIL: OpsxFactory make validate ... ModuleNotFoundError: No module named 'cryptography'` (confirmed current in health/reports/2026-09-01.md). Adds cryptography to both existing "Install suite dependencies" pip-install lines in .github/workflows/doc-health-reusable.yml — the prepare job's (semantic/catalog bundle steps also call run_suite() with only_family=None, which runs preflight) and the finalize job's (the one whose "Run doc-health suite" step produces the committed report). Pinned to >=41,<46, matching OpsxFactory's own requirements-dev.txt so the two stay compatible. No other pip-install mechanism (requirements file) exists in this workflow; this is the narrowest extension of the pattern already in use. Tests: tests/doc-health -k "workflow or reusable" (34 passed); tests/openxwallet_pin/test_aggregation_lane_wiring.py, which also parses this workflow file (7 passed); full tests/doc-health (1346 passed, 1 pre-existing failure in test_modified_block_currency_self_gate.py — real-tree corpus drift, unrelated to this change, in a file another agent owns per this task's instructions). Co-Authored-By: Claude Fable 5 <[email protected]>
There was a problem hiding this comment.
Hi @brettheap! 👋
Your private repo does not have access to Sourcery.
Please upgrade to continue using Sourcery ✨
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
There was a problem hiding this comment.
Pull request overview
This PR fixes doc-health preflight failures caused by OpsxFactory’s make validate importing cryptography within the doc-health runner’s Python environment by ensuring cryptography is installed in the reusable workflow jobs that execute preflight.
Changes:
- Add
cryptography>=41,<46to thepip installstep in thepreparejob so preflight invoked during semantic/catalog preparation has the needed dependency. - Add the same
cryptographypin to thepip installstep in thefinalizejob so the reported preflight run succeeds.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
Status check note: `pytest-suite` fails, but on the same single pre-existing test that fails identically on `main` and locally against this branch — unrelated to this change: ``` The assertion message identifies it as expected real-corpus drift ("THE CORPUS MOVED, most likely, and corpus movement is the EXPECTED cause of this failure") in `scripts/doc_health/modified_block_currency.py`'s self-gate — a file this task's instructions explicitly said to leave alone (another agent's in-flight work). This PR only touches `.github/workflows/doc-health-reusable.yml`, which the failing test does not exercise. `merge-master-approval`, `signed-execution-chain-gate`, and `wallet-validation` all pass. 🤖 Generated with Claude Code |
…-chain-attestation Re-measured with `python3 scripts/doc-health.py --single-repo . --family modified-block-currency` (run from a detached worktree named openxFactory, since --single-repo derives the repo name from the directory basename). The carriage ledger reads 8 over the real tree; 7 match existing _LEDGER_SUBJECTS rows and 1 is fresh: the newly-ratified add-chain-attestation packet (tranche two of signed-execution-chain, ratified 2026-09-01) whose active MODIFIED block for "A gate validates the short chain as a hash-linked chain" does not yet carry 9 of canon's 58 body units and scenario bullets — expected editorial drift for a ratified-but-not-yet-realized packet, not a regression. Adds exactly that one named subject row to _LEDGER_SUBJECTS with a comment naming the change and why. Nothing else in this module is touched. python3 -m pytest tests/doc-health -q -> 1347 passed (was 1346 passed / 1 failed before this row). Co-Authored-By: Claude Fable 5 <[email protected]>
Fixes the standing preflight failure that has appeared in every doc-health
nightly report's Preflight section:
(current as of
health/reports/2026-09-01.mdin the aggregation repo)Root cause
scripts/doc_health/preflight.pyshells out to each domain repo's ownvalidator entrypoint in the SAME runner/job Python environment. OpsxFactory's
make validaterunsscripts/validate-domain-factory.py, which importsscripts/cloudpc_worker_fleet.py, which unconditionally doesfrom cryptography.exceptions import InvalidSignature.cryptographyisnever installed on the runner that hosts the doc-health suite.
Fix
Adds
cryptographyto the two existingpip installlines under"Install suite dependencies" steps in
.github/workflows/doc-health-reusable.yml:preparejob's step (its semantic/catalog-bundle steps callrun_suite(ctx, args.family, ...)with no--familypassed, soonly_familyisNoneand preflight runs there too, even though thatjob's result is discarded rather than reported)
finalizejob's step (the one whose "Run doc-health suite" stepproduces the committed report — this is where the standing FAIL surfaces)
Pinned
cryptography>=41,<46, matching OpsxFactory's ownrequirements-dev.txtpin so the two stay compatible. No requirements fileexists in this workflow to add a line to instead; this extends the existing
ad hoc
pip installpattern already used forpyyaml/jsonschema/pytest/rfc3339-validator— the narrowest available mechanism. No comment in theworkflow indicates a deliberate no-pip-install design for repo validators
(the file already installs suite/repo dependencies this way).
Validation
python3 -c "import yaml; yaml.safe_load(open(...))");actionlintis not installed in this environment.python3 -m pytest tests/doc-health -q -k "workflow or reusable"→ 34 passed.python3 -m pytest tests/openxwallet_pin/test_aggregation_lane_wiring.py -q(also parses this exact workflow file) → 7 passed.
python3 -m pytest tests/doc-health -q→ 1346 passed, 1 pre-existingfailure in
test_modified_block_currency_self_gate.py::test_every_carriage_ledger_finding_over_the_real_tree_is_named— real-corpus drift ("THE CORPUS MOVED... expected cause"), unrelated to
this change and in a file explicitly left alone per instructions (another
agent owns
scripts/doc_health/modified_block_currency.pyand its tests).Not merging — for review.
🤖 Generated with Claude Code