fix(architecture): restore the top-level module budget gate after #6703 #6734
All Vouch review confidence checks passed
Residual risk 0.21 = Change Risk (0.52) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.52 · 650 lines diff across 8 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.388
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #6734"
general
weight: 0.35
JasonBuildAI
Goal And Delivered Outcome
Impact: a required Python Tests merge-gate job is deterministically red on
main, so every PR whose Python Tests run (30 open PRs at the time of writing) inherits an unrelated failure and maintainers cannot separate it from a real regression; this PR restores the gate with a one-line import change and a byte-identical relocation.docs/architecture/rfcs/monorepo-distribution-split-v0.mdM0 / Section 9.maincarries 146 top-level modules whiletests/architecture/top_level_module_budget.jsonpins 145, because #6703 addedloopx/chat_turn_release.pywithout moving another module below a package root. The required Python Testspytestshard therefore fails deterministically on unmodifiedmain, somerge-gateis red for every PR whose Python Tests run (30 open PRs at the time of writing; docs- or presentation-only PRs that skip the Python Tests workflow are unaffected) and maintainers cannot separate an inherited failure from a real regression in a PR.f9bdae67596c185cebc81dc555dd6a3e0242e9c5,python -m pytest -q tests/architecture/test_top_level_module_budget.py→1 failed, 5 passedwithloopx/ grew from 145 to 146 top-level modules. At this head the same command →6 passed, the top-level count is 145, andloopx canary premerge --from-git-diff --git-diff-base upstream/main→status: passed,manual_holds: 0.loopx-project/loopx:mainatf9bdae67596c185cebc81dc555dd6a3e0242e9c5.Author Declaration
Implemented against
tests/architecture/top_level_module_budget.json(max_top_level_modules: 145,baseline_commit: a4483aaece5bc74ec3f969fd067229487022401b) and the module metric ceiling forloopx/chat_runtime.pyinloopx/canary/module_metric_baseline.json, both atf9bdae67596c185cebc81dc555dd6a3e0242e9c5.| Criterion (spec clause) | Disposition | Symbol / path | Test or command |
| --- | --- | --- | --- |
| Top-level
loopx/.pycount must equal the pinned 145 | implemented |loopx/capabilities/native_chat/turn_release.py;loopx/chat_turn_release.pyremoved |python -m pytest -q tests/architecture/test_top_level_module_budget.py→ 6 passed ||
loopx/chat_runtime.pymust stay inside its reviewed module-size ceiling | implemented |loopx/chat_runtime.py(import-only change) |python examples/control_plane/control-plane-maintainability-ratchet-smoke.py→ ok,unreviewed: 0|| The Turn-release wakeup behavior must not change | implemented |
TurnReleaseWakeupmoved byte-identically; only the import line changed |python -m pytest -q tests/test_lark_delivery_wakeup.py tests/test_chat_turn_wait.py→ 7 passed, 2 pre-existing host failures disclosed below |pytest/mypyresults are reported with their Windows host limitations below.Scope And Continuation
Eventregistry whose only importer isloopx/chat_runtime.py; it has no code, test, example, doc or external reference other than that import. It moves into the existingloopx/capabilities/native_chat/package thatchat_runtime.pyalready imports for its native-chat companions. The class body and its comments are byte-identical, so there is no behavior change and no compatibility shim is needed. No product behavior, CLI surface, schema or vocabulary changes.loopx/chat_→loopx/chat/M1 move), #6728 records that decision; this PR is the smallest change that restores the gate without weakening either ratchet.Validation
d37839b29b18c42120da1795961e4c070e7dfcdb| Check kind | Result | Public-safe evidence / limitation |
| --- | --- | --- |
|
regression_parity| passed |python -m pytest -q tests/architecture/test_top_level_module_budget.py:1 failed, 5 passedon unmodifiedf9bdae675(146 against the 145 pin);6 passedat this head.git diff --statfor the change is a 100% rename plus one import line. ||
unit| passed |python -m pytest -q tests/architecture/test_top_level_module_budget.py tests/architecture/test_control_plane_import_boundaries.py tests/architecture/test_package_kernel_import_ratchet.py→35 passed in 37.22s. ||
unit| passed with disclosed host failures |python -m pytest -q tests/test_lark_delivery_wakeup.py tests/test_chat_turn_wait.py→7 passed, 2 failed. Both failures are the fake POSIXcodexshim on native Windows (CodexChatAgentError: executable_not_found); the same two tests fail identically on the unmodified basef9bdae675(2 failed, 4 passedfortests/test_lark_delivery_wakeup.pyalone), andtests/test_chat_session_active_turn.pypasses52 passed. ||
static| passed |python -m ruff check loopx/chat_runtime.py loopx/capabilities/native_chat/turn_release.py→ clean.python -m mypyreports 6 pre-existing Windows-only errors aboutos.killpg/signal.SIGKILL/os.WNOHANGinloopx/extensions/process_runtime.pyandloopx/control_plane/effect_runtime.py, which this diff does not touch; hosted CI runs Linux. ||
static| passed |python scripts/generate_semantic_inventory.py --changed-from HEAD→changed sources: 1 paths, 1 snapshots; supported candidates: 0;git diff --checkclean. ||
integration| passed |loopx canary premerge --from-git-diff --git-diff-base upstream/main→status: passed,merge_gate_passed: true, direct checks 5/5 passed, catalog canaries 10/10 passed,manual_holds: 0.self_merge_allowed: falseis the repository policy, not a check failure. |mypyare not clean on this cp936 Windows host independently of this diff (the 4 remainingtests/architecturefailures aregbkcodec errors in test fixtures that do not import the changed module, and the mypy errors are POSIX-only attributes in untouched files). The changed behavior surface is the import graph only, which the 35 architecture tests plus the 7 passing wakeup/turn tests exercise; the two failing wakeup tests are host-only and reproduce on the base.Frontend / Visual Evidence
Type of Change
LoopX Area
Technical Direction
docs/architecture/rfcs/monorepo-distribution-split-v0.mdM0 / Section 9; related #5685 (the earlier 150-vs-147 instance, no longer reproducible) and #6703 (the introducing change).Shared-authority RFC fixture impact
Boundary Checklist
.loopx/,.codex/goals/, and liveACTIVE_GOAL_STATE.md).none.Signed-off-bytrailer (git commit -s).AI disclosure: this change was drafted with AI assistance at JasonBuildAI's request, under their direction and constraints. An independent reviewer agent audits the exact head before handoff and records its verdict on this PR; maintainer review is requested.