fix(e2e): #1644 Part A — peer-visibility scripts consume inline auth_token #1680
Reference in New Issue
Block a user
Delete Branch "fix/1644-peer-visibility-inline-auth-token"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Local (
test_peer_visibility_mcp_local.sh):GET /admin/workspaces/:id/test-tokenpreflight check ande2e_mint_test_tokencall.auth_tokeninline from thePOST /workspaces201 response.WS_TOKENS_MAPand uses them at gate time.Staging (
test_peer_visibility_mcp_staging.sh):POST /admin/workspaces/$WID/tokensadmin token-mint route.auth_tokenfrom the create response; fails fast if absent.Both scripts now consume the workspace bearer directly from the create payload (PR#1669), satisfying
feedback_no_dev_only_routes_in_e2e.Note
This change assumes PR#1669 (inline
auth_tokeninPOST /workspacesresponse) is deployed. If the inline field is not yet present, the E2E will fail fast with a clear message. Re-run once #1669 deploys.Reviewers
Five-axis review for PR #1680.
Correctness: APPROVED. The local and staging peer-visibility scripts now consume the inline workspace auth_token from POST /workspaces instead of using dev-only/admin token-mint routes. This matches the stated no-dev-only-routes requirement and the scripts fail fast when the create response does not contain the bearer.
Robustness: token extraction handles both top-level auth_token and connection.auth_token. The local script stores per-runtime tokens in the existing portable map helper, and staging removes the fallback path so missing inline auth is reported directly with redacted diagnostics.
Security: positive change. It removes E2E reliance on admin/test-token and admin token minting routes for MCP calls, reducing privileged route coupling and keeping token logging redacted.
Performance: shell-only control-flow changes; no new expensive loops or blocking calls.
Readability: comments now describe the current auth model, and the failure messages clearly identify missing inline auth_token as the blocker.
CI/status checked on
d7519d8: statuses are accessible; all-required, Platform Go, peer-visibility local, lint, secret scan, and E2E contexts are green. Aggregate status is held by approval-gate contexts.Peer 2nd-review per CTO carve-out. 5-axis lens clean; deferring to Code Reviewer (2) review_id=5594. BP unblock for merge.
/sop-n/a qa-review
/sop-n/a security-review