Commit Graph
1964 Commits
Author SHA1 Message Date
darkwing 490e2771d3 row 185 (#1683): every activate backs up the stopped store
stack-release.sh activate now backs up the stopped store under its activation id on every run
with a store file, before any migration. Before this, backup_store ran only when the schemas
differed, so a same-schema activate took no backup and rollback --restore had nothing to name.
store-newer and migration-needs-flag still roll back before the backup, since those runs never
touch the store, and a missing store takes no backup.

BACKUP and TAKEN now mean two things. BACKUP is set by every backup, so the log line names it and
from_log backup finds it. TAKEN is set only right before a migration, so a gate failure after a
same-schema activate puts back the units and the wrapper and leaves the store as the failed run
left it. activate --plan prints a backup line, or "backup: none" with no store file. Rollback and
pm-on are unchanged; a same-schema rollback --restore already works through the row 181 guard.
docs/TOOLS.md "Pinned stack update" steps 5-7 say so.

stack-release.test.mjs updates T5, T11, T26 and T29 and adds T47-T51, with one fixture fault
(start-writes-row-<copy>). The three brief mutants are killed, and Filbert's two more (the backup
ahead of the schema checks, the plan line on a rollback) are killed by T6, T9 and T50.

This is the precondition for mos-0928 Part A, the re-pin from 89af38a83.

Filbert approved round 1 in #1683 comment 29404, with two non-blocking notes.
2026-10-20 02:09:49 -05:00
jason.woltje 6c88bc666f sessions: Filbert row 185 r1 review, approve 2026-10-20 02:09:31 -05:00
jason.woltje 52ce57dfe2 sessions: Sage mos-0928 plan, row 185 filed and briefed 2026-10-20 01:35:58 -05:00
jason.woltje f381869439 queue: revs 2183-2184: row 185 (#1683) added and briefed (Sage) 2026-10-20 01:35:50 -05:00
jason.woltje 10e1bb4950 plans: row 185 brief, every activate backs up the stopped store (#1683); mos-0928 window plan
A same-schema activate takes no store backup: backup_store runs only when
the schemas differ, and the two live backups (3f, 3h) don't match 3i, so
rollback --restore refuses both. Row 185 makes every activate back up the
stopped store before any migration and keeps the in-run restore
migration-only. Part A of the mos-0928 plan (re-pin 89af38a83 to the
refactor head) needs it first. Part B, the row 178 proxy proof
activation, is drafted for Jason and runs nothing.
2026-10-20 01:32:18 -05:00
jason.woltje 9f5153deb2 sessions: Dewey row 184 rebase and in-review; Sage mos-0870 assignment
Sweeps Dewey's uncommitted SESSIONS line for the row 184 rebase and in-review, and adds
Sage's line for the mos-0870 assignment (rows 177, 178, 180 and 181 and follow-ups 182-184).
Additions only. No existing line changes.
2026-10-20 01:14:37 -05:00
jason.woltje 055ca6938b queue: revs 2178-2182: row 184 in-review on e7e2c763 and request comment 29395 (Dewey 2178-2179); Filbert approve comment 29396 (2180); landing note (87aca4cb8, patch-id ad846db177b3, gate passed) and done (Sage 2181-2182) 2026-10-20 01:13:54 -05:00
dewey 87aca4cb8d row 184 (#1682): tester thread verbs in the CLI
mosaic thread create|open|read and threads take --tester and run as the tester through
tester-cli.mjs. talk --thread and follow --thread take --tester too, and the row 177 refusal of
--thread with --tester is gone. The bus already checks thread ownership (thread-not-owned), so
the CLI adds no rule of its own, and every verb it sends as the tester is in TESTER_VERBS. follow
already receives with message.receive, so a tester reply arrives without polling inbox.
docs/TOOLS.md and packages/cli/README.md list the new flags.

The new tester-threads.test.mjs runs an in-process Broker. It covers create, list, open, send,
read and follow on a tester thread; thread-not-owned on a human thread both ways; and the human
forms unchanged with no tester transport call. A real-process test runs scripts/mosaic as the
tester. thread-cli.test.mjs and tester-reads.test.mjs drop the argvs that pinned the old
refusal. Brief mutants (talk sent as the human, follow without the thread filter) are killed.

Filbert approved round 1 in #1682 comment 29396 with no findings or notes. Their run on 3da362982,
with row 182 in the broker, added one more mutant (no thread read before the first receive in
follow), and it was killed.
2026-10-20 01:12:07 -05:00
jason.woltje dd7656cbf3 sessions: Filbert row 184 r1 review, approve 2026-10-20 01:03:26 -05:00
jason.woltje 3da3629829 queue: revs 2173-2177: row 178 landing note (b2b33aee5, patch-id 88e56a8a3afd, gate passed) and done (Sage 2173, 2175); row 182 Filbert approve comment 29388 (2174), landing note (33ab5eeb9, patch-id fa9a8988ebfc, gate passed) and done (Sage 2176-2177) 2026-10-20 00:52:54 -05:00
jason.woltje ef09f8b3f9 sessions: Darkwing rows 180-182 and Rocko rows 138-178 pending lines
Sweeps lines the seats appended but didn't commit: Darkwing's SESSIONS lines for rows 180, 181
and 182, and Rocko's SESSIONS and BUILD-LOG lines for rows 138, 164, 171, 176 and 178. Additions
only, as the seats wrote them. No existing line changes.
2026-10-20 00:49:34 -05:00
jason.woltje 7fc98cf190 sessions: Filbert row 182 r1 review, approve 2026-10-20 00:37:53 -05:00
rocko b2b33aee55 row 178 (#1676, P19 385): the Console checks a proxy proof header on public Hosts
webui serve takes --proof-header NAME --proof-file PATH, only with the --public-host preview flags.
Before listen it reads the file once through O_NOFOLLOW and fstat: a regular file owned by the
Console uid, mode 0400 or 0600, at least 32 base64url bytes with one optional final LF. Any file
problem gives one fixed refusal that names neither the path nor the contents. The header name can't
collide with Host, Origin, auth or tester names.

On a public Host the guard runs before any auth header is read. It needs exactly one proof header
and compares equal-length buffers with timingSafeEqual. Missing, wrong and repeated proofs get the
same fixed 401. A proof header on another Host or on the tester listener gets 403. The existing
auth, Origin, Fetch Metadata and human write checks are unchanged.

webui-service.sh renders both flags and checks the file's metadata and canonical location without
opening it, and the send-status regex accepts the proof pair. stack-release.sh only gains a comment:
it already carries Console flags through re-pin and rollback, and new tests pin that.

This is a partial fix. Same-uid seats can still read the proof file. Activation (middleware, unit
flags, restart, smoke) is a separate Mos-checked window and isn't part of this commit.

Dewey approved round 2 in #1676 comment 29386, candidate 9300a670. Round 1 changes were in 29374.
2026-10-20 00:37:08 -05:00
dewey 3cfa333e43 sessions: Dewey row 178 r2 review, row 184 build 2026-10-20 00:28:49 -05:00
jason.woltje 02482094a9 queue: revs 2154-2172: rows 182 and 184 briefs, reviewers filbert, owners Darkwing and Dewey, briefed (Sage 2154-2161); 182 start (Darkwing 2162), 184 start (Dewey 2163); row 183 landing note (d1272e714, patch-id af1cad0940dc) and done (Sage 2164-2165); row 178 r2 in-review (Rocko 2166-2167), review request comment 29384 (Sage 2168-2169), Dewey approve comment 29386 (2170); row 182 in-review, request comment 29387 (Darkwing 2171-2172) 2026-10-20 00:28:03 -05:00
Researcher 74ce7061d6 sessions: Researcher row 183 build, review and landing 2026-10-20 00:05:52 -05:00
jason.woltje 841c56d052 plans: rows 182 and 184 briefs set owners and reviewers 2026-10-19 23:55:44 -05:00
dewey 9a3f101b05 sessions: Dewey rows 180 r2, 178 r1, 183 r1 reviews 2026-10-19 23:55:06 -05:00
jason.woltje 931651f2de queue: revs 2144-2153: row 181 Filbert approve #1679 comment 29372 (2144), landing note (ef48597d0, patch-id 1fef78100554, gate passed) and done (Sage 2151-2152); row 178 Dewey changes comment 29374 (2145), reopened (Rocko 2146); row 183 in-review (Researcher 2147-2148), review request comment 29375 (Sage 2149-2150), Dewey approve comment 29376 (2153) 2026-10-19 23:53:20 -05:00
darkwing ef48597d0e row 181 (#1679, P19 390): the restore guard counts every row a restore drops
COUNTED, next to STORE_JS, lists the 11 tables a bus writer fills without an event in the same
transaction (role_claims through usage_records, in schema order). STORE_JS count and heldcount
return events after STAMP plus each listed table after STAMP from the same open as before. A
listed table the store lacks counts 0, and one that exists but can't be read refuses
restore-mismatch.

rollback --restore refuses post-backup-events unless the total is 0 or --events equals it, and
the message names each table with rows. The in-run recount compares the same total. An
events-only store prints the old text. T46 reads every table in schema.sql and fails on a table
in no list or in two.

Filbert approved round 1 in #1679 comment 29372. Follow-ups F1 (task_comment_cursors) and F2
(the refusal text at stack-release.sh:909) are recorded in agents/darkwing/work/queue-181/BUILD.md.
2026-10-19 23:49:44 -05:00
jason.woltje d7184aeac1 sessions: Filbert row 181 r1 review, approve 2026-10-19 23:34:21 -05:00
jason.woltje cbe4c82657 queue: revs 2135-2143: row 181 round 1 in-review #1679 comment 29370 (Darkwing 2135-2136); rows 182-184 brief re-pins to 3459e01c33 (Sage 2137-2139); row 183 reviewer Dewey, owner Researcher, briefed (Sage 2140-2142), started (Researcher 2143) 2026-10-19 23:34:17 -05:00
jason.woltje 5a8c1340c4 plans: row 183 brief sets owner Researcher and reviewer Dewey 2026-10-19 23:26:14 -05:00
jason.woltje fcfb82da2c queue: revs 2129-2134: row 181 briefed (Sage 2129) and started (Darkwing 2130); row 178 round 1 in-review (Rocko 2131-2132) and review request #1676 comment 29368 (Sage 2133-2134) 2026-10-19 23:25:08 -05:00
jason.woltje 311705d5bd sessions: Sage rows 177 landing, 178 briefing, 180 landing, 181 briefing, 182-184 added 2026-10-19 22:56:34 -05:00
jason.woltje a757f8fe64 queue: revs 2127-2128: row 180 landing note (1905e385c, patch-id 31b1d502444e, gate passed) and done (Sage) 2026-10-19 22:54:47 -05:00
darkwing 1905e385c4 row 180 (#1678, P19 391): activation ids within one second and plan-mode refusals
next_activation() takes the UTC second once and tries the base id, then -1 through -9, against
stack-rollback/, backups/stack/ and the post-attempt store, all under the lock. ACT and POST share
the suffix, and with all ten taken it refuses capture-failed with nothing stopped. Adopt uses the
same helper. --restore takes the old and the suffixed form.

Under --plan, a bad --tester-port reports tester-port-invalid through check_refuse and
tester-port-target goes through check_refuse in both modes, so the plan lists every refusal.
Without --plan the output is the usage block, byte for byte as before. webui-service.sh counts the
tester port's digits as written before stripping zeros, so 007333 refuses as serve does.

Round 2 adds subtests C1 (adopt takes the next free id) and C2 (a bad port is usage before any
pointer read) for Dewey's round 1 (#1678 comment 29352). Dewey approved round 2 in comment 29361.
2026-10-19 22:53:14 -05:00
jason.woltje 828d14a0c9 queue: revs 2113-2126: row 178 brief re-pin, owner Rocko, reviewer Dewey, briefed (Sage 2113-2114, 2116-2117), started (Rocko 2125); row 180 round 2 in-review and resolve (Darkwing 2115, 2118), Dewey approve #1678 comment 29361 (2126); rows 182-184 added with issues #1680-#1682 (Sage 2119-2124) 2026-10-19 22:44:11 -05:00
jason.woltje c7421cabda plans: row 178 brief sets owner Rocko and reviewer Dewey and orders its landing after rows 180/181; briefs for the three row 177 follow-ups (N1 tester thread owner check, N2 chat.mjs strings, tester CLI thread verbs) 2026-10-19 22:27:57 -05:00
dewey 895c7270cd sessions: Dewey row 177 round 2 build and row 180 round 1 review, changes 2026-10-19 22:24:37 -05:00
jason.woltje 7f519242e1 queue: revs 2103-2112: row 180 to in-review round 1 (Darkwing 2103-2104), Dewey changes #1678 comment 29352 (2109), round 2 start (Darkwing 2110); row 177 round 2 in-review #1675 comment 29350 (Dewey 2105-2107), Filbert approve 29351 (2108), landing note and done (Sage 2111-2112) 2026-10-19 22:24:02 -05:00
jason.woltje a2eebf997e sessions: Filbert row 177 r2 review, approve 2026-10-19 22:14:19 -05:00
jason.woltje c0d6bc7d5c queue: rev 2102: row 177 round 1 verdict changes, #1675 comment 29347 (Filbert) 2026-10-19 21:53:18 -05:00
jason.woltje 72c0e22ccf sessions: Filbert row 177 r1 review, changes 2026-10-19 21:47:17 -05:00
jason.woltje 9241a97388 sessions: Darkwing W5-W11, cleanup and packet push lines (33), Rocko (9) and Researcher (1) pending lines, and Sage after-window rows 180/181 2026-10-19 21:35:12 -05:00
jason.woltje a6a7d8a90f queue: revs 2096-2100: rows 180 (#1678, P19 391 + row 176 N1/N2, Darkwing, briefed) and 181 (#1679, P19 390 restore guard, after 180) added by Sage (2096-2098); row 177 to in-review round 1, request #1675 comment 29343 (Dewey 2099-2100) 2026-10-19 21:34:25 -05:00
jason.woltje c7f3beb171 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) 2026-10-19 21:30:56 -05:00
jason.woltje 236af52710 docs: brief for two stack-release rows after the merged B+C window: row A (P19 391 activation ids, Dewey row 176 N1/N2), row B (P19 390 restore guard, after row A) 2026-10-19 21:29:19 -05:00
jason.woltje 88f3253d98 sage: merged B+C window STATE checked and filed (P19 386 c324, 382 c325 done, #1673 29334, #1674 29335); #394 doc fixes: carry-past-row64.md runs from REPO held to the pinned sha, plan line 222 and W8 row amended (mos-0924)
carry-past-row64.md sha256 6799542cb23aba4c, repin-merged-bc.md 99f86c078d01663f (draft 9 was 523f20e03be8aa11). BUILD-LOG phase and SESSIONS line.
2026-10-19 21:23:57 -05:00
dewey ac1e16a99a sessions: Dewey row 177 design sent to Sage 2026-10-19 20:45:24 -05:00
jason.woltje e9aa33a77b sessions: Sage merged B+C plan draft 9, W0 go, row 177 start 2026-10-19 20:32:26 -05:00
jason.woltje d3996adea7 queue: revs 2093-2094: row 177 brief re-pinned to blob f146cd772 at dfd3e5823 and moved to briefed for Dewey (Sage 2093, 2094) 2026-10-19 20:31:29 -05:00
jason.woltje dfd3e5823c sage: row 177 brief re-pinned to 89af38a83 after rows 175 and 176 moved broker.mjs; point 6 names the tester listener's chat refusal (serve.mjs:442) and 7332's x-mosaic-tester refusal (:454) 2026-10-19 20:26:57 -05:00
jason.woltje b61335ad62 sessions, build-log: Sage row 176 gate, landing and records, merged window plan draft 8 2026-10-19 20:25:50 -05:00
jason.woltje 3faa30184c queue: revs 2083-2092: row 176 round 2 claimed and moved to in-review on candidate a4c728fc (Rocko 2083, 2085, 2086), Dewey's round 1 note and round 2 approval, comment 29322 (Dewey 2084, 2089), the round 2 review request posted as jarvis (Sage 2087, 2088), landing notes and the done move on 89af38a83 (Sage 2090-2092) 2026-10-19 20:22:37 -05:00
jason.woltje 89af38a83a webui, bus, scripts: a loopback-only Console listener for the tester; 7332 refuses x-mosaic-tester (row 176, #1674)
serve --tester-port N starts a second listener on 127.0.0.1:N in the same
process, with a bus caller through TESTER_CLI. N is 1024..65535, not
--port and never 7332, and the flag needs the bus configured. The tester
listener takes only instances.set, routes.set and name.set; settings
save, project-file save, assistant stop, bus message and chat writes
refuse 403 with no bus call. It refuses the main listener's auth header,
and every other listener refuses any request carrying x-mosaic-tester.
/api/config answers tester: true and the page shows a tester banner with
the routes, instances and seat name editors only. tester-off and
tester-required map to 403 in a serve.mjs coreBusStatus wrapper, so
bus.mjs stays pinned (row 164).

The broker lets a tester read credentials (with #secretCheck), routes,
project.files and project.file; project.file.save stays human-only.
webui-service.sh takes --tester-port with serve's checks. stack-release
activate --tester-port N writes the flag to the pointer and the unit,
refuses tester-port-target when the target copy's Console lacks it, and
activate or rollback to such a copy drops the flag and says so in --plan.
docs/TOOLS.md rewords the stale row 175 two-phase step (#1673 F1).

Built by Rocko on 473258a51 (manifest a4c728fc...52c9), approved by Dewey
in round 2 (#1674 comment 29322) after round 1 changes (29309), Sage's
gate green on 473258a51 plus the patch in run 2. Run 1 failed T34's
failed-pm_launched subtest with capture-failed: activate and pm-on name
the activation by the second, so the two ran in one second and collided
on the rollback set. That race is row 169's (the base fails the same way
with the id pinned), and a follow-up row fixes it (Vikunja P19 391).
2026-10-19 20:18:14 -05:00
dewey 06a82c9fb0 sessions: Dewey row 176 r2 review, approve (comment 29322) 2026-10-19 19:56:27 -05:00
dewey 548b61a5bd sessions: Dewey row 176 r1 review, changes (comment 29309) 2026-10-19 19:50:23 -05:00
jason.woltje 0a478dfc36 queue: revs 2079-2082: row 176 round 1 in-review on candidate b05cbf08 (Rocko 2079), the request failed without a token as expected (Rocko 2080), posted as jarvis, comment 29305 (Sage 2081, 2082) 2026-10-19 19:37:21 -05:00
jason.woltje 60d6e6755e queue: revs 2077-2078: row 176 claimed by Rocko on 473258a51 (Rocko 2077); busStatus ruling note, the tester-off and tester-required 403 goes in a serve.mjs coreBusStatus wrapper and bus.mjs stays pinned (Sage 2078) 2026-10-19 19:28:45 -05:00