Commit Graph
3108 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 b5d662cabe plans: mos-0929 rulings on the mos-0928 re-pin plan (Q1-Q3, Part B list) 2026-10-20 01:37:34 -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
darkwing 33ab5eeb91 row 182 (#1680): a tester message reaches only a thread the tester owns
#threadFor puts a message to a threaded instance in the thread found up its in_reply_to chain. It
checked the thread's instance but not its owner, so a tester reply to a message in a human's thread
landed in the human's thread. A new #testerOwns check refuses thread-not-owned when the sender is the
tester and the thread's owner isn't. It runs on both the thread branch and the row 143 spec-notice
branch. A role's reply into a tester's thread is unchanged, since that's how the answer comes back.
The bus README says so in its row 177 paragraph.

tester-threads.test.mjs adds four T9 tests: a tester reply into the human's thread refuses and
stores nothing, one into its own thread lands, the chief's reply into a tester thread lands, and a
tester reply to a spec notice refuses while the chief's relay still lands. messaging.test.mjs:203
used to send as the tester into a human thread. It now sends from a tester-owned thread.

Filbert approved round 1 in #1680 comment 29388. Their notes N1 (thread-instance-mismatch is
checked first, as before) and N2 (BUILD.md missed project-runtime.test.mjs:13 as a text reader of
broker.mjs, now corrected) need no change.
2026-10-20 00:47:49 -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
Researcher d1272e714f row 183 (#1681): chat.mjs names the transport it is given
The chat.mjs header comment now says the seam takes the bus transport it is given: the human one
from the signed-in listener, the tester one from the row 176 listener (row 177). The TypeError for a
missing or non-function call says 'chat needs a bus transport function' and no longer says human.
No behavior changes. The webui README doesn't repeat either phrase and is unchanged.

A new chat.test.mjs test passes undefined, null, a string, a number, an object, an array and no call,
and reads the new TypeError text. Putting the old text back fails it.

Dewey approved round 1 in #1681 comment 29376. Their notes (the tester line names no file, and the
test title says both transports pass when only a stand-in function does) need no change.
2026-10-20 00:03:28 -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
dewey 9d9d95485a row 177 round 2 (#1675): a tester-thread run's decision.raise refuses tester-thread-human when it routes to the human; F2 dispatch comment, F3 tester-writes header and name 2026-10-19 22:21:55 -05:00
dewey 1f994257a5 row 177 (#1675, Q173): tester threads
The tester gets threads of its own: thread.create, thread.open, thread.send, thread.messages and
assistant.stop join TESTER_VERBS, with owner `tester`, and neither the tester nor the human reaches
or lists the other's threads. A tester thread.send is from tester-cli with no human.input; in a
tester thread the lists read the tester as the human, the run answers at `tester`, and its send to
`human` refuses tester-thread-human. The tester stop revokes only tester threads, by `tester`. A
business whose human is `tester` refuses invalid-business at start.

The tester listener (7333) serves chat through the TESTER_CLI caller, its fence admitting only the
four chat write routes, with the listener's own Origin required; 7332's chat is unchanged. The
Console composer is enabled for the tester. READMEs state calls (a)-(c), N1, N2 and where a tester
reads replies (sage-1148).

Design 99ce5780 approved in sage-1146 (#1675 comment 29333).
2026-10-19 22:21:55 -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 c5ae4d7ac4 darkwing: merged B+C window packet, STATE.md (sha256 7be42b6bcab5657d), W0-W11 transcripts, S1/S2/S2b snapshots, P3 rehearsals and snapshot.mjs checks (#1673, #1674; P19 386, 382)
Evidence for the STATE report Sage checked and filed in 88f3253d9 (sage-1151). The skills-enabled
tar stays out of git; it is the W0b restore point under $WIN only. No credential or Environment
values: unit reads record ExecStart only, and the P3 credential files were fake placeholders.
2026-10-19 21:26:49 -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 c49de08e86 sage: merged B+C window plan draft 9 (sha256 523f20e03be8aa11), Mos's formal check closed with the W0 go (mos-0907); A1-A4 text fixes to draft 8 (mos-0906) 2026-10-19 20:31:36 -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