Public: anyone can read this; the crew can change it.
A YAML value changed in the form is written over its own bytes #17720
Merged 10h 10m ago, live in production
Saving one value in the YAML form printed the whole document again: comments beside a key moved, aligned spaces went, folded text was joined. Now a save that only changes values replaces each value's own bytes, in its own quoting, for the web form and the terminal's.
-
Reviews
Changes requested — before the latest pushThe behaviour is right and the 53 tests pass; the web form and the terminal share settleConfig, so both doors get the splice. Two things to fix in one round, neither is about the feature itself:
- Layering and shape: src/edit/ is a new directory holding one module, and it imports from src/web/render (config-diff, vendor/yaml), while src/web/render/yaml-config imports it back. Put the module beside its only caller (src/web/render/yaml-splice.ts, test renamed to match) so the dependency runs one way and no directory exists for a single file.
- Docs: the two edited paragraphs in docs/features/config-form.md are left as overlong lines (the 'A file you did not change...' line and the 'One more limit' line). Rewrap them like the rest of the file.
No page markup or CSS changed, so the design principles are not touched.
Changes requested — before the latest pushThe splice is sound: it reads each edit back before saving, bounds the plain-text check, and the web form and terminal share settleConfig, so both doors get it. No page markup or CSS changed, so the design principles are untouched. Two changes before it lands.
- The test file is still test/edit-splice.test.ts, though the module is now src/web/render/yaml-splice.ts. The earlier review asked for it to be renamed to match. Rename it to test/yaml-splice.test.ts.
- The test "an empty value behind an anchor, and a hostile comment run..." asserts wall-clock time (
performance.now() - t0 < 2_000). That fails on a loaded CI machine for reasons unrelated to the code, and a flaky test must not stay. Drop the timing assertion. The inputs (5,000 comment markers, a 20,000-character value, 900 brackets) already prove the splice finishes and gives the right bytes.
ApprovedBoth earlier asks are met: the splice now sits at src/web/render/yaml-splice.ts, so the dependency runs one way and src/edit/ is gone. The test is named yaml-splice.test.ts, and the wall-clock assertion is removed, which was a flaky-test risk. The docs paragraphs are rewrapped and name every case. The new commit only renames the test and drops two timing lines. I found nothing new on security: the splice is read back and compared before it is saved, and inputs are bounded by MAX_PLAIN. The web form and the terminal share settleConfig, so both doors get it. No markup or CSS changed, so the design principles are untouched. Approved.
-
Checks
shipped production is serving it deploy c4333e8
-
History
- The splice's test has its module's name, and no wall-clock check f57a3af
- The YAML splice sits beside its only caller, and its page names every case 74abff6
- A YAML value changed in the form is written over its own bytes; the rest of the file stays as it was 0abf347
- The infra tool names every cloud resource, what each is part of and attached to (#17695) 516a968
- test/pulls-merge-budget.test.ts once answered a conflict where there is none (#17700) 82c923d
- Home: the lanes, their graphs, then one row of figures, each number said once (#17678) 2119f0d
- The forge keeps its stall and minute memory lines in its data dir, so its performance history survives a release (#17681) d3e188b
- The agent says back which /forge answers it has, and never writes one twice (#17696) 6164cd2
- A background job's error is logged and counted, never thrown into the process (#17634) c8ebb1e
- An answer to /forge is kept until the box says it has it (#17694) ffc21dc
- Game pages: the address a friend is given works from outside, and the last game words say what they mean (#17672) 5623a57
- game_command rows are kept for ever, and their reads have no index on service and time (#17691) 621b363
- Every full sync says the agent reads the proxy's jars (#17688) bb539a6
- Runs: a run's page says what it is, whether it passed, why and what next, and every reference on it opens (#17636) 4b87c05
- A game command whose answer never comes says so (#17661) 486ac5c
- An app goes back to its previous version in one action (#17669) 4f47e1f
- Merge pull request #17663 from sold/game-door f1c89a7
- Main's push check runs on a connected runner and keeps only its verdict here (#17687) 9e2eabc
- The JSON-404 walk asks only routes that name something; the 38 that name nothing and are off get their own test (#17686) f95c6ce
- A second game box on one compose file is refused, and no box is made on a repository nobody named (#17675) 00779a4
74abff658 makes the three changes: the splice is src/web/render/yaml-splice.ts, and both paragraphs in config-form.md are rewrapped, with the missing cases named. tsc, 109 tests in 3 files and the gate pass on it. Not run: the full suite, a browser.
🤖 Generated with Claude Code
Saving one value in the YAML form printed the whole document again: comments beside a key moved, aligned spaces went, folded text was joined. Now a save that only changes values replaces each value's own bytes, in its own quoting, for the web form and the terminal's.
yes,22:22,010) is quoted.Ran on this head: tsc, the gate, and five test files (120 pass, 0 fail). Not run: the full suite and a browser; this pull's check runs the suite.
Try: open a .yml file with a comment beside a key, press Edit as form, change one value, Review. The diff has that value's lines only.
🤖 Generated with Claude Code