refactor(opencode-go): localize stream internals#101440
Conversation
01eab13 to
bb7e544
Compare
bb7e544 to
f359a9f
Compare
|
Codex review: needs maintainer review before merge. Reviewed July 7, 2026, 3:11 AM ET / 07:11 UTC. Summary PR surface: Source 0. Total 0 across 3 files. Reproducibility: not applicable. this is an internal cleanup PR, not a reported runtime bug. Source search confirms the localized declarations are not used as external call sites on current main. Review metrics: none identified. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land the narrow export-localization after normal maintainer merge handling, keeping OpenCode Go public surface through Do we have a high-confidence way to reproduce the issue? Not applicable; this is an internal cleanup PR, not a reported runtime bug. Source search confirms the localized declarations are not used as external call sites on current main. Is this the best way to solve the issue? Yes; localizing declarations in their defining modules is the narrowest maintainable fix because AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against d8ffb1f30746. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source 0. Total 0 across 3 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
|
Land-ready proof for head
Main advanced after the reviewed merge base. I inspected |
|
Merged via squash.
|
What Problem This Solves
OpenCode Go still exposed four declarations that are used only inside their defining modules. This made private stream and live-catalog implementation details look like supported extension surfaces and kept them in unused-export reports.
Why This Change Was Made
Localize the two stream wrapper helpers and the two parameter types without changing their implementations, callers, runtime behavior, or the plugin's public
api.tssurface.User Impact
No user-visible behavior changes. Maintainers get a narrower private implementation surface and cleaner dead-code reports.
Evidence
e024eacf176caf103101de3c37bd81f596652379: 277,997 nodes and 1,120,665 edges.DEFINES,USAGE, andCALLSedges for all four declarations.tbx_01kwxnhj0z18r2rzxyme4jr51c:corepack pnpm test extensions/opencode-go- 5 files, 29 tests passed.corepack pnpm check:changed- extension production/test typecheck, lint, guards, and import cycles passed.corepack pnpm deadcode:report:ci:ts-unused- zero remaining matches for the four declarations.oxfmt --checkandgit diff --checkpassed.