Repository navigation
HA3: hono-api becomes an Orun baseline - #4
Merged
Merged
Conversation
The Hono API on one Cloudflare Worker becomes a baseline that takes a new
API from nothing to live on stage and prod in ONE landing, built the way
cirrus-baseline builds its product since baseline-v22, with what a small
baseline contains taken from portfolio-starter-kit's baseline-v2.
- blueprint.yaml (the card) and repo-blueprint.yaml (the build): two
phases. 01-product places every module, brands it, re-tenants it, strips
the work tree, defers promotion and dev's push lanes, creates and links
the repository, reconciles CLOUDFLARE_API_TOKEN (workers-deploy) and
CLOUDFLARE_ACCOUNT_ID (account-id), lands one PR, and awaits the
convergence and a /health probe on stage and prod. No wiring await: there
is no infra. 02-docs is hook-only: it restores both deferrals, renders the
deployment record and lands it.
- .baseline/ (identity, the two task contracts, the API's README), the
rebrand engine with an API_NAME seam (apps/api/src/identity.ts), the
bootstrap helpers, the deployment-record hook, ai/context, docs/phases,
BOOTSTRAP.md, baseline.yml and tag.yml.
- The API gains GET /health ({status, name, environment}); its smoke reads
it for THIS environment on the Worker's own workers.dev URL (the Worker
composition exports no deployed URL; DEPLOYED_URL overrides it).
- ci.yml plans nothing only while intent.yaml names ws_CHANGE_ME (no
ORUN_CI variable) at orun v2.78.4; checks.yml runs on pull requests only;
stack-tectonic 0.19.0; infra/ and packages/ discovery roots, without
which orun plan refused the tree.
- testing/: manifest, phases (the two-phase partition and cirrus's
01-product hook chain), coverage, rebrand, retouch, bootstrap-defer, leak
(every shipped file read for factory paths), placement (the offline
bootstrap on orun's Initial commit, and the product's own push-to-main
plan through ci.yml's --from-ci github --event-file path) and e2e (both
landings under Checks, every run step of the stage lane's PR plan in a
staged job tree, wrangler dev --env stage, the component's own smoke).
Orun-Task: HA-4
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AuyckrXahuAVgdmxamUUtk
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.
HA3 (task HA-4). The Hono API on one Cloudflare Worker becomes an Orun baseline. A new API goes from nothing to live on stage and prod in one landing, the way cirrus-baseline builds its product since baseline-v22. What a small baseline contains comes from portfolio-starter-kit's baseline-v2.
What was added
The card and the build
blueprint.yaml(the card) andrepo-blueprint.yaml(the build document), with two phases:01-productplaces every module (root files, workflows, tooling,apps/api,tests/api). Its post hooks run cirrus's 01-product chain in this order: retouch, git init/stage, rebrand, orun-workspace,work-tree --strip,promotion --defer,dev-lanes --defer, restage, rebrand-verify, the pnpm lockfile,orun.repo/ensure, link, oneorun.integrations/reconcileper brokered key,orun.pr/land.CLOUDFLARE_API_TOKEN(workers-deploy) andCLOUDFLARE_ACCOUNT_ID(account-id).orun.run/watchon the merge sha and anorun.http/probeof/healthon stage and prod.orun.secrets/existsawait, because there is no infra.02-docsis hook-only. It restores both deferrals, renders the deployment record and lands it, then re-probes.requires.integrations: [github, cloudflare],expectedMinutes: 9. The verify URL ishttps://{reponame}-api-{env}.{subdomain}.workers.dev.Baseline machinery
.baseline/: the tree's identity, the two task contracts and the product README.tooling/rebrand(the rename engine) andtooling/bootstrap(promotion, dev-lanes, retouch, work-tree).hooks/render-deployment-docs.sh,ai/context/,docs/phases/andBOOTSTRAP.md..github/workflows/baseline.ymlandtag.yml.The API
GET /healthanswers{"status":"ok","name":API_NAME,"environment":ENVIRONMENT}.API_NAMEinapps/api/src/identity.tsis the product-name seam.GET /is unchanged.The deploy contract
/healthfor this environment onhttps://<repo>-api-${ORUN_ENVIRONMENT}.<subdomain>.workers.dev. The worker composition exports no deployed URL, so the command builds its own;DEPLOYED_URLoverrides it.orgName/owner/repoparameters are dropped.wrangler.jsoncstays committed, so the composition'sverify-worker-structurestep finds it in a staged tree before any build.CI and intent
ci.ymluses alinkedgate: it plans nothing only whileintent.yamlsaysws_CHANGE_ME. It is pinned to orun v2.78.4.checks.ymlruns onpull_requestandworkflow_dispatchonly.parameterDefaultsare gone, and the repo docs point atai/context.infra/andpackages/get.gitkeepfiles. Without themorun planrefused the tree.Specs
HA3 — a baselinemilestone,tasks/HA-4, andmetadataon HA-1..3 (orun work checkrefused them without it).How it was verified
All of this ran locally; Baseline CI on this PR runs the same tiers.
pnpm install --frozen-lockfile,wire:fixture, typecheck, lint, test (5 tests) and build.orun new --statusparses the blueprint at v2.58.11, v2.78.4 and 2.79.0.orun validateandorun work checkare clean.testing/{manifest,phases,coverage,rebrand,retouch,bootstrap-defer}.test.sh. Hand-made mutations of the blueprint fail them as they should (a reconcile moved beforelink, the deferrals swapped, the watch removed, two keys on one reconcile,api-testsmoved into02-docs).leak.test.shpasses at 2.79.0 and v2.58.11. It reads all 40 derived files: nothing of the factory ships, no shipped file names a factory path, and there is no provenance prose.placement.test.shpasses at 2.79.0, v2.58.11 and v2.78.4.acme-inc/acme-hono-api, whose slug ends in the baseline's own slug. It produces orun's Initial commit plus two landings.work:block stripped, its gates restored and its record rendered.--from-ci github --event-filepath, deploysapito stage and prod side by side. There is no infra to order before it.--resumeover the finished API is a no-op.e2e.test.shpasses at 2.79.0 and v2.78.4.verify-worker-structure,wire-fixture, build, typecheck,deploy-dry-run.wrangler dev --env stageserves the Worker on random ports, undersetsidwith process-group cleanup.smokestep, and it refuses the stage Worker when told it is prod./,/healthand a 404 return what the API promises.Not verified: a live bootstrap against a workspace (repo creation, brokered token, real deploy, workers.dev probes). See risks HA-F. HA-G records that
orun plan --changedplans nothing for a push whosebeforeis all zeros; the landing merges a PR into orun's Initial commit, so it has abefore.🤖 Generated with Claude Code
https://claude.ai/code/session_01AuyckrXahuAVgdmxamUUtk
Generated by Claude Code