Skip to content

OPN2: core's placement names the database's region - #9

Merged
pullely merged 3 commits into
mainfrom
orun/OPN-8-core-placement
Nov 11, 2026
Merged

pullely merged 3 commits into
mainfrom
orun/OPN-8-core-placement

Conversation

@pullely

@pullely pullely commented Nov 11, 2026 •

Copy link
Copy Markdown
Owner

A follow-up to #8 for the same task. Its first deploy (run 43110234860) failed on core's stage lane:

A request to the Cloudflare API (/accounts/…/workers/scripts/openproduct-worker-stage) failed. You do not have access to this feature. …: placement hint not allowed [code: 10023]

Everything that orders after core was held back with it.

The change

  • core's placement. It goes from the monorepo's { "mode": "smart", "hint": "apac" } to { "region": "aws:ap-southeast-1" }:
    • region is the documented Placement Hints form (developers.cloudflare.com/workers/configuration/placement), and wrangler 4.100's schema accepts it.
    • The Supabase projects run in AWS ap-southeast-1 (infra/supabase, supabaseRegion). So the worker still runs next to its database, which was the point of OPP13.
  • tests/web opennext-config.test.ts pinned the old hint form. It now reads the region from infra/supabase and asserts the placement is { region: "aws:<that region>" }, so the two cannot drift apart.
  • The status doc records the first deploy: the placement refusal, R2 not being enabled on the account, and the synthetic monitor deploying on stage and prod.

The held-back lanes redeploy with it

openproduct-media failed on the same deploy with "Please enable R2 through the Cloudflare Dashboard" (10042). R2 is now enabled on the account.

orun plan --changed schedules only components whose own files change, and a plain dependsOn edge only orders. So the second commit adds a real note to each of the media, gateway and website component.yaml files:

  • the media prerequisite comment is corrected: the plan cannot see whether R2 is enabled;
  • the gateway's media edge did its job;
  • a plain edge never schedules a dependent.

The merge's plan (orun plan --changed --trigger github-push-main), stage before prod:

  • media → core → gateway → website;
  • media prod waits on media stage, core prod on core stage, and gateway prod on all three.

Checks (local)

  • wrangler deploy --dry-run with the fixture wiring passes for stage and prod (174 KiB gzip).
  • the placement test passes, and the web suite's other 1,480 tests passed in CI;
  • orun task check OPN-8: 6 changed components, all inside the contract. orun validate passes.

🤖 Generated with Claude Code

pullely and others added 3 commits November 12, 2026 03:51
The openproduct Cloudflare account refuses the monorepo's
{ "mode": "smart", "hint": "apac" } ("placement hint not allowed", code
10023), which failed core's first stage deploy and held back everything
behind it. core now uses the documented Placement Hints form,
{ "region": "aws:ap-southeast-1" }, naming the region the Supabase projects
run in, so it still runs next to its database.

The status doc records the first deploy: the placement refusal, R2 not yet
enabled on the account (the owner's step), and the synthetic monitor
deployed on stage and prod.

Orun-Task: OPN-8
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
R2 is now enabled on the openproduct account. orun plan --changed schedules
only components whose own files change, and a plain dependsOn edge orders
without scheduling, so media, the gateway and the website each get a real
note in their component.yaml:

- media: the prerequisite comment said the first plan checks R2. It cannot:
  OPN-8's first apply planned cleanly and failed at create (10042).
- gateway: the media edge held it back on that deploy, as designed.
- web: a plain edge orders but never schedules.

This merge then redeploys all four, in order: media, core, gateway, website,
stage before prod.

Orun-Task: OPN-8
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tests/web's opennext-config test pinned core's placement to the monorepo's
{ mode: "smart", hint: "apac" }. It now reads the database's region from
infra/supabase and asserts the placement is { region: "aws:<that region>" },
so the two cannot drift apart.

Orun-Task: OPN-8
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@pullely
pullely merged commit 8e9f80e into main Nov 11, 2026
16 checks passed
@pullely
pullely deleted the orun/OPN-8-core-placement branch November 11, 2026 22:39
pullely added a commit that referenced this pull request Nov 11, 2026
The status doc records OPN-8's go-live and closes OPN2:

- #9's merge deployed media, core, the gateway and the website, stage
  before prod, all green.
- Both environments answer on the openproduct workers.dev hosts. /health
  is ok, all seven sweep phases ran and are healthy, core reads Postgres
  from beside it, and the synthetic monitor's promises hold.
- No secret is in GitHub Actions or in a committed file.
- Password sign-up stays with OPN3, as already recorded.

The risks file gains OPN-V: requireApproval is set on stage and prod, yet
the push-to-main run did not wait on an approval. That is the owner's
question, and any fix is a platform one.

Orun-Task: OPN-8

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant