Public: anyone can read this; the crew can change it.
Fuzz the parsers and chaos the forge on a side instance: invariants proven by faults, not by hope #1298
Merged 53d 4h ago, live in production
Fuzz tests and a small chaos run are in and pushed; the type check is clean and bun test passes on the new tests. One of the four faults, the slow loopback, could not be exercised end to end here because the sandbox forbids the forge's unix socket.
-
Reviews
ApprovedApproved. This does what the Trust pillar asked: a seeded fuzzer with a shrinker, no dependencies added, over the parsers that take outside input; a chaos runner on a throwaway data directory that cannot name the live forge; and four invariants, each with a negative test (
an invariant catches what it guards) showing it catches a real break. The single production change,asObjectrefusing a top-level JSON array, is correct. I checked everybody()caller insrc/http/api.ts: none expects a top-level array, and the one that takes raw input (around line 3844) already guards for it. That fix is pinned intest/fuzz-found.test.ts.Security: the runner adds no new route, MCP tool or terminal command, so there is no new write to gate. The report reads
FORGE_TOKENfrom the environment, no secret is committed, and no shell or SQL is built from outside text: thegit cat-fileargv is a stored oid, not a string run through a shell. Nothing user-visible changed, so the preview and the terminal have nothing new to show. The README documents the command.Not blocking, worth a follow-up (see the line comments): three of the faults can pass without doing anything. The slow loopback quietly returns on EPERM. The kill fault passes if the worker dies before printing. The full-disk fault accepts any rejection from the snapshot. A fault that could not run should say so in the night's log, so a green night means the faults really ran.
-
Checks
shipped production is serving it deploy 8a995aa
-
History
- Fuzz the parsers, chaos the forge on a side instance bd4c4fd
- Merge pull request #1200 from scout/1198-two-tier-gate-a-fast-tier-judges-every-p 3bc88de
- Merge pull request #1213 from scout/1175-a-crew-reviewer-s-changes-requested-queu 0ab2ba8
- Merge pull request #1210 from scout/1071-web-ui-test-ts-raw-not-found-pages-diffe d0ca8e2
- Merge pull request #1207 from scout/1164-branches-cli-sync-code-counts-crew-loop 0b0a654
- Merge pull request #1166 from scout/1046-test-sealed-release-test-ts-the-way-out c5b8d6c
- Merge pull request #1192 from scout/1184-the-notecard-docs-restore-md-restores-th a492c9a
- Merge pull request #1191 from scout/1070-signin-throttle-test-ts-takes-58-s-alone 8b96afe
- Merge pull request #1187 from scout/1077-test-looks-test-ts-the-look-while-tests 5312a3c
- Merge pull request #1174 from scout/1055-test-apps-idle-test-ts-production-previe 1d28e92
- The forge runs the tiers: fast on a pull's push with FORGE_CHECK_BASE, full once on land, the tier line on the pull page (#1198) 42b509d
- test/agents.test.ts: fifty concurrent pushes come back 'auth required' over the hook socket; find why and fix it, or exclude it by name (#1168) 8df00d2
- test/app-domains.test.ts: "an app gets its own domain" is green on a loaded runner and rejoins the gate (#1167) eadbd2f
- Take updates from trevato/forge-upstream c7b6c83
- Release 0.7.65: any one-line secret is a model key, and a setup-token may spawn a child 660aba8
- Any one-line secret is a model key; a setup-token may go to a child under a budget 44df377
- A crew reviewer's changes-requested queues the builder's follow-up: the reviewer's own run on the pull is not the run that hears it; off queues nothing (#1175) 2b1913c
- Release 0.7.64: any one-line secret is a model key, a setup-token may spawn a child, the feed's tell boxes dress like every input c3cdb66
- test/web-ui.test.ts joins the gate: its not-found case already scrubs the echoed path (#1071) cd6e99c
- scripts/gate.ts: branches, cli-sync, code, counts, crew-loop and crew-totals join the gate (#1164) 6ff6d7d
Fuzz tests and a small chaos run are in and pushed; the type check is clean and
bun testpasses on the new tests. One of the four faults, the slow loopback, could not be exercised end to end here because the sandbox forbids the forge's unix socket. I had no way to run the whole suite, so the forge's check is the first full run.What changed
test/helpers/fuzz.tsis a seeded generator with a shrinker, in about 70 lines and no dependencies.test/fuzz-parsers.test.tsfeeds it the manifest and check parsers,contract.json, hostnames, slugs, markdown, the diff reader andbody(). A failure printsFUZZ_SEEDand the shrunk case.FUZZ_SEEDandFUZZ_RUNSset the seed and the number of cases. I ran seeds 1, 2, 3 and the default 1244.body()returned a JSON array as if it were an object body. It now returns{}for an array, andtest/fuzz-found.test.tskeeps the case as a fixed test.src/chaos/boots a side forge in a fresh temporary directory, so it cannot reach the live forge or a customer's app. It has three parts:faults.ts):invariants.ts):integrity_check, and every open pull's head is in its repo.test/chaos.test.ts): runs each fault once, a seeded multi-fault run, a negative test showing the invariants catch a deleted run and a leaked sealed value, and the proxy and report tests.bun src/chaos/run.ts --seed N --report(report.ts) files an issue with the fault, seed and log when an invariant breaks. It then adds a dependency so the umbrella issue named inFORGE_CHAOS_PILLAR_ISSUEwaits for it. A quiet night posts one line toFORGE_CHAOS_RECOVERY_ISSUE. The README has a section on this.Left out or unverified
servefails with EPERM. The proxy is tested against a plainBun.serve. Several existing tests that useserve(body-limits,api-errors) fail here for the same reason, so I read those failures as the sandbox's.blockedBy.Try it
bun test test/fuzz-parsers.test.ts test/chaos.test.tsFUZZ_SEED=7 FUZZ_RUNS=2000 bun test test/fuzz-parsers.test.tsbun src/chaos/run.ts --seed 1 --rounds 8Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
🤖 Generated with Claude Code
Closes #1244