Repository navigation
Show hidden quiet-history runs in the Log on request - #173
Merged
Merged
Conversation
A quiet-history task's successful run is now recorded, marked "quiet": true, with its log. Hidden runs are kept for 48 hours (at most 200 per task), do not count against the run history limit, are never unread, and stay out of the default Log, `dispatchq status` and the usage statistics. The Log's Filter popover gains a temporary "Show hidden runs" switch (memory only) that lists them, each marked Hidden. Failed runs of quiet tasks keep showing without it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Optimistic run patches (read, cancel) and a run-now's new run now reach the Log's list while Show hidden runs is on. Mark all read skips quiet runs, so state.json does not collect every watcher tick. The UI says hidden runs are kept for up to 48 hours, since the per-task cap can end that sooner. Runs and PruneHistory read history through the same helper as PruneQuietRuns. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t-runs # Conflicts: # README.md # internal/store/store.go
…the Log filter reachable AppendRun, PruneHistory and PruneQuietRuns now hold the store's cross-process write lock, so a rewrite by one process (the daemon, or `dispatchq run-now`) no longer drops a run the other appended meanwhile. Hidden runs are pruned once more than 20 are due, instead of rewriting history on every watcher tick. The Log keeps its toolbar whenever the list is loaded or Show hidden runs is on: an install whose only runs are hidden can reach the switch, and an empty list with the switch on still shows the chip that turns it off. The empty state says where hidden runs are. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…write Review follow-up. Hidden runs are pruned once more than 20 are due or once one is six hours past its 48 hours, so a stopped or rarely ticking watcher still loses them on schedule. PruneHistory and PruneQuietRuns read history without the cross-process lock and take it (reading again) only for a rewrite, so a finished run with nothing to drop holds nobody up. The Log's empty state mentions hidden runs only when the queue has a quiet-history task. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review follow-up. The daemon drops all expired hidden runs when it starts, batch or not, so a queue whose only quiet task stopped does not keep them. PruneHistory and PruneQuietRuns share one helper for the decide-then-lock rewrite; a read error in the unlocked pass (another process's append caught mid-line) is left to the pass under the lock. The cross-process test no longer reports from a goroutine after the test ended. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes
"quiet": trueinhistory.jsonl), with its log. Before, it left no trace.GET /api/runsleaves hidden runs out by default, and?hidden=1includes them.GET /api/runs/{id}finds them, so a notification link to a quiet run's result now opens its log.dispatchq status(including--all --json, which scripts read) leaves hidden runs out unless you pass--hidden. With it, the JSON carries"quiet": true.run-nowon a quiet task now prints the result instead of "no run recorded".External readers of history.jsonl
I checked
claudeq-failure-watch/watch.pyread-only. It reports nothing new for a success row:failures()only looks atfailed, andattention_reason()returns nothing forsuccess. A hidden success does count as "a later run of the same task". A quiet task's rate-limit pause that was later resumed and succeeded no longer raises a false "resume overdue" alert, and its earlier non-defect failure is no longer reported once a later tick succeeds. That is the same rule ordinary tasks already follow. A hidden run's log is deleted together with its history row, so the orphaned-log check is not tripped.Downgrade
update.DataFloorstays the same: older releases can still read the file and simply ignorequiet. After a downgrade, the hidden runs still on disk would show as ordinary runs until they age out under the normal cap.Verification
go build,gofmt,go vet,golangci-lint(0 issues),go test ./... -race, plus webtypecheck,lint,vitest(283 tests) andbuildall pass.DISPATCHQ_HOMErunning real script tasks, with the dev UI captured by headless Chromium at desktop and narrow width.🤖 Generated with Claude Code