Skip to content

Tier 3 map — patches that run without a viewer present #623

Open
4 of 18 issues completed
Open

Description

@allisonmahmood

Destination

A spec for tier 3 patches, written into docs/product.md, the CONTEXT.md glossaries and ADRs, sharp enough to file as build tickets with no further design conversation, and proven first by prototypes that were actually run: a tier 3 version keeps everything a tier 2 version has (its page, its server handlers, its data) and its server can also start work with no viewer present, on a schedule, on a delivery from a company connection, as a continuation of work a viewer or a previous step started, or at a delayed moment chosen from code. The reference patch, the nightly briefing, is built by a fresh agent from the skills alone as the acceptance journey. The map ends with the spec and its build tickets, not with the build.

Notes

  • Product shape already decided; do not re-decide it. docs/product.md § Runtime tiers and § Tier 2 fix the tier 2 contract (request-scoped query/mutation/action, the credential-free execution service, company tasks bound on first open and released on idle, two identities, nothing leaves except through an integration). The tier 2 map's charting ticket (The destination: a spec for tier 2 patches, proven by prototypes #295) fixed the tier 2/3 line as execution without a viewer present. Tier 3 builds on that machinery; it does not reopen it.
  • Charted from a live grilling on 2026-10-10, three rounds with Allison, with Astra (one pass) and GPT 6.1 Sol (one gap pass) as second-family critics. The first closed ticket below records every decision from those rounds, including the tier 3 catalogue and what it refuses.
  • Research runs on two model families. Each research ticket is resolved by a Claude Opus 5.5 subagent and a codex lane (GPT 6.1 Sol with tools, xhigh) in parallel; the session merges both and fills gaps with its own judgment. Findings land in the ticket's resolution comment, never on a branch and never in the tree (this overrides the wayfinder skill's branch step).
  • Prototypes are real and thrown away. A code prototype runs on an Opus 5.5 subagent (the orchestrator never builds), is pushed to a prototype/<name> branch and filed as a real PR that is never merged, with a Try it section, updated as the discussion moves. Spikes report measured numbers. Before a prototype is thrown away, a second-family model evaluates it (is the design sound, what does it leave unproven) and its verdict is recorded on the ticket beside Allison's.
  • Reviewers mix model families, no hard rule. Astra for one critical pass on a question round; GPT 6.1 Sol for the heavier and cheaper passes, including research lanes and targeted checks; the Claude line (Opus 5.5, Haiku 5.5) for building and ordinary lanes. Pick for perspective and cost, not by habit.
  • UI changes start as static mocks. Anything a person sees (the card's Triggers block, the connections page with a second integration) is mocked in several distinct versions, published with the patchpage skill and picked before any component is touched. First-party pages compose the shell's shared component set.
  • Skills every session consults: grilling and domain-modeling on grilling tickets; research on research tickets; prototype on prototype tickets; effect-service-conventions and node_modules/effect/AGENTS.md before writing Effect code; Hit every surface in CLAUDE.md before calling any build done.
  • Every grilling question carries product context, consequences and a recommendation, so a session can be answered from the ticket alone. Allison wants the cost table and the "what does the person in the tab see" story up front on infrastructure decisions.
  • Patchy MCP is a seam, not a deliverable. Agents calling into a patch and getting data back is a later effort (authenticated handler invocation with a machine token). This map's contracts must not build a second door for it; they note where it attaches.

Decisions so far

  • The destination: a spec for tier 3 patches, proven by prototypes, and the tier 3 catalogue: a spec plus build tickets with prototype learnings, not a build; a tier is the condition under which code may run; four causes (schedule, delivery, continuation, delayed), the refusals; integrations are the only way out and in with receive-then-run and a generic Webhook integration first; the owner is the standing authority with run-as-initiator attribution and an admin brake; bound seconds metered with a one-minute floor; runs as bounded steps with continue; card-level controls; version-owned triggers; the nightly briefing as the reference patch; Patchy MCP as a seam.
  • Research: Fargate shapes for unattended work and the price of an idle bound company task: a bound exec task is $0.029/hour on-demand (Spot 68% less); a nightly 20-minute job is $0.73/month under the 30-minute window and $0.32 under a two-minute one, a five-minute schedule $21 vs ~$8–11, a one-minute schedule $21 regardless; start with one task and an admission rule plus a class-keyed idle window, reserve the viewers' spares from unattended binds, measure interference before a second task or Spot; raise the Fargate vCPU quota before launch.
  • Research: webhook sender contracts and what a generic receipt must do: Slack's 3 s sets the ceiling, so receipt verifies, stores and answers in under a second with no executor; GitHub never retries and Typeform disables on a 404, so uptime and the paused-connection response matter more than run speed; five of nine senders issue their own secret, so the Webhook connection takes a minted or a pasted one; generic = raw-body HMAC plus Standard Webhooks, timestamped schemes (Slack, Stripe, HubSpot) and challenges are vendor adapters; dedup by sender delivery id per connection, kept 30 days; Slack modals and Stripe Issuing need synchronous answers and stay refused.
  • Research: durable run persistence, recovery and the scheduling substrate on the existing executor: one platform row per run is queue, lease and step pointer, claimed with SKIP LOCKED under an absolute deadline-anchored lease; triggers rewritten in the publish transaction from the manifest so removals never resurrect; a run principal adapter and nullable initiating viewer replace today's required viewer; nested mutations need stable effect-slot keys across step retries and nothing renews a 24-hour key; the handoff is a checkpoint mutation committing cursor plus continue/done intent relayed idempotently (recommended over cursor-only retry); platform and company databases restore as one unit and unfinished runs come back held; our own five-second lease-held scheduler, not EventBridge.

Not yet specified

  • Recovery across independently restored databases. The run queue lives in the platform database and deduplication records in company databases; a restore of one without the other can resurrect effects. A recovery-model constraint has to be stated before "durable delivery" is promised; its shape waits on the run contract.
  • Personal connections and delivery distribution. When connections stop being company-wide, which inbound events may reach which owner-authorised patches changes; fan-out must preserve connection identity and subscription provenance. Sharpens once the deliveries ticket settles.
  • Retained runs against wire retirement and version revocation. Pinning a queued run to its version selects code but cannot promise that code stays executable forever; revocation itself is still open on grilling: who revokes a patch version, and how is it seen and undone #425. Name the compatibility boundary in the spec; the migration policy waits for real retention horizons.
  • A company automations page. A company-wide view of every patch's unattended work for admins. Comes after the card-level controls prove insufficient.
  • The open-ended outbound integration. An admin-connected base URL plus a credential Patchy holds, used through a typed client. Allison wants the flexibility on the integration side, not in the patch; it is a later integration, and the deliveries contract should not preclude it.
  • Vendor integrations with inbound events and resident sources. Stripe, Slack, a form tool, a manufacturing-line feed Patchy holds a socket to. Each is its own build; the Webhook integration on this map is the contract they will reuse with stronger verification.
  • Pre-binding before a schedule fires, and Spot capacity for batch work. Optimisations after baseline cold execution is measured.
  • The tariff. What a company pays for bound seconds, idle time and runs; billing is a later map. This map fixes the promise and the metering truth only.

Out of scope

  • Tier 4 (sandboxes for agents, possibly isolates behind a bash-like surface); named, not designed here.
  • Resident patch code: sockets, listeners, loops or timers held by patch code. A resident source is an integration whose connection Patchy holds.
  • Outbound fetch from handlers and a generic HTTP connection on this map; the only way out is an integration Patchy builds.
  • Synchronous public routes where patch code composes the response; receipt is Patchy's and runs follow. Agent call-and-response is Patchy MCP, later.
  • Table-change triggers and email-in as causes; wakes are lossy hints, not events.
  • A workflow engine or DSL: no histories, replay compatibility or second programming model; the run is bounded steps with continue.
  • New vendor integrations themselves, the billing tariff and its UI, custom domains or any new network surface, and public tier 2.

Sub-issues

Sub-issues

4 of 18 Issues completed
Loading 18 sub-issues

Activity

  1. added
    wayfinder:map
    on Oct 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    wayfinder:map

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions