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
Extend the import-boundary rule to the current OpenCode adapter modules until they move under src/adapters/ #575
Tests-only. test/host/import-boundary.test.ts blocks imports resolving into src/adapters/** and the index.ts/tui.ts forwarders, but the OpenCode adapter implementation currently lives in src/core/host.ts, src/events.ts, and src/capture/runtime.ts, which the rule does not target. Measured at 928f83c8: adding import { createOpenCodeHost } from "../core/host.ts"; to src/runtime/setup.ts passes typecheck, lint, and the suite — engine-to-adapter dependence is currently held only by the absence of such imports. Complete when #564 relocates the adapters, or sooner by adding the three modules to the deny set. A mutation run 2026-11-28 is recorded in the PR #560 review.
Closed by measurement at a3b8c73, the path this ticket asked for: the deny set names the current OpenCode translator modules instead of only the future src/adapters/ location.
Attempted again on that head, in a scratch worktree: src/runtime/setup.ts given import { createOpenCodeHost } from "../core/host.ts"; fails shared source cannot depend on adapters or their entry forwarders. The same mutation against the relocated layout fails the same assertion. bun run typecheck passes in both cases with the bad import present, which is the reason the test exists.
No surviving import path from shared source into the current adapter modules that I can construct. Closing; if a new topology appears it needs its own ticket rather than reopening this one.
Correction to my closing comment, on two claims I did not verify carefully enough.
"bun run typecheck passes in both cases" holds only for the layout where the module still exists. At a3b8c73 it does pass with ../core/host.ts present and the boundary test failing, which is the case that proves the test rather than the compiler is the enforcement. At the relocated layout the old path is gone, so the same import fails as TS2307 — a different reason, and not evidence about the rule.
"No surviving import path from shared source into the current adapter modules" is true for relative specifiers only. Reproduced at f3acb39 in a scratch worktree:
import * as probe from "opencode-self-improvement/tui";
Both boundary assertions pass and typecheck reports no errors, while package.json exports "./tui" to ./src/adapters/opencode/tui/panel.tsx. The rule inspects specifiers that begin with ., so a bare self-reference through the package's own exports map reaches adapter code without tripping anything. Filed separately; this ticket's subject — the three translator modules — remains closed, so I am not reopening it.
Activity
ocsi-architect commentedon Nov 28, 2026
Closed by measurement at
a3b8c73, the path this ticket asked for: the deny set names the current OpenCode translator modules instead of only the futuresrc/adapters/location.Attempted again on that head, in a scratch worktree:
src/runtime/setup.tsgivenimport { createOpenCodeHost } from "../core/host.ts";failsshared source cannot depend on adapters or their entry forwarders. The same mutation against the relocated layout fails the same assertion.bun run typecheckpasses in both cases with the bad import present, which is the reason the test exists.No surviving import path from shared source into the current adapter modules that I can construct. Closing; if a new topology appears it needs its own ticket rather than reopening this one.
ocsi-architect commentedon Nov 28, 2026
Deny set extended to the current adapter modules; mutation no longer reproducible at a3b8c73.
ocsi-architect commentedon Nov 28, 2026
Correction to my closing comment, on two claims I did not verify carefully enough.
"
bun run typecheckpasses in both cases" holds only for the layout where the module still exists. Ata3b8c73it does pass with../core/host.tspresent and the boundary test failing, which is the case that proves the test rather than the compiler is the enforcement. At the relocated layout the old path is gone, so the same import fails asTS2307— a different reason, and not evidence about the rule."No surviving import path from shared source into the current adapter modules" is true for relative specifiers only. Reproduced at
f3acb39in a scratch worktree:Both boundary assertions pass and
typecheckreports no errors, whilepackage.jsonexports"./tui"to./src/adapters/opencode/tui/panel.tsx. The rule inspects specifiers that begin with., so a bare self-reference through the package's own exports map reaches adapter code without tripping anything. Filed separately; this ticket's subject — the three translator modules — remains closed, so I am not reopening it.