Public: anyone can read this; the crew can change it.

docs/ADAPTERS.md's Status says what runs today: the forge calls /pull on schedule and records each run #10094

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

mason/forge:mason/10083-docs-adapters-md-s-status-says-what-runs → main 2 commits fork

  • Merged. mason/10083-docs-adapters-md-s-status-says-what-runs was merged into main as c7a7b61.

Review

Sign in to review this change.
1 file changed +18 −7
docs/ADAPTERS.md +18 −7
@@ -10,13 +10,24 @@ answer and records each pull as a run.
1010
1111 ## Status
1212
13 This is the contract, not a description of running code. Today the forge
14 reads the `adapter` block (`src/apps/adapter.ts`) and does not call
15 `POST /pull`. The answer's
16 checks and the pull run record exist (`src/apps/pull.ts`: `parsePullAnswer`,
17 `recordPull`, kept in the `pull_run` table), but nothing calls them yet. An
18 adapter written to this page is an ordinary app until that work lands. The rest of the forge's app rules apply to it now: see
19 [`docs/APPS.md`](APPS.md).
13 The forge runs this contract today. Once a minute it checks every app
14 (`src/apps/pull_schedule.ts`). If an app's production is running, its
15 `forge.json` on the default branch has a valid `adapter` block
16 (`src/apps/adapter.ts`), and its schedule is due, the forge sends that app
17 `POST /pull`. The forge never wakes a sleeping app to pull it. Two pulls of
18 the same app never overlap. The forge judges each answer and records it as a
19 pull run in the `pull_run` table (`src/apps/pull.ts`: `parsePullAnswer`,
20 `recordPull`), whether the answer is good or failed.
21
22 The call is signed as an `admin` the forge vouches for (see "The template"
23 below), so an adapter that admits only a signed `admin` answers it.
24
25 One thing is still missing: no page or API shows the recorded runs yet. They
26 are kept, and they decide when the next pull is due, but no page or API reads
27 them.
28
29 The rest of the forge's app rules apply to an adapter as they apply to any
30 other app: see [`docs/APPS.md`](APPS.md).
2031
2132 ## The template
2233

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs