Skip to content

fix: diagnose locality-restricted resume failures instead of generic error#453

Closed
Mesut Oezdil (mesutoezdil) wants to merge 1 commit into
agent-substrate:mainfrom
mesutoezdil:fix/resume-locality-error-diagnostics
Closed

fix: diagnose locality-restricted resume failures instead of generic error#453
Mesut Oezdil (mesutoezdil) wants to merge 1 commit into
agent-substrate:mainfrom
mesutoezdil:fix/resume-locality-error-diagnostics

Conversation

@mesutoezdil

@mesutoezdil Mesut Oezdil (mesutoezdil) commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Locality-restricted resume failures now say why instead of the generic "no free workers available": either the restricted node's eligible workers are all busy, or the node has no eligible workers at all (may have been removed). Status code unchanged, message only.

Test plan: go build ./..., go test ./cmd/ateapi/..., added TestNoFreeWorkerError.

Fixes #398

…error

When a local snapshot restricts resume to specific nodes and no worker
is picked, distinguish a real locality conflict (all eligible workers
on those nodes are busy, or the nodes have no eligible workers at all)
from cluster-wide capacity exhaustion, instead of the generic
FailedPrecondition: no free workers available.

Fixes agent-substrate#398
@mesutoezdil

Copy link
Copy Markdown
Contributor Author

Dmitry Berkovich (@dberkov) would you mind taking a look when you get a chance?

@HavenXia

Copy link
Copy Markdown
Collaborator

#401 seems already fixed it but need a rebase

@mesutoezdil

Copy link
Copy Markdown
Contributor Author

Closing in favor of #401, which covers the same diagnostic and does it more efficiently (single pass via workerScan vs. this PR's two passes), and was opened first (2026-07-06). Thanks Haven Xia (@HavenXia) for flagging.

@mesutoezdil
Mesut Oezdil (mesutoezdil) deleted the fix/resume-locality-error-diagnostics branch July 17, 2026 18:20
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.

Locality-restricted resume failures report a misleading "no free workers available" error

2 participants