fix(runnerhub): map RUNNER_ERROR_CODE_FAILED_PRECONDITION to Connect FailedPrecondition - #287
Open
seal-agent wants to merge 3 commits into
Open
fix(runnerhub): map RUNNER_ERROR_CODE_FAILED_PRECONDITION to Connect FailedPrecondition#287seal-agent wants to merge 3 commits into
seal-agent wants to merge 3 commits into
Conversation
…ault runner failures The Runner has no wire code for "your deployment is misconfigured", so an operator-fault failure (canonically an agent socket path over the AF_UNIX limit, or socket-dir permissions/ownership) is relayed to the admin as Connect `Internal` — reading as a Compass bug rather than a knob to turn. Adds one enum value to `RunnerErrorCode` (`proto/compass/v1/runner.proto`), tag 5, mirroring the `RESOURCE_EXHAUSTED` precedent (a new value with a doc comment naming its Connect mapping and the distinguishing rationale), and regenerates the internal Go tree. This is the shared prerequisite for the runner-side sentinel mapping (T3) and the server-side `runnerErrorToConnect` arm (T2, compass-server lane); an unmapped code still degrades to today's `CodeInternal`, so nothing breaks until those land. The doc comment disambiguates DIRECTION: this code flows outbound Runner->Server->admin, distinct from the inbound Server->Runner `CodeFailedPrecondition` the Runner treats as a benign no-secrets / no-config-surface signal. Wire change is additive and buf-breaking-safe (a new value in the internal-only `compass.v1` `RunnerService` package; no public TS client generates it). buf lint/breaking/drift/gen-fence green; generated code compiles. Design: docs/designs/platform/compass-runner-gateway-error-sentinels/design.md (T1). Spec-impact: none. Refs SEA-1442. Co-authored-by: Matt Wilkinson <matt@rigel.build>
…eir package path Review nit on #285: the inbound-direction disambiguation cited bare host.go / config_materialize.go, ambiguous in a multi-package tree. Qualify to go/internal/runner so a reader grepping lands in the right package. Comment-only; no wire/descriptor change (regenerated doc-comment copy tracks it). Spec-impact: none. Refs SEA-1442. Co-authored-by: Matt Wilkinson <matt@rigel.build>
seal-agent
changed the base branch from
main
to
compass-runner-1442-proto-enum
August 12, 2026 18:01
…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 12, 2026 18:26
b740f5d to
1b4c1ee
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.