R25
What to build¶
The static architecture gate detects equivalent cycles across ordinary absolute and relative import forms.
Source and evidence¶
Repository scientific/architectural review, snapshot 86c8517, item R25.
Classification: confirmed defect; medium severity.
The import scanner records only an ImportFrom statement's containing module,
ignoring its imported names. When a name resolves to a project submodule, the
dependency graph loses that edge. Thus from telemetry import b in a.py and
from telemetry import a in b.py create no recorded a-to-b or b-to-a edges.
Relative from . import ... statements have the same gap. The required gate can
therefore accept a cyclic module dependency introduced with ordinary import syntax.
The retained retained synthetic probe uses the real validator against a temporary
two-module package. Explicit module imports produce the expected cycle diagnostic;
both from-import variants return no violations. It restores validator globals and
removes temporary fixtures. This demonstrates gate incompleteness, not an assertion
that the current production package contains a hidden runtime failure.
Acceptance criteria¶
- [ ] Explicit imports, from package import submodule and relative from-dot imports detect the same two-module cycle.
- [ ] Symbol-only imports do not fabricate submodule edges; package inventory controls resolution.
- [ ] Existing layer restrictions and deterministic safe diagnostics remain valid.
- [ ] Fixtures cover aliases/packages/relative levels and state dynamic-import exclusions explicitly.
- [ ] Preserve Consumer-owned meaning, payload-free evidence, disabled optional-import isolation, safe diagnostics and the non-relaxable Safety Floor.
- [ ] Run the narrowest observable contract, then applicable committed Make gates. Record every command and outcome; update specifications/compatibility evidence for changed public or wire contracts. Run native Collector verification for changed Collector assets and build for packaging changes.
Design guidance¶
Resolve imported names against known project modules while retaining the containing-module dependency. Build accurate AST-derived edges instead of matching strings or importing inspected code.
Keep prefactoring narrow and verifiable in this slice. Reuse established owners and structural interfaces; introduce a pattern only when it clarifies a real responsibility or variation point. Do not add consumer vocabulary or private payloads to platform code or evidence. Mocked/local results must not claim hosted, production, accelerator or release qualification.
Blocked by¶
None (can start immediately). Shared-area coordination is useful, but no other review fix is a genuine prerequisite for this slice.
Verification scope¶
Convert the described counterexample or investigation oracle into an observable test at the lowest suitable public boundary. Prefer bounded operation-count or deterministic interleaving evidence to flaky timing assertions; timing guarantees need a declared tolerance and independently owned cleanup. This ticket authorizes remediation/research, not publication or deployment.