Files
SubMiner/backlog/tasks/task-61 - Ensure-parser-utility-scripts-exit-immediately-after-output.md
kyasuda 457e6f0f10 feat(tokenizer): refine Yomitan grouping and parser tooling
- map segmented Yomitan lines into single logical tokens and improve candidate selection heuristics

- limit frequency lookup to selected token text with POS-based exclusions and add debug logging hook

- add standalone Yomitan parser test script, deterministic utility-script shutdown, and docs/backlog updates
2026-02-16 17:41:24 -08:00

1.3 KiB

id, title, status, assignee, created_date, updated_date, labels, dependencies
id title status assignee created_date updated_date labels dependencies
TASK-61 Ensure parser utility scripts exit immediately after output Done
2026-02-16 22:35 2026-02-16 22:37

Description

Update scripts/test-yomitan-parser.ts and scripts/get_frequency.ts so they clean up Electron parser resources and terminate immediately after producing results, avoiding hangs.

Acceptance Criteria

  • #1 scripts/test-yomitan-parser.ts exits promptly after printing output.
  • #2 scripts/get_frequency.ts exits promptly after printing output.
  • #3 Electron-related resources (parser window/app loop) are cleaned up on both success and error paths.

Final Summary

Added deterministic shutdown to both utility scripts. scripts/get_frequency.ts now destroys parser windows in a finally block, calls app.quit() when Electron is loaded, and uses explicit .then/.catch exits so the process terminates immediately after output with correct exit codes. scripts/test-yomitan-parser.ts now mirrors this pattern with runtime cleanup (shutdownYomitanRuntime) and explicit process exit handling.