fix(dispatch): close the report out on the run's outcome - #3
Merged
Conversation
A report moved to "dispatched" when its run started and never moved again, so one that had been handled and one that had been ignored looked the same, and dispatchAll skipped both forever. A clean exit is not the same as the work being done. Under the default permission "plan" the agent can only propose: it writes a plan, asks whether to proceed, and exits 0 having touched nothing, with no one there to answer. That was recorded as a plain success on a stuck report, which reads as devbar ignoring what you sent while the run still costs money. A finished run now resolves the report when the working tree changed, and reopens it as "new" otherwise, carrying a note that names plan mode as the reason when that is what happened. Reopening is not a retry: the finished task still guards its report, so nothing re-runs on its own. Deciding that from `git status --porcelain` alone was wrong, and wrong in the common case. Porcelain names which paths are dirty, not their content, so a file already modified before a run and edited again during it produced byte-identical output — a real edit read as a no-op, and the report was reopened after being handled. gitSnapshot now stamps each dirty path with its size and mtime and the comparison is per file. That also fixes changedFiles, which shared the blind spot and never reported an edit to an already-dirty file. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ph2Rn26we5JcGUhtQckrdQ
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
A report moved to "dispatched" when its run started and never moved again, so one that had been handled and one that had been ignored looked the same, and
dispatchAllskipped both forever.A clean exit is not the same as the work being done. Under the default permission
planthe agent can only propose: it writes a plan, asks whether to proceed, and exits 0 having touched nothing, with no one there to answer. That was recorded as a plain success on a stuck report, which reads as devbar ignoring what you sent while the run still costs money.A finished run now resolves the report when the working tree changed, and reopens it as
newotherwise, carrying a note that names plan mode as the reason when that is what happened. Reopening is not a retry: the finished task still guards its report, so nothing re-runs on its own.Deciding that from
git status --porcelainalone was wrong, and wrong in the common case. Porcelain names which paths are dirty, not their content, so a file already modified before a run and edited again during it produced byte-identical output — a real edit read as a no-op, and the report was reopened after being handled.gitSnapshotnow stamps each dirty path with its size and mtime and the comparison is per file. That also fixeschangedFiles, which shared the blind spot and never reported an edit to an already-dirty file.Verification
All CI steps run locally and green: build, app build,
type-check,lint(0 errors),format --check,test(199 pass / 0 fail). CI on the pushed branch is also green.🤖 Generated with Claude Code
https://claude.ai/code/session_01339td96EX4bLYrbCNc4NTH