Repository navigation
Lower the openDox back-import ratchet after BUILD slice 2, and re-pin to the commit it measures - #9
Conversation
… to the commit it measures openDox-code #9 removes four of the thirteen import-time `openxdox` reaches through a late seam of openDox's own. The ratchet in tests/test_dependency_direction.py refuses an unrecorded FALL as well as a rise, so without this commit this leg's required `validate` goes RED the moment that lands — proved here by restoring the old census against the new openDox: Failed: openDox→openXdox back-imports FELL, per module (import-time, deferred): ['opendox/cli.py: (5, 1) -> (3, 1)', 'opendox/serve_workbench.py: (1, 7) -> (0, 7)', 'opendox/workbench.py: (1, 0) -> (0, 0)'] — good, and the census in this file is now untrue. Two moves, and they are one act: pyproject.toml opendox @ git+…@8e9ffa628e96 -> @f03988556643 (openDox-code #9's head; the lane re-bumps to the MERGE sha once #9 lands — the ratchet measures whatever this line names, so the two must not drift) OPENDOX_BACK_IMPORTS 13 import-time / 19 deferred over SIX modules -> 9 import-time / 19 deferred over FIVE cli.py (5,1)->(3,1); serve_workbench.py (1,7)->(0,7); workbench.py (1,0)->(0,0) and therefore DROPPED from the table, which is what the refusal above instructs. branch_session.py, serve.py and serve_project.py unmoved. The comment above the table now also records the nine that remain and WHY none of them is waiting on an author: each needs a line openxFactory's docs/opendox-carve-manifest.yaml does not declare for its row, so they are owed a declared-edit ruling, enumerated on openDox-code #9 § 4. And it records this census's one blind spot, found by slice 2 rather than reasoned about: `_census` counts ast.Import / ast.ImportFrom nodes, so a DEFAULT ARGUMENT that reaches the consumer (`records_dir: str = gate_console.DEFAULT_RECORDS_DIR`) is invisible to it — branch_session.py has 7 such sites and serve.py 2. Converting their imports would have lowered this census while the modules still could not be imported without openXdox. Both conversions were made, measured and reverted at openDox-code, and openDox-code now asserts the property directly (tests/test_consumer_reach.py imports each converted module in a subprocess with `openxdox` blocked). That assertion belongs there, not here: this leg measures a repository it does not write, and cannot import openDox's modules to find out — `cli_gate` imports `opendox.branch_session`, which imports `openxdox.gate_console`. Arrival verifier, phase B, on this branch: OK — every row figure identical to § 4.1's landed line (92 / 9 / 81 / 4 unapplied / 6 of 6 / 99 files / 2 created). Refs opensoft/openXfactory#656 Lane: openxfactory-4-opendox-extraction Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Reviewer's GuideThis PR atomically advances the openDox pin to BUILD slice 2 and lowers the measured openDox→openXdox back-import ratchet, including removal of the zero-count workbench entry and documentation of the census limitations; validation confirms the updated measurement remains consistent after the sibling slice 3 merge. Flow diagram for the openDox back-import ratchet updateflowchart LR
Pin[openDox dependency pin<br/>f0398855] --> Measure[_pinned_opendox_root]
Measure --> Census[OPENDOX_BACK_IMPORTS census]
Census --> Ratchet[validate ratchet]
Ratchet --> Result[9 import-time / 19 deferred<br/>over five modules]
Result --> Drop[Drop workbench.py<br/>after reaching 0 / 0]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
…lice-2 ratchet branch Slice 3's derived deferred-allowlist and this branch's ratchet lowering touch the same two files and do not overlap: its hunks are the allowlists at the top of tests/test_dependency_direction.py and the dependency block's comment, this one's are OPENDOX_BACK_IMPORTS and the `opendox @ git+…` pin line. Merged rather than rebased because this repository's ruleset declines a force push. Lane: openxfactory-4-opendox-extraction Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
There was a problem hiding this comment.
🔵 Needs a closer look
Replace the unmerged openDox revision with its actual merge commit before approval.
Pull request overview
Updates the openDox dependency pin and back-import ratchet for BUILD slice 2.
Changes:
- Updates the openDox Git dependency pin.
- Lowers the recorded back-import counts and removes the completed workbench entry.
File summaries
| File | Description |
|---|---|
tests/test_dependency_direction.py |
Records the reduced back-import counts. |
pyproject.toml |
Updates the openDox dependency pin. |
Review details
Suppressed comments (1)
pyproject.toml:84
- This pins
opendoxto the head of openDox-code #9, which is still an open/draft PR rather than a merge commit. That contradicts the pin contract immediately above (“Pinned to the merge commit, never a range or branch”) and leavesvalidate/main resolving an unlanded revision; please wait for #9 to merge and replace this with its actual merge SHA before merging this change.
# jsonschema, BUILD-arc slice 3 (opensoft/openxFactory#656 comment 5627156620,
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
`f03988556643` -> `551ad4d5a18f`. openDox-code #9 took three review findings (a refusal message that named a remedy the extension points cannot provide; a subprocess test that read ANY nonzero exit as "still reaches the consumer"; a fake `openxdox` parent left in `sys.modules`). None of the three touched an import statement, so the census this file records is unchanged at 9 import-time / 19 deferred over five modules — re-measured against the amended tree, not carried: branch_session.py (1, 7) | cli.py (3, 1) | serve.py (5, 2) serve_project.py (0, 2) | serve_workbench.py (0, 7) python -m pytest -q tests/test_leg_shape.py tests/test_dependency_direction.py --noconftest 24 passed The lane still re-bumps this line to the MERGE sha once openDox-code #9 lands. Refs opensoft/openXfactory#656 Lane: openxfactory-4-opendox-extraction Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
There was a problem hiding this comment.
🔵 Needs a closer look
Update the dependency pin and provenance, and qualify or correct the census limitation claim.
Review details
Suppressed comments (3)
pyproject.toml:106
- The linked openDox-code #9 has advanced past
f039885...; its current head is551ad4d5a18fe97bce925e00d74ded615eafd418, whose follow-up fixes the consumer-reach refusal and its subprocess check. Pinning the earlier commit leaves this leg on the pre-fix behavior and contradicts the description that this line tracks #9's head; update it to the current head (then to the merge SHA when #9 lands).
"opendox @ git+https://github.com/opensoft/openDox-code@551ad4d5a18fe97bce925e00d74ded615eafd418",
tests/test_dependency_direction.py:310
- This now describes
f03988556643as #9's head, but the linked PR has moved to551ad4d5a18fe97bce925e00d74ded615eafd418. Once the pin is updated, keep this provenance text in sync so the measured commit and the dependency source are unambiguous.
#: LOWERED BY BUILD SLICE 2 — `opensoft/openDox-code` #9, head `551ad4d5a18f`,
#: which this file's pin now names (`pyproject.toml`). The census RULED
tests/test_dependency_direction.py:334
- The new claim that default arguments are this census's “one blind spot” is not true for the existing walker: it only recurses through list fields whose elements are
ast.stmt, so it also skips imports in module-levelexcepthandlers andmatchcases (ExceptHandler/match_caseare AST containers, not statements). Those imports can execute during module import and evade this ratchet; either make_censusrecurse through those containers with tests, or qualify this as only the blind spot currently observed.
#: WHICH IS THIS CENSUS'S ONE BLIND SPOT, RECORDED RATHER THAN PAPERED OVER:
#: `_census` counts `ast.Import` / `ast.ImportFrom` nodes, and a default
#: argument, an annotation or a decorator that reaches the consumer is none of
#: those. A module can therefore reach (0, n) here and still fail to import.
- Files reviewed: 2/2 changed files
- Comments generated: 0 new
- Review effort level: Lite
There was a problem hiding this comment.
🟡 Changes recommended
Replace the temporary upstream PR-head pin with the merge SHA and rerun the ratchet.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
Suppressed comments (1)
pyproject.toml:106
- Before this can land on
main, replace the temporary PR-head pin with the merge SHA of openDox-code #9. GitHub currently reports551ad4d5a18fe97bce925e00d74ded615eafd418as that PR's unmerged head, and the PR description itself says a head pin is wrong formain; otherwise this leg's released installs will depend on an unmerged upstream branch. Re-run the ratchet after the merge SHA is available.
"opendox @ git+https://github.com/opensoft/openDox-code@551ad4d5a18fe97bce925e00d74ded615eafd418",
- Files reviewed: 2/2 changed files
- Comments generated: 1
- Review effort level: Lite
openDox-code #9 merged to main at da8aae969b4057bd46d2550c265e5bb363142458. Repoint pyproject.toml's opendox pin from the review-time PR head (551ad4d5a18f) to that merge sha, and update the ratchet comment in tests/test_dependency_direction.py to name it. Lane: openxfactory-4-opendox-extraction Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
There was a problem hiding this comment.
🔵 Needs a closer look
Update the PR description to match the merge SHA used by the dependency pin.
Review details
Suppressed comments (1)
pyproject.toml:106
- The PR description still says this pin is
551ad4d5a18f(PR #9's head), but this changed line usesda8aae969b40...(the post-mergemaincommit). Since the ratchet is measured through the exact installed pin, please update the §1 table and related prose to the merge SHA actually used here, or change the pin if551ad4d5a18fis intended.
"opendox @ git+https://github.com/opensoft/openDox-code@da8aae969b4057bd46d2550c265e5bb363142458",
- Files reviewed: 2/2 changed files
- Comments generated: 0 new
- Review effort level: Lite



Lane: openxfactory-4-opendox-extraction (formerly openxfactory-opendox)
The openXdox half of BUILD slice 2. It is required for this leg's
validateto stay green onceopensoft/openDox-code#9 lands, and it must land in the same window — the ratchet refuses an unrecorded FALL exactly as it refuses a rise.Refs opensoft/openXfactory#656
The branch also carries a merge of openXdox-code
main208656fb(BUILD slice 3), taken as a merge commit because the repository ruleset declines a force push to an already-published branch — see § 6.1. Two moves, and they are one act
pyproject.tomlopendox @ git+…@8e9ffa628e96@da8aae969b40— openDox-code #9's MERGE sha (=mainafter landing)OPENDOX_BACK_IMPORTSworkbench.pyreached (0, 0) and is DROPPED from the table — which is the refusal's own instruction ("drop a module from the table when it reaches (0, 0)"), not a liberty taken here.The pin and the table are one act because the table is measured THROUGH the pin.
_pinned_opendox_root()readsfind_spec("opendox"), andvalidateinstalls whatever this line names. Bumping one without the other is the state the ratchet exists to refuse. The lane re-bumps this line to the MERGE sha once openDox-code #9 lands — a head sha in a pinned dependency is correct for review and wrong formain.2. Why this PR is REQUIRED and not merely tidy — perturbation-proved
The old census, restored against the new openDox (both legs installed,
pip install -eeach):That is this leg's required check going red on somebody else's merge, which is exactly what the ratchet was landed to make impossible to do quietly.
3. What openDox-code #9 actually did, and the nine it did not
Four of the thirteen, through a late seam of openDox's own (
src/opendox/consumer_reach.py— the shape § 4.1 landed HERE, mirrored, including the narrowModuleNotFoundError-by-name handling from its fix round 2):cli.py:72 :74,serve_workbench.py:49,workbench.py:70.opendox.workbenchandopendox.serve_workbenchnow import with noopenxdoxinstalled.None of the nine that remain is waiting on an author. Each needs a line openxFactory's
docs/opendox-carve-manifest.yamldoes not declare for its row — a multi-line import statement's continuation lines, theDashboardHandlermixin base list, theprofile_openxfactorycomposition point — so all nine are owed a declared-edit ruling, enumerated on openDox-code #9 § 4.4. The blind spot this slice found in this file's census — recorded, not papered over
A default argument is evaluated when the
defexecutes, i.e. at import time._censuscountsast.Import/ast.ImportFromnodes and a default argument is neither, so a module can reach (0, n) in this table and still fail to import without openXdox.branch_session.pyhas 7 such sites andserve.py2; both conversions were made at openDox-code, measured, and reverted rather than shipped as a census that reads better than the tree.No change is proposed to
_censushere, and that is deliberate. It measures the right thing for what this leg can measure — a repository it consumes and does not write — and widening it would not close the gap anyway: the honest test is "does the module import", and this leg cannot run it.cli_gate.py:46importsopendox.branch_session, which importsopenxdox.gate_console, so importing openDox's modules from here re-enters this package. openDox-code #9 therefore asserts it at home, in a subprocess withopenxdoxblocked at the finder, and the comment above the table names the gap and points there. Whoever words the declared-edit ruling should see it; § 4.1's owner may want it in the surface enumeration too.5. Validators
run in a venv carrying BOTH legs — openDox-code at #9's head (the commit this pin now names) and this branch — which is what makes the ratchet's 9/19 a measurement rather than a transcription.
FLOOR PART 1, the arrival verifier, phase B, on this branch:
Every figure is identical to § 4.1's landed line —
92 / 9 / 81 / 4 unapplied / 6 of 6 / 99 files / 2 created. Same flags as § 4.1:--dest-base 3487e476d782, the six--replica-at, and--allow-created src/openxdox/consumer_reach.py --allow-created tests/test_dependency_direction.py. Neither file this PR touches is under a declared root, so no row moves.6. Sibling slice 3 has LANDED, and this branch carries it
build/declare-function-body-deps(#8, slice 3 —jsonschema, and the deferred allowlist now DERIVED frompyproject.tomlviatomllib+packages_distributions()) merged tomainas208656fb432c6e5b6e00304a648e5313dc6be8dewhile this branch was open. It touches both of these files.This branch has taken
origin/mainas a MERGE, not a rebase — the repository ruleset declines a force push, so a rebased history could not be pushed to an already-published branch. The merge is clean: slice 3's hunks are the allowlists at the top of the file and the dependency block's comment; this one's areOPENDOX_BACK_IMPORTSat 253+ and theopendox @ git+…line. Againstmain208656fb, this branch's whole diff is still the two moves in § 1:Both validators in § 5 were re-run after the merge, in a venv that also carries
jsonschema>=4.18as slice 3's derived allowlist now requires —24 passed, and the arrival line reproduces unchanged.7. What this pull request does not touch
Nothing in openxFactory: no manifest, no pin file, no gitlink, no
openspec/changes/. Nomoved_verbatimrow, and no row at all — both files are outside this destination's declared roots.🤖 Generated with Claude Code
Summary by Sourcery
Align the openDox dependency pin and back-import ratchet with BUILD slice 2.
Enhancements:
Build: