You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ax watch hangs forever on a task that doesn't exist #435
The INITIAL frame reuses the already-resolved task, so the store is read once per watch instead of twice. With this, ax watch task does-not-exist exits the same way ax get task does-not-exist does; watches on existing tasks are unaffected.
go build ./internal/..., go vet ./internal/... and the full go test ./... pass, including TestServerGRPC, which covers the existing INITIAL/MODIFIED path.
I tried to open the PR, but non-collaborator PR creation now returns "does not have the correct permissions to execute CreatePullRequest" (my earlier #408 was accepted on 2026-09-25, so this looks recent). Happy to open it as soon as that's possible — or a maintainer can pick up the patch above, which is also on the fork branch fix/watch-task-not-found.
I am taking this on, building on the diagnosis and reproductions from @vincent0426 and @Yi-111-a. I will keep watch registration before the initial read so updates cannot fall into a lookup/subscription gap, return NotFound for missing tasks and Internal for backend errors, and test subscription cleanup, cancellation, initial/modified delivery, and the registration race. The PR will include baseline failure and captured CLI/API/Redis evidence.
Obsolete: ax watch and WatchTask were removed (#522).
We are closing this as part of a cleanup after the significant changes in v0.4.0, because it is probably obsolete or out of scope now. If you think this is a mistake, please reopen it (or leave a comment if you can't reopen it).
Activity
Yi-111-a commentedon Oct 1, 2026
Confirming the diagnosis with a reproduction, and the fix matches what the issue describes.
Verified on
ac23328(current main):internal/server/server.go:386discards theGetTaskerror:Then
cmd/ax/main.go:683callsstream.Recv()undercontext.Background(), so nothing ever ends the wait.A regression test that reproduces the hang against unmodified
main(5s deadline, so it can only pass if the server actively returns the error):Proposed change — resolve the task before subscribing, and map
store.ErrNotFoundtocodes.NotFound, matchingGetTask:The
INITIALframe reuses the already-resolved task, so the store is read once per watch instead of twice. With this,ax watch task does-not-existexits the same wayax get task does-not-existdoes; watches on existing tasks are unaffected.go build ./internal/...,go vet ./internal/...and the fullgo test ./...pass, includingTestServerGRPC, which covers the existingINITIAL/MODIFIEDpath.I tried to open the PR, but non-collaborator PR creation now returns "does not have the correct permissions to execute CreatePullRequest" (my earlier #408 was accepted on 2026-09-25, so this looks recent). Happy to open it as soon as that's possible — or a maintainer can pick up the patch above, which is also on the fork branch
fix/watch-task-not-found.erain commentedon Oct 13, 2026
I am taking this on, building on the diagnosis and reproductions from @vincent0426 and @Yi-111-a. I will keep watch registration before the initial read so updates cannot fall into a lookup/subscription gap, return NotFound for missing tasks and Internal for backend errors, and test subscription cleanup, cancellation, initial/modified delivery, and the registration race. The PR will include baseline failure and captured CLI/API/Redis evidence.
rakyll commentedon Nov 25, 2026
Obsolete: ax watch and WatchTask were removed (#522).
We are closing this as part of a cleanup after the significant changes in v0.4.0, because it is probably obsolete or out of scope now. If you think this is a mistake, please reopen it (or leave a comment if you can't reopen it).