Skip to content

Sync upstream v2 through 56d893c24 while preserving fork contracts - #96

Merged
shuv1337 merged 75 commits into
v2from
t3/upstream-sync-56d893c2
Nov 17, 2026
Merged

shuv1337 merged 75 commits into
v2from
t3/upstream-sync-56d893c2

Conversation

@shuv1337

@shuv1337 shuv1337 commented Nov 17, 2026 •

Copy link
Copy Markdown
Owner

Summary

Reconcile exactly 69 commits from upstream/v2 through 56d893c24d60e76bc532400c8cfaefc8f70fa41d onto fork 4f9fce5001e57532a5632af286af9a9d9f3ebf8a (#92 plus #95), with a real two-parent merge (ae24c3e210697543cb299218a3aaa82b485c83cc). Already incorporated upstream: 9de0a387a564f625eb454e3ac0281c5822eb0da2. Never upstream/main.

Rust collector packaging, safer runtime failure classification, batched discovery, workflow engine-call diagnostics/sleep handling, content-addressed build storage, operator OAuth held scopes, OpenAPI HuJSON/account-schema improvements and dependency egress enforcement. Fork SDK: 0.0.1-beta.141.shuv.1, CLI beta.59. Protocol command: 1–13 unchanged; live 14 recorded, no protocol-list change.

Implementation/PR only: do not merge or deploy automatically. Lead review, private SDK publication, retained-data/exact-image rollback rehearsal and deployment remain separate. Nothing published, deployed or read from production.

Qualification so far

  • bun install, bun run format, bun run check: PASS; 24 installed patches and exact dependency pins validated.
  • bun run e2e:prepare: PASS. Named plan/fork-CI product selections passed, including final unified discovery (both statement scenarios), dotted search, cold 8,549-tool discovery, key/anti-widening, caller/person-only approval, sharedRuntime, organizations, publishing/pins, CLI/media, feedback, collector and error contracts. Per-command receipts will be appended below before handoff.
  • Six fork-CI standalone lanes: 70 passed (PGlite 6, typecheck-runner 15, prepare-cache 25, emulator-failures 13, dashboard-file-names 1, release-archives 10).
  • Additional range: workflow/storage 2, HuJSON/shared account schemas 2, operator OAuth 3, dependency-egress/srcset 5: PASS. Standalone private SDK policy 12, webhook sweep waits 18, lost connections 26, ordered lost-request lifecycle 2, test-stage-branch 11: PASS.
  • Native Go/workerd: 3 passed (cancelled subscriptions; telemetry ingest; collector restart/retention). Collector linux-x64 build/check/smoke PASS (4,729,448 bytes, GLIBC_2.34, allowed libraries). go test ./..., actionlint and Compose config PASS.
  • Native collector exception selections: 5 passed, 1 upstream fixture failed. a_drain_killed_part_way_finishes_after_a_restart_and_leaves_a_consistent_store waits for a retention step on every one of six restarts, including after prior steps already finished the drain. Failure records steps=0, maintenancePending=false, draining=false, used bytes 1,859,584, already below its 90% low-water bound. The crate is byte-identical to the frozen upstream target. No retry, deadline extension, skip or weakened assertion was applied; retained-data rollback is not claimed qualified by this test.
  • Initial Node 26.13.0 runs failed before product requests: upstream's Node-global undici constructor is now a Dispatcher1Wrapper requiring an argument. A direct probe proves the same constructor under pinned Node 24.22.1 is Agent with dispatch(). Supported-toolchain runs pass; no harness compatibility workaround was added.
  • The frozen plan's lost-request filters became stale in the extra 28 commits: one selected zero tests (not a pass), another omitted the first of two ordered lifecycle cases and failed. The current whole lost-connection standalone and both correctly named lifecycle cases pass, with original failed receipts retained.
  • Final real-server receipt: 63 distinct scenarios passed, including both managed local Cloud selections (dropped database connection and held-Google-scope refusal). Final affected search/caller/sharedRuntime/workflow/storage run: 8 passed under the retained 60-second limits. Test-stage-unreadable standalone: 18 passed.
  • Docker image from source merge ae24c3e: sha256:a7bbe1ea0835839c1397c539ffa50bd3c2761d04946991a0a36ba08e67ac95ab, amd64. Packaged feedback, separate collectors and burst-memory return: 3 passed. Collector app-isolation and compression/streaming: 2 blocked/failing before behavior because app deployment cannot reach the host-gateway synthetic registry. A synthetic HTTP listener answers locally but times out from the same Node Docker image; no firewall/route/config workaround was made. These two behaviors are NOT qualified by the image run.
  • Fork CI PASS on head b9b8a5062b05cabf0f587d5ee382d51b226833b9: https://github.com/shuv1337/executor/actions/runs/44081239025 . check 3m10s; security-e2e 6m45s; both Socket checks pass. No CI rerun needed.

Unverified: production/private registry availability, live data/account-sharing impact, deployed Cloud, native arm64/macOS/Windows, complete old-image product/telemetry backward-read and rollback. No product/hosted data step is added; detailed impact below.

Fork CI is selected regression coverage, not upstream's full suites or deployment approval. It now explicitly builds/checks/smokes the pinned collector: upstream prepare skips that build in CI expecting an artifact job this fork does not have. Bun remains 1.4.4 and Playwright remains 1.64.1 with its patch.

all: frozen upstream sync changes the lockfile, workflow, toolchain inputs and E2E harness

Frozen upstream reconciliation — November 17, 2026 (PST)

Implementation/PR only. The lead owns review, merge, private SDK distribution, exact-image
rollback rehearsal and deployment. No production, registry, account or network configuration
was accessed or changed by this work.

Identities and boundaries

Additional 28-commit inventory

# Commit Actual change and gate impact
42 1d5cd9fac88a106b9704c82fcc1584ac89cad024 Classify HuJSON as text rather than stringifying/parsing it as JSON in OpenAPI requests, responses and generated schemas. SDK content gate changes.
43 aa07b772670dd26616d31d8492e3387baac1f734 Classify workflow engine-call failures by bounded hop/class/code, retry only transient sleep/sleepUntil engine calls, finish elapsed waits, record exhausted engine failures, and add E2E-only fault injection. Extends the retry gate beyond never-connected exchanges to durable keyed sleeps, not app steps or writes.
44 e9a908c50758496da91d244c76894e1b1fda1da0 CLI beta.57; strengthens workflow proof that a repeat actually completes a failed sleep and elapsed waits are not repeated.
45 2e8c8b7ed736b6c95f8f87c6a90f78160752919a Repeat read-only R2 get/list/head on classified transient 10001/10043 failures, at most three attempts; no replay of an opened failing body stream. Cloud adapter gate expands.
46 502b7c415293a93ac00d6f4323f0d52cceba64d1 Give each stage test request its own non-keepalive connection; record new/reused connections, written state and response-body loss through lifecycle/setup/teardown. Harness only, not product replay.
47 f66f9cf2f0d40629b1cbf32186eeb97e96bb91c1 Temporarily mark workflow-engine-calls not-run on Cloud after upstream failures; self-host remains scheduled. Reversed by #55; no new final skip is introduced.
48 ece78469888ebffb3a51bf17afb2114fa2cdf023 Measure catalog-scale phases and retain timing evidence before checking latency. No product behavior.
49 734e0b76d97757d9d960ed886cbc51bcbc7194ee Add edge probe tooling, plus redaction/classification of nested certificate/connection errors. Probe is removed in #67; redaction tests remain.
50 658397d4634775526256d777251c8593687c392a Share machine-speed calibration/timeout evidence and raise upstream scenario/hook hang detectors from 60 to 120 seconds. Changes the plan's timeout gate; the fork retains 60 seconds under this task's no-longer-deadline rule. The 7,000-tool scale budget is machine-calibrated upstream; the fork 8,549-tool cold gate is unchanged.
51 15cca94353951efffd9761188921267e9091078c Repeat harness requests only when diagnostics prove nothing was written, with bounded backoff, cancellation/deadline/body checks and saved attempt receipts. Harness gate now includes unwritten methods, never written POST/GET/DELETE.
52 9ec62d7c788ed0480d534597c972e9fbc05defd4 Bound webhook sweep observations by scenario deadlines; preserve every external task/trace observation, queue progress and waits; add runner-owned webhook queue fixtures and standalone sweep-wait scenarios. Product source only corrects sweep comments; not a provider-write retry feature.
53 5307d9fc1f8fc4a6b52d6c41056c9e29822b23c0 Require a supported test-stage branch state before deletion, handle unreadable/deleted branches explicitly and cover command/orphan cleanup. Test-stage administration only; no branch operation was performed.
54 e40e5ea0a29a6175b97e16855000fcb3d7987643 Distinguish retryable framework/build storage failure from app compilation failure, observe concurrent content-addressed framework writes, and classify/retry Cloud R2 writes. Storage gate expands: keyed content writes/confirmation are distinct from app-write replay.
55 12ee40be1d7a0ec66f7f0a6b229fc9688956e2bd Record failed sleep-call elapsed time, distinguish repeat versus elapsed sleep completion and restore managed Cloud coverage removed in #47. Retains the bounded sleep-only repeat gate.
56 ec9dd1254be126e608c597e83208e12cc0821a77 Make webhook FIFO fixture expose the actual lease/queue transitions and assert public observations instead of racing removed rows. No new product mutation.
57 03b23ea1ccd35d06686bec144fddb076608129f6 Persist privacy-safe stage request history with request timing, trace correlation and unfinished requests, including lifecycle evidence. Harness privacy/evidence gate expands.
58 64362230c887aa4fac26ae688125ec5f300bb26f Wait for observed webhook-source work rather than assuming an immediate sweep; update app-account webhook assertions. No product data step.
59 da00d81a4e3980b8c5b05110211292d8df5ef6ed Share one in-flight framework retention write between concurrent builds; avoid retaining a failed build; add R2 failure/contention and SDK real-store fixtures. Content-addressed storage gate, no arbitrary app-call replay.
60 52c4834a074ea87c511a630c076d42b4da0433ad CLI beta.58 and explicit CI-selection coverage for app source/framework changes. No fork CI layout replacement.
61 e160181f047f316e459358ec6161a7560a962e63 Publish security reporting guidance and security.txt routes through site/Cloud edge contract. No infrastructure applied.
62 fbb5ac1df109e54e5bbb55fa9d05f45f1ba7640a Reject worker-size/skip evidence from unsuitable workflow versions/attempts; strengthen missing/mismatched baseline cases. Upstream-layout tooling only.
63 41120c3805ec9b5dcfd3aae52f04b09c19a11c22 Make catalog-scale and connect-repeat fixtures account for process outcomes and protect opened/sent-call refusal cases. No classifier widening.
64 dcd272aff3100cca9584962cefa3ca455a23c775 Merge HuJSON contribution, broaden structured +json recognition and AWS JSON types, and check JSON before the text gate; apps beta.139. SDK package changes; no protocol bump.
65 a8d3a2c555f6d14a019ef2ee9fdb8e0b9209ecfc Real-server HuJSON/JSON/AWS response and request coverage, with shared OpenAPI import helpers. SDK media gate now executable.
66 f4416e915d7c4479a29c01f9d5fc6ec4343251fb Memoize shared schema identities/closures across account-router listings, validate merged schema entries once per catalog, preserve per-account branches, and record large-catalog/failure evidence; apps beta.140. SDK content and #89 cyclic/shared-schema gates expand.
67 ab2a3469bcb22cacfd5e8c085b5ebe79d1da1d88 Remove the edge-probe experiment and its tooling/test selection. Not a skip of a retained product invariant; the probe never reaches the final tree.
68 d2daa20f473726d1a8553d28d9e35b749c6f5dfc CLI beta.59; operator OAuth held scopes can renew existing grants but cannot be requested by new/reconnect sign-ins, with bounded explicit refusal and own-client recovery. Cloud's Google registration holds gmail.modify; self-host operator-owned Google retains it. OAuth contract/config gate changes, but #68 DCR registered scopes and #80 callback projection remain untouched.
69 56d893c24d60e76bc532400c8cfaefc8f70fa41d apps beta.141; linear srcset scanning; enforce private-fetch policy on off-registry tarballs/redirects, sanitize install failures and extend worker-bundler patch; add network/srcset scenarios. Builder egress/private-registry compatibility gate expands.

Plan gates changed, plainly

The 28 commits are not covered by the original plan's “no SDK source change” or “OAuth
usability refactor only” observations. They require a new immutable SDK version, held-scope
OAuth refusal/renewal evidence, multi-account schema closure checks, dependency-egress
checks and expanded storage/engine-call classification. Repeated sleeps and content-addressed
storage operations are not never-connected app RPC exchanges. No app write or workflow step
whose answer was lost is replayed. #93 is not diagnosed or fixed. The fork retains its 60-second scenario/hook limits rather than upstream's 120 seconds. No test retry,
skip or assertion allowance is added here to make these paths green.

Conflict ledger (all 23 unmerged paths)

Path Choice and reason
apps/hosted/self-host/README.md Reconcile Rust/store split with fork's persistent telemetry volume and #95 private SDK procedure. Do not copy upstream's deletion command or claim default fork telemetry is ephemeral.
apps/hosted/self-host/compose.yaml Keep flat/default-organization host settings and telemetry volume; update only collector terminology.
apps/hosted/self-host/native/main.go Keep fork separate-app-process/watchdog/proxy/cancellation paths; use upstream collector executable/socket/supervision and COLLECTOR binding, including shutdown.
apps/hosted/self-host/scripts/package-runtime.ts Keep fork shared/product/apps configurations and APPS callback bindings; replace Motel with collector external binding, remove Motel config/payload; stage the collector separately in native fixtures.
apps/hosted/server/src/contracts/mcp-connections.ts Keep member/API confined mutations, connection-key schemas and 5-second–90-day bounds. Keep fork manage-scoped metadata listing rather than silently broadening read-key metadata; selected-tools grants still cannot list siblings.
apps/hosted/server/src/implementation/access.ts Keep request-owned access-bearing CheckedApp and pinned active-version authorization. Accept upstream AppAccountReads/selectedAppFrom and verified slug lookup; remove superseded second batch-selection read path.
apps/hosted/server/src/implementation/mcp-connections.ts Keep requireCallingScope/member-owner confinement and API management contract, not upstream browser-only mutation comment.
apps/hosted/server/src/implementation/mcp.ts Keep verified CurrentCaller, discoveryChecked {app,access}, account/connection checks and listAccountsEach. Reconcile one upstream searchReads/PrefetchHost snapshot with the fork's batched kept-row facade; misses/refusals use that same snapshot, not another query cache.
apps/hosted/server/src/implementation/resource-lifecycle.ts Keep creator/root-owner group audience semantics; accept upstream owner-batched rechecks and per-app Result failures, removing the old duplicate appsResolving implementation.
apps/hosted/server/src/implementation/tools.ts Accept upstream prefetched selection for live search; retain fork batched kept-row API and policy/router/account filters, using those same upstream selections.
bun.lock Accept upstream resolutions/patch changes, then regenerate with bun install for the exact .141.shuv.1 workspace identity; keep Playwright 1.64.1 patch.
e2e/tests/mcp-connections.spec.ts Keep fork API/full-grant/anti-widening assertions rather than upstream's assertion that mutation tools do not exist.
packages/app-templates/src/implementation/executor-skill-digests.gen.ts Regenerate with bun run executor:intro after source reconciliation; never combine hash strings.
packages/apps/package.json New immutable fork SDK 0.0.1-beta.141.shuv.1, not upstream .141 or reused .138.shuv.1.
packages/mcp/src/implementation/execute.ts Keep dotted-path resolver and batched kept-row/account projection. Accept upstream per-search batch ownership for misses; never batch unrelated locked apps.
packages/sdk/src/contracts/executor.ts Accept upstream owner-batched appsResolving Result contract; retain fork host-only searchableKept and caller/key extensions.
packages/sdk/src/implementation/declarations.ts Accept upstream batched account usability/recheck semantics and authorizeAll; retain unchanged fork caller-bearing snapshot/key behavior.
packages/sdk/src/implementation/listings.ts Accept upstream Schema decoding/prefetch. Reconcile kept-row projection with shared prefetched rows/access so misses remain explainable without repeating reads; preserve per-catalog shared projections.
packages/sdk/src/implementation/tool-search-store.ts Accept upstream ordered batch rows rather than fork map; adapt kept-row consumer to ordered indexing.
packages/sdk/src/implementation/tool-search.ts Accept batch-row documentation/type; retain automatic merge of fork namespace-relative dotted search.
packages/sdk/src/implementation/tools.ts Keep verified requester/approver and per-app sharedRuntime/callerConnection. Accept upstream app-entry counting and safe failure classification, including resumed calls with one prior app entry. Kept-row fast path consumes only served entries of the shared owner/actor/version/account prefetch.
packages/sdk/src/implementation/worker-dependencies.ts Keep fork trailing-slash registry normalization and upstream tarballFetch/egress/redaction.
packages/sdk/src/implementation/workerd-entry.ts Keep fork durable progress/stalled-body and attempt-limit watchdogs. Integrate upstream engine fault classification/sleep semantics; do not drop crash-loop bounds.

Non-conflicting preservation and fixture reconciliation

#88 resolver, #89 OpenAPI shared closures, #90 awaited feedback receipt/privacy, #91 shared
notifications/cancellation, root-owner multi-org admission, organization-only publishing,
short names, apps call, Playwright patch/Bun 1.4.4, migration mapping and #95 were reviewed
beyond conflict markers. The pending personal-account scenario remains retained and skipped;
neither hosted target is unskipped. No #68/#80/#93 feature work is included.

Native fixtures now require the staged collector executable instead of motel.capnp and find
the process by --data=<fixture> instead of Motel's workerd directory argument. Native Go
shutdown calls the collector supervisor, not the removed Motel supervisor.

The upstream search-statements assertion is tightened from exactly 12 to exactly 10 SQL
statements
: the fork already carries access with its app list and does not reread those two
access folds. The original fork warm search still requires four backend operations; its
scenario is retained. Both small/large app counts, forbidden private apps and reconnect
refusals remain asserted. No assertion is relaxed to allow more work or less security.

Migration/data impact and remaining release gates

The full 69-commit range adds no product schema migration and no hosted/Cloud data step.
The sole changed migration file changes a comment from Motel to telemetry collector.
Fork Cloud 14 remains immutable; upstream 14/15/16 stay fork 15/16/17. SDK/product/registry
journals and the pending personal-account decision remain unchanged. Existing installed app
versions, credentials, source pins and app data are not migrated for telemetry.

The Rust collector owns a separate SQLite store, never reads/resets/deletes nested motel/,
and does not import old history. Exact old image + independently preserved old telemetry bytes
are still required to read old traces. Live mounted data, old-reader restoration, existing
personal-account impact, current private builder resolution, exact-image rollback, deployed
Cloud and non-Linux-x64 platforms are not established by fresh fixture tests. These remain
lead-owned release gates, not inferred from PR CI.

Guidance followed

Read charter/lead handoff, AGENTS, CONTEXT, RELEASING, executor-e2e skill, migration numbering,
personal-account decision, approved plan/summary/resolutions/approval/amendment, #92 and fork CI.
Missing public-export engineering notes remain known papercut pc_dcf8902b5987.
Rat-stack pages read: ratstack://repo/AGENTS.md, ratstack://skills/ship,
ratstack://skills/investigate-a-failure, ratstack://skills/add-a-store.
Only language-neutral fence/evidence/migration/rollback rules apply; Executor conventions win.

Evidence

Command logs and receipts are copied from .local/upstream-sync/ to
/home/shuv/.cache/agent-ws/executor-upstream-sync-20261117/. The final PR and handoff give
executed command/scenario receipts, including failures and fixes; an unmatched filter is never
a pass. Real-server diagnostics/results and privacy-safe named evidence are retained outside
the prunable .local/e2e/; no sessions or product databases are published.


Executed command and scenario receipts

Filtered-out cases are not counted. Initial failures and unmatched filters remain explicit.

selection-00

bun run e2e:self-host --test-name 'An exchange with the local app runtime that never connected|A failed exchange with the local app runtime records how far'

2 passed (2). Evidence: selection-00.log.

  • passed: Runtime connect repeat An exchange with the local app runtime that never connected is repeated once, and nothing that may have reached it is
  • passed: Runtime hop shape A failed exchange with the local app runtime records how far it got, as shapes only

selection-01

bun run e2e:local --test-name 'local logs a restarted app runtime and reports lost calls'

1 passed (1). Evidence: selection-01.log.

  • passed: Local app runtime restart local logs a restarted app runtime and reports lost calls and builds as lost connections

selection-02

bun run e2e:self-host --test-name 'MCP search reads every app'

2 failed (2). INITIAL FAILURE: superseded by additional-00 and final-60s-paths after unified prefetch reconciliation and stricter 10-statement assertion. Evidence: selection-02.log.

  • failed: MCP search statements An organization-wide MCP search reads every app's kept search rows in the same statements however many apps there are
  • failed: Search statements MCP search reads every app's discovery state in statements that do not grow with the apps

selection-03

bun run e2e:local --test-name 'MCP search resolves namespace-relative dotted paths|A broad MCP tool search returns concise pages'

2 passed (2). Evidence: selection-03.log.

  • passed: MCP search concise MCP search resolves namespace-relative dotted paths without changing ranked queries or scope
  • passed: MCP search concise A broad MCP tool search returns concise pages within their byte budget and describe returns full signatures

selection-04

bun run e2e:self-host --test-name 'Cold MCP discovery serves 8549'

1 passed (1). Evidence: selection-04.log.

  • passed: Cold OpenAPI discovery Cold MCP discovery serves 8549 generated OpenAPI tools after activation

selection-05

bun run e2e:self-host --test-name 'cannot create an all-apps connection|cannot widen a connection or mint'

2 passed | 7 skipped (9). Evidence: selection-05.log.

  • passed: Scoped MCP connections A full member connection can create a narrower Mesh connection through the Executor app, and a scoped connection cannot create an all-apps connection or mint a wider key
  • passed: Scoped MCP connections An org admin's connection key cannot widen a connection or mint outside its scope, on the API or through the Executor app

selection-06

bun run e2e:self-host --test-name 'Members create, list, update and revoke their own scoped connection|a connection key minted by its connection'

2 passed | 9 skipped (11). Evidence: selection-06.log.

  • passed: Connection keys a connection key minted by its connection's owner, through the API or the dashboard, expires, works only at that connection's MCP URL, is refused by the API and elsewhere, dies with the connection and is audited, and stays refused when its owner makes a new connection with the revoked ID
  • passed: Scoped MCP connections Members create, list, update and revoke their own scoped connection from the dashboard and with an API key, mint and revoke a key on it, and cannot use another member's connection, an account they do not own, or an app they cannot see

selection-07

bun run e2e:self-host --test-name 'apps see each MCP user|a tool that requires a person refuses'

2 passed (2). Evidence: selection-07.log.

  • passed: Caller identity apps see each MCP user, the dashboard person and workflow work as distinct verified callers
  • passed: Caller identity a tool that requires a person refuses the agent's own approval until the person approves

selection-08

bun run e2e:self-host --test-name 'callers of an app that declares sharedRuntime|an app that does not declare sharedRuntime keeps a runtime for each account selection'

2 passed (2). Evidence: selection-08.log.

  • passed: Shared runtime callers of an app that declares sharedRuntime share one warm runtime and keep their own accounts, caller, approver and cache
  • passed: Shared runtime an app that does not declare sharedRuntime keeps a runtime for each account selection

selection-09

bun run e2e:self-host --test-name 'Group resource grants and account connections cannot cross organizations|only an owner of the self-host root organization creates organizations'

2 passed | 3 skipped (5). Evidence: selection-09.log.

  • passed: Resource isolation Group resource grants and account connections cannot cross organizations
  • passed: Self-host organization creation only an owner of the self-host root organization creates organizations; admins, members, outsiders, other owners, anonymous callers and bearer keys are refused

selection-10

bun run e2e:self-host --test-name 'a self-host with several organizations signs in|a self-host upgraded with several organizations and no root record'

2 passed | 1 skipped (3). Evidence: selection-10.log.

  • passed: Self-host with several organizations a self-host upgraded with several organizations and no root record leaves the root unset and keeps serving each
  • passed: Self-host with several organizations a self-host with several organizations signs in their members, admits invitations into the inviting organization and refuses anyone without one

selection-11

bun run e2e:self-host --test-name 'an account linked for everyone is named on the app|a member sees the App accounts greyed out'

2 passed | 3 skipped (5). Evidence: selection-11.log.

  • passed: Hosted Accounts tab a member sees the App accounts greyed out and read-only with the linked account's name, and the app link routes other than the list refuse them
  • passed: Hosted Accounts tab an account linked for everyone is named on the app's card for a member who linked none, and its owner's account row lists the app

selection-12

bun run e2e:self-host --test-name 'App builds retain their selected npm framework across rebuilds|Existing apps are pinned to an explicit apps framework by a data step'

2 passed | 2 skipped (4). Evidence: selection-12.log.

  • passed: Framework pin data step Existing apps are pinned to an explicit apps framework by a data step
  • passed: Packaged apps App builds retain their selected npm framework across rebuilds

selection-13

bun run e2e:self-host --test-name 'a rejected legacy registry upgrade preserves the old SDK|Publishing dialog explains readiness'

2 passed (2). Evidence: selection-13.log.

  • passed: Publishing dialog Publishing dialog explains readiness, repairs names and keeps copied listings separate
  • passed: Registry upgrades a rejected legacy registry upgrade preserves the old SDK and listings, retries after repair, and retains published source on repeat startup

selection-14

bun run e2e:self-host --test-name 'Builds refuse an app'

1 passed | 1 skipped (2). Evidence: selection-14.log.

  • passed: Compiled file limit Builds refuse an app's own JavaScript or TypeScript file over 2 MB and create no app; a file just under it, a larger JSON import and a package with a larger file build

selection-15

bun run e2e:local --test-name 'apps CLI deploy reports a file over the compile limit'

1 passed | 1 skipped (2). Evidence: selection-15.log.

  • passed: Local compiled file limit apps CLI deploy reports a file over the compile limit with its path, size and the limit

selection-16

bun run e2e:self-host --test-name 'MCP call and execute return app images, audio and files'

1 passed | 3 skipped (4). Evidence: selection-16.log.

  • passed: MCP direct calls MCP call and execute return app images, audio and files as MCP content blocks

selection-17

bun run e2e:local --test-name 'the CLI.s tool commands call the host.s MCP tools'

1 passed | 3 skipped (4). Evidence: selection-17.log.

  • passed: CLI tool commands the CLI's tool commands call the host's MCP tools with input from a flag, a file or standard input and print JSON, and whoami describes the local key

selection-18

bun run e2e:self-host --test-name 'executor apps call runs an app tool with an API key'

1 passed | 1 skipped (2). Evidence: selection-18.log.

  • passed: Apps CLI call executor apps call runs an app tool with an API key, takes a 2 MB input from a file or stdin, refuses an input over 32 MiB with its size and input that is not a JSON object before any request, and reports a failing tool, a call that needs approval and a caller without access

selection-19

bun run e2e:self-host --test-name 'a self-host with flat app hosts publishes'

1 passed (1). Evidence: selection-19.log.

  • passed: App UI with flat hosts a self-host with flat app hosts publishes app--organization addresses and refuses nested ones

selection-20

bun run e2e:self-host --test-name 'Pending webhook sources are served first in, first out'

1 passed (1). Evidence: selection-20.log.

  • passed: Webhook source order Pending webhook sources are served first in, first out, and the lease lets one sweep serve a source and loses no link made meanwhile

selection-21

bun run e2e:self-host --test-name 'self-host feedback webhook awaits acceptance|self-host feedback webhook works with analytics disabled'

2 passed (2). Evidence: selection-21.log.

  • passed: Self-host feedback webhook self-host feedback webhook awaits acceptance and preserves analytics fallback
  • passed: Self-host feedback webhook self-host feedback webhook works with analytics disabled and surfaces receiver failures

selection-22

bun run e2e:self-host --test-name 'A trace the collector answers in part fails|The bundled collector at its size bound'

2 passed (2). Evidence: selection-22.log.

  • passed: Telemetry partial trace A trace the collector answers in part fails a check that reads it and stays marked in evidence
  • passed: Telemetry store bound The bundled collector at its size bound keeps its traces while an idle server's exports trickle in

selection-23

bun run e2e:local --test-name 'The local collector serves the trace viewer'

1 passed (1). Evidence: selection-23.log.

  • passed: Telemetry viewer The local collector serves the trace viewer: its trace list, a trace, a reload, an unknown trace and the logs filters

selection-24

bun run e2e:self-host --test-name 'Every error tools/call and tools/run declare|Every error a write reports after its app code received the call'

2 passed | 35 skipped (37). Evidence: selection-24.log.

  • passed: Hosted MCP execute failures Every error a write reports after its app code received the call leads with the write warning over REST, MCP, the dashboard and traces, in the Worker and the data facet
  • passed: Tool call log Every error tools/call and tools/run declare keeps its status and body, adding only the optional reference

selection-25

bun run e2e:self-host --test-name 'a registration without application_type'

1 passed (1). Evidence: selection-25.log.

  • passed: OAuth registration application type a registration without application_type is native for a loopback or private-use callback, held to the native rules, and web otherwise

selection-26

bun run e2e:self-host --test-name 'Team registry publishes, isolates, copies and unpublishes organization-only source|Self-host resolves an older client.s short package name'

2 passed (2). Evidence: selection-26.log.

  • passed: Self-host short names Self-host resolves an older client's short package name and a current client's full name to the same organization listing
  • passed: Team registry Team registry publishes, isolates, copies and unpublishes organization-only source

selection-27

bun run e2e:self-host -- --test-name 'application_type|fetch without a User-Agent names Executor|cannot create an all-apps connection|cannot widen a connection or mint|fails to load fails only its own reads'

5 passed | 7 skipped (12). Evidence: selection-27.log.

  • passed: App fetch User-Agent An app's fetch without a User-Agent names Executor and keeps an app's own
  • passed: App load failure containment An app whose code fails to load fails only its own reads and names its error in every preview
  • passed: Scoped MCP connections A full member connection can create a narrower Mesh connection through the Executor app, and a scoped connection cannot create an all-apps connection or mint a wider key
  • passed: Scoped MCP connections An org admin's connection key cannot widen a connection or mint outside its scope, on the API or through the Executor app
  • passed: OAuth registration application type a registration without application_type is native for a loopback or private-use callback, held to the native rules, and web otherwise

selection-28

bun run e2e:self-host --test-name 'self-host feedback webhook|self-host with DO_NOT_TRACK|self-host analytics pseudonymize|Hosted feedback enforces'

5 passed | 4 skipped (9). Evidence: selection-28.log.

  • passed: Self-host feedback webhook self-host feedback webhook awaits acceptance and preserves analytics fallback
  • passed: Self-host feedback webhook self-host feedback webhook works with analytics disabled and surfaces receiver failures
  • passed: Hosted feedback Hosted feedback enforces its API contract and reaches the local ingestion service
  • passed: Self-host instance analytics self-host analytics pseudonymize people, report a private domain and send no names or IDs
  • passed: Self-host instance analytics self-host with DO_NOT_TRACK sends nothing and reports feedback as disabled

selection-29

bun run e2e:pglite

6 passed (6). Evidence: selection-29.log.

selection-30

bun run e2e:typecheck-runner

15 passed (15). Evidence: selection-30.log.

selection-31

bun run e2e:prepare-cache

25 passed (25). Evidence: selection-31.log.

selection-32

bun run e2e:emulator-failures

13 passed (13). Evidence: selection-32.log.

selection-33

bun run e2e:dashboard-file-names

1 passed (1). Evidence: selection-33.log.

selection-34

bun run e2e:release-archives

10 passed (10). Evidence: selection-34.log.

selection-35

bun run e2e:collector-job --testNamePattern 'another target.s collector job does not decide|an earlier attempt.s successful collector job never'

2 passed | 16 skipped (18). Evidence: selection-35.log.

selection-36

bun run e2e:prepare-cache --testNamePattern 'a damaged executable is never taken as up to date'

1 passed | 24 skipped (25). Evidence: selection-36.log.

selection-37

bun run e2e:lost-connections --testNamePattern 'does not send a written POST again|does not send a GET that changes state again'

26 skipped (26). ZERO EXECUTED: NOT A PASS. Frozen-plan names changed upstream; additional-09 executes all 26 current cases. Evidence: selection-37.log.

selection-38

bun run e2e:lost-connections-lifecycle --testNamePattern 'a request lost and sent again in a scenario|the record the scenario before made is on disk'

1 failed | 1 skipped (2). INCOMPLETE FILTER: omitted the first ordered lifecycle case; additional-10 runs both current titles and passes. Evidence: selection-38.log.

selection-39

bun run e2e:conflict-markers --testNamePattern 'a conflict left in a tracked file fails'

1 passed | 1 skipped (2). Evidence: selection-39.log.

selection-40

bun run e2e:npm-channel --testNamePattern 'a beta publication that moved latest fails at once|a tag naming a newer version fails at once'

2 passed | 9 skipped (11). Evidence: selection-40.log.

selection-41

bun run e2e:publish-guard --testNamePattern 'npm.s tag naming a newer release stops the npm step'

1 passed | 35 skipped (36). Evidence: selection-41.log.

additional-00

bun run e2e:self-host --test-name 'MCP search reads every app'

2 passed (2). Evidence: additional-00.log.

  • passed: MCP search statements An organization-wide MCP search reads every app's kept search rows in the same statements however many apps there are
  • passed: Search statements MCP search reads every app's discovery state in statements that do not grow with the apps

additional-01

bun run e2e:self-host --test-name 'a run.s sleep whose engine call failed|A build whose framework write storage refused'

2 passed (2). Evidence: additional-01.log.

  • passed: Build retain storage A build whose framework write storage refused answers try again, concurrent builds share one write, and an app that does not compile still fails
  • passed: Workflow engine calls a run's sleep whose engine call failed is called again, a run whose sleep keeps failing records why for its owner, and neither an app's own failure nor a step whose answer was lost is repeated

additional-02

bun run e2e:self-host --test-name 'Live OpenAPI sends and returns HuJSON|an OpenAPI app whose resources expand into one another, linked through several accounts'

2 passed | 10 skipped (12). Evidence: additional-02.log.

  • passed: Large OpenAPI app an OpenAPI app whose resources expand into one another, linked through several accounts, lists each tool once with one branch for every account and its schemas complete
  • passed: Live OpenAPI import Live OpenAPI sends and returns HuJSON as written text, while JSON, every +json type and AWS JSON stay JSON

additional-03

bun run e2e:self-host --test-name 'Executor for Google is offered|keeps renewing grants that hold a scope it may no longer ask for|keeps no grant holding a scope outside its allowed scopes'

3 passed | 15 skipped (18). Evidence: additional-03.log.

  • passed: Credential placement Executor for Google is offered to providers on Google's endpoints whose scopes it allows, once its credentials are set, and a self-host operator's own Google client still signs in gmail.modify
  • passed: Credential placement the operator's OAuth client keeps no grant holding a scope outside its allowed scopes, read with the server's granted-scope separator
  • passed: Credential placement the operator's OAuth client keeps renewing grants that hold a scope it may no longer ask for, refuses sign-ins and reconnects that ask for it before the service, and a reconnect on the user's own client keeps that client

additional-04

bun run e2e:self-host --test-name 'with private fetch off, a build|with private fetch on, a build installs tarball|an app page whose srcset holds a long run of commas'

5 passed (5). Evidence: additional-04.log.

  • passed: App dependency network with private fetch off, a build refuses a dependency whose tarball URL is a private address and never requests it
  • passed: App dependency network with private fetch off, a build installs a dependency whose tarball URL is a public address
  • passed: App dependency network with private fetch on, a build installs tarball URLs on a private address, and a failed download names only the package and status
  • passed: App dependency registry with private fetch off, a build installs from a private registry's own origin, refuses what it sends to other private addresses, and words failures without its text
  • passed: App page srcset an app page whose srcset holds a long run of commas is served as fast as a page of its size and rewritten

additional-05

bun run e2e:self-host --test-name 'Cold MCP discovery serves 8549'

1 passed (1). Evidence: additional-05.log.

  • passed: Cold OpenAPI discovery Cold MCP discovery serves 8549 generated OpenAPI tools after activation

additional-06

bun run e2e:self-host --test-name 'cannot create an all-apps connection|cannot widen a connection or mint|Members create, list, update and revoke their own scoped connection|a connection key minted by its connection|a scoped connection refuses a call after its pinned account is replaced'

5 passed | 6 skipped (11). Evidence: additional-06.log.

  • passed: Connection keys a connection key minted by its connection's owner, through the API or the dashboard, expires, works only at that connection's MCP URL, is refused by the API and elsewhere, dies with the connection and is audited, and stays refused when its owner makes a new connection with the revoked ID
  • passed: Scoped MCP connections a scoped connection refuses a call after its pinned account is replaced during an execution, as an unlinked connection account
  • passed: Scoped MCP connections Members create, list, update and revoke their own scoped connection from the dashboard and with an API key, mint and revoke a key on it, and cannot use another member's connection, an account they do not own, or an app they cannot see
  • passed: Scoped MCP connections A full member connection can create a narrower Mesh connection through the Executor app, and a scoped connection cannot create an all-apps connection or mint a wider key
  • passed: Scoped MCP connections An org admin's connection key cannot widen a connection or mint outside its scope, on the API or through the Executor app

additional-07

bun run e2e:apps-published --reporter=verbose

12 passed (12). Evidence: additional-07.log.

additional-08

bun run e2e:webhook-sweep-waits --reporter=verbose

18 passed (18). Evidence: additional-08.log.

additional-09

bun run e2e:lost-connections --reporter=verbose

26 passed (26). Evidence: additional-09.log.

additional-10

bun run e2e:lost-connections-lifecycle --testNamePattern 'a request lost in a scenario is saved|the record the scenario before made is on disk' --reporter=verbose

2 passed (2). Evidence: additional-10.log.

additional-11

bun run e2e:test-stage-branch --reporter=verbose

11 passed (11). Evidence: additional-11.log.

additional-12

bun run e2e:test-stage-unreadable --reporter=verbose

18 passed (18). Evidence: additional-12.log.

final-60s-paths

bun run e2e:self-host --test-name 'MCP search reads every app|apps see each MCP user|a tool that requires a person refuses|callers of an app that declares sharedRuntime|an app that does not declare sharedRuntime keeps a runtime for each account selection|a run.s sleep whose engine call failed|A build whose framework write storage refused'

8 passed (8). Evidence: final-60s-paths.log.

  • passed: Build retain storage A build whose framework write storage refused answers try again, concurrent builds share one write, and an app that does not compile still fails
  • passed: Caller identity apps see each MCP user, the dashboard person and workflow work as distinct verified callers
  • passed: Caller identity a tool that requires a person refuses the agent's own approval until the person approves
  • passed: MCP search statements An organization-wide MCP search reads every app's kept search rows in the same statements however many apps there are
  • passed: Search statements MCP search reads every app's discovery state in statements that do not grow with the apps
  • passed: Shared runtime callers of an app that declares sharedRuntime share one warm runtime and keep their own accounts, caller, approver and cache
  • passed: Shared runtime an app that does not declare sharedRuntime keeps a runtime for each account selection
  • passed: Workflow engine calls a run's sleep whose engine call failed is called again, a run whose sleep keeps failing records why for its owner, and neither an app's own failure nor a step whose answer was lost is repeated

cloud-selected

bun run e2e:cloud --test-name 'Cloud.s database pool runs a statement whose connection the far end dropped|Cloud.s own Executor for Google registration refuses before Google'

2 passed | 26 skipped (28). Evidence: cloud-selected.log.

  • passed: Cloud database placement Cloud's database pool runs a statement whose connection the far end dropped once more on a fresh connection, unless it may have changed data or is in a transaction
  • passed: Credential placement Cloud's own Executor for Google registration refuses before Google a sign-in asking for a scope Google has not approved for it, such as gmail.modify, leading with the user's own client, and still signs in approved scopes

Fix round 1 — November 17, 2026 (PST)

Head 0784871519f9f76cf1cb4bbe3804a8f7a783982c adds three commits on top of b9b8a5062b05cabf0f587d5ee382d51b226833b9. No rebase, amend or force-push; merge commit ae24c3e untouched.

F1 — the private-SDK gate now refuses a tarball the builder would refuse

Commit ce0d406cf. scripts/releases/apps-self-host.ts keeps every existing check (status, version, integrity, file-by-file comparison) and adds two origin rules against EXECUTOR_NPM_REGISTRY:

  • dist.tarball must be on the builder registry's exact origin. Metadata naming another origin fails closed with an AppsReleaseMismatch that names the registry origin and the tarball URL with its origin.
  • The archive is downloaded with { redirect: "manual" } and each 3xx hop is resolved and checked. A hop whose origin is not the registry's is refused with a message naming both origins, before any connection to it; same-origin hops are followed up to five. fetch no longer follows a redirect past the origin check.

Unchanged by design: packages/sdk/src/implementation/workerd-entry.ts, patches/@cloudflare%2Fworker-bundler@0.2.4.patch, EXECUTOR_APPS_ALLOW_PRIVATE_FETCH and every network policy. Only this gate script and its scenario file changed.

Commit ce0d406cf also adds one scenario to e2e/tests/apps-published.spec.ts, extending the existing synthetic registry harness with an advertised off-origin dist.tarball, a same-origin URL that answers 302 to another origin, and an otherOrigin counter server:

  • self-host gate refuses an SDK tarball or redirect on another origin: both topologies exit 1 with outside the builder registry's origin, the message names the registry origin and the other origin, and the other origin received zero requests; the same registry serving its own archive with matching bytes still exits 0 with Builder registry serves matching apps@.

Planted-bug check: with the gate script reverted to b9b8a5062, the new scenario fails (expected 1, received 0); restored, it passes. Receipt: fix-r1/apps-published-gate-planted-bug.log.

F3 — fork CI guards the new contracts

Commit ab5f26631. .github/workflows/fork-ci.yml security-e2e:

  • The self-host --test-name filter adds with private fetch off, a build, App dependency registry, keeps renewing grants that hold a scope and own Google client still signs in gmail.modify. Each alternative was checked against e2e/test-plan.ts: 3, 0, 1 and 1 scheduled self-host scenarios. The suite label matches no scheduled title — e2e/run.ts filters on scenario titles, not suite names — so the App dependency registry suite's only scenario is selected by the with private fetch off, a build prefix; the workflow says so beside the step.
  • A new SDK release gate scenarios step runs bun run apps:build and bun run e2e:apps-published -- --testNamePattern 'self-host gate'. The gate suite is its own e2e/apps-published.config.ts suite and never runs under e2e:self-host; plain --test-name is not a vitest 5 flag, so the step uses --testNamePattern.
  • actionlint .github/workflows/fork-ci.yml: PASS.

F6 — self-host README

Commit 078487151. apps/hosted/self-host/README.md trace sampling now says "the telemetry collector" at both former "Motel" sites (the image runs executor-collector). The remaining "Motel" at :262 is deliberately kept: it names the old pre-cutover store that cannot read the new Rust traces.

Checks and scenarios run

All logs are in /home/shuv/.cache/agent-ws/executor-upstream-sync-20261117/fix-r1/. Node 24.22.2 / npm 11.19.1 (CI's major), Bun 1.4.4.

Check Result
bun run format PASS, no files left changed
bun run check PASS (format check, oxlint, tsc-rs 9/9 projects, protocols/telemetry/API-error/rate-limit/boundary/no-tests-outside-e2e) — check.log
actionlint .github/workflows/fork-ci.yml PASS
bun run e2e:apps-published -- --testNamePattern 'self-host gate' 3 passed
bun run e2e:self-host -- --test-name 'with private fetch off, a build installs from a private registry' 1 passed

No full suite, no Docker image scenario (host-gateway remains broken here), no merge, publish, deploy or host/registry/network change.

Note for the runner: this host's default Node 26 / npm 12 returns npm pack --json as an object, which the suite's Packed schema rejects (SchemaError: Expected array) before any gate code runs; the pinned Node 24 toolchain CI uses returns the array. The suite was therefore run with Node 24.22.2 on PATH.

RhysSullivan and others added 27 commits November 16, 2026 23:15
…-host gate

The builder now fetches dependency tarballs and redirect hops with private network access only on the configured registry's origin, so a gate that followed a redirect anywhere could pass an archive the builder refuses. The gate reads dist.tarball, refuses one whose origin differs from EXECUTOR_NPM_REGISTRY, and downloads with manual redirects that must stay on that origin. Its scenarios prove an off-origin tarball URL, a same-origin URL redirecting away, and the existing same-origin pass.
Fork CI ran none of the new contracts that interact with the fork's private registry and operator OAuth. The security-e2e filter now selects the private-fetch egress scenarios and the held-scope and gmail.modify self-host scenarios, and a new step runs the apps SDK release gate's suite against a local registry.
The image runs executor-collector, so the trace sampling section no longer calls the span receiver Motel.
@shuv1337
shuv1337 merged commit bbbfd72 into v2 Nov 17, 2026
4 checks passed
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.

3 participants