Repository navigation
Description
Direction (Drew, 2026-11-23 23:51 CST)
"migrate fully into cloudflare fallback to cf tunnel then fallback to tailscale dns"
The PM stack's human-facing surfaces move fully onto Cloudflare hosting. The serving fallback chain, in order:
- Cloudflare hosting (Workers/Pages + the hosted data plane) — the normal path.
- Cloudflare Tunnel to the laptop — first fallback.
- Tailscale DNS (
amd-6.raptor-pumpkinseed.ts.net) — final fallback.
Why
The PM stack review (record: PR #14068; summary on #13900, comment 7121679379) established that every page a human opens is still served 100% from the laptop today, and the deployed aggregator is a build from 2026-11-15, 4,687 commits behind main (#14059) — the root of several live symptoms (/chat 404s, /sessions cold-hangs). A stack whose purpose is working when a machine is gone cannot itself live on one machine. The data plane already has real hosted pieces; decision sets are the half-migrated model to copy (data hosted, pages still laptop-served).
Scope
- The aggregator and console surfaces (the 37 reviewed in PR docs(pm): PM stack pages review — every page live, with screenshots (2026-11-24) #14068's record), plus their deployment pipeline: hosted deployment must track main continuously, so the pm-aggregator deployment is 4,687 commits behind main (2026-11-15 build) — PM apps must follow main #14059 staleness class cannot recur silently.
- The push unification design (PM push unification: one registry, one sender, the Android app as a first-class endpoint #14084) and the answer write-back build (pm-stack: push answer write-back to the queue broker — a phone tap applies broker-sourced decides (Actions-exec extensions first) #14043) compose with this target — one hosted home, not three.
- Already-hosted data-plane pieces stay; the design says what moves, what stays, and what each surface needs.
Not this issue
The review's content defects keep their own issues — #14060 (search performance), #14061 (notification ledger timestamps), #14062 (health self-contradiction), #14063 (cross-surface count contradictions), #14064 (decision sets never age out), #14065 (fixture fallbacks fabricate data), #14066 (cost explorer duplicates). The migration changes where pages are served from; the design must state plainly which findings it does and does not affect, and must not be used to close any of them by association.
First step
A design record, before any slice is queued:
- Target architecture per surface (hosted / tunnel-served / tailnet-only, with reasons).
- Fallback mechanics: how a request actually moves down the chain (front-door routing vs DNS), which health signals trigger a fall, and how far the automation goes vs a human flipping a name.
- Data-plane placement per surface, following the decision-sets model.
- The deployment pipeline that keeps hosted == main.
- A slice map, packetised after the design lands.
- Open decisions named with their decider, not invented over.
Secrets and credentials are referenced by name only throughout.
{
"direct_parent": null,
"links": [],
"lineage": {
"design": null,
"roadmap_item": null,
"priority": null
},
"pm_meta": 1,
"provenance": {
"queue_id": null,
"scheduled_start": null,
"picked_up_at": null,
"work_started_at": null,
"created_at": "2026-11-24T05:52:06Z",
"session_id": null,
"lane": null,
"host": "htch-runtime",
"worktree": null,
"model": null,
"lane_start_issues": [],
"workspace_ref": null,
"auth_subject": "archer",
"stamped_by": "fleet 0.1.0 (native)"
}
}
Activity
developing-today commentedon Nov 24, 2026
CODE-5185
developing-today-fleet commentedon Nov 24, 2026
Design of record landed — PR #14124
Record:
doc/2026-11-24T06-06-29Z_design_pm-cloudflare-migration/(via PR #14124), indexed indoc/README.md. Design only — nothing queued; slices are packetised from the record now it exists.Shape in one paragraph. One front door at
pm.security.cab(the console edge's pattern, generalised — it already fronts that name with a health-gated route flip, and the console origin already passes dashboard paths to the aggregator, so path-unity is the estate's existing shape). Tier 1 is hosted Workers (pm-service for the board family, per the #9079 edition already in flight; the decision-events side for decision surfaces; the #14084 registry surfaces). Tier 2 is a PM-owned Cloudflare Tunnel to the laptop editions. Tier 3 is the tailnet name — and the design says plainly what is true: tier 3 is a bookmark a human picks, not a failover, because no Cloudflare machinery can fail a request over to a different DNS name; it exists for the Cloudflare-down shape and the drills in M9 prove it by using it.Fallback mechanics, honestly. Tier 1→2 is mechanised at the front door with per-surface route state: human flip (the rollback/deliberate switch) plus automatic fall for reads only on hosted failure — falling to real laptop data or an honest unavailable page, never to fixtures (the #14065 rule is a hard acceptance rule for every slice). Writes never auto-fall: answers and submissions go to the edge intake/held queue and are applied exactly once by #14043's applier; board write authority follows the #9079 writer-of-record lease in every tier — a tier may serve a board it may not write.
Deployment. Hosted == main by construction: every PM Worker gets the console edge's Actions build → health-gate (deployed commit == merge commit) → route-flip pipeline, and the by-hand deploys in
workers.jsonare brought under it. The laptop tier gets the scheduled rebuild+flip plus a drift alarm, and every tier's /health renders deployed commit + age — #14059's asks, made structural so 4,687 silent commits cannot recur.Per-surface targets: all 38 reviewed surfaces are tabled in §3 of the record (37 captured + the projector). Kaneo/Pad/Grist/RFA get the tunnel tier as their target home in this migration — separate products whose store programmes (#6816/#3142) own anything more. #14060–#14066 each get a plain row in §9: none is fixed by the migration (#14063 loses only its serving half — one front door, one projection set; #14065 gains a hard requirement, not a fix), and none should be closed by association.
Slice map (ordered, NOT queued):
Open decisions (deciders named; recommendations in §12 of the record):
PM book: unchanged by this record — the book updates inside the slices that change serving facts (M1/M3/each wave/M9), per the book-live-update rule; a book edited at design time would describe a stack that doesn't exist yet.
— Lane PM-CF-DESIGN, 2026-11-24.
Merge pull request #14124 from developing-today/design/pm-cloudflare-…
developing-today-fleet commentedon Nov 24, 2026
Rulings recorded — 2026-11-24 (Drew)
D1 — settled: one front door. The canonical name is pm.security.cab, the single door for the PM surfaces. Drew raised no objection to the design's recommendation, so it stands as decided.
D2 — decided: automatic fallback. When a hosted surface fails, reads fall automatically to the next tier, and the fall is always visible in route state. Writes still never auto-fall (see the amendment below).
Amendment to the design's fallback section — the client-fallback layer. Drew adds a mechanism the design did not have: client-side fallback. The hosted page's own JavaScript detects failure when it goes to fetch dynamic details and falls back to the next tier's endpoint itself, walking the chain from the user's side — including toward the tailnet address. Server-side failover to a different DNS name remains impossible, exactly as the design states; what changes is that the client walking the chain mechanises the fall, so the last tier is no longer only a bookmark a human picks. This layer applies to reads and dynamic details. Writes are unchanged: they never auto-fall — submissions ride the edge intake/held queue and are applied exactly once by the answer write-back applier (#14043, the push answer write-back build).
Generalisation. Automatic fallback is the estate pattern, not a PM-only behaviour: fleet commands adopt it later too, and the Android app does the same fallback natively and directly, rather than through a browser page.
Frontend direction for these surfaces. The reactive/dynamic layer is Datastar with server-sent events (SSE). The UI stack is Tailwind with DaisyUI, with all default DaisyUI themes available.
What happens next. Slice M1 (front door + deployment pipeline) is packetised from this record; the shell it serves takes the client-fallback layer above as a design input. Slices M2–M9 remain unqueued.
— Lane PM-CF-AMEND, 2026-11-24.
developing-today-fleet commentedon Nov 24, 2026
Slice M1 packetised — task 21686
Per the rulings recorded above (comment 7123885604), slice M1 — front door + deployment pipeline is now queued:
repo-health-code-pilot, priority 40, kindfeature_slice, dedupe keyrepo-health:v1:slice:developing-today/code:issue:14107:slice-1. Verified by read-back after enqueue: statusqueued.Slices M2–M9 are not queued — M1 only, as directed.
— Lane PM-CF-AMEND, 2026-11-24.
Merge pull request #14135 from developing-today/archer/pm-cf-amend-14107
developing-today-fleet commentedon Nov 24, 2026
Amendment — offline mode and the durable client write queue (Drew, 2026-11-24 00:28 CST)
Drew adds two requirements to this migration, recorded against the design of record (PR #14124) and the client-fallback amendment (comment 7123885604):
1. Offline mode via a service worker. The hosted PM surfaces must work offline: a service worker caches the shell and the data it needs, so the surfaces open and read with no tier reachable. This is new — the design record has no offline or browser-service-worker provision today (the only "service workers" named in the record are the Cloudflare Workers edition, #9079, a different thing). It composes with the client-fallback layer rather than replacing it: fallback walks the tiers when some tier answers; offline mode is the floor when none does. The design already contemplates the read side of this in §5's failure table (a laptop-sourced view showing "last-known data with its age, or unavailable — never invented"). One existing rule binds the offline cache directly: §0 rule 2, the #14065 rule — an offline surface serves its last real cached data, marked with its age, and never fixture or fabricated data.
2. Writes are saved client-side and reattempted until pushed. A write made while offline, or while the write path is down, goes into a durable client-side write queue — persisted on the device, surviving page close and app restart — and is reattempted until the server acknowledges it. It is never lost and never silently dropped.
One point flagged against the design text, not papered over. §5.1 of the design record states the write rule:
Drew's queue does not break the never-re-route rule: a queued write is reattempted against the same write path (the edge intake / held queue that feeds the #14043 applier), never re-routed to a different authority, and board-data writes still follow the writer-of-record lease in every tier. What changes is the last behaviour in that paragraph: input is no longer merely "kept in front of them" in the live page while the path is down — it is persisted in the client queue and retried automatically until it lands. Read the design as amended on that point.
The join with #14043, stated explicitly: the client write queue is the client half of the write-back design. Client queue → edge intake / held queue (#13469) → the ledger's answer record → the applier (#14043). A client reattempt must reuse the same answer id, so the intake's existing dedupe (double-taps and retries deduped by answer id) and the applier's answer-id-keyed ledger keep application exactly-once no matter how many times the client retries.
Implication for a queued slice (scope note only — the packet is not edited here): M1 (task 21686, front door + deployment pipeline) serves the shell the other slices hang off. The service worker belongs to that shell; carrying its registration and cache policy from M1 is far cheaper than retrofitting it onto a shell already shipped.
— Lane PM-OFFLINE-PUSH-AMEND, 2026-11-24.
dezren39 commentedon Nov 24, 2026
M1 progress: PR #14155 adds the decision-events Worker build-version field to
/health. The fixed-SHA contract test failed before the implementation and passes now (bun test: 17 passed). Typecheck remains unverified because the Workers types dependency could not be installed here; no Cloudflare deployment was run. This is a prerequisite slice only, not completion of M1; the issue stays open.Next slice: after the next PR,
decision-eventsis deployed by Actions withVERSION=$GITHUB_SHA, and the deploy workflow refuses success unless/healthreports that exact SHA.dezren39 commentedon Nov 24, 2026
M1 progress: Actions deploy and exact-SHA health gate
PR #14155 now also adds a
decision-eventsActions deploy workflow. It injects the full$GITHUB_SHAasVERSIONand fails unless/healthreturnsok: trueand that exact SHA. The worker registry and deploy documentation are updated. The focused gate test was first observed red against a false stub;bun testnow passes (19 tests).git diff --checkand workers.json JSON validation pass.Remote install/test/typecheck is running in Fleet Actions run. No Cloudflare deployment was run. This remains a prerequisite only; M1 is still open, including the console-style staged route flip/rollback, front door, and the other acceptance criteria.
Next slice: after the next PR, a decision-events version is uploaded without serving traffic, health-checked at its exact SHA, then promoted; on health mismatch the prior serving version is restored.
dezren39 commentedon Nov 24, 2026
PR #14155 has a new
decision-eventsActions deploy path with full-SHAVERSIONand an exact/healthgate. Local suite: 19 passed; workers registry and diff checks passed. Remote install/test/typecheck is still running, no live Cloudflare deployment was attempted. Task 21686 is parked until CI rundezren39/fleet#45343716235reaches a terminal result. Resume point: add staged upload, exact-SHA health gate, and route flip/rollback; M1 remains open.dezren39 commentedon Nov 24, 2026
CI follow-up: remote verification run
dezren39/fleet#45343716235reached terminal success. This verifies the current PR head only; M1 acceptance remains incomplete (staged upload/health-gate/route-flip and live done-check remain). Task 21686 is re-parked with that status. Do not mark #14107 or M1 complete until the full acceptance checklist is verified.dezren39 commentedon Nov 24, 2026
agent-note:v1 | oc-code-06 · scheduled run (2026-11-24). Picked up M1 (pm.security.cab front door and deployment pipeline) from queue task 21686. It changes production exposure and the deployment pipeline across the aggregator and console surfaces. Not started here: no deployment or DNS changes from a scheduled lane. Parked for a supervised feature-slice run.