Skip to content

feat(cli): replace experimental workers with gated compute commands - #6554

Merged
jgoux merged 10 commits into
developfrom
feat/compute-feature-flag
Sep 10, 2026
Merged

jgoux merged 10 commits into
developfrom
feat/compute-feature-flag

Conversation

@jgoux

@jgoux jgoux commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

Replace supabase experimental workers with supabase compute, registered only when experimental.compute or SUPABASE_EXPERIMENTAL_COMPUTE=1 enables it. Without opt-in, Compute is absent from help, completion, and direct invocation.

Rename the local implementation, symbols, configuration, templates, storage paths, and error identities to Compute, including [compute.<name>] and supabase/compute/<name>/. Workers shipped experimentally in v2.117.0. This transition intentionally makes a clean break: no aliases, legacy config passthrough, or migrations are required for the retired local names. Compute error tags intentionally start new telemetry fingerprints.

Remove the experimental command namespace. Keep the Compute and Stack implementations under src/commands/experimental/ for source organization; the root command owns their public paths and feature-flag registration.

Keep server-owned Workers endpoints, generated API contracts, invocation URLs, and log identifiers unchanged until the backend adopts Compute naming.

Enable Effect linting across the Compute commands, shared runtime, and test fixture helper. Use Effect services for scaffold loading, filesystem paths, clocks, and JSON decoding, with typed archive errors and scoped test fixtures. Embedded application templates are excluded from CLI runtime linting; the formatter test retains a narrow native-Date exception as an independent local-time oracle.

Reject invalid Compute environment opt-ins on applicable command paths. Refuse scaffolding when JSON is the authoritative configuration, and require explicit exposure when deploying a source directory without a Compute config entry, so ignored or missing settings cannot silently select public access.

@jgoux
jgoux requested a review from a team as a code owner September 10, 2026 08:19
@jgoux jgoux self-assigned this Sep 10, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 AI Review

Both independent reviews were available: Claude reported 8 findings and Codex reported none. Code inspection confirms all 8 underlying concerns, with claude-1 narrowed to Go-delegated paths that actually load config and claude-5 corrected to the package’s exported schema/type surface rather than a direct workers export.

Findings

Severity Location Category Sources Claim
🟠 MAJOR apps/cli-go/pkg/config/config.go:247 backwards-compatibility claude Removing the ignored workers passthrough field makes previously supported [workers.*] sections fail strict Go config decoding on residual delegated paths that call LoadConfig.
🟠 MAJOR packages/config/src/compute.ts:88 backwards-compatibility claude The published @<!---->supabase/config schema and derived public types replace the workers key with compute without a compatibility alias, while the path-filtered conventional commit produces only a feature/minor release.
🟡 MINOR apps/cli/src/commands/compute/compute-backend.ts:101 error-handling claude Invalid non-empty SUPABASE_EXPERIMENTAL_COMPUTE values are silently converted to false, hiding the compute command tree instead of reporting the actionable validation error.
🟡 MINOR apps/cli/src/commands/compute/compute-backend.ts:51 performance claude When the compute environment override is unset, compute routing performs project discovery and potentially reads and parses config before unrelated CLI commands, duplicating stack routing I/O for start and stop.
🟡 MINOR apps/cli/src/commands/compute/push/SIDE_EFFECTS.md:55 documentation claude All six compute side-effect documents omit the environment/config gate required to expose their commands and omit SUPABASE_EXPERIMENTAL_COMPUTE from their environment-variable tables.
🟡 MINOR apps/cli/src/docs/docs-spec.unit.test.ts:33 test-coverage claude Because the default root disables compute, docs generation and most command-tree invariant tests never inspect the compute family.
⚪ NIT apps/cli/src/commands/compute/compute-backend.ts:19 maintainability claude Compute routing duplicates stack routing’s workdir-flag extraction, config parsing, and schema-setting extraction, leaving the two gates with divergent config-loading behavior.
⚪ NIT apps/cli-go/pkg/config/config_test.go:355 test-coverage claude The new Go experimental.compute tests omit remote-position coverage and do not assert that the field remains excluded from emitted TOML.

Findings outside the diff

  • 🟡 MINOR apps/cli/src/commands/compute/push/SIDE_EFFECTS.md:55 — All six compute side-effect documents omit the environment/config gate required to expose their commands and omit SUPABASE_EXPERIMENTAL_COMPUTE from their environment-variable tables.
  • 🟡 MINOR apps/cli/src/docs/docs-spec.unit.test.ts:33 — Because the default root disables compute, docs generation and most command-tree invariant tests never inspect the compute family.

Stats

Claude findings: 8 · Codex findings: 0 · Confirmed: 8 · Refuted: 0 · Uncertain: 0


Models: claude-opus-5 + gpt-5.6-sol · Trigger: auto · Workflow run

This review runs once per PR. A maintainer can request another with a /ai-review comment.

Comment thread apps/cli-go/pkg/config/config.go Resolved
Comment thread packages/config/src/compute.ts Resolved
Comment thread apps/cli-go/pkg/config/config_test.go Resolved
@jgoux

jgoux commented Sep 10, 2026

Copy link
Copy Markdown
Contributor Author

All review findings have been addressed. Commit eaf1a02 documents the opt-in gate and environment semantics in all six Compute side-effect inventories, extends Go base/remote and TOML non-emission coverage, and verifies that default generated docs exclude Compute.

The command-tree coverage concern is also covered by the existing boolean-flag invariant test across all four Stack/Compute combinations and the Compute routing integration tests. The generated public docs intentionally use the disabled tree.

The compatibility suggestions are not applicable: Workers was never released, so the local rename intentionally has no aliases or migration. Invalid Compute overrides intentionally leave the tree absent. The current config discovery and separate Stack/Compute loading policies are retained for the reasons recorded in their resolved threads.

The Go unit suite, focused docs tests, CLI type checks, and repository quality checks pass. All six inline threads are resolved. Effect lint coverage is being expanded in a separate follow-up commit as requested.

@jgoux
jgoux requested a review from johnstonmatt September 10, 2026 10:56

@Coly010 Coly010 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review: #6554 — feat(cli): replace experimental workers with gated compute commands

Head 53525730b, base bd962c491. CI green. Items marked [verified] were reproduced locally against this head; [reported] items come from a live run I did not repeat.

Verdict: Request changes

The rename is executed cleanly (223 integration cases preserved 1:1, no stray worker outside wire identifiers, wire/local naming boundary documented at every crossing). The problems are concentrated in (1) one reproducible regression for configs that still carry the old section, (2) the new feature gate, which fails silently in every direction while its sibling gate — in the same PR — is tested to fail loudly, and (3) the surfaces the experimental contract does not cover, where the PR's "unreleased" shorthand is doing load-bearing work it can't carry.


A. The "unreleased" premise: right for the command path, not for the rest

The PR body says: "Workers was unreleased, so the old local names have no compatibility aliases." Five of the six AI-review threads were declined on that basis, so it is worth being precise about what it covers.

supabase experimental workers did ship — v2.117.0 (GitHub stable release 2026-09-07, npm latest today) and every v2.118.0-beta.* carry it, Command.unlisted but fully invocable. It shipped under the experimental contract, though: the deleted experimental.command.ts doc comment says the family is "not yet covered by the CLI's compatibility promise" and that graduating it "is a breaking rename of its invocation path." So "unreleased" is shorthand for "never GA as supabase workers", and for the command path the premise holds — renaming experimental workers → compute with no alias is exactly what that contract allows. [verified]

Where the shorthand stops working is the surfaces that contract does not speak for:

Surface Shipped as Covered by the experimental contract?
supabase experimental workers invocation path v2.117.0 stable (unlisted) + all v2.118.0-beta.* Yes. Rename without alias is within policy.
[workers.<name>] tables and supabase/workers/<name>/ written into users' projects by experimental workers new v2.117.0 Arguable. The contract text is about the command family; nothing says config it wrote into a user's config.toml is fair game. The repo's own habit for a renamed section (inbucket → local_smtp) is tolerate + warn regardless (B6), and dropping the Go passthrough turns it into a hard failure (B1).
workers key in the @supabase/config schema and exported HOSTED_SECTION_KEYS All 11 published npm versions (0.0.0 → 0.5.1) No. The package has its own contract (README, "Semver and the published contract": the runtime exports and the two JSON Schema artifacts). Acceptable for a 0.x package, but it is a contract change the config-v* release approver should see named as such.
workers in the published docs JSON Schema (root additionalProperties: false) v2.117.0 No, same package contract. Existing [workers.*] configs now fail editor validation.
19 Worker* error-tag literals (PostHog error_fingerprint) v2.117.0 Not addressed either way. The tag-stability rule has no experimental carve-out, and stack kept its literals in this same PR (B5). Volume is negligible, so either choice is fine if made explicitly.

Ask: reword the PR body and commit 3af1c094d ("reconcile unreleased compute error tag snapshot") to say "experimental, outside the compatibility promise" rather than "unreleased", and treat the three uncovered surfaces (B1, B5, B6) on their own merits rather than under that umbrella.


B. Fix before merge

B1. Removing the Go workers passthrough hard-breaks residual Go-delegated commands for any config carrying a leftover [workers.*] table — [verified, reproduced]

apps/cli-go/pkg/config/config.go:247 renamed the ignored field instead of adding alongside. Its own retained comment explains why it existed: to stop UnmarshalExact (config.go:755, TagName = "json") from rejecting a section the TS side accepts. Reproduced with a Go test against this head:

failed to parse config: decoding failed due to the following error(s):
'config.config' has invalid keys: workers

[compute.hello] loads fine; [workers.hello] fails. At the base commit it passed.

Scope: only the residual delegated surface (db branch create|delete|switch, db diff --use-pg-schema, db remote changes, gen keys, functions download --legacy-bundle) — not db push/functions deploy, which are native. But it is an error on an unrelated command, naming a section the CLI no longer documents, for exactly the alpha users this PR targets.

Fix (one line + one test): keep Workers map[string]any \toml:"-" json:"workers"`next toCompute, commented as the retired spelling kept inert. The base test *"accepts the TS-owned workers section"* was renamed to compute` rather than duplicated, so the stale spelling now has zero coverage — add it back.

B2. The gate swallows both an invalid env value and a malformed config, so every misconfiguration presents as "Unknown subcommand" — [verified, reproduced]

apps/cli/src/commands/experimental/compute/compute-backend.ts:108,111 catchTags both ComputeRoutingError and ExperimentalFeatureFlagError to false. Compare stack-backend.ts:129, which propagates the flag error, and apps/cli/src/cli/main.e2e.test.ts:8-21, which this PR adds to pin that loud behaviour for stack.

Reproduced with [experimental] compute = true in config.toml:

$ SUPABASE_EXPERIMENTAL_COMPUTE=true supabase compute list
{"_tag":"Error","error":{"code":"UnknownSubcommand","message":"Unknown subcommand \"compute\" for \"supabase\""}}

$ SUPABASE_EXPERIMENTAL_STACK=true supabase start
{"_tag":"Error","error":{"code":"StackRoutingError","message":"SUPABASE_EXPERIMENTAL_STACK must be 0 or 1 when set","suggestion":"Set SUPABASE_EXPERIMENTAL_STACK=0 to use legacy start/stop, or use `supabase stack`."}}

Note the first case is not "fail closed from neutral": a typo'd env value overrides an explicit compute = true to off, with no signal. =true is the value people will reach for because the config key is literally compute = true. The author's thread reply ("only a valid opt-in registers it") describes the neutral case; it doesn't address env-overrides-config or malformed-config.

Fix: give resolveComputeEnabled the same error channel as resolveStackBackend and let main.ts route it into the beforeParse: Effect.failCause(...) seam it already wires (main.ts:28-45). Keep fail-closed for a readable config that says false; do not fail silently. Update the six SIDE_EFFECTS.md "any other non-empty value leaves the tree unregistered" sentences accordingly.

B3. The gate test suite never enables compute through config.toml — [verified]

compute-backend.integration.test.ts: every TOML fixture is compute = false (lines 46, 61, 74) or malformed (91). The only true values are JSON (47, 57, 79). So the TOML branch of parseDocument → readComputeSetting — the path compute-commands.md documents first — has no positive coverage; Effect.succeed(false) passes it. Also missing versus stack-backend.integration.test.ts: env "0" overriding a true config, env "1" overriding a false config, and no-project → false. All are two-line additions to the existing project() helper.

B4. Two doc links broken by the blanket path rename — [verified]

apps/cli/src/commands/start/SIDE_EFFECTS.md:5 and stop/SIDE_EFFECTS.md:5 now point at ../stack/{start,stop}/SIDE_EFFECTS.md. commands/stack/ does not exist — stack stayed under commands/experimental/stack/ (this PR's own AGENTS.md change says so). Base had ../experimental/stack/...; revert.

B5. Telemetry literal policy is applied inconsistently within the PR — [verified]

stack.shared.ts:27, start.errors.ts:8, stop.errors.ts:8 rename the class and keep the literal (Data.TaggedError("ExperimentalStackTargetError")), which is exactly what error-tag-stability.unit.test.ts (added in the base commit, #6553) and AGENTS.md:179 ask for. The compute side renamed all 19 shipped literals in the same PR (error-tags.txt: −28/+33).

Either choice is defensible for an unlisted experimental family with days of history. What shouldn't ship is opposite choices in one PR, made implicitly. Pick one: (a) keep the literals like stack did (zero cost, fixture diff shrinks to the genuinely new tags), or (b) accept the fingerprint split and say so in the PR body for whoever owns the dashboards.

B6. No provision for a leftover [workers] section in @supabase/config, and the package already has the mechanism — [verified]

At head, packages/config/src contains no reference to workers at all (only Postgres max_parallel_workers* settings). A [workers.api] table is dropped as an excess property by Schema.Struct with no warning, no rewrite, and no hint that [compute.api] is the new spelling. [remotes.<name>.workers.*] is dropped the same way.

The package's own precedent for a renamed section is normalizeDeprecatedSMTPSections (packages/config/src/io.ts:280-309): it rewrites inbucket → local_smtp at top level and under every [remotes.*], prefers the new key when both are present, and returns the deprecated paths; the loader then prints, via Console.error (io.ts:615-629):

WARN: config section [inbucket] is deprecated. Please use [local_smtp] instead.

Go mirrors it (config.go:623-636 prints the same WARN and rebuilds the viper so the removed key does not trip UnmarshalExact). The retired key is deliberately not in the published JSON Schema (zero inbucket occurrences in config.schema.json), so tolerance is loader-level only — which is the right shape for workers too.

Fix: add normalizeDeprecatedComputeSections beside the SMTP one (top-level + remotes.*, compute wins when both present, WARN per path), and add the matching Go WARN next to the retained Workers passthrough from B1. A rewrite rather than a drop also closes the migration variant of C1: [workers.api] exposure = "private" keeps meaning private after the directory is renamed. Cover it with the same remotes-position cases the SMTP normalizer has.

Note for the @supabase/config thread: the README's "Semver and the published contract" section names the two generated JSON Schema artifacts as part of the published contract, and says every publish is human-approved against a type-surface diff. Removing workers from that schema is therefore a contract change under the package's own rules — acceptable for 0.x, but the approver of the next config-v* release should not be told it was "unreleased".

B7. The PR introduces a feature-flag registration model and removes the only written experimental-family policy, without adding governance — [verified]

What the PR's AGENTS.md changes cover: Effect-lint scope, "commands/experimental/ organizes source; root.ts owns feature-flag registration", the directory-layout sentence, and the workers→compute vocabulary rename. Nothing else. No ADR.

What was removed: the doc comment on the deleted experimental.command.ts was the only place stating that experimental families are "not yet covered by the CLI's compatibility promise" and that graduating one "is a breaking rename of its invocation path". That text now survives only as a user-facing copy for stack (stack-commands.md:3-4, stack.command.ts:27); compute has no equivalent (C4). packages/config/AGENTS.md has export-surface snapshots and a type-surface diff advisory, but no guidance on renaming or retiring a schema section.

This is how B1/B6 happened: there is no checklist an author or agent could have followed. Recommend adding, in this PR since it is the one establishing the model:

  • apps/cli/AGENTS.md — "Experimental features and feature flags": a family is gated by [experimental] <name> = true and SUPABASE_EXPERIMENTAL_<NAME>=1, resolved through command-internal/experimental-feature.ts; invalid env values must surface, not silently disable (B2); the family's short description carries "(experimental)"; the family is excluded from the docs spec; what the compatibility promise does and does not cover (invocation path: no; on-disk config keys, published @supabase/config schema, telemetry tag literals: yes, per error-tag-stability).
  • packages/config/AGENTS.md — "Renaming or retiring a config section": add a normalizeDeprecated* rewrite + WARN (top-level and remotes.*), keep a Go passthrough + WARN in apps/cli-go/pkg/config/config.go for as long as any delegated command loads config, regenerate the JSON Schemas, update HOSTED_SECTION_KEYS/DOCUMENT_ONLY_LOCAL_PATHS, and state the change explicitly in the PR body for the config-v* release approver.
  • Optionally a short ADR ("Experimental feature gating and rename policy") so the rule outlives the AGENTS.md paragraph.

C. Fix now, or as the first follow-up before the alpha widens

C1. compute new in a config.json project writes a shadow config.toml the readers ignore, reports success, and push then deploys with defaults — including exposure = public — [verified write step; push defaulting confirmed in code]

Reproduced: config.json project + compute new api --runtime node --size 4gb --exposure private --yes → exit 0, JSON success payload, config.json untouched, new config.toml containing [compute.api] exposure = "private". loadComputeProject prefers config.json, so push sees recorded === undefined and resolveExposure (push.handler.ts:~200) returns DEFAULT_COMPUTE_EXPOSURE = "public" (compute-runtimes.ts:104); size likewise falls to 2gb. The DX pass observed the follow-on push nudge: "No runtime configured for api: guessed deno … Set [compute.api] runtime = "deno" in supabase/config.toml" — pointing at a file that already contains it.

This is pre-existing (v2.117.0's new/SIDE_EFFECTS.md documents the tomlOnly gap) and compute.shared.ts:100-103 acknowledges it. But "Access private" on screen → internet-facing deploy, exit 0, is the one outcome that turns into a security conversation. The same defaulting also bites the migration case this PR creates: rename supabase/workers/ → supabase/compute/ but leave [workers.api] exposure = "private" and the private compute is re-exposed on the next push.

Fix: have new refuse (with the JSON snippet to paste) when config.json is authoritative, rather than writing somewhere ignored. Independently, push should refuse to default exposure for a directory with no config entry at all — require it explicitly — since the code comment already identifies silent re-exposure as "the one outcome nobody asked for".

C2. Env-only opt-in is not persisted, so new on a laptop → push in CI/teammate clone fails with "Unknown subcommand" — [reported]

compute new writes [compute.<name>] but never [experimental] compute = true. It already edits config.toml via toml-section.ts; write the gate too, or at least print: "compute is enabled for this shell only via SUPABASE_EXPERIMENTAL_COMPUTE. Add [experimental] compute = true to supabase/config.toml to keep it enabled."

C3. No discoverability escape hatch when disabled — [verified]

supabase --help contains "compute" zero times when disabled; supabase compute and supabase experimental workers list both dump ~8 KB of root help then "Unknown subcommand … rerun with --debug". Since the gate already reads the config document, it can tell when [compute.*], a legacy [workers.*], or supabase/workers/ is present with the feature off — that hint is certain to be what the user wants. Cheapest shape: an unlisted compute stub when the gate is off that prints the opt-in instructions and exits non-zero; an unlisted experimental stub that prints the rename.

C4. The instability marker was dropped from user-visible help — [verified]

  stack               Manage experimental local stacks
  compute             Manage Supabase Compute

The deleted experimental.command.ts doc comment required keeping "experimental" in every user-facing string when graduating a family. compute now reads identically to db or functions. Suggest Command.withShortDescription("Manage Supabase Compute (experimental)") and a sentence in the long description that flags, output and config keys can change in any release. Relatedly, the docs-exclusion invariant moved from structural (Command.unlisted) to conventional (the docs script happens to call the zero-arg rootCommandForFeatures()); docs-spec.unit.test.ts:130-137 pins it, which is good.

C5. compute is registered out of alphabetical order — [verified]

root.ts:96 inherited the old experimentalCommand slot (after encryption). Help shows encryption, compute, functions. Move the spread between completionCommand and configCommand.

C6. The gate has no command-path short-circuit — [verified]

resolveComputeEnabled runs resolveWorkdir + findCliProjectPaths (climbs to /) + read + parse on every invocation including every __complete keystroke; resolveStackBackend early-returns unless the command is start/stop/stack. The DX pass measured read+parse of a 15 KB config at ~0.2 ms, so this is not a performance problem despite three reviewers raising it. The real reasons to add an early return: it shrinks the blast radius of B2's silent failure, and on shared hosts an attacker-writable ancestor supabase/config.json (unbounded readFileString, no stat) is read before argv parsing for every user under that directory. Predicate: run the gate only for __complete*, root help/no positional, or first command token compute.


D. Follow-ups (pre-existing in the workers code, surfaced by this review)

  • push uploads everything — no ignore rules, no warning. compute-package.ts:23-34 ("Nothing is excluded."). .env, .git/, .npmrc go to control-plane storage and into the image layer. Honour .dockerignore/add .supabaseignore, or at minimum warn on well-known secret filenames. (security, medium)
  • Builder-relayed state_reason printed raw in status.handler.ts:124-148 and push.handler.ts:445-487, while compute-logs.format.ts:56-95 sanitises the same text on the logs path. Hoist stripControlSequences and apply it. (security, medium)
  • Presigned upload URL (compute-api.ts:236-266) not scheme/host-validated; redirect-follow default would forward the archive body. Require https:, fail on 3xx. (security, low/medium, plausible)
  • No archive size bound; contiguous Uint8Array(total) in tar.ts:226 is a bare allocation, so a large tree becomes a defect rather than a typed error. ComputeArchiveCompressionError also drops the gzip cause from user output (compute-package.ts:182). (low)
  • Dockerfile template unpinned tag, runs as root; templates echo GREETING env var in an unauthenticated public response. (low; templates become every user's starting point)
  • 401 → "report it with supabase issue" (compute-api-status.ts:53-58). Class doc already says 401 is "the user's to fix by logging in". Switch on status. (DX)
  • --output json vocabulary: size: "2gb-1vcpu" (raw wire) from list/status vs size: "2gb", vcpu: 1 from new; --size accepts only 2gb|4gb, so list→push doesn't round-trip. logs -o json emits stream: "worker_guest_logs" — the retired word in machine output (PR body discloses wire identifiers stay, so this is a conscious leak; flag it). (DX)
  • Node scaffold has no package.json, so the classifier guesses deno for a directory the CLI itself created as node. (DX)
  • Grammar: push.handler.ts:620 "No compute were named"; help uses "a compute"/"several compute". Pick a head noun. (nit)
  • "compute" collides with compute add-on / instance size (addon_type: "compute_instance", branches create --size micro). Not for this PR to settle, but the experimental.compute and [compute] schema descriptions should disambiguate before they reach the docs. (docs)
  • compute-commands.md is orphaned (nothing links to it). Link from the SIDE_EFFECTS "Feature gate" sections. (nit)
  • new.integration.test.ts:162-163 comment now contradicts the assertion under it ("supabase compute new is an unknown command"). (nit)
  • shadow-cache.unit.test.ts restructure is unrelated to this PR (zero compute/worker mentions). (scope)
  • Duplicate gate loader: stack reads config.toml only, compute discovers JSON/TOML. Compute's is correct; stack's is the latent bug; the duplication is why it will stay one. Consider one resolveExperimentalFlagFromProject in command-internal/. (maintainability; author declined in-thread, noting for the record)
  • ComputeRoutingError and ComputeStacksValidationError occupy telemetry-tag fixture entries but can never reach PostHog. (nit)
  • tar.ts reverses a documented decision (v2.117.0 comment: "A plain Error … because createTar is a pure synchronous function") without recording why; writeOctal is now an Effect per field. (nit)

E. What's good

  • Wire-vs-local boundary: compute-url.ts:12, compute-logs.sql.ts:46-51, compute-api.ts:21,291 each keep the server identifier with a comment saying why. Best-handled part of the PR.
  • Rename completeness: no category-(b) leftovers anywhere under apps/cli/src, packages/config, apps/docs, docs/. Docs JSON schemas are regenerated, not hand-edited. knip.json/tsconfig/oxlint/lint scripts move together.
  • Test preservation: all six integration suites keep their exact case sets (push 69, logs 48, new 33, delete 29, list 22, status 22). Scoped fixtures replace rmSync-in-ensuring; the as unknown as …["Service"] casts in the fixture helper are gone. New unit coverage (tar re-entrancy, gzip failure injection, macro validation branches) is genuine.
  • Security posture of the compute code generally: strict DNS-label names at every entry point, symlink-aware source containment (CLI-2339 lesson landed), presigned-URL query redaction in debug, metadata normalised in tar (uid/gid 0, modes 0644/0755), Object.create(null) in readComputeSection. experimental.compute correctly in DOCUMENT_ONLY_LOCAL_PATHS.
  • compute delete confirmation UX, push's "Not attempted / Still building" partial-failure reporting, and the --exposure one-deploy nudge are above the house average.

Status of the six AI-review threads

Thread Author's reply This review
Go workers passthrough (MAJOR) Declined: "never released" Re-raise. The experimental contract covers the command path, not the tables workers new wrote into a user's config.toml; regression reproduced (B1). One-line fix.
@supabase/config rename without alias (MAJOR) Declined: "never released" Re-raise. Not covered by the experimental contract: 11 published npm versions carry workers, and the README names the JSON Schema artifacts as the published contract. Rename is defensible for 0.x, but the package's own inbucket→local_smtp precedent is a rewrite + WARN normalizer, and none exists for workers (B6).
Invalid env → silent disable (MINOR) Declined: intentional fail-closed Re-raise as major. Reply covers the neutral case only; env typo overrides explicit config enable, and malformed config is also swallowed (B2).
Per-invocation config I/O (MINOR) Declined: accepted tradeoff Agree it's not a perf problem (~0.2 ms measured). Short-circuit still worth it for blast radius (C6).
Duplicate loaders (NIT) Declined Noted for the record; stack's TOML-only read is the latent bug (D).
Go test coverage (NIT) Addressed in eaf1a02bb Confirmed: base/remote + non-emission covered. But the stale-workers case lost its only test (B1).

@jgoux

jgoux commented Sep 10, 2026

Copy link
Copy Markdown
Contributor Author

Addressed the accepted findings in b3ff732.

  • A, B1, B5, B6: Corrected the release premise: experimental Workers shipped in v2.117.0 and the config package was published. Backward compatibility is explicitly not required for this transition. The clean rename therefore remains: no retired config passthrough, aliases, or normalization. Compute error tags intentionally start new telemetry fingerprints; the PR description now states this. Server-owned Workers contracts remain unchanged. Existing pushed commit messages remain intact; the corrected rationale is recorded here and in the PR description.
  • B2, B3, C6: Invalid explicit Compute environment values now produce a typed error on applicable paths. Unrelated commands skip Compute resolution. Added positive TOML activation, opposing environment/config precedence, no-project, root-help and completion coverage. Malformed/unreadable config remains fail-closed; Stack also retains that behavior. A disabled command remains absent without enablement hints.
  • B4, C4, C5: Repaired both Stack links, marked enabled Compute help experimental, and restored alphabetical root registration.
  • C1: Refuse scaffolding when JSON is the authoritative project config, including a JSON-only ancestor reached from a defaulted workdir, before prompts or writes. All selected unconfigured source directories are checked for explicit exposure before any packaging/upload/deploy, and recovery guidance targets the specific service; configured entries retain their existing defaults. Regression coverage checks unchanged files, no prompts, private deployment payloads, and refusal without network mutations.
  • B7: Added concise contributor guidance for experimental registration, visibility, environment scope, and explicit decisions about published config/disk/server/telemetry boundaries. This does not impose compatibility migrations on this transition.
  • C2, C3: Environment-only activation remains process-scoped; it is not persisted automatically. Disabled command stubs or enablement hints would contradict the intended opt-in model. The guide explains how to share activation through project config.

For D, fixed the orphaned guide link, stale test comment, and deployment diagnostic grammar; clarified that this Compute family runs application containers separately from database instance sizing; removed the unrelated shadow-cache test restructuring. The Effect-native archive implementation is intentional: expected failures now use the typed Effect channel. The tag fixture inventories declarations rather than promising that every tag currently reaches telemetry. Server-owned machine identifiers remain deliberately unchanged.

The remaining pre-existing D items are follow-up scope: archive exclusion/secret-file handling and terminal sanitization first; then upload URL/redirect behavior (the redirect risk still needs a transport-level repro), archive memory limits, template hardening, authentication guidance, output-size consistency, and Node scaffold detection. Stack JSON discovery and broader loader consolidation also remain separate from this Compute registration change. These are recorded here rather than silently treated as fixed.

@jgoux
jgoux requested a review from Coly010 September 10, 2026 13:42
@jgoux
jgoux added this pull request to the merge queue Sep 10, 2026
Merged via the queue into develop with commit c322a4d Sep 10, 2026
36 checks passed
@jgoux
jgoux deleted the feat/compute-feature-flag branch September 10, 2026 14:01
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.

2 participants