Skip to content

fix(runnerhub): map RUNNER_ERROR_CODE_FAILED_PRECONDITION to Connect FailedPrecondition - #287

Merged
mattwilkinsonn merged 1 commit into
mainfrom
compass-server-1442-t2-error-map
Aug 14, 2026
Merged

fix(runnerhub): map RUNNER_ERROR_CODE_FAILED_PRECONDITION to Connect FailedPrecondition#287
mattwilkinsonn merged 1 commit into
mainfrom
compass-server-1442-t2-error-map

Conversation

@seal-agent

Copy link
Copy Markdown
Contributor

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.

@linear-code

linear-code Bot commented Aug 12, 2026

Copy link
Copy Markdown

SEA-1442

@seal-agent seal-agent changed the title feat(proto): add RUNNER_ERROR_CODE_FAILED_PRECONDITION for operator-fault runner failures fix(runnerhub): map RUNNER_ERROR_CODE_FAILED_PRECONDITION to Connect FailedPrecondition Aug 12, 2026
@seal-agent
seal-agent changed the base branch from main to compass-runner-1442-proto-enum August 12, 2026 18:01
@seal-agent
seal-agent force-pushed the compass-server-1442-t2-error-map branch from b740f5d to 1b4c1ee Compare August 12, 2026 18:26
Base automatically changed from compass-runner-1442-proto-enum to main August 12, 2026 19:49
…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
seal-agent force-pushed the compass-server-1442-t2-error-map branch from 1b4c1ee to 8b29040 Compare August 13, 2026 21:34
@mattwilkinsonn
mattwilkinsonn merged commit e6f26b6 into main Aug 14, 2026
2 checks passed
@mattwilkinsonn
mattwilkinsonn deleted the compass-server-1442-t2-error-map branch August 14, 2026 15:30
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.

2 participants