Skip to content

refactor(api): move the ws-* proxy out of index.ts (L2, pure move) - #2714

Merged
simple-agent-manager[bot] merged 5 commits into
mainfrom
sam/task-l2-landing-slice-t76yge
Nov 14, 2026
Merged

simple-agent-manager[bot] merged 5 commits into
mainfrom
sam/task-l2-landing-slice-t76yge

Conversation

@simple-agent-manager

@simple-agent-manager simple-agent-manager Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Merge approved by Raphaël on November 14, 2026 (about 13:16 UTC): "Regarding PR2714, yeah, go ahead and merge it." Source: chat session a6bd681e-26f2-4ea3-9483-7188edcf27d7, message 01M7D5HFP5QSME6GJ08CFAF811. The earlier hold line on this pull request is lifted.

In the same message he lifted per-PR approval for slices that only reorganize code with identical behaviour; slices that change behaviour still go to him. Coordinator review of head 0d75915a53b62c424b659131b4cc5fa13c98e04c: no findings (see comments).

Summary

Self-host landing plan, slice L2 (idea 01M72M9AEB933ZY8269D376DKC, "LANDING PLAN (part 5 of 7)"): move the workspace-subdomain (ws-{id}.*, ws-{id}--{port}.*) proxy out of apps/api/src/index.ts. Pure move, no behaviour change.

  • apps/api/src/routes/workspace-subdomain-proxy.ts: workspaceSubdomainProxy(c, next), the former anonymous app.use('*', …) middleware (main's index.ts lines 258-732).
  • apps/api/src/routes/workspace-port-access.ts: resolveWorkspacePortAccess(c, url, workspaceId, targetPort), the former inline port-access block (sam_port_access cookie, ?port_token= → 302 + Set-Cookie, public-ports lookup, 401 "Session expired" page). It returns the 302 to the caller, which still sends it only after the D1 ownership check, as before.
  • index.ts mounts app.use('*', workspaceSubdomainProxy) at the same position and drops the imports only the block used. index.ts: 1,040 → 543 lines (under the 800-line limit), so it leaves the EXEMPT_FILES list in scripts/quality/check-file-sizes.ts (that list's own comment says to remove split files).
  • File names, function names and signatures match the integration branch sam/selfhost-pass-2, so later slices (L6 and the reverse-tunnel/gateway work) apply as small diffs. The bodies are main's current code, not the integration branch's.

Middleware order (unchanged)

app.onError(handleAppError) → interactive-preview host app.use → Pages proxy app.use → ws- proxy* (app.use('*', workspaceSubdomainProxy)) → requestLoggingMiddleware() → analyticsMiddleware() → apiCors → routes → /mcp/* CORS overrides. The ws-* proxy is still the third app.use('*'), before request logging, analytics, CORS and every auth middleware, exactly as on main. Tests that reach the proxy through the Worker entry (worker.default.fetch) were not touched and pass.

Pure-move proof

.tmp/l2/verify_pure_move.py (scratch, not committed: the repository has no home for one-off verification scripts) takes the ws-* block from git show origin/main:apps/api/src/index.ts, takes the two new files, re-inlines resolveWorkspacePortAccess's body in place of its four-line call site, and compares after stripping indentation and blank lines (import/export lines are outside the compared bodies). Run against main 6d79731d5:

  • Comment above the middleware identical: yes
  • Normalized body: 434 lines old, 434 new, identical: yes
  • Segments: 18 of 18 identical; imports: 25 of 25 resolve to the same modules
  • Proven discriminating: changing one string literal and one header name in the new file turned two segments to NO and the body comparison to False.
# Segment (old index.ts ws-* middleware) normalized lines New location Identical
1 subdomain parse + 400 INVALID_WORKSPACE 14 workspace-subdomain-proxy.ts workspaceSubdomainProxy yes
2 port-access locals (caller) 9 workspace-subdomain-proxy.ts workspaceSubdomainProxy yes
3 5a sam_port_access cookie 13 workspace-port-access.ts resolveWorkspacePortAccess yes
4 5b ?port_token= handshake + 302 build 34 workspace-port-access.ts resolveWorkspacePortAccess yes
5 public-ports D1 lookup 14 workspace-port-access.ts resolveWorkspacePortAccess yes
6 5f HTML 401 "Session expired" page + end of port block 25 split: caller locals in proxy, body in port-access yes
7 session auth (BetterAuth) 14 workspace-subdomain-proxy.ts workspaceSubdomainProxy yes
8 terminal-token auth 19 workspace-subdomain-proxy.ts workspaceSubdomainProxy yes
9 D1 ownership lookup + 404/gone 17 workspace-subdomain-proxy.ts workspaceSubdomainProxy yes
10 node runtime lookup 10 workspace-subdomain-proxy.ts workspaceSubdomainProxy yes
11 status gate (running/recovery/boot-log) 18 workspace-subdomain-proxy.ts workspaceSubdomainProxy yes
12 302 after ownership 5 workspace-subdomain-proxy.ts workspaceSubdomainProxy yes
13 cf-container branch 130 workspace-subdomain-proxy.ts workspaceSubdomainProxy yes
14 VM branch: backend hostname + log/metric 25 workspace-subdomain-proxy.ts workspaceSubdomainProxy yes
15 VM branch: port path + port-proxy token 22 workspace-subdomain-proxy.ts workspaceSubdomainProxy yes
16 VM branch: header rewrite 14 workspace-subdomain-proxy.ts workspaceSubdomainProxy yes
17 VM branch: fetch + ports readiness 37 workspace-subdomain-proxy.ts workspaceSubdomainProxy yes
18 VM branch: Set-Cookie strip + return 14 workspace-subdomain-proxy.ts workspaceSubdomainProxy yes

The only non-identical lines are the expected ones: the export async function wrappers, PortAccessResult and the return { userId, portAccessRedirect, publicPortAccess }, the four-line delegation in the caller (const access = await resolveWorkspacePortAccess(…), if (access instanceof Response) return access;, the destructuring assignment, one comment), import/export lines, the app.use('*', workspaceSubdomainProxy) registration and its one-line comment, and the new files' header doc comments.

Import mapping (25 symbols)
Imported symbol used by the old block old module (from index.ts) imported by new file from
SAM_PROXIED_REQUEST_HEADER ./services/vm-agent-container ../services/vm-agent-container
WorkspaceStatus @simple-agent-manager/shared @simple-agent-manager/shared
and drizzle-orm drizzle-orm
assertSessionUserApproved ./services/signup-approval ../services/signup-approval
assertTerminalTokenSessionLive ./services/terminal-token-liveness ../services/terminal-token-liveness
createAuth ./auth ../auth
drizzle drizzle-orm/d1 drizzle-orm/d1
eq drizzle-orm drizzle-orm
fetchVmAgentContainer ./services/vm-agent-container ../services/vm-agent-container
getNodeBackendBaseUrl ./services/node-agent-readiness ../services/node-agent-readiness
getVmAgentContainerConfig ./services/vm-agent-container ../services/vm-agent-container
isExpectedWorkspacePortsUpstreamUnavailable ./routes/workspaces/ports-readiness ./workspaces/ports-readiness
isPastHardExpiry ./services/agent-sign-in/session-cap ../services/agent-sign-in/session-cap
isWorkspacePortsListRequest ./routes/workspaces/ports-readiness ./workspaces/ports-readiness
log ./lib/logger ../lib/logger
parseWorkspaceSubdomain ./lib/workspace-subdomain ../lib/workspace-subdomain
recordNodeRoutingMetric ./services/telemetry ../services/telemetry
schema ./db/schema ../db/schema
serializeError ./lib/logger ../lib/logger
signTerminalToken ./services/jwt ../services/jwt
stripPreviewAuthCookies ./lib/preview-cookies ../lib/preview-cookies
verifyPortAccessToken ./services/jwt ../services/jwt
verifyTerminalToken ./services/jwt ../services/jwt
workspacePortsReadinessPayload ./routes/workspaces/ports-readiness ./workspaces/ports-readiness
workspacePortsStateForStatus ./routes/workspaces/ports-readiness ./workspaces/ports-readiness

Intentionally NOT included (input for slice L6 and the self-host transport slices)

The integration branch's workspace-subdomain-proxy.ts differs from this PR only in:

  1. redirect: 'manual' unconditionally on both proxied fetches (main keeps targetPort !== null ? 'manual' : c.req.raw.redirect), plan item C4 / slice L6.
  2. Node routing via readNodeAgentRouteRow / nodeAgentRouteFromRow / NodeAgentRouteError (one read for runtime + transport + lease port), with a new 503 NODE_UNREACHABLE and a node_route_unavailable ports payload.
  3. Reverse-tunnel loopback origin for vmUrl (nodeRoute.kind === 'reverse-tunnel').
  4. Caddy forward_auth gateway: isGatewayAuthorizationRequest, gatewayUnsupportedRuntimeResponse (cf-container), gatewayDecisionResponse.
  5. headers.delete('x-sam-gateway-secret') on both the container and VM paths.
  6. The self-host paragraph in the header comment.

workspace-port-access.ts on the integration branch is byte-identical to this PR's except the header comment.

Validation

  • pnpm lint (via pnpm check:fast, exit 0)
  • pnpm typecheck (api; rebuilt dependencies in order on main 6d79731d5)
  • pnpm test: full apps/api vitest run, JSON reporter: success, 3,368 files, 15,022 tests, 15,018 passed, 4 skipped, 0 failed (on base d65360dcd; the rebase onto 6d79731d5 touched no file in this diff, and the proxy tests were re-run there: 67/67)
  • Additional validation: quality:file-sizes exit 0 (index.ts 543 lines); quality:ast-checks 0 errors and no warnings in touched files; quality:source-contract-tests pass; check-file-sizes.test.ts 9/9; Workers-runtime entry tests workspace-preview-websocket, signup-approval-gate, d1-request-session, instant-sleeping-deletion-guard: 88/88
  • N/A: no sweep/cron/alarm candidate selection changed

Test edits are file-path only: tests/unit/ws-proxy.test.ts and the first case of tests/unit/cf-container-runtime-contract.test.ts now read src/routes/workspace-subdomain-proxy.ts. tests/integration/multi-workspace-nodes.test.ts checks ws_proxy_route in the new file and adds one assertion that index.ts still contains app.use('*', workspaceSubdomainProxy), so a deleted registration still fails a test. No assertion was rewritten. No outbound-fetch inventory exists on main, so there was nothing to re-key.

Staging Verification (REQUIRED for all code changes — merge-blocking)

  • Staging deployment green — Deploy Staging 43524672751 succeeded 23:24:21Z for exact head 0d75915a53b62c424b659131b4cc5fa13c98e04c; no D1 migrations applied (both databases "No migrations to apply")
  • Live app verified via Playwright — signed in to app.sammy.party as the staging smoke user (token-login against api.sammy.party), desktop 1280x800 and mobile 375x667
  • Existing workflows confirmed working — project chat list and conversation, workspace page (sidebar, sessions, terminal), task submit and Instant chat start all worked; the only browser console errors were two 502s from my own port-URL loads before the listener existed
  • New feature/fix verified on staging — every ws-* path exercised on both runtimes (details below)
  • Infrastructure verification completed — N/A: no infra changes (a real VM was still provisioned and used)
  • Mobile and desktop verification notes added for UI changes — N/A: no UI changes

Staging Verification Evidence

Window granted by the PR Shepherd (feature.pr-shepherd-deps-20261111), 23:08-23:45Z. Smoke user, project Potato (01KWHD8XS7MQ7R6KWXJYRHDVH4), default placement, no pool/credential/default changes.

Unauthenticated, before vs after deploy vs production (byte comparison, sha256 prefix):

Request Before deploy (staging) After deploy (staging) Production
ws-<id>--3000 no cookie 401 text/html, 8ea5a2d35df2, 478 B 401 text/html, 8ea5a2d35df2, 478 B, no-store, nosniff 401, 8ea5a2d35df2, 478 B
ws-<id>--3000/?port_token=bogus 401, 8ea5a2d35df2 401, 8ea5a2d35df2 401, 8ea5a2d35df2
ws-<id> no auth 401 JSON, 60 B 401 JSON, 60 B (Authentication required) 401 JSON, 60 B
ws-bad, ws-<id>--abc 400 JSON, 69 B 400 JSON, 69 B 400 JSON, 69 B

VM runtime (task 01M7BKNKNKF8K8X571W8GJBTXB, workspace 01M7BKVJAZ7RRC2853K8K6163G, node 01M7BKNWT0Z18462KPQSXDZWH8, Hetzner cx33 fsn1; running 23:29:08Z):

  • Agent chat: the conversation rendered the agent's READY reply.
  • Terminal through wss://ws-<id>.sammy.party/terminal/ws/multi (122 frames): prompt, keystroke echo, session reattach on reload.
  • Forwarded port ws-<id>--3000 (Python listener started from that terminal): /api/workspaces/:id/port-access token URL → 302 to the bare host with Set-Cookie: sam_port_access=…; Path=/; HttpOnly; Secure; SameSite=Strict; Max-Age=14400, Cache-Control: no-store, Referrer-Policy: no-referrer; then 200 l2-port-ok with the cookie.
  • Missing cookie and an invalid sam_port_access cookie → 401 page, sha 8ea5a2d35df2 (identical to production).
  • Public port: PATCH ports-public {enabled:true} → anonymous 200 l2-port-ok; {enabled:false} → anonymous 401, sha 8ea5a2d35df2.

Instant runtime (task 01M7BM7SJTR24W1NSJX3AB21W4, workspace 01M7BM7T42T712NQNYCCGZ3DA0, container node 01M7BM7SY33QH7DHXGN91CZS5N; running 23:35:39Z):

  • Terminal through ws-* works (the container has no python3; a Node listener was used).
  • Before the listener existed the port request reached the container's vm-agent (502 {"error":"port proxy error: dial tcp 127.0.0.1:3000: connect…"}), so routing and the injected port-proxy token were accepted.
  • With the listener: token → 302 + cookie, cookie → 200 l2-port-ok, public on → anonymous 200, public off → 401 sha 8ea5a2d35df2.

Cleanup: both tasks closed (workspaces removed; explicit DELETE then 404), VM node DELETE 200. D1 audit 23:38:57Z: VM node row finalized/absent, Instant node deleted, both workspace rows absent, both tasks completed, zero non-deleted nodes on staging. Late audit 23:44:35Z: unchanged, zero non-deleted nodes. Staging FREE published 23:45Z.

UI Compliance Checklist (Required for UI changes)

N/A: no UI changes (apps/web, packages/ui, packages/terminal untouched).

UI Screenshot Evidence

N/A: no UI changes.

End-to-End Verification (Required for multi-component changes)

  • Data flow traced: browser → ws-* host → index.ts middleware chain → workspaceSubdomainProxy (routes/workspace-subdomain-proxy.ts) → resolveWorkspacePortAccess (routes/workspace-port-access.ts) for port hosts → D1 ownership (workspaces) and runtime (nodes) lookups → fetchVmAgentContainer (Instant) or fetch(getNodeBackendBaseUrl(...)) (VM)
  • Capability tests through the real entry: workspace-proxy-ownership, workspace-proxy-port-access, workspace-proxy-cf-container-reserved-port, routes/workspace-local-forward, Workers workspace-preview-websocket (all unchanged, passing)
  • Behaviour claims checked by running the mechanical comparison, not by reading
  • Live staging run on VM and Instant (see Staging Verification Evidence)

Data Flow Trace

See the first checkbox above; unchanged from main, only the file boundary moved.

Untested Gaps

Not exercised on staging: the Instant reserved-port 403 PORT_RESERVED branch and the creating-status boot-log WebSocket exception (both moved byte-identically and covered through the Worker entry by workspace-proxy-cf-container-reserved-port.test.ts and workspace-proxy-ownership.test.ts). Hetzner-side absence of the deleted VM was not read directly (no provider token); D1 shows the node finalized.

Post-Mortem (Required for bug fix PRs)

N/A: not a bug fix.

What broke

N/A

Root cause

N/A

Class of bug

N/A

Why it wasn't caught

N/A

Process fix included in this PR

N/A

Post-mortem file

N/A

Specialist Review Evidence (Required for agent-authored PRs)

  • All local reviewers completed and findings addressed before merge
  • If any reviewer did NOT complete: needs-human-review label added and merge deferred to human: N/A, every reviewer completed. The label was only the marker of the owner's hold and was removed when he approved.
Reviewer Status Outcome
cloudflare-specialist PASS No behaviour change found: same middleware order and short-circuiting, same D1 queries per path, 302 still after ownership check, module load order unchanged (./repo-hosting-wiring first). LOW: the comment "Return the 302 redirect after we confirm the DB lookup passes below" in workspace-port-access.ts now reads oddly; kept verbatim to match main and the integration branch (pure-move rule).
architecture-reviewer PASS Placement in routes/ matches interactive-preview-host.ts; split coherent; names/signatures match the integration branch; no scope creep. LOW: index.ts at 543 lines is a 500-800 warning (out of scope); exemption removal correct.
task-completion-validator PASS All research findings have checklist items; every checked item is in the diff; test edits path-only plus one kept registration assertion; no entry-level test modified. LOW: staging pending; paste proof table in PR (done).

CodeRabbit Review Evidence (Required for agent-authored PRs)

  • CodeRabbit requested after local review, staging if applicable, and CI gates passed
  • Waited about 15 minutes
  • Either CodeRabbit reviewed and no CodeRabbit feedback is unresolved, or it did not review and the observed outcome is recorded below

CodeRabbit Notes

Requested 2026-11-13 23:45:04Z through the trusted coderabbit-bot-review.yml workflow dispatch from main (run 43529417059, success); the label path does not fire on drafts. CodeRabbit answered at 23:45:15Z with "Action not completed — Review rate limited" (it had already posted "Review limit reached" when the draft opened at 21:06Z). No review arrived by 00:00:32Z. Outcome: no CodeRabbit review; not re-triggered. SonarCloud quality gate: passed.

Exceptions (If any)

  • Scope: the PR stayed a draft with needs-human-review until the owner approved it on November 14, 2026; the task file lives on this branch instead of a direct-to-main task commit.
  • Rationale: owner's merge hold for the self-host landing plan (see top). Nothing goes to main without his approval, including the task file.
  • Expiration: expired; Raphaël approved this PR on November 14, 2026.

Agent Preflight (Required)

  • Preflight completed before code changes

Classification

  • external-api-change
  • cross-component-change
  • business-logic-change
  • public-surface-change
  • docs-sync-change
  • security-sensitive-change
  • ui-change
  • infra-change

External References

N/A: no external API or library behaviour involved; Hono middleware semantics (app.use with a named async handler) are unchanged from main's inline handler.

Codebase Impact Analysis

apps/api/src/index.ts (block removed, imports pruned, registration added); new apps/api/src/routes/workspace-subdomain-proxy.ts and apps/api/src/routes/workspace-port-access.ts; scripts/quality/check-file-sizes.ts (exemption removed); three source-contract tests under apps/api/tests/. Every request to a ws-* host passes through the moved code; requests to other hosts call next() exactly as before. Open PRs touching index.ts (#2605, #2308) change only import lines and route registrations, not this block.

Documentation & Specs

N/A: no docs, rules or specs cite the proxy's location in index.ts (searched apps/www/src/content/docs, docs/, .claude/rules, apps/api/.claude, AGENTS.md, CLAUDE.md).

Constitution & Risk Check

Principle X (simplicity): pure move, no new abstraction beyond the integration branch's two functions. Principle XI: no values added or changed. Risk: every workspace request; mitigated by the mechanical body comparison, unchanged middleware order, unchanged entry-level tests, and (pending) staging parity with production for the 401 page.

Head at creation: 0d75915a53b62c424b659131b4cc5fa13c98e04c.

🤖 Generated with Claude Code

raphaeltm and others added 4 commits November 13, 2026 20:50
Pure move of the workspace-subdomain proxy middleware (index.ts lines 258-732 on main)
into routes/workspace-subdomain-proxy.ts and routes/workspace-port-access.ts, mounted at
the same position in the middleware chain. No behaviour change. index.ts drops from
1,040 to 543 lines and leaves the file-size exemption list.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@simple-agent-manager simple-agent-manager Bot added the needs-human-review Agent could not complete all review gates — human must approve before merge label Nov 13, 2026
@coderabbitai

coderabbitai Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one): 1

  • coderabbit-review

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@raphaeltm

Copy link
Copy Markdown
Owner

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@simple-agent-manager

Copy link
Copy Markdown
Contributor Author

Coordinator review (self-host coordinator, task 01M7AF82KG9C78WAABTG3V1MN1)

Reviewed head 0d75915a53b62c424b659131b4cc5fa13c98e04c (base 6d79731d5). No findings. Approved from the coordinator's side for this exact head; a new commit voids this.

What I checked myself, independently of the author's script:

  • Compared every source line removed from apps/api/src/index.ts with every line added under apps/api/src/, whitespace-normalised. Of 467 removed lines, 16 are not re-added: 14 import lines that moved with the code, and the inline app.use('*', async (c, next) => { wrapper with its closing });. Of 518 added lines, 67 are new: imports with adjusted relative paths, the two file header comments, the exported function signatures, the PortAccessResult type, and the four-line delegation to resolveWorkspacePortAccess. No proxy logic line differs.
  • The one structural change, extracting the port-access block into a function: in main, userId, portAccessRedirect and publicPortAccess are declared null / null / false immediately before that block and nothing assigns them earlier, so a helper that starts from the same initial values and returns them is equivalent. Early Response returns inside the block are passed through by if (access instanceof Response) return access.
  • The proxy is mounted with app.use('*', workspaceSubdomainProxy) at the position of the old inline middleware; no other middleware line moved.
  • Redirect hardening and the self-host transport code from the integration branch are not in this PR.

Relied on, not re-run by me: CI run 43507669855 (functional jobs green), the author's staging evidence (workspace chat and terminal, port token to cookie flow, public port on and off, the 401 page byte-identical to production, Instant path, cleanup), and the three specialist reviews.

Merge decision: Raphaël's, requested in the coordinator chat on 2026-11-14.

@simple-agent-manager simple-agent-manager Bot removed the needs-human-review Agent could not complete all review gates — human must approve before merge label Nov 14, 2026
@simple-agent-manager
simple-agent-manager Bot marked this pull request as ready for review November 14, 2026 14:04
@simple-agent-manager

Copy link
Copy Markdown
Contributor Author

Merge approved by Raphaël on November 14, 2026 (about 13:16 UTC), in his own words: "Regarding PR2714, yeah, go ahead and merge it." Source: chat session a6bd681e-26f2-4ea3-9483-7188edcf27d7, message 01M7D5HFP5QSME6GJ08CFAF811, which I read directly. In the same message he lifted the per-PR approval for slices that only reorganize code with identical behaviour ("if code is just being reorganized and functionality remains exactly the same, then I don't want to be bothered by that"); slices that change behaviour still go to him.

Head is unchanged since my review (0d75915a53b62c424b659131b4cc5fa13c98e04c). Main has moved 14 commits since this PR's base; its only change to apps/api/src/index.ts is an import and a route registration for buildContextCallbackRoute, outside the moved block, so the move is still verbatim against current main. Removing the hold label and merging; main's CI gates the production deploy.

@simple-agent-manager

Copy link
Copy Markdown
Contributor Author

Coordinator: branch updated with main (a7d05239d); new head f7cef2e6b5d94d5185c0ee2397ac6a538e9345fa. Reason: the Specialist Review Evidence check unions the labels in the original event payload with the live ones (scripts/quality/pr-evidence-source.ts, unionLabels), so re-running the old job kept failing on the removed needs-human-review label; a fresh pull-request event was needed. It also gets CI on current main, which had moved 14 commits.

Re-checked at the new head: workspace-subdomain-proxy.ts and workspace-port-access.ts are byte-identical to the reviewed head 0d75915a; index.ts differs from it only by main's two buildContextCallbackRoute lines (import and registration, outside the moved block); the diff against main is the same 8 files, +654/-505. Coordinator approval carries over to f7cef2e6b5d94d5185c0ee2397ac6a538e9345fa. I merge when this head's CI is green.

@sonarqubecloud

Copy link
Copy Markdown

@simple-agent-manager

Copy link
Copy Markdown
Contributor Author

CI run 43603231157 on f7cef2e6b: every job passed except Durable Object Workers shard 3/3. In that shard all 62 files and 645 tests passed; the job exited 1 on one unhandled runner error, EnvironmentTeardownError: [vitest-worker]: Closing rpc while "onUserConsoleLog" was pending, raised while tests/workers/sam-notices.test.ts was running. That is a test-runner teardown race, not an assertion, and that file does not exercise the moved proxy code. Main's CI passed the same job on the same main commit (run 43599274738). Re-running the failed jobs once.

@simple-agent-manager
simple-agent-manager Bot merged commit bc5a6cc into main Nov 14, 2026
56 of 58 checks passed
simple-agent-manager Bot added a commit that referenced this pull request Nov 14, 2026
… sam/selfhost-pass-2)

M1: merge main (03230e5, then 84d77aa) into sam/selfhost-pass-2
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