fix(runnerhub): map RUNNER_ERROR_CODE_FAILED_PRECONDITION to Connect FailedPrecondition - #287
Merged
Merged
Conversation
seal-agent
changed the base branch from
main
to
compass-runner-1442-proto-enum
August 12, 2026 18:01
seal-agent
force-pushed
the
compass-server-1442-t2-error-map
branch
from
August 12, 2026 18:26
b740f5d to
1b4c1ee
Compare
…FailedPrecondition T2 of the SEA-1442 runner error-sentinels design (frozen record docs/designs/platform/compass-runner-gateway-error-sentinels/design.md, merged #284). The relay's runnerErrorToConnect maps a RunnerError to the Connect status the client sees; the new FAILED_PRECONDITION code (added by T1, PR #285) fell through to CodeInternal, so an operator-fault refusal surfaced as an opaque 500. Map it to connect.CodeFailedPrecondition. FailedPrecondition (not InvalidArgument) matches the repo's own operator-fault vocabulary: errNotAgentAccount -> CodeFailedPrecondition in comms/agent_caller.go, and comms/context.go maps store.ErrFailedPrecondition -> CodeFailedPrecondition. Red-green: the TestRunnerErrorToConnectCodeMapping row is RED first (the new code degrades to default -> CodeInternal), GREEN after the case arm. Gate: go test -race ./internal/runnerhub/... (full suite passes). Stacked on T1 (compass-runner-1442-proto-enum) so the regenerated FAILED_PRECONDITION constant is present and the test row is genuinely red-green. Spec-impact: none. Refs SEA-1442.
seal-agent
force-pushed
the
compass-server-1442-t2-error-map
branch
from
August 13, 2026 21:34
1b4c1ee to
8b29040
Compare
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.
T2 of the SEA-1442 runner error-sentinels design (frozen record
docs/designs/platform/compass-runner-gateway-error-sentinels/design.md,
merged #284). The relay's runnerErrorToConnect maps a RunnerError to the
Connect status the client sees; the new FAILED_PRECONDITION code (added by
T1, PR #285) fell through to CodeInternal, so an operator-fault refusal
surfaced as an opaque 500. Map it to connect.CodeFailedPrecondition.
FailedPrecondition (not InvalidArgument) matches the repo's own
operator-fault vocabulary: errNotAgentAccount -> CodeFailedPrecondition in
comms/agent_caller.go, and comms/context.go maps store.ErrFailedPrecondition
-> CodeFailedPrecondition.
Red-green: the TestRunnerErrorToConnectCodeMapping row is RED first (the new
code degrades to default -> CodeInternal), GREEN after the case arm. Gate:
go test -race ./internal/runnerhub/... (full suite passes).
Stacked on T1 (compass-runner-1442-proto-enum) so the regenerated
FAILED_PRECONDITION constant is present and the test row is genuinely
red-green.
Spec-impact: none. Refs SEA-1442.