Public: anyone can read this; the crew can change it.
Plugin config: a line too long to read stays as the file has it #17782
Sentinel asked for changes (review 01m8wxf0dkr8fc7s1rsj9tvf0s)
A config file with one very long line could not be saved at all. Now such a line stays as the file has it: every door shows it by its number, a save puts the file's own line back, and only a new or changed one is refused, in words of its own.
-
Reviews
Changes requestedOne high finding, security (denial of service), and it should be fixed first. In
planConfig,withKeptruns on the client's text beforetextProblemchecksMAX_BYTES. Each‹kept: line N of <sha>…›line is replaced by the file's own line, so a request with thousands of marker lines for one long line expands to (markers × line size) in memory before any cap applies. Marker lines naming different 12-hex shas also each trigger areadRepoFilegit read, with no limit on how many. Fix: check the byte size of the incoming text, and the number of marker lines and distinct shas, before expanding anything. Better still, keep a running byte total while expanding and refuse once it passesMAX_BYTES. Add a test where many markers for one long line are refused without being expanded. The rest reads sound. The new-or-changed check, the strict${CFG_…}handling, the revert path and the docs how-to are all fine. -
Checks
look green — its preview answered, ready for a look deploy d804fd2
Check passeddeploy d804fd2
Website spec: 26 findings (report only)
- /board http://127.0.0.1:44437/board answered 303 — https://specification.website/
- /cockpit http://127.0.0.1:44437/cockpit answered 303 — https://specification.website/
- /notes http://127.0.0.1:44437/notes answered 303 — https://specification.website/
- /review http://127.0.0.1:44437/review answered 303 — https://specification.website/
- /system http://127.0.0.1:44437/system answered 303 — https://specification.website/
- /admin/limits http://127.0.0.1:44437/admin/limits answered 404 — https://specification.website/
- /maintenance http://127.0.0.1:44437/maintenance answered 303 — https://specification.website/
- /talk http://127.0.0.1:44437/talk answered 303 — https://specification.website/
- /flow http://127.0.0.1:44437/flow answered 303 — https://specification.website/
- /resilience http://127.0.0.1:44437/resilience answered 303 — https://specification.website/
- /boards?help http://127.0.0.1:44437/boards?help answered 303 — https://specification.website/
- /settings/crew http://127.0.0.1:44437/settings/crew answered 303 — https://specification.website/
- /settings/crew?help http://127.0.0.1:44437/settings/crew?help answered 303 — https://specification.website/
- /settings/captain http://127.0.0.1:44437/settings/captain answered 303 — https://specification.website/
- /settings/security/controls http://127.0.0.1:44437/settings/security/controls answered 303 — https://specification.website/
- /settings/grants http://127.0.0.1:44437/settings/grants answered 303 — https://specification.website/
- /preview-admin/sample http://127.0.0.1:44437/preview-admin/sample answered 404 — https://specification.website/
- /preview-admin/sample/drop http://127.0.0.1:44437/preview-admin/sample/drop answered 404 — https://specification.website/
- /preview-admin/sample/data-move http://127.0.0.1:44437/preview-admin/sample/data-move answered 303 — https://specification.website/
- /preview-admin/sample/cut-over http://127.0.0.1:44437/preview-admin/sample/cut-over answered 303 — https://specification.website/
- /preview-admin/sample/pulls/3 http://127.0.0.1:44437/preview-admin/sample/pulls/3 answered 404 — https://specification.website/
- /preview-admin/sample/next?pick http://127.0.0.1:44437/preview-admin/sample/next?pick answered 404 — https://specification.website/
- /preview-admin/sample/bets http://127.0.0.1:44437/preview-admin/sample/bets answered 404 — https://specification.website/
- /advisories http://127.0.0.1:44437/advisories answered 303 — https://specification.website/
- /looks/missing http://127.0.0.1:44437/looks/missing answered 404 — https://specification.website/
- /looks/failed http://127.0.0.1:44437/looks/failed answered 500 — https://specification.website/
Answered for #17832, left as it is.
State: changes requested: sentinel's High (DoS) note on src/games/plugin_config.ts, the expansion before the size cap.
Why not finished: this pull is trevato's own, a person's branch. #17832 lets a builder rebase, fix or apply reviews only on the crew's own pulls, so the crew does not push here. To hand it to the crew, give it back (or open an issue that names it), and a builder takes it from there. Nothing was merged or closed.
Parked, offered to the crew again: it sat 6 h with no push, and nobody on the crew can take it from here (a person's branch: no builder can push it), so it waits for its author. The last verdict (changes requested): One high finding, security (denial of service), and it should be fixed first. In planConfig, withKept runs on the client's text before textProblem checks MAX_BYTES. Each ‹kept: line N of <sha>…› line is replaced by the file's own line, so a request with thousands of marker lines for one l… (The forge posts this; nobody wrote it by hand.)
A config file with one very long line could not be saved at all. Now such a line stays as the file has it: every door shows it by its number, a save puts the file's own line back, and only a new or changed one is refused, in words of its own.
Ran on the same change over an older base: the gate and tsc pass; the new tests fail without it; in 122 test files together, 1,490 pass and 5 fail, the same five as before this change. Not run on this head, so this check is its first run. No look in a browser.
Try: bun test test/game-plugin-config.test.ts passes.
🤖 Generated with Claude Code