itx grand cleanup: §8+§9 graduate — egress is a capability, captun intercept dies, kernel shrinks, auth mints, legacy afterAppend deleted#1485
Merged
Conversation
…faults, shadow tests) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ty dissolved Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…po DOs Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 6502e43. Configure here.
Main independently shipped repos/workspace/worker as platform defaults with origin-carrying chain delegation (the correct fix for inherited context-scoped caps) and config-gated durable-object refs — that implementation wins wholesale. Re-applied this branch's unique layers on top: the egress capability (EgressPipe default + dialable, registry- dispatching itx.fetch), the isolate-wiring unification in the registry's loadWorker, the workers-RPC-safe onRpcBroken guard in provide, and auth-routed id minting in ItxProjects.create. Dropped from this branch in deference to main's choices: project-as-default (project stays a hardwired built-in) and the PROJECT entry in DIALABLE_DURABLE_OBJECTS (allowlist stays empty by default, config-gated). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… pipe
Main's consolidation shipped egress-as-a-capability under the name `fetch`
with define absorbing provide and one shared registry host — all adopted.
This branch's layers re-applied on top of that design: the default `fetch`
target is the stateless EgressPipe (secret substitution + real fetch, no
Durable Object in the egress path) instead of ProjectEgress.call dialing
the DO's egressFetch, which this branch deletes along with the captun
intercept tunnel; ProjectEgress is now purely the registry-first
dispatcher and leaves DIALABLE_LOOPBACKS. Also re-applied: wireIsolateEnv
in the registry's loadWorker, the workers-RPC-safe onRpcBroken guard,
auth-routed id minting in ItxProjects.create, and the live-shadow test
support rewritten to caps.define({ invoke: "path-call", name: "fetch" }).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
jonastemplestein
added a commit
that referenced
this pull request
Jun 11, 2026
## What Adds `POST /internal/project/mint-project-id` (service middleware) to the auth worker + contract: mints a canonical `prj_` id without creating an auth-side project record. ## Why #1485 makes auth the ONLY minter of the `prj_` id space — OS's operator/recovery create path round-trips through this endpoint instead of minting locally. Previews point at production auth, so this must deploy from main BEFORE #1485 can pass preview e2e (its preview run currently 404s on this route). Purely additive — extracted verbatim from #1485; nothing calls it until that PR lands. ## Testing - `apps/auth` + `apps/auth-contract` typecheck green. - Exercised end-to-end by #1485's preview e2e once this deploys. 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Additive internal route behind existing service auth; no DB writes and no production callers until a dependent PR lands. > > **Overview** > Adds a **service-only** internal API so auth can hand out canonical `prj_*` ids **without** creating an auth project row—intended for OS operator/recovery creates that have no owning organization. > > The **auth-contract** defines `POST /internal/project/mint-project-id` (no input; `{ id: string }` output). The **auth worker** implements it behind `serviceMiddleware`, returning `generateId("prj")` and registers `mintProjectId` on the internal project router. Nothing in this PR calls the route yet; follow-up work will route OS minting through auth instead of local id generation. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 211c08a. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> <!-- CLOUDFLARE_PREVIEW --> ## Environment Config Lease <!-- CLOUDFLARE_PREVIEW_STATE --> <!-- { "apps": { "os": { "appDisplayName": "OS", "appSlug": "os", "status": "deployed", "updatedAt": "2026-06-11T06:25:18.097Z", "headSha": "211c08a5d8212f4ae82f5999318ad76f9dfe1a59", "message": null, "publicUrl": "https://os.iterate-preview-2.com", "runUrl": "https://github.com/iterate/iterate/actions/runs/27328011383", "shortSha": "211c08a" } }, "environmentConfigLease": { "dopplerConfig": "preview_2", "leasedUntil": 1781162485637, "leaseId": "762efb9d-f616-4d21-aa38-f2ecd2d43f0e", "slug": "preview-2", "type": "environment-config-lease" } } --> <!-- /CLOUDFLARE_PREVIEW_STATE --> Lease: `preview-2` Doppler config: `preview_2` Type: `environment-config-lease` Leased until: 2026-06-11T07:21:25.637Z ### OS Status: deployed Commit: `211c08a` Preview: https://os.iterate-preview-2.com [Workflow run](https://github.com/iterate/iterate/actions/runs/27328011383) Updated: 2026-06-11T06:25:18.097Z <!-- /CLOUDFLARE_PREVIEW --> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
…ateless Precision fix: "no DO in the egress path" overstated it. The Project DO is still every dispatch's supervisor (live fetch shadows resolve in its registry); what EgressPipe changes is that secrets are D1 rows scoped by the dial-time projectId, so substitution and the outbound fetch run in a plain isolate and secret material never enters the DO. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…types) Main's follow-ups PR independently shipped this branch's tunnel deletion — its versions win wholesale where they overlap: the e2e fixture's defineLiveEgressFetchCap, the one-shot define→fetch→revoke workerd shadow test, the registry's best-effort onRpcBroken wiring, and the withheld-text removal. Re-applied this branch's remaining unique layers on top: the DO keeps NO egress surface (main still had fetch/egressFetch as the terminal pipe; here the default `fetch` target is the stateless EgressPipe), wireIsolateEnv in the registry's loadWorker, auth-routed id minting in ItxProjects.create, and the ProjectCapability deletion (main's test entry still exported it). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What
The remaining grand-cleanup workstreams in one deliberately breaking PR (prd gets redeployed). DECISIONS D23 is the canonical record. Three main-side PRs landed mid-flight and overlap this work — all adopted wholesale in the merges: #1482 (repos/workspace/worker as platform defaults with origin-carrying delegation), #1487 (
fetchis a shadowable cap,defineabsorbsprovide, shared registry host), and #1490 (intercept tunnel deleted, streams is a cap, best-effortonRpcBroken). This PR contributes the layers below on top of them.§9 finished: the egress pipe is stateless
fetcha shadowable platform:project cap and deleted the tunnel, but kept the DEFAULT pipe inside the Project DO (ProjectEgress.call→egressFetch). This PR replaces that terminal with the statelessEgressPipeloopback. The Project DO still supervises every dispatch (live shadows resolve in its registry), but egress secrets are D1 rows scoped by the registry-injectedprojectId, so substitution + the real outbound fetch run in a plain isolate and secret material never enters the DO.fetch, noingressFetch, noegressFetch.Worker-loading unification
itx/isolate.tsis the ONE place the platform's trust posture (Law 4 ITERATE scoping, Law 5 egress outbound) is wired into loaded isolates; the registry's source caps and the project worker both use it. (The Workers-RPC-safeonRpcBrokenguard this PR carried shipped independently in itx follow-ups: intercept tunnel deleted, streams is a cap, scoped DO names, REPL reads types.ts #1490 — main's version adopted.)ProjectCapabilitydissolvedThe hand-wired forwarder entrypoint is deleted; nothing called it.
Auth is the ONLY project-id minter
New auth internal route
POST /internal/project/mint-project-id(service-authed); OS operator/recovery creates (project directory +itx.projects.create) round-trip through it.mintProjectIdis deleted from OS — theprj_id space has exactly one source.Legacy afterAppend/runner-state deleted
The agent, slack-agent, slack-integration, and repo DOs lose their
afterAppendRPCs and fake runner shapes (delivery has been on the host model for a while). Agent runtime state is now the honest{ agentPath, processors: { [slug]: snapshot } }; slackensureReadyreturns a plain snapshot; the agent-stream benchmark updated.Deferred to main's posture (from the original plan)
projectstays a hardwired built-in (per itx: repos/workspace/worker become platform defaults; origin-carrying delegation; durable-object refs #1482's kernel choice) rather than a durable-object default;DIALABLE_DURABLE_OBJECTSstays empty by default (config-gated).fetch(per itx consolidation: one define verb, fetch is just a (shadowable) cap, one context-node shape #1487), notegress.#1489 must merge (and auth deploy) first — this PR's create paths round-trip id minting through auth's new
/internal/project/mint-project-id, and previews point at production auth. The preview e2e here 404s until that endpoint is live.Breaking changes (intended)
runtimeStateshape changed (consumers were shape-agnostic or updated).egressFetchis gone from every surface; useitx.fetch/ theegresscap.Testing
project-mcp-server-connectionfails 2/3 identically on the branch base (verified in a clean worktree) — pre-existing.Out of scope
🤖 Generated with Claude Code
Note
High Risk
Breaking egress and secret-handling semantics (DO no longer substitutes secrets; interceptors see raw placeholders), new auth dependency for id minting, and changed agent runtimeState shape affect security-sensitive paths and deploy ordering.
Overview
Completes itx D23: project egress is a shadowable
fetchcapability whose default terminal is the statelessEgressPipe(secret substitution + outbound fetch in a plain isolate), while the Project DO only supervises registry dispatch.fetch/egressFetchare removed from the Project DO;ProjectCapabilityis deleted.Adds
itx/isolate.tsso project workers, source caps, and the run harness share one ITERATE +ProjectEgressglobalOutbound wiring path.Auth is the sole
prj_minter: OS drops localmintProjectId; operator/admin anditx.projects.createcall auth’smintProjectIdinternal route.Removes legacy
afterAppend/ runner-shaped RPCs on agent, slack, and repo DOs; agentruntimeStateis{ agentPath, processors }(benchmark updated). Docs mark §8/§9 shipped; livefetchshadows see rawgetSecret(...)placeholders (withheld-text mode removed).Reviewed by Cursor Bugbot for commit df5965b. Bugbot is set up for automated code reviews on this repo. Configure here.
Environment Config Lease
No active environment config lease.
OS
Status: released
Commit:
df5965bPreview: https://os.iterate-preview-6.com
Summary: Preview app released.
Workflow run
Updated: 2026-06-11T10:34:00.682Z