Files
SubMiner/backlog/tasks/task-180 - Fix-launcher-stats-command-timeout-for-slow-dashboard-startup.md
sudacode 48f10dbb03 chore(backlog): maintain task backlog and add changelog fragments
- Move completed tasks (85, 117, 118, 155) to backlog/completed/
- Delete superseded task files (166 verification, 172 drilldown)
- Add stats dashboard milestone m-1
- Add new tasks (190, 194)
- Update task metadata across remaining backlog items
- Add changelog fragments for stats, mpv args, and subtitle filtering
2026-03-18 02:25:07 -07:00

3.1 KiB

id, title, status, assignee, created_date, updated_date, labels, milestone, dependencies, references, priority, ordinal
id title status assignee created_date updated_date labels milestone dependencies references priority ordinal
TASK-180 Fix launcher stats command timeout for slow dashboard startup Done
codex
2026-03-17 15:16 2026-03-18 05:28
launcher
stats
tests
m-1
/Users/sudacode/projects/japanese/SubMiner/launcher/commands/stats-command.ts
/Users/sudacode/projects/japanese/SubMiner/launcher/main.test.ts
/Users/sudacode/projects/japanese/SubMiner/launcher/commands/command-modules.test.ts
medium 112500

Description

Address the failing launcher stats startup path so the CLI tolerates the intended slow dashboard startup window instead of timing out early.

Acceptance Criteria

  • #1 The launcher stats command no longer times out before the intended slow-start window used by tests
  • #2 Regression coverage verifies the slower stats startup path succeeds
  • #3 The failing launcher stats startup test passes locally

Implementation Plan

  1. Add a focused launcher command regression that simulates a stats response arriving after the current timeout boundary and expects success.
  2. Adjust the stats startup wait timeout in launcher/commands/stats-command.ts to match the intended slow-start tolerance.
  3. Re-run the targeted command test, the previously failing launcher/main.test.ts case, and then the full launcher/main.test.ts file.

Implementation Notes

Verified the failing launcher path: launcher/main.test.ts timed out because launcher/commands/stats-command.ts only waited 8000ms for the stats startup response while the supported slow-start test writes the response after 9s.

Raised the stats startup response timeout to 12000ms so attached stats startup tolerates the existing slow cold-start window without changing command flow.

Verification passed: bun test launcher/commands/command-modules.test.ts --test-name-pattern "stats command launches attached app command with response path|stats command returns after startup response even if app process stays running|stats command throws when stats response reports an error"; bun test launcher/main.test.ts --test-name-pattern "stats command tolerates slower dashboard startup before timing out"; bun test launcher/main.test.ts; bun run test:fast.

Final Summary

Fixed the launcher stats startup timeout by extending the response-file wait window in launcher/commands/stats-command.ts from 8s to 12s. The command flow was left unchanged; the launcher now simply gives the stats dashboard enough time to report readiness during slower cold starts, which matches the existing supported behavior exercised by launcher/main.test.ts.

Verification passed with the targeted launcher command tests, the previously failing slow-start launcher/main.test.ts case, the full launcher/main.test.ts file, and the full bun run test:fast gate.