Skip to content

Fix the console Agents view for saved providers and authenticate node routes first - #136

Merged
SaladDay merged 5 commits into
mainfrom
codex/boundary-acceptance-fixes
Sep 25, 2026
Merged

SaladDay merged 5 commits into
mainfrom
codex/boundary-acceptance-fixes

Conversation

@SaladDay

@SaladDay SaladDay commented Sep 25, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Fixes two defects found in the real acceptance run of the Core/Web boundary release (#128), plus the findings from their blind review.

  • D1: the console's Agents view failed for any Project with a saved Agent carrying x_agents_core.model_provider. The admin client validated saved Agents with the Session snapshot rule, which accepts only {harness}.
    • Saved Agents now use their own projection. It accepts exactly Core's read shapes: absent, {}, harness only, provider only, both. It still rejects unknown members and any api_key.
    • Session snapshots stay strict.
  • D4: node machine routes revealed deployment state before authenticating. /api/v1/sandbox-node/configuration and /enroll returned 503 or 409 for invalid credentials while the deployment was uninitialized or E2B.
    • They now authenticate first: a missing, invalid or foreign-installation credential gets 401 regardless of state.
    • A recognized credential keeps the previous 503 and 409 behaviour.
    • Administrator routes are unchanged.
  • Blind review fixes:
    • The installation-mismatch check runs before the "initialized" check.
    • The contract doc limits the 503 to configuration and enrollment.
    • Core's model-provider base_url validation now rejects invalid ports and hosts. The client's read check is no stricter than Core's write rule, so one saved Agent can no longer break the whole Agents list.

Review

  • An independent blind review found no P0, P1 or P2 issues.
  • The three P3s were fixed in ca5c6763 and verified by regression tests and the gate. There was no second review round, per the small-fix rule.

Verification

  • Full local server gate (acceptance-fixes-r4) on 5deb9b22: passed. Playwright browser cases were skipped on the server (Chrome unavailable; approved skip).
  • fca93f5d merges main's Replace the forced first-run with a Getting started checklist #133, a Web-only change whose files don't overlap with this branch. On the merged tree:
    • root pnpm typecheck passed;
    • agents-client: 591/591;
    • pnpm test:web: 339/339.
  • Each regression test fails on the base and passes at head.

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith with what you need. Autofix is disabled.

The console's Agents page failed for any Agent saved with x_agents_core.model_provider
because the admin projection reused the Session Agent projection, which accepts only
{harness}. Saved Agent reads return an optional harness and an optional safe provider
view (protocol, base_url, optional limits, api_key_configured), and an empty object when
neither is saved.

Split the Core extension check: Session Agent snapshots keep the exact harness-only
shape, and saved Agents reuse the execution-configuration provider validator. Unknown
members, a null provider and any api_key are still rejected.
Before the sandbox deployment was initialized, GET /api/v1/sandbox-node/configuration
and POST /api/v1/sandbox-node/enroll answered any credential, invalid ones included,
with 503 runtime_node_unavailable: the shared deployment lock rejected an uninitialized
deployment before the route checked its credential. Configuration also reported a
non-node (E2B) deployment as 409 before authenticating.

Node routes now lock the deployment without that check, authenticate the enrollment
token or node credential first, and only then report an uninitialized deployment (503),
an installation mismatch (401) or the existing mode, maintenance and specification
outcomes. Administrator routes keep the initialized-deployment check. Identity and the
node connection already authenticated first and are unchanged.
…ored provider URLs

A claimed but uninitialized installation now rejects an enrollment token or node
credential issued for another installation with 401 before reporting 503, as it
does after initialization, so the two deployment states are indistinguishable to
such a caller. The contract states that only configuration and enroll answer an
accepted credential with 503 before initialization.

Core's provider base URL admission now requires a port in 1-65535 and a usable
host: an IP address, or a domain with valid IDNA labels of letters, digits,
hyphens and underscores and a non-numeric final label. The client's read check
no longer parses the host with URL: it keeps the HTTPS, credential, query and
fragment checks, so a base URL an earlier Core stored cannot fail a whole Agents
list.
@SaladDay
SaladDay merged commit 993a724 into main Sep 25, 2026
3 checks passed
@SaladDay
SaladDay deleted the codex/boundary-acceptance-fixes branch October 7, 2026 06:37
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.

1 participant