Skip to content

feat(runner): declare the runtime tier and egress posture at enrollment - #1156

Merged
trunk-io[bot] merged 2 commits into
compass-service-owner/rig-3512-posture-surfacesfrom
compass-service-owner/rig-3512-enroll-runtime-identity
Sep 13, 2026
Merged

feat(runner): declare the runtime tier and egress posture at enrollment#1156
trunk-io[bot] merged 2 commits into
compass-service-owner/rig-3512-posture-surfacesfrom
compass-service-owner/rig-3512-enroll-runtime-identity

Conversation

@rigel-mintaka

@rigel-mintaka rigel-mintaka commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

This PR is part of a stack containing 10 PRs:

  1. main
  2. feat(runtime): add the host-process WorkloadRuntime backend (RIG-3512) #1120
  3. feat(runner): derive the agent uid from the Runner's euid on the host backend (RIG-3512) #1125
  4. feat(runner): deliver the agent socket and config by path on the host backend (RIG-3512) #1135
  5. feat(runtime): distinguish a configured egress policy from an unset one #1142
  6. feat(runtime): refuse an egress policy the host tier cannot enforce #1143
  7. feat(runner): carry no egress policy on a backend that cannot enforce one #1145
  8. feat(runner): report the runtime tier and egress posture per session #1148
  9. feat(cli): show the runtime tier and egress posture per session #1153
  10. feat(ui): mark each agent's runtime tier and egress posture #1154
  11. "feat(runner): declare the runtime tier and egress posture at enrollment" (this PR)

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

@linear-code

linear-code Bot commented Sep 12, 2026

Copy link
Copy Markdown

RIG-3512

@rigel-mintaka
rigel-mintaka added this pull request to stack #1126 September 12, 2026 17:17
@github-actions

github-actions Bot commented Sep 12, 2026

Copy link
Copy Markdown

Compass engineering docs preview: https://compass-service-owner-rig-35-qq4l.compass-eng-docs.pages.dev

Deployed from compass-service-owner/rig-3512-enroll-runtime-identity at 1811bb3.

rigel-mintaka and others added 2 commits September 12, 2026 15:22
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
rigel-mintaka force-pushed the compass-service-owner/rig-3512-enroll-runtime-identity branch from 49bc06d to 1811bb3 Compare September 12, 2026 19:37
@trunk-io

trunk-io Bot commented Sep 12, 2026

Copy link
Copy Markdown

😎 Stack merged successfully - details.

@trunk-io
trunk-io Bot merged commit 612b9cd into main Sep 13, 2026
17 of 27 checks passed
@trunk-io
trunk-io Bot deleted the compass-service-owner/rig-3512-enroll-runtime-identity branch September 13, 2026 00:29
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