Skip to content
Myr

Merge docs/concurrency-story into main

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by oscabriel · committed by oscabriel · parents 080e1fc, 7988526 · Browse files · 8 files+136 added−11 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

8 files+136 added−11 removed

  • tests:+18 added−0 removed
  • other:+118 added−11 removed

8 files+136 added−11 removed

modified:apps/web/src/features/landing/landing-page.tsx+11 added-5 removed
10 unmodified lines
11import { LandingNowList } from "./landing-now-list.tsx";12import type { LandingNow } from "./landing-now.ts";13import { MusicBox } from "./music-box/music-box.tsx";14import { WaysIn } from "./ways-in.tsx";15import { HEADLINE, HERO_LEDE } from "./words.ts";15import { CONCURRENCY, HEADLINE, HERO_LEDE } from "./words.ts";1617/** The page's one main action, a size up from a toolbar's button. */18const PRIMARY = buttonVariants({19 className: "text-want h-11 px-6 no-underline",
17 unmodified lines
37 </>38 );39};4041/** The lede, with `main` set as the ref it is, in mono at the lede's own size. */42const Lede = () => {43 const [before, after] = HERO_LEDE.split(MAIN);41/** A sentence with `main` set as the ref it is, in mono at the sentence's own size. */42const WithMain = ({ text }: { readonly text: string }) => {43 const [before, after] = text.split(MAIN);4445 return (46 <>47 {before}
115 unmodified lines
163 <h1 className="text-display text-balance">164 <Headline />165 </h1>166 <p className="text-lede text-muted-foreground max-w-(--measure-lede) text-pretty">167 <Lede />167 <WithMain text={HERO_LEDE} />168 </p>169 <p170 className="text-ui text-muted-foreground max-w-(--measure-lede) text-pretty"171 data-concurrency=""172 >173 <WithMain text={CONCURRENCY} />174 </p>175 </div>176 <div className="flex max-w-full flex-col items-center gap-4">177 <AppLink className={PRIMARY} data-action="asks" to={ASKS_PATH}>178 Browse open asks
35 unmodified lines
modified:apps/web/src/features/landing/words.ts+4 added
modified:apps/web/src/features/shared/status-line.tsx+5 added-1 removed
47 unmodified lines
48 Match.when(49 "shape",50 () => "What the change touches, read from its paths and added lines."51 ),52 Match.when("merge", () => "The answer merged onto the landed main."),52 Match.when(53 "merge",54 () =>55 "The answer merged onto the landed main, and merged again when main moves."56 ),57 Match.when(58 "cheap",59 () => "Counts on the merged tree: the project's ratchets."60 ),61 Match.when(
548 unmodified lines
modified:apps/web/test/landing.test.tsx+18 added
165 unmodified lines
166 ).toBeTruthy();167 })168 );169170 it.effect(171 "says under the lede that many agents answer at once while main moves one landing at a time, and that the merge stage merges again when main moves",172 () =>173 Effect.gen(function* () {174 const main = mainOf(yield* pageWith(landed));175 const hero = main.slice(0, main.indexOf('data-figure="music-box"'));176 const gate = main.slice(main.indexOf('aria-labelledby="gate"'));177178 const merge =179 /<li\b[^>]*data-stage="merge"[\s\S]*?<\/li>/u.exec(gate)?.[0] ?? "";180181 expect(textIn(hero)).toContain(182 "Many agents answer at once, each in a fork of its own, and main moves by one landing at a time."183 );184 expect(textIn(merge)).toContain("merged again when main moves");185 })186 );187188 it.effect("names the four words as GLOSSARY.md defines them", () =>189 Effect.gen(function* () {190 const markup = yield* pageWith(landed);191 const words = ["Ask", "Answer", "Check", "Refusal"];
288 unmodified lines
added:examples/swarm-run-2026-10-08.md+79 added
modified:GLOSSARY.md+3 added-3 removed
15 unmodified lines
16A commit in a claimant's fork offered to satisfy one ask.17_Avoid_: pull request, PR, patch, attempt, submission1819**Round**:20One push of an answer that the gate checked: its head commit, the gate's verdict on it, and when. The next push starts the next round, numbered from 1, and a verdict is never read against a later round.20One push of an answer that the gate checked: its head commit, the gate's verdict on it, and when. The next push starts the next round, numbered from 1, and a verdict is never read against a later round. The rounds are the record an agent works from when it pushes again, so nothing it learned lives only in its own context.21_Avoid_: revision, iteration, attempt, submission2223**Claim**:24One person's exclusive, expiring right to answer an ask, made of a fork and a scoped token; kept alive only by pushes.24One person's exclusive, expiring right to answer an ask, made of a fork and a scoped token; kept alive only by pushes. While it lives, a second claimant is refused, so agents working at once never answer the same ask unless its kind allows a race.25_Avoid_: lease, lock, assignment2627**Claim fork**:28The fork a claim is made of, at `<owner>/<name>--<ask>--<handle>`, to which the claimant pushes answers.
14 unmodified lines
43**Check kind**:44The shape of an ask's check: redThenGreen, lintToZero, ratchet, migrate, or symbolAbsent (a family's delete child).4546**Family**:47A migrate ask whose old name is used in two or more modules, opened as one child ask per module that uses it, each with that module as its territory, plus a delete child that waits on every child and checks the name is gone; the parent closes when its last child lands.47A migrate ask whose old name is used in two or more modules, opened as one child ask per module that uses it, each with that module as its territory, plus a delete child that waits on every child and checks the name is gone; the parent closes when its last child lands. Each child is claimed on its own, so one change is answered by several people at once.48_Avoid_: epic, subtasks, batch, stack4950**Territory**:51The module (by default a workspace package) an answer may change.
204 unmodified lines
modified:PRODUCT.md+1 added
modified:README.md+15 added-2 removed
1# Myr23A Git platform for the boundary between a project and everyone else. Everything a project ships is public, its contribution process is typed code on `main`, and a push lands only by passing a typed gate.45Anyone's agent can now offer a change at any hour, and projects answer by closing the door or hand-building a vouch gate in front of it. Myr puts that boundary in the platform, so it is held at the push rather than in a maintainer's evening. It runs live at <https://myr.technology>.5Anyone's agent can now offer a change at any hour, and projects answer by closing the door or hand-building a vouch gate in front of it. Myr puts that boundary in the platform, so it is held at the push rather than in a maintainer's evening. Many agents offering changes to one project at once is the reason it is held there: each answer is judged on its own merged tree, and `main` moves by one landing at a time. It runs live at <https://myr.technology>.67A platform can do what a setting on a code host cannot:89- **Judge with checks the answer cannot touch.** A push that edits test config, scripts or CI, or skips a test without a reason, is refused.
11 unmodified lines
21remote: retryable: no22 ! [remote rejected] HEAD -> main (OutOfScope)23```2425## Many agents at once2627A claim is exclusive unless the ask's kind allows a race, so a second claimant hears `AskFull`, and a claim lives only while its claimant pushes: by default it is warned after 2 hours and lapses after 24 without a push. Each project is one Durable Object and each pushed answer runs in a Workflow of its own, so answers to different asks are merged and checked in parallel; only the final write to `main` waits, in a landing slot that holds one answer at a time. The platform never rebases an answer: when `main` moved while it waited, it merges the answer three ways onto the new `main` and checks the merged tree again, up to three times (`maxRemerges` in `packages/project/src/landing.ts`). When that merge conflicts, or `main` keeps moving, the answer is refused `StaleBase`, and a conflict's refusal names each conflicting path with the landing, ask and person that moved it. A migrate ask whose old name is used in several modules opens as a family: one child ask per module, each claimed on its own, plus a delete child that waits until every other child has landed. What an agent carries from one push to the next is kept by the platform, not in its context: each push is a numbered round with its own verdict, each refusal is a typed value with the command to run next, and `myr evidence` returns a failing lane's log to the answer's claimant.2829Measured live on the `dev-oscabriel` stage on 2026-10-08, from commits `25a727e` (swarm run 1) and `6730a0e` (the rest), with [`scripts/swarm.ts`](scripts/swarm.ts) and `smoke --loop`; the whole record, failures included, is in [examples/swarm-run-2026-10-08.md](examples/swarm-run-2026-10-08.md).3031| Run | Measured |32| --- | --- |33| Swarm run 2: six contributors on four harnesses (Claude Code, OpenCode, Amp, pi), one family child each | 6 of 6 landed in 7 min 41 s; one `StaleBase` landed on its second attempt, one `ChecksFailed` landed after a fix |34| Both swarm runs' ten landings | 6 of 10 met a moved `main` and were merged and checked again before landing |35| The core loop, five runs | 5 of 5 passed, each refused `OutOfScope` in git's output before it landed |36| The Lander's land step, ten swarm landings | median 5.5 s, worst 12 s: over the 5 s bar in 5 of 10 |3738## Quick start3940You need Bun 1.4.2 and git 2.5x. Nothing here needs an account:41
74 unmodified lines
116apps/ the platform, sandbox and web Workers, and the CLI117packages/ the protocol (one schema for every surface), gate, rules, checks, lifecycles, git and the rest118infra/ bootstrap, deploy, the stage table, teardown119scripts/ brand and byte checks, seed, smoke, swarm, release107examples/ datekit and burrow, fictional projects seeded on dev stages120examples/ datekit and burrow, fictional projects seeded on dev stages, and the swarm's run record121tools/ the vendored lint plugins122```123124## Credits
12 unmodified lines