docs: row B brief amended per mos-0927 R1: item 4 classifies every table in the target schema into one of four lists, item 1 records UPDATEs that do not move the time column (#1679)

This commit is contained in:
2026-10-19 21:30:56 -05:00
parent 236af52710
commit c7f3beb171
@@ -86,6 +86,10 @@ nonzero snapshot rowsAfter as a stand-in for this fix.
event in the same transaction, with the writer's file and line. usage_records and instance_names
are on that list. The threads tables from rows 175 and 177 get checked too. The list goes in
stack-release.sh as one constant next to STORE_JS.
For every counted table, BUILD.md also says whether any writer UPDATEs a row without moving its
time column, with the writer's file and line. An update like that escapes an `at > STAMP`
count, so a restore drops it silently. This row records each such gap and doesn't have to
close it (mos-0927 R1).
2. Count them. STORE_JS `count` and `heldcount` return the rows after STAMP for events and for each
listed table, keyed by table name, from the same read in the same open as today (immutable on a
stopped store, readOnly on a held one, with the row 166 is-active recheck kept). A listed table
@@ -104,17 +108,23 @@ nonzero snapshot rowsAfter as a stand-in for this fix.
Test: instance_names rowsAfter 1 with events 0 refuses before any `systemctl stop` in the
stand-in log, the stack stays up, and `--events 1` then restores. The same holds for one
usage_records row. T14 (:565) passes unchanged for an events-only store.
4. A guard test for new tables. A test reads every table with an `at` column from the target
store's schema. It fails when a table is neither events, nor in the constant, nor in a short
reviewed list of tables whose rows always come with an event (deliveries, for example, named in
BUILD.md with the writer that shows it). A later schema row that adds such a table then has to
classify it.
4. A guard test for every table (mos-0927 R1). A test reads every table in the target store's
schema from `sqlite_master`, whatever its columns. Each table has to be in exactly one of four
lists, and the test fails on a table in none of them or in two:
1. events;
2. the counted constant from item 1;
3. always written with an event, each with the writer's file and line in BUILD.md (deliveries,
for example, if its writer shows it);
4. not counted by time, each with the reason: a time column other than `at` (projects has
`updated`) or no time column at all (meta and the cursor tables).
At the head, the migrations create 17 tables and 14 of them have `at TEXT NOT NULL`, so lists 3
and 4 can't be empty. A later schema row that adds a table then has to classify it.
## Acceptance
- Each item 2 to 4 has its test and a killed mutant: one per listed table that drops it from the
count, one that compares only events in the in-run recount, and one that adds a table with an
`at` column to the fixture schema without classifying it.
count, one that compares only events in the in-run recount, one that adds a table to the
fixture schema without classifying it, and one that lists a table in two of the four lists.
- Suites green on Sage's gate, run from a git worktree of the candidate.
- Filbert approves the manifest.
- Touched files: `scripts/stack-release.sh`, `packages/cli/tests/stack-release.test.mjs`,