sage: Part B window file draft 2 for mos-0957 (F1: B6 and B-R1 name the stop's endLaunch rows, PB5 counts per step; F2: PB6, PB7 and B-R1 matrices run (a)-(h)); Q2 answered, Q1 to Jason's list

This commit is contained in:
2026-10-20 05:34:25 -05:00
parent 240f21650f
commit 148a9503d8
@@ -1,13 +1,14 @@
# Part B window: turn on the row 178 proxy proof on the live copy
Sage, 2026-10-20, draft 1, for Mos's A2 check (mos-0928 Part B, P19 385, Gitea #1676). Written on refactor at
Sage, 2026-10-20, draft 2, for Mos's A2 check (mos-0928 Part B, P19 385, Gitea #1676). Written on refactor at
a843ae284, which lands row 187 (#1685, A0). Plan b05eb85e (`repin-rows-177-185.md`) stays as it is. This file
replaces its Part B "Agent steps" table for the run and carries the B-R1 correction Mos accepted in mos-0954.
Draft 2 makes Mos's two mos-0957 fixes: B6 and B-R1 name the stop's rows (F1), and PB6 runs (a)-(h) (F2).
Nothing in this file runs until all of these hold:
1. Jason's go on Part B (J1).
2. The queue row for P19 409 (M8) and 410 (M9) has landed (mos-0956). If it changes the tool blob named below,
2. Queue row 188 (Gitea #1686), the tests for P19 409 (M8) and 410 (M9), has landed (mos-0956). If it changes the tool blob named below,
Mos checks this file again (mos-0849/0850).
3. Q1 below is settled: the order of J2 and this window.
4. Mos's A2 check of this file passed.
@@ -92,9 +93,9 @@ J1-J6 as on P19 385 and plan b05eb85e, unchanged (mos-0954). B-R1's command is t
| PB2 | Darkwing | The tunnel, read only, as Part A P4: exactly one `R:` spec, `R:0.0.0.0:7332:127.0.0.1:7332`, and DropInPaths empty. |
| PB3 | Darkwing | `git -C $REPO rev-parse HEAD:scripts/stack-release.sh HEAD:scripts/webui-service.sh` prints the TOOL blob and the `webui-service.sh` blob above, and `git -C $REPO status --porcelain -- scripts/stack-release.sh scripts/webui-service.sh scripts/bus-service.sh scripts/stack-copy.sh` is empty. Those four must not move until B7. |
| PB4 | Darkwing | A1, if not done: `umask 077`, then one line of at least 43 characters from `[A-Za-z0-9_-]` to SLOT from a random source, never printed. Then, for A1 old or new: `stat -c '%a %U %s %F' $SLOT` prints `600 jwoltje N regular file` with N 44 or more, `test ! -L $SLOT`, and `realpath -e $SLOT` is outside REPO and `$DATA/copies`. Nothing else reads the file. |
| PB5 | Darkwing | The rehearsal on a scratch root seeded at LIVE and 3i, with REPO's TOOL, the example business file plus the plug-in keys, `bus.tester` true and scratch ports. The proof file is a scratch file holding a dummy value written for the rehearsal, not the slot. Steps: (1) B1's plan and B3's run with the pair; (2) the B4 matrix, plus one request with the dummy value and the auth header on the public Host, which must get past the proof to the sign-in check; (3) `activate <scratch LIVE> --pm --no-proof`, plan and run, and the PB6 matrix again, identical to the first; (4) `rollback --plan` after (1), whose `to` must not be LIVE, which shows why Part B never uses it; (5) a grep of every file under the scratch state and data root and every saved stdout and stderr for the dummy value: no match outside the proof file itself. Output in `$WIN/pb5/` with sha256 values Sage checks. |
| PB6 | Darkwing | The 7332 matrix with the proof off, Part A's (a)-(g), saved as `$WIN/matrix-off.txt`. It must equal Part A's `matrix-new.txt`. |
| PB7 | Jason | J3 and J4 applied, the middleware live on the route. Then Darkwing reruns PB6 as `$WIN/matrix-off-mw.txt`, which must equal `matrix-off.txt`: the loopback requests don't go through the middleware, and with the proof off the Console ignores the extra header. Jason's own sign-in through the public name still works; that check is his. |
| PB5 | Darkwing | The rehearsal on a scratch root seeded at LIVE and 3i, with REPO's TOOL, the example business file plus the plug-in keys, `bus.tester` true and scratch ports. The proof file is a scratch file holding a dummy value written for the rehearsal, not the slot. A held snapshot of the scratch store goes before (1), between (1) and (2), and after (2), so the counts show which rows the stop, the PM launch and the matrix each write. Steps: (1) B1's plan and B3's run with the pair; (2) the B4 matrix, plus one request with the dummy value and the auth header on the public Host, which must get past the proof to the sign-in check; (3) `activate <scratch LIVE> --pm --no-proof`, plan and run, and the PB6 matrix again, identical to the first; (4) `rollback --plan` after (1), whose `to` must not be LIVE, which shows why Part B never uses it; (5) a grep of every file under the scratch state and data root and every saved stdout and stderr for the dummy value: no match outside the proof file itself. Output in `$WIN/pb5/` with sha256 values Sage checks. |
| PB6 | Darkwing | The 7332 matrix with the proof off, rows (a)-(h), saved as `$WIN/matrix-off.txt`. Lines (a)-(g) must be byte-identical to Part A's `matrix-new.txt` (sha256 93c07e15), and (h) must be 200. |
| PB7 | Jason | J3 and J4 applied, the middleware live on the route. Then Darkwing reruns PB6 as `$WIN/matrix-off-mw.txt`, under PB6's rule: (a)-(g) equal `matrix-new.txt` and (h) is 200, so the file equals `matrix-off.txt`: the loopback requests don't go through the middleware, and with the proof off the Console ignores the extra header. Jason's own sign-in through the public name still works; that check is his. |
## The window
@@ -103,10 +104,10 @@ J1-J6 as on P19 385 and plan b05eb85e, unchanged (mos-0954). B-R1's command is t
| B0 | Darkwing | The business file copy in the Backups table, its sha256 in `$WIN/backups.txt`. The idle check: `mosaic agents --business mosaic-stack --tester` (chief not `working`) and `mosaic launches list`. Start stamp from `date -u +%FT%TZ`. Then S1, `node $SNAP --store "$DATA/bus/bus.sqlite" --held`. |
| B1 | Darkwing | `scripts/stack-release.sh status mosaic-stack`: pointer on LIVE, `pm: true`, schema 3i, last line ok, unit flags match the pointer. Then `scripts/stack-release.sh activate $LIVE mosaic-stack --pm --proof-header X-Mosaic-Proof --proof-file $SLOT --plan`. It must print `from:` and `to:` LIVE, `note: <LIVE> is the pointer's copy; the run re-pins it and only the Console flags change`, `migration: none; the store is at the target's version`, the backup line, `proof: on, header X-Mosaic-Proof, file <SLOT>`, and the Console line equal to FLAGS_ON. No refusal. It must match PB5 (1) on the same lines. Any other difference stops the window. |
| B2 | Darkwing | The units, read only, as Part A W4: DropInPaths empty on both, bus ExecStart has `--pm`, both name LIVE, no `"`, `'` or `\` in the bus `Environment=` or either ExecStart. |
| B3 | Darkwing, on Mos's go | The same activate without `--plan`. Exit 0, final `result ok`, every gate check including `pm_launched`. Record the activation id, the backup path and STAMP, and the backup's SHA256SUMS sha256 in `$WIN/backups.txt`. Then `status`: pointer on LIVE with FLAGS_ON. Then `journalctl --user -u mosaic-webui.service --since "<B3 stamp> UTC" --no-pager \| grep -c 'Proxy: proxy proof on'` prints 1. |
| B3 | Darkwing, on Mos's go | The same activate without `--plan`. Exit 0, final `result ok`, every gate check including `pm_launched`. Record the activation id, the backup path and STAMP, the backup's SHA256SUMS sha256, and the new chief's launch id from `mosaic launches list` in `$WIN/backups.txt`. Then `status`: pointer on LIVE with FLAGS_ON. Then `journalctl --user -u mosaic-webui.service --since "<B3 stamp> UTC" --no-pager \| grep -c 'Proxy: proxy proof on'` prints 1. |
| B4 | Darkwing | The matrix with the proof on, below, saved as `$WIN/matrix-on.txt`. |
| B5 | Jason | J5. |
| B6 | Darkwing | S2, `node $SNAP --store "$DATA/bus/bus.sqlite" --held`. Against S1, S1's rows are unchanged and every new row belongs to B3's PM launch (its `role_claims` row and launch rows). Darkwing lists the new rows by table. |
| B6 | Darkwing | S2, `node $SNAP --store "$DATA/bus/bus.sqlite" --held`. Against S1, S1's rows are unchanged, and the new rows are only these, which Darkwing lists by table with seq, stamp and kind: (1) the stop's rows for the running chief r34520a581318, written by LIVE's `broker.mjs` `endLaunch` before the backup STAMP, as in Part A: an appended `role_claims` release row and an `events` `session.ended` row, so the B3 backup is not equal to S1 by design and S1 is a prefix of it; (2) B3's PM launch rows for the new chief, in the tables and counts PB5 (1) showed; (3) the B4 matrix writes none: every refused request returns before any store read, and (a), (g) and (h) only read, which PB5's snapshot around (2) must confirm. If PB5 showed rows there, those kinds and counts are expected instead; (4) rows from J5, if any, named with what Jason reports doing. Any other row stops before B7 and goes to Mos. |
| B7 | Darkwing, then Sage | The STATE report: stamps, activation id, backup path and sha256 values, pointer before and after, unit ExecStart lines (no Environment values), S1 and S2, PB5's sha256 values, every matrix, the journal line, J5's result as Jason reports it, and any stop. Sage checks it against the transcripts and posts a summary on P19 385 and #1676. |
### The B4 matrix
@@ -147,12 +148,16 @@ Before B3, any refusal or mismatch ends the window with nothing stopped.
### B-R1, the way back
0. A held snapshot S3 before the run, as B0's S1.
1. `scripts/stack-release.sh activate $LIVE mosaic-stack --pm --no-proof --plan`. It must print the note line,
`proof: dropped; --no-proof drops header X-Mosaic-Proof`, `migration: none`, the backup line, and the Console
line equal to FLAGS_OFF.
2. The real run on Jason's go. Exit 0, `result ok`, `pm_launched`. The steps log names the drop. The journal
since that stamp says `Proxy: proxy proof off` once. Record the backup path and STAMP.
3. PB6's matrix again, saved as `$WIN/matrix-back.txt`, equal to `matrix-off.txt`.
3. PB6's matrix again, saved as `$WIN/matrix-back.txt`, under PB6's rule: (a)-(g) equal `matrix-new.txt` and (h)
is 200. Then S4. Against S3, S3's rows are unchanged and the new rows are B6's kinds (1) and (2) again: the
stop's `role_claims` release and `session.ended` for the chief B3 launched (the id in `backups.txt`), then
the new PM launch rows. Any other row goes to Mos.
4. Then Jason takes the middleware off (J6). The order matters: with the middleware on and the proof off, the
Console ignores the extra header. With the middleware off and the proof on, every public request gets 401,
Jason included.
@@ -180,11 +185,14 @@ Prune nothing. Keep every copy, rollback set and backup Part A kept, plus B3's a
narrows the access and never widens it. I recommend that order, with J2 kept open on #385 as its own row. It's
Jason's call, since mos-0928 set the precondition.
- Q2, PB5 sends a dummy proof value to a scratch Console. It's written for the rehearsal, it isn't the slot value
and no cluster object holds it. OK to keep?
and no cluster object holds it. OK to keep? Mos: yes, as written (mos-0957).
Q1 is on Jason's morning list next to J1-J6, with this recommendation and Mos's reading: Part B under jwoltje
first, J2 as its own row after (mos-0957).
## What Sage ran for this file
Read only, 2026-10-20 between 10:26Z and 10:29Z. Nothing live changed.
Read only, 2026-10-20 between 10:26Z and 10:29Z for draft 1, and after 10:31Z for draft 2. Nothing live changed.
- `git fetch` and `git rev-parse origin/refactor` (a843ae284), the pointer's copy, activation, pm, schema and
console fields.
@@ -193,3 +201,5 @@ Read only, 2026-10-20 between 10:26Z and 10:29Z. Nothing live changed.
- `stack-release.sh` at a843ae284: `check_target`, `proof_for_target`, `proof_checks`, `proof_file_problem`,
`plan`, `rollback_in_run`, `from_log`. `webui-service.sh render` (:185-205). `serve.mjs` `proofOptions`
(:217-240) and the request checks (:476-520). `cli.mjs:49`, `:92` and `:101`.
- Draft 2: Part A's `STATE.md` (S1, B and S2 table and the endLaunch rows) and `matrix-new.txt`, and a grep of
`packages/webui/src/serve.mjs` for store writes on the matrix paths (none).