Skip to content

fix: time out usage subprocesses - #102

Open
vycdev2 wants to merge 1 commit into
vycdev:mainfrom
vycdev2:fix/timeout-usage-subprocess
Open

fix: time out usage subprocesses#102
vycdev2 wants to merge 1 commit into
vycdev:mainfrom
vycdev2:fix/timeout-usage-subprocess

Conversation

@vycdev2

@vycdev2 vycdev2 commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add a bounded runner for the !usage ccusage subprocess.
  • Terminate and report hung usage queries instead of leaving Discord requests pending indefinitely.
  • Invoke the fixed ccusage argument list without a shell.

Verification

  • npm run build
  • node --test tests/usagePeriods.test.mjs (8 passed)
  • npm test (66 passed)
  • git diff --check
  • The regression test was confirmed to fail when the timeout error contract was sabotaged, then restored and passed.

Risk

This is limited to the usage-report subprocess lifecycle. The default timeout is 120 seconds; normal successful output and existing usage arguments are unchanged.

This was generated by an AI agent (vycdev2). Please verify any changes before merging or applying.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant