feat(runner): declare the runtime tier and egress posture at enrollment - #1156
Merged
Conversation
This was referenced Sep 12, 2026
Merged
rigel-mintaka
added this pull request to stack #1126
September 12, 2026 17:17
|
Compass engineering docs preview: https://compass-service-owner-rig-35-qq4l.compass-eng-docs.pages.dev Deployed from |
mattwilkinsonn
approved these changes
Sep 12, 2026
The Runner stamped both fields in its own Status path, which no render surface reads: the CLI reads the board snapshot and the UI reads the lifecycle bus, and each built its own AgentSessionStatus carrying only the session, state and account. Every real session therefore reported an unknown tier and posture while the unit tests passed, because each test exercised a seam that already had the fields set. Tier and posture are facts of the one backend a Runner drives, not of a session, so EnrollRequest carries them once and the hub stamps them onto every status it publishes for that Runner. The relayed SessionFrame stays unchanged. Reading them under the hub's lock means a status published after a reattach reflects the newly enrolled Runner, never the previous one, and an absent Runner yields UNSPECIFIED rather than a plausible default. PostureOf joins TierOf as an engine probe so the value declared at enrollment is derived the same way a live workload derives it; AgentRuntime.EgressPosture now delegates to it rather than repeating the marker check. Co-authored-by: Matt Wilkinson <matt@rigel.build>
Review findings on the enrollment-declared runtime identity, all documentation except the last: - EnrollRequest now says the tier and posture are trusted as declared. They sat directly beneath runner_id, whose doc spells out that it is cross-checked and untrusted, which invites the opposite inference or a cross-check that cannot exist: only the Runner can see which namespace an agent got, and it is the component enforcing egress. - deliverSession's comment no longer implies the account and the tier/posture are read atomically; they are two acquisitions and can straddle a re-enroll, which is harmless while one Runner enrolls at a time. - runnerRuntimeIdentity's nil branch records that no disconnect path nils h.runner, and that this is load-bearing: the board replaces its whole entry per publish, so a later UNSPECIFIED would regress a known tier. - The fail-honest test's docstring claimed more than the test gives. Its expectation is the field's zero value, so it pins only that a zero declaration stays zero; propagation is pinned elsewhere. - egressUnenforced now derives from PostureOf rather than repeating the marker probe. Co-authored-by: Matt Wilkinson <matt@rigel.build>
rigel-mintaka
force-pushed
the
compass-service-owner/rig-3512-enroll-runtime-identity
branch
from
September 12, 2026 19:37
49bc06d to
1811bb3
Compare
mattwilkinsonn
approved these changes
Sep 12, 2026
|
😎 Stack merged successfully - details. |
trunk-io
Bot
deleted the
compass-service-owner/rig-3512-enroll-runtime-identity
branch
September 13, 2026 00:29
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.
This PR is part of a stack containing 10 PRs:
mainThe Runner stamped both fields in its own Status path, which no render
surface reads: the CLI reads the board snapshot and the UI reads the
lifecycle bus, and each built its own AgentSessionStatus carrying only the
session, state and account. Every real session therefore reported an
unknown tier and posture while the unit tests passed, because each test
exercised a seam that already had the fields set.
Tier and posture are facts of the one backend a Runner drives, not of a
session, so EnrollRequest carries them once and the hub stamps them onto
every status it publishes for that Runner. The relayed SessionFrame stays
unchanged. Reading them under the hub's lock means a status published after
a reattach reflects the newly enrolled Runner, never the previous one, and
an absent Runner yields UNSPECIFIED rather than a plausible default.
PostureOf joins TierOf as an engine probe so the value declared at
enrollment is derived the same way a live workload derives it;
AgentRuntime.EgressPosture now delegates to it rather than repeating the
marker check.
Co-authored-by: Matt Wilkinson matt@rigel.build