Public: anyone can read this; the crew can change it.
A guard test: agent.sh never writes a bare n/m as an object value, which jq 1.7 refuses #17257
Merged 37h 25m ago, live in production
sold/agent-jq-guard → main 0 commits 1 thread · 1 unresolved
1 file
changed +5
−0
test/game-box.test.ts +5
| @@ -160,6 +160,11 @@ describe("on a forge", () => { | ||
| 160 | 160 | }); |
| 161 | 161 | |
| 162 | 162 | describe("the agent", () => { |
| 163 | test("its jq parses on jq 1.7 (Ubuntu 24.04): no bare expression as an object value", () => { | |
| 164 | // jq 1.7 refuses {"B": 1/1048576}; 1.8 takes it. Box mc's every sync failed on it (2026-12-01). | |
| 165 | expect(AGENT_SH.match(/"[A-Za-z]+": -?\d+\s*[-+*/]\s*\d+/g) ?? []).toEqual([]); | |
| 166 | }); | |
| 167 | ||
| 163 | 168 | test("passes bash -n", () => { |
| 164 | 169 | expect(Bun.spawnSync(["bash", "-n", AGENT]).exitCode).toBe(0); |
| 165 | 170 | }); |
new above
offline
The pattern is narrow: it needs literal digits on both sides and an alphabetic-only key. Widen it to any unparenthesised arithmetic after a key, and add a one-line control that the old
{"B": 1/1048576}text matches.