fix(mcp): bound the run_watch summary and stop the watch on cancel #613
No reviewers
Labels
No labels
breaking
bug
documentation
enhancement
epic
good first issue
help wanted
refactoring
resolution/duplicate
resolution/invalid
resolution/wontfix
security
severity/critical
severity/high
severity/low
severity/medium
status/abandoned
status/blocked
status/needs-decision
status/needs-info
status/needs-verification
testing
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
sixfold-space/madtea!613
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "issue-602-run-watch-bounds"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
run_watchappended a status line on every poll, so a long timeout with a short interval grew the result without bound. It now records a line only when the status changes, so the summary stays a few lines long for any timeout.The wait between polls used
time.Sleep, so a cancelled request kept polling. It now waits on the request context and returns at once on cancel, with the status so far.The loop moved into
watchRun, which takes the status read as a function, so tests drive it without a forge. Each new test fails when its fix is reverted. The timeout is unchanged: 300 s default, set by the caller.run_watchstays an intentional mirror of the CLIactions runs watch.Closes #602
Closes #602