You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Lint does not enforce index.ts boundaries for cleanup/, routing/, warm-pool/ and contract/ helpers #445
Architecture rule 14 says pnpm lint enforces that no file outside a directory component imports past its index.ts. .oxlintrc.json has no pattern for src/core/cleanup/, src/gateway/routing/ or src/core/warm-pool/, so a new reach-in such as ./cleanup/types.js from src/core/reaper.ts passes lint.
Also, older imports reach past src/contract/index.ts to contract/os-range.js / contract/duration.js (src/core/domain.ts:1, src/core/doctor.ts:2, src/leasing/lease-acquisition-coordinator.ts:8, src/gateway/routing/request-match.ts:7, src/cli/index.ts:60), and lint does not catch them.
Expected
Lint fails a reach-in into any directory component that has an index.ts.
Found in review of PR #444 (notes, not blocking there).
ADR 0027 already guards the four reported components. Seven contract helper reach-ins remain grandfathered. The new assertion proposes retiring those exemptions.
pnpm exec vitest run --project unit src/lint-rules.test.ts
70 passed; 1 failed:
imports OS range and duration helpers through the contract index across the repo
Expected []; received 7 past-index violations:
CLI and HTTP -> contract/duration.ts
core/domain, core/doctor, core/warm-pool/config,
gateway/routing/request-match, leasing/lease-acquisition-coordinator
-> contract/os-range.ts
The same file's new cleanup/routing/warm-pool/contract fixture passes, proving the original missing-pattern defect is fixed.
Root cause
Gap: ADR 0027 intentionally preserved existing breaches. .dependency-cruiser-known-violations.json:38 and its six other helper entries suppress them under lint's --ignore-known. src/contract/index.ts:1–9 exports neither helper, and src/contract/AGENTS.md:5 explicitly directs callers to private files. This is remaining boundary cleanup, not a missing discovery rule.
Simplest fix
Export the existing OS range and duration helpers through the contract index. Route their seven consumers through that index, remove the seven corresponding exemptions, and correct the contract manual. Keep dynamic component discovery and unrelated exemptions unchanged. Include the reproduction test from bug/445-repro.
Alternatives rejected
Add oxlint path patterns: duplicates the dependency-cruiser rule and restores manual enumeration.
Remove exemptions alone: existing imports would fail lint.
Clear the entire baseline: unrelated to this issue.
Risk
Barrel imports can expose runtime initialization cycles; check core/domain and leasing consumers.
Keep exported helper behavior and wire schemas unchanged.
Keep only unrelated entries in the grandfathered baseline.
Activity
V3RON commentedon Oct 16, 2026
Reproduction
ADR 0027 already guards the four reported components. Seven contract helper reach-ins remain grandfathered. The new assertion proposes retiring those exemptions.
The same file's new cleanup/routing/warm-pool/contract fixture passes, proving the original missing-pattern defect is fixed.
Root cause
Gap: ADR 0027 intentionally preserved existing breaches.
.dependency-cruiser-known-violations.json:38and its six other helper entries suppress them under lint's--ignore-known.src/contract/index.ts:1–9exports neither helper, andsrc/contract/AGENTS.md:5explicitly directs callers to private files. This is remaining boundary cleanup, not a missing discovery rule.Simplest fix
Export the existing OS range and duration helpers through the contract index. Route their seven consumers through that index, remove the seven corresponding exemptions, and correct the contract manual. Keep dynamic component discovery and unrelated exemptions unchanged. Include the reproduction test from
bug/445-repro.Alternatives rejected
Risk
Written by an agent.