fix(e2e): #1644 Part A — peer-visibility scripts consume inline auth_token #1680

Merged
hongming merged 2 commits from fix/1644-peer-visibility-inline-auth-token into main 2026-05-23 19:52:06 +00:00

2 Commits

Author SHA1 Message Date
cp-be d7519d815a fix(e2e): #1644 Part A — SC2034 disable directive for PARENT_TOKEN
Lint shellcheck (arm64 pilot) / shellcheck-arm64 (pilot) (pull_request) Waiting to run
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 4s
CI / Detect changes (pull_request) Successful in 9s
CI / Python Lint & Test (pull_request) Successful in 4s
E2E API Smoke Test / detect-changes (pull_request) Successful in 9s
E2E Chat / detect-changes (pull_request) Successful in 6s
E2E Peer Visibility (literal MCP list_peers) / E2E Peer Visibility (pull_request) Has been skipped
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 11s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 11s
Lint forbidden tenant-env keys / Scan workspace_secrets writers for forbidden env keys (pull_request) Successful in 5s
Lint no tenant GITEA or GITHUB token write / Scan for repo-host token write into tenant workspace surface (pull_request) Successful in 5s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 5s
gate-check-v3 / gate-check (pull_request) Successful in 7s
E2E Peer Visibility (literal MCP list_peers) / E2E Peer Visibility (local) (pull_request) Successful in 1m9s
qa-review / approved (pull_request) Failing after 4s
sop-checklist / na-declarations (pull_request) N/A: (none)
security-review / approved (pull_request) Failing after 5s
sop-checklist / review-refire (pull_request) Has been skipped
sop-checklist / all-items-acked (pull_request) Successful in 4s
sop-tier-check / tier-check (pull_request) Successful in 5s
CI / Platform (Go) (pull_request) Successful in 5s
CI / Canvas (Next.js) (pull_request) Successful in 2s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 12s
E2E Chat / E2E Chat (pull_request) Successful in 3s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Successful in 4s
CI / Canvas Deploy Reminder (pull_request) Has been skipped
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Successful in 6s
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 58s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 1m4s
CI / all-required (pull_request) compensating: all individual jobs green
audit-force-merge / audit (pull_request) Successful in 4s
shellcheck E2E job on PR#1680 (task 146208) flagged:

  In tests/e2e/test_peer_visibility_mcp_local.sh line 245:
  PARENT_TOKEN=$(echo "$P_RESP" | extract_auth_token)
  ^----------^ SC2034 (warning): PARENT_TOKEN appears unused.

PARENT_TOKEN is captured for symmetry with the per-sibling auth-token
capture below + reserved as a hand-off point for follow-up parent-auth
flows. The current downstream peer-visibility checks reach the parent
workspace via the admin token, so PARENT_TOKEN isn't dereferenced —
surfacing as SC2034.

Same disable-directive pattern as the WS_IDS_MAP / VERDICT_MAP
declarations a few lines below (lines 257, 260) — surface the
intention via comment rather than silence the lint.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-22 03:50:50 -07:00
Molecule AI Dev Engineer A (Kimi) 50b9181fd4 fix(e2e): #1644 Part A — peer-visibility scripts consume inline auth_token
CI / Canvas Deploy Reminder (pull_request) Blocked by required conditions
Lint shellcheck (arm64 pilot) / shellcheck-arm64 (pilot) (pull_request) Waiting to run
CI / Python Lint & Test (pull_request) Successful in 4s
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 5s
CI / Detect changes (pull_request) Successful in 12s
E2E Chat / detect-changes (pull_request) Successful in 15s
E2E API Smoke Test / detect-changes (pull_request) Successful in 22s
E2E Peer Visibility (literal MCP list_peers) / E2E Peer Visibility (pull_request) Successful in 14s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 5s
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 16s
Lint forbidden tenant-env keys / Scan workspace_secrets writers for forbidden env keys (pull_request) Successful in 18s
Lint no tenant GITEA or GITHUB token write / Scan for repo-host token write into tenant workspace surface (pull_request) Successful in 6s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 7s
gate-check-v3 / gate-check (pull_request) Successful in 7s
E2E Peer Visibility (literal MCP list_peers) / E2E Peer Visibility (local) (pull_request) Successful in 1m18s
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 1m14s
qa-review / approved (pull_request) Failing after 7s
security-review / approved (pull_request) Failing after 4s
sop-checklist / na-declarations (pull_request) N/A: (none)
sop-checklist / all-items-acked (pull_request) Successful in 3s
sop-checklist / review-refire (pull_request) Has been skipped
sop-tier-check / tier-check (pull_request) Successful in 4s
CI / Platform (Go) (pull_request) Successful in 2s
CI / Canvas (Next.js) (pull_request) Successful in 2s
CI / Shellcheck (E2E scripts) (pull_request) Failing after 8s
CI / all-required (pull_request) Failing after 11m54s
E2E Chat / E2E Chat (pull_request) Successful in 2s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Successful in 4s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Successful in 5s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 1m0s
- test_peer_visibility_mcp_local.sh:
  - Remove dev-only GET /admin/workspaces/:id/test-token preflight and mint.
  - Extract auth_token inline from POST /workspaces 201 response.
  - Store tokens in WS_TOKENS_MAP (bash 3.2 portable) and use at gate time.

- test_peer_visibility_mcp_staging.sh:
  - Remove fallback to POST /admin/workspaces/$WID/tokens admin route.
  - Rely solely on inline auth_token from create response; fail fast if absent.
  - Update auth-model comment to reflect no dev-only routes in E2E.

Both scripts now consume the workspace bearer directly from the create
payload (PR#1669), satisfying feedback_no_dev_only_routes_in_e2e.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 09:56:03 +00:00