lessons: a size budget is met, not raised, moves into the code standards
coreScriptBudget rose four times on 11-12 (d96403141,05cadcafd,4519eea71,09e2eef0d), 1,089 bytes with nothing moved out, the third day the budget lesson was seen (10-17, 11-10). Per LESSONS' rule it moves into docs/code-standards.md as a row of "What a change contains". Docs only.
This commit is contained in:
+10
-1
@@ -799,7 +799,13 @@ before the merge, are in the code standards.)
|
||||
out to a plugin (#5918). A budget that counts comments makes them the
|
||||
cheapest thing to cut. Measure what the budget is about, and run the
|
||||
sub-second guard before pushing a change near it.
|
||||
- Seen 2× (2026-10-17, 2026-11-10).
|
||||
- 11-12: coreScriptBudget was raised four times in one afternoon, by
|
||||
367 (d96403141), 151 (05cadcafd), 458 (4519eea71) and 113 (09e2eef0d),
|
||||
1,089 bytes in all, each saying there was no page left to move it to.
|
||||
09e2eef0d's 113 came from a rebase: 6055f626e fit at its base and the
|
||||
two commits that landed under it filled the room.
|
||||
- Seen 3× (2026-10-17, 2026-11-10, 2026-11-12); moved to the code
|
||||
standards.
|
||||
|
||||
**A release published after a newer one takes Latest, and with it the
|
||||
update feed and the tap, unless the publish step checks.**
|
||||
@@ -930,6 +936,9 @@ each one.
|
||||
answered psikent (/v1/models says every model takes tools) and windy
|
||||
(a group's Context hint names the member a longer conversation skips)
|
||||
under one subject that names only the first.
|
||||
- **A size budget is met, not raised** (10-17, 11-10, 11-12). On 11-12
|
||||
coreScriptBudget rose four times in one afternoon (d96403141,
|
||||
05cadcafd, 4519eea71, 09e2eef0d), 1,089 bytes, with nothing moved out.
|
||||
- **Never let magpie's default override a value the user set themselves**
|
||||
(10-05, 10-10, 10-17). On 10-17 5a2414acd brought every plugins.yml
|
||||
without `settled` up once, Essentials to All. A user who had run
|
||||
|
||||
@@ -18,6 +18,7 @@ describe and review a change to a subsystem is in the
|
||||
| Another app's values come from that app. | When magpie writes another app's file or speaks for it, take each field's type and value from that app's own data, binary, merge code or docs, not only its field names. 84554e57 wrote updatedAt in milliseconds and hung Claude Desktop's skills page (#863). #966 guessed Codex's limit_reached, which #996 undid after reading ChatGPT.app. On 10-13 accc8c090 copied Claude Code's OAuth client names but sent its own redirect_uri (127.0.0.1, where Claude Code sends localhost); e0ecf0161 read the binary and fixed it. |
|
||||
| Nothing that can block runs under a lock its reader needs. | Never send on a channel or call anything that can block while holding a lock the receiver takes first. Set shared state before the handoff that lets another goroutine look at it, and a struct copied by value that holds a map is not a copy. A fake server's handler runs on many goroutines: guard what it records with a lock, and count only the calls the test makes, since background reads reach it too. A change that starts a goroutine or timer runs `-race` before it is pushed. 85fd35ab hung macOS -race CI (4fb8e887). 01e66e0f's marshal wrote into a shared map (15afd988). On 10-11 7cba316b9's turn-done timer read fields on its own goroutine and went red under -race (a2afc1828). On 10-13 TestKeptLoginStandsAtItsPlace's fake Codex appended from two goroutines (a75de4c21). |
|
||||
| magpie's default never overrides a value the user set. | Before writing a key, list everywhere the agent or magpie reads that setting from, and test with a user-set value present. A migration that rewrites a setting names the users who set it themselves, and leaves their value alone or says in the release why not. CLAUDE_CODE_AUTO_COMPACT_WINDOW overrode the user's own autoCompactWindow for ~150 releases (602d4ec6). On 10-10 four fixes (603dc0c4, 5aca7d09, c65d9fb4, d9bf7c1c) each started without a test holding a user-set value. On 10-17 5a2414acd turned every unmarked Essentials preset into All, including one a user picked with `magpie plugin preset essentials` (#2749). |
|
||||
| A size budget is met, not raised. | A change that reaches a budget (app.js, the core scripts) moves something out first: to a plugin page, a lazily loaded file like `updatesource.js`, or code it replaces. A raise names what the owner agreed to, not "nothing left to move". Comments are not what gets cut: the budget counts code. After a rebase, run the budget test again at the pushed head. app.js's budget rose four times in 2.5 days to 1,269,000 (85eef5d87, #2710). On 11-12 coreScriptBudget rose four times in one afternoon, 1,089 bytes, with nothing moved out (d96403141, 05cadcafd, 4519eea71, 09e2eef0d). |
|
||||
| Checks cover the edges the change touches. | For numbers, check the boundaries. For paths, check each platform (macOS, Linux, Windows). For concurrency, check races and stale state. Pick checks by risk. |
|
||||
|
||||
## Tests
|
||||
|
||||
Reference in New Issue
Block a user