Skip to content

fix: remove stale process listener test helper - #7045

Open
WyvernMonarch wants to merge 1 commit into
code-yeongyu:devfrom
WyvernMonarch:fix/process-cleanup-listener-types
Open

fix: remove stale process listener test helper#7045
WyvernMonarch wants to merge 1 commit into
code-yeongyu:devfrom
WyvernMonarch:fix/process-cleanup-listener-types

Conversation

@WyvernMonarch

@WyvernMonarch WyvernMonarch commented Aug 19, 2026

Copy link
Copy Markdown

Summary

Remove an unused process-listener test helper whose broad event union no longer typechecks against Bun's typed process.listeners() overloads. Production cleanup registration and every active process-cleanup test seam remain unchanged.

Changes

  • Removed the unreferenced ProcessCleanupEvent alias.
  • Removed the unreferenced getNewListener helper.
  • Preserved getRegisteredProcessCleanupSignalListener and flushMicrotasks, which are used by the process-cleanup test suite.

QA & Evidence

  • What was tested: baseline and post-fix bun run typecheck.
    • Observed result: the baseline reproduced TS2769 and TS2322; post-fix typecheck passes across root, scripts, and all workspace packages.
    • Artifacts: .omo/evidence/20260819-process-cleanup-listener-types/baseline-typecheck.txt, .omo/evidence/20260819-process-cleanup-listener-types/typecheck.txt
    • Why sufficient: directly proves the reported errors are removed without casts or suppressions.
  • What was tested: bun test packages/omo-opencode/src/features/background-agent/process-cleanup.test.ts.
    • Observed result: 44 pass, 0 fail.
    • Artifact: .omo/evidence/20260819-process-cleanup-listener-types/targeted-test.txt
    • Why sufficient: exercises all production cleanup listener paths imported by the edited helper module.
  • What was tested: bun test packages/omo-opencode.
    • Observed result: 8,241 pass, 1 skipped tmux smoke, 0 fail.
    • Artifact: summarized in .omo/evidence/20260819-process-cleanup-listener-types/qa-summary.md
    • Why sufficient: the entire changed adapter is green.
  • What was tested: bun run build.
    • Observed result: all build stages completed, including declarations and the OpenCode distribution.
    • Artifact: .omo/evidence/20260819-process-cleanup-listener-types/build.txt
    • Why sufficient: proves declaration generation and distribution bundling succeed.
  • What was tested: real OpenCode 1.18.18 serve with the built worktree plugin as the only configured plugin in isolated HOME/XDG directories.
    • Observed result: healthy server, local Sisyphus agent registered, server.connected observed, live user DB stayed at 5,492 sessions before and after.
    • Artifacts: .omo/evidence/20260819-process-cleanup-listener-types/run-opencode-smoke.sh, .omo/evidence/20260819-process-cleanup-listener-types/opencode-smoke.txt
    • Why sufficient: proves the rebuilt local plugin still initializes on the real harness while preserving host isolation.

Risks & Residuals

  • Runtime risk is minimal because only unreachable test-helper code was deleted.
  • Tmux smoke was omitted because tmux is unavailable on the QA host and no TUI/runtime path changed.
  • A raw root bun test run produced 15,888 passes and three unrelated failures outside packages/omo-opencode; details and classification are recorded in the QA summary. The complete packages/omo-opencode suite is green.

Summary by cubic

Removes an unused process-listener test helper to fix Bun type errors without changing runtime behavior. The old helper used a broad event union that broke process.listeners() overloads (TS2769/TS2322); it is now deleted and typecheck passes.

  • Scope: edits packages/omo-opencode/src/features/background-agent/process-cleanup.test-helpers.ts only. Deletes ProcessCleanupEvent and getNewListener; keeps getRegisteredProcessCleanupSignalListener and flushMicrotasks.
  • Behavior and tests: no production changes. Process-cleanup registration is unchanged and the suite remains green.
  • Migration: none.

Written for commit 0469595. Summary will update on new commits.

Review in cubic

@github-actions github-actions Bot added the opencode OpenCode edition: packages/omo-opencode label Aug 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

opencode OpenCode edition: packages/omo-opencode

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant