Files

1 line
4.6 KiB
JSON

{"body":"## Filbert review: row 181 round 1 (#1679), approve\n\nRequest 29370. Candidate manifest `46a4433ca4108682af2027dc27ad72359b45709006f809fbf45c4b45dfacc283` on base `a757f8fe6`. The brief is blob aafa471ae, and the rulings are in sage-1163.\n\n**Verdict: approve.** No findings block. N1 and N2 are notes. F1 from BUILD.md stays a follow-up.\n\n### What I ran\n\n- I built `~/filbert-scratch/r181-r1/wt` from `a757f8fe6`, then ran `git apply --index build.patch`.\n - `sha256sum -c` on the manifest passed 3/3, and the manifest file hashes to `46a4433c...dfacc283`.\n - The patch-id is `1fef78100554`: 3 files, +129/-16.\n- Base drift: `git log a757f8fe6..refactor` (fcfb82da2) on the three paths is empty.\n- Hash pins and path readers: no test under packages/*/tests or scripts/test-*.sh reads `scripts/stack-release.sh` or `docs/TOOLS.md`, or pins a 64-hex hash of them, except `stack-release.test.mjs` itself.\n- I took the slot after sage-1185, with the /proc busy check CLEAR before and after, and TMPDIR `~/fs177`.\n - `stack-release.test.mjs`: 116/116 pass, 0 fail, rc 0, from 04:29:04Z to 04:32:48Z. The counts are an awk sum over the spec log.\n- I ran two mutants of my own on `scripts/stack-release.sh`, each against T45 only. Each was restored by `git checkout`, and the tree went back to the 3 staged paths.\n - M1: a table's rows go into the text but not the total (`if(n){text+=...}`). Killed: rc 1, 5 of 6 failed. Every subtest failed except (c).\n - M2: a missing listed table throws instead of counting 0 (the `sqlite_master` check removed). Killed: rc 1, 5 of 6 failed, the same subtests.\n- Darkwing's run (116/116 and 14 mutants killed) is their receipt, not mine.\n\n### Item 1: the lists, checked at a757f8fe6\n\n- I grepped the INSERTs in packages/bus/src. They match BUILD.md's table:\n - broker.mjs: :561 for events, plus :999, :1129, :1159, :1551, :1575, :1687, :1696, :1734, :1769, :1806, :1894, :2257, :2301, :2331, :2362, :2377, :2470, :2483, :2518, :2535, :2565, :2596 and :2645.\n - usage.mjs:92.\n - store.mjs, for meta.\n- No other code under packages/ or scripts/ inserts into these tables.\n- Every counted broker writer stamps `at` with `this.#now()`, the monotonic ISO clock. usage.mjs stamps it with `new Date().toISOString()` inside its own transaction (:88-98).\n- decision_events is rightly in COUNTED: the decision.resolve event at :1778 is written only `if (s.human)`.\n- decisions (list 3): the insert at :1696 and the `action.allowed` event at :1716 both run inside `request`'s `this.#store.transaction(() => ...)` (:1295). The claim holds.\n- The UPDATE list is empty, as BUILD.md says. schema.sql has 16 CREATE TABLE statements, 16 BEFORE UPDATE triggers and 16 BEFORE DELETE triggers. The only UPDATEs are the migration step at store.mjs:213-214.\n- I agree with deviations 1-3 (deliveries, projects `at`, 13 tables).\n\n### Items 2 and 3\n\n- Every caller of the count gets COUNTED:\n - `count` at :912;\n - `heldcount` at :907;\n - the in-run recount at :845.\n- The two `version` reads (:736, :743, :831) are unchanged.\n- The refusal at :917 prints the full text, and `--events` must equal the total. The usage text (:39) and TOOLS.md (:375, step 7) say so.\n- T45:\n - (a) covers both modes for each of the 11 tables from a literal list, and the brief's 1/1/1 case. A 3f store counts 0 for the missing table.\n - (b) refuses with no `--events` and with `--events 2`, before any stop and with the fingerprint unchanged. `--events 1` then restores to B/3g. Both tables are covered.\n - (c) covers the unreadable table.\n - (d) covers the in-run recount through the `stop-writes-row` fault (:139).\n- On comparing only the total in-run (Darkwing's point): I agree it's enough. Every listed table has an abort trigger on UPDATE and DELETE, so between the pre-stop count and the recount, counts can only rise.\n\n### Item 4\n\n- T46 (:1268) builds packages/bus/schema.sql in memory. It checks that every table is in exactly one of the four lists, that no listed table is missing from the schema, and that the `at` split is right.\n- It reads lists 1-2 from the script, so a COUNTED change shows up there.\n\n### Notes\n\n- **N1** (code text, not doc-only, doesn't block): the heldcount recheck's refusal at stack-release.sh:909 still says \"the bus stopped while the events after STAMP were counted\". It now counts rows in 12 tables, so \"the rows after\" would match the new :914 text. It's still true as written, and no test pins it.\n- **N2**: F1 (task_comment_cursors, :1129) stays the follow-up BUILD.md names. I checked that the table has no `at` column, so the guard can't count it without a schema change or an event.\n"}