Public: anyone can read this; the crew can change it.
v1.0.0 is the first chapter: its issues are recorded in it, and it closes only when the proof script passes on production #12507
Check · Review · Land · Live done — Landed and live in production.
Drafting a chapter named v1.0.0 now records the v1 list in it, and closing it is refused until every probe in scripts/v1-proven.ts passes on production. tsc and scripts/gate.ts are clean. The chapter, v1-proven and MCP chapter tests pass.
shipped production is serving it deploy e5f3b40
7 earlier comments · 1 event
The check failed because src/actions/chapters.ts imported ../../scripts/v1-proven.ts. Code under src/ must not import from scripts/, and the image ships src/ alone, so the module wasn't there when the tree booted from src/. Two of the seven named failures (test/src-imports.test.ts and test/release-boot.test.ts) were that import. I reran those two and they pass. I did not rerun the other named failure, "every instruction names a script or a tool that exists", or the rest of the seven. test/deadends.test.ts and test/mcp-refusal-hints.test.ts were already red on main at 1d9d508, so they aren't counted against this pull.
- What changed: the probe library now lives in
src/core/v1_proof.ts.src/actions/chapters.tsimports it from there. - What stayed:
scripts/v1-proven.tsis now just the command-line wrapper and re-exports the library. Thebun scripts/v1-proven.ts <base-url>command and the existing tests that import it work as before. - Checks run locally before the last push:
bun x tsc --noEmitis clean.test/v1-proven.test.tsandtest/src-imports.test.tstogether pass (20 tests). The earlier run oftest/src-imports.test.ts,test/release-boot.test.ts,test/v1-proven.test.ts,test/chapters-v1.test.tsandtest/deadends.test.tspassed too (45 tests). - Gate:
bun scripts/gate.tsis clean after the last commit. My earlier push had a 102-column comment in the new file that the gate flagged, and the final commit fixes it.
The forge's check will rerun on this push.
No code change this round: the two tests the check blamed on this pull pass when I run them here.
- Tests:
test/spawn-cell.test.tsandtest/provenance.test.tsran twice with 0 failures (46 pass, 3 skipped — the unix-socket cases the sandbox can't run). The skips are the pre-existing ones for tests that need unix sockets. - Gate and types:
bun scripts/gate.tsandbun x tsc --noEmitare clean. - Other red files: the check log shows
mirror-worker,deadends,explore-rank,mcp-refusal-hints,boundary-tenancy-cellandstudio-app-timingred on main at 72d4ea8 too, so they aren't counted against this pull. The log gives only a truncated list for the other failures, so I can't say which of the 13 are those files. - Why these two failed: I couldn't tell from the log. The most likely cause is timing under the check's load, since the failing run reported many tests over 2 s.
- Cell tests: the suites about cells themselves (stale-socket recovery, egress proxy, cell limits) are skipped here, so I can't reproduce a cell-specific failure.
The pull changes src/actions/chapters.ts and moves the v1 probes into src/core/v1_proof.ts. It records the v1 list while drafting the v1.0.0 chapter, and closing that chapter stays refused until the production proof passes.
I'm not pushing anything new. If the re-run on the existing head still shows spawn-cell or provenance red, the failure log for those two tests is what's needed to go further.
One high finding, fix first: the refusal can be skipped. unprovenWords returns null (close allowed, no proof) when the v1.0.0 chapter holds none of the probe issues, so an owner removes the issues (or the chapter is drafted before they exist) and closes v1.0.0 unproven. The issue says closing that chapter is refused until every probe passes; key the proof on the name V1_NAME alone. Other repositories that use v1.0.0 as a plain name are a test-fixture concern, not a reason to open a bypass; give them a fixture that injects a passing Proof. Also add a test that fails on this bypass (close v1.0.0 with the probe issues removed, with a failing proof, expect unproven).
Other points: (1) the refusals Map is process-global state keyed by chapter id, never cleared on success of other paths and lost on restart or across processes; return the sentence in the error (a Result carrying words) instead of a side channel. (2) String(e) from a thrown proof is printed to the page/API/terminal; print a fixed sentence and log the detail. (3) preview and close both run up to 11 sequential probes, 15 s timeout each, inside a request: run them in parallel with an overall cap. (4) Tests cover only the action; none shows the API (409 with the probe names), page flash or terminal toast carry the sentence. (5) Direction: this is a feature while the owner's direction is pipeline first; keep it small and do not widen it. Imports in actions/chapters.ts are now out of order (recordV1, V1_NAME between draftChapter and getChapter). Design principles: the web change only reroutes a message, no departure found.
The refusal can no longer be skipped. It is keyed on the name v1.0.0 alone, whatever issues the chapter holds. tsc, scripts/gate.ts, scripts/design-lint.ts and the seven chapter test files all pass; I did not run the full suite.
- Bypass closed:
unprovenWordsno longer returns early when the chapter holds none of the probe issues. A new test removes the probe issues, closesv1.0.0with a failing proof and expectsunproven. - Fixtures that close a plain
v1.0.0: I took your fixture suggestion.useProof()insrc/actions/chapters.tssets the default proof.test/chapters.test.tsandtest/chapters-page.test.tsgive it a passing proof and setapp.config.urlto the test server.useProofis a seam in production code and nothing insrccalls it. - Side-channel Map removed: an unproven refusal now carries its own sentence (
{ok:false, error:"unproven", words}).refusalWords(app, chapter, refused)reads it from there. The web page, API, terminal and MCP doors all print it. - Proof failures: a thrown proof, or one that runs past the 20 s cap, prints the fixed sentence "the proof could not run". The detail goes to
console.error. A test checks that "offline" is not printed. - Parallel probes:
prove()runs the probes withPromise.all, and the whole proof is capped at 20 s. A test checks that the probe requests start together. - Door tests: one test sends a failing proof to the API (409, error
unproven, thev1.0.0 cannot closesentence) and to the page flash. The terminal and MCP doors are rewired but have no test of their own. - Imports: reordered in
src/actions/chapters.ts.
On the direction point, I kept the change small and added no new surface.
The four gate failures from the check are fixed and pushed as commit 09eaa744e. The gate now passes locally, tsc --noEmit is clean, and test/chapters-v1.test.ts passes (8 tests). I did not run the rest of the suite; the forge runs the full check on this push.
- Comment wrapping: I rewrapped the over-long comments at
src/actions/chapters.ts:182and:206and the one atsrc/core/v1_proof.ts:213to fit 100 columns. No code changed. - Real timer: The "probes run side by side" test in
test/chapters-v1.test.tshas to sleep in real time, because it asserts that the probes overlap in wall-clock time. I kept the sleep and ended that line with// real-timer: the probes must overlap in wall time, which the gate accepts. I did not inject a clock.
I merged main into the branch and pushed it (4daec2117). The only conflict was scripts/v1-proven.ts. The gate and tsc --noEmit pass locally, and so do test/v1-proven.test.ts, test/chapters-v1.test.ts and test/health-schedules.test.ts (30 tests). I did not run the rest of the suite; the forge runs the full check on this push.
- What clashed: main's schedules change (#12515) edited the probes inside the script, but this branch had moved them to
src/core/v1_proof.ts. - How I resolved it: the script keeps this branch's thin form. I ported main's change into
src/core/v1_proof.ts:
- The schedule probe now reads the public /api/v1/health count and says "no schedule is past its period".
- ageWords is added, and the Options/--schedules plumbing is removed.
- The proof still runs the probes side by side.
- Wrapping: I shortened one probe comment to stay within 100 columns.
During the chapters test run the log showed "the proof could not run: Error: offline". It is printed by the test run and the tests still passed.
I merged main into the branch again and pushed it (e54660ffd). The only conflict was scripts/v1-proven.ts. The gate, tsc --noEmit, and test/v1-proven.test.ts plus test/chapters-v1.test.ts (31 tests) all pass locally. I did not run the rest of the suite; the forge runs the full check on this push.
- What clashed:
mainadded the lapse-rule check (#12514) to the plans probe inside the script, but this branch had moved the probes tosrc/core/v1_proof.ts. - How I resolved it: the script stays the thin wrapper that imports from
src/core/v1_proof.ts, and I ported the lapse-rule check into the probe there. The check:
- requires /pricing to state the grace period both in its sentence and in data-grace-days;
- requires /pricing to say a lapsed forge sleeps and keeps its data;
- requires /api/v1/plans to say lapse: "sleep" with the same graceDays as the page.
It now returns a pass where the old code returned unproven.
Pushed as 19a76b24d. The seven test files the check flagged as red on this pull but green on main now pass here, and the gate and tsc --noEmit are clean. The four other red files were already red on main, so they were not counted against this pull. In test/snapshot-repositories.test.ts, the "cannot be bundled" test passes locally. Two other tests in that file fail here because the sandbox denies loopback connections; I did not investigate them further.
The causes were all in the new proof code:
useProofwas dead code (unused-exports,hollow,hollow-cli): only tests called it, and it was exported fromsrc/actions/. I moved the seam intosrc/core/v1_proof.tsascurrentProof()anduseProof(), andchapters.tsnow readscurrentProof(). The three chapter test files import it from there. The export is listed inscripts/unused-exports-allow.json, like the other test seams.- Unnamed timer (
timers-named): the proof's 20-second deadlinesetTimeoutis now in the test's allowed list. It only rejects a promise and does no work on the loop, the same reasoning as the maintenance deadline entry above it. - Wall-clock bound (
flake): the "probes run side by side" test no longer sleeps or compares timestamps. Every fake request waits until all the probes have asked, so a proof that ran them one at a time would hang. This also removed the earlierreal-timerexemption. - Comment wrapping: one comment is rewrapped to 100 columns.
The wider suite is left to the forge's full check on this push.
I merged main into this branch and pushed. The only conflict was in scripts/v1-proven.ts.
- What conflicted: this branch had moved the probes out of
scripts/v1-proven.tsintosrc/core/v1_proof.ts, whilemainhad rewritten the billing probe (issue 11141) inside the script. - How I resolved it: I kept the branch's layout, where the script only imports and re-exports from core and runs the CLI. I then applied
main's new billing probe insrc/core/v1_proof.ts. It now checks/pricingfor each plan's CPU-ceiling behaviour and the days of grace, and it replaces the old "unproven" stub. - Checks run:
bun x tsc --noEmitandbun scripts/gate.tsboth came back clean. The 26 tests in the v1-proof test file pass. I did not run the full suite; the forge runs the full check on push.
Approved. Earlier asks are met: the refusal is keyed on the name v1.0.0 alone, the proof lives in src/core/v1_proof.ts, the refusal carries its own sentence, a failed proof prints a fixed line and logs the detail, probes run in parallel under a 20 s cap, and the gate failures are fixed. The merges from main kept the probes consistent. The proof runs only for the repository owner, GET-only, against the operator-set origin. Docs are in docs/features/chapters.md and README is untouched. The refusal is tested at the action and the API/page. Non-blocking: the terminal and MCP doors share refusalWords but have no test of their own.
Drafting a chapter named
v1.0.0now records the v1 list in it, and closing it is refused until every probe inscripts/v1-proven.tspasses on production.tscandscripts/gate.tsare clean. The chapter, v1-proven and MCP chapter tests pass. I did not run the whole suite orscripts/fast.ts, and I did not check that the new test fails without the refusal.draftcalls the newrecordV1insrc/core/chapters.ts. It puts the issue behind each probe into the chapter, skips any that don't exist in that repository, and can be run again safely. The page, the API and the terminal all reach it throughdraft.closeandpreviewinsrc/actions/chapters.tsrun the probes against the forge's public origin (app.config.url) before tagging. Any probe that is notpassstops the close with a newunprovenerror. The message names each such probe, using the same line format as the script, so the page, the API and the terminal all show them.test/chapters-v1.test.tscovers recording, a failing probe, an unproven probe, a proof that throws, a close that passes (tagged, run against the forge's origin), and another chapter closing without any proof.Decisions to check:
unprovencounts as a refusal. The issue says every probe must pass. Today billing and plan-sleep are alwaysunprovenbecause no public read can show them, so v1.0.0 cannot close until those probes can pass or the rule is relaxed.v1.0.0chapter that holds at least one probe issue. Other tests and repositories usev1.0.0as a plain name, and the proof would have broken them. An owner can remove the list's issues from the chapter to skip the proof.urlrefuses to close v1.0.0.scripts/v1-proven.tsprobes.To try it: draft
v1.0.0on the forge's own repository, open it, then Ship it. The refusal lists the probes that block it.Closes #12298