refactor(operator-trend): drop dead re-export shim layer (T3-2 phase 3)#78
Conversation
The operator_trend_closure_forecast_* fractal carried 16 leaf modules that were pure re-export shims (import + __all__, zero logic), each imported only by its own mirror test and never by any production module. They roughly doubled the apparent size of the fractal without adding behavior. Repoint the 16 mirror tests to import directly from the real source modules (reset_controls / reacquisition_controls / freshness_controls / core) and delete the shims. Also delete the facades test, whose sole purpose was asserting the shims' re-export identity — tautological once the shims are gone. No status string or composer behavior is touched; the recovery-state golden contract is byte-identical and the full suite stays green (2492 passed). Note: the per-tier composer collapse is deferred — the tiers have diverged behaviorally (clamp vs no-clamp) and the golden does not yet cover the dict-composers, so that collapse needs a wider characterization net first.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 33e496f3a2
ℹ️ 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".
| @@ -1,11 +0,0 @@ | |||
| from __future__ import annotations | |||
There was a problem hiding this comment.
Update the CI mypy target list before deleting shims
In the GitHub Actions workflow I inspected (.github/workflows/ci.yml line 33), the Type-check operator trend seams step still passes this deleted path and the other removed shim files directly to python -m mypy; mypy's help says positional arguments are files/folders to type check, and running it against this removed file now exits with cannot read file 'src/operator_trend_closure_forecast_events.py': No such file or directory. Any push or PR that reaches this workflow will fail until the deleted shim paths are removed or replaced with the real source modules.
Useful? React with 👍 / 👎.
The 'Type-check operator trend seams' step listed the 16 re-export shim modules removed in this PR, so mypy failed with 'No such file or directory'. Drop them; the 15 real modules still type-check (verified locally).
What
Deletes the 16 pure re-export shim modules in the
operator_trend_closure_forecast_*fractal and repoints their mirror tests to the real source modules.Why
Each shim was
import+__all__with zero logic, imported only by its own mirror test — never by any production module. They roughly doubled the apparent size of the fractal while adding a pure layer of import indirection.Changes
reset_controls/reacquisition_controls/freshness_controls/core)facade_X is X), tautological once the shims are goneSafety
ruff check src/ tests/clean; full suite 2492 passed, 2 skippedDeferred (follow-on phase)
The per-tier composer collapse — the original Phase 3 target — is intentionally not here. The tiers have diverged behaviorally (e.g.
rebuildclamps each magnitude adjustment at zero,rererestoredoes not), and the golden does not yet cover the multi-arg dict-composers. A naiverecovery_state(target, *, depth)parametrization would risk a silent contract break with no test to catch it. That collapse needs a wider characterization net first.