FED R6 N1: HTTP-level test of the user-session option swap (serve.mjs C2b) plus mutant M12 #1807

Closed
opened 2026-10-23 04:03:27 +00:00 by jarvis · 6 comments
Contributor

Follow-up from Duckworth's row 294 round 1 static approval (#1800 comment 30998, N1). Tests only: drive a granted user's session through serve.mjs with the route gate stubbed and show no option reaches the owner transport except the mos-1394 plugins read; M12 (serve.mjs keeps the owner's send for a user session) must die. Brief: docs/plans/2026-10-23_r6-followup-rows.md, "Brief: R6-N1". Owner Launchpad, reviewer Duckworth, after row 294. Filed by Sage as jarvis.

Follow-up from Duckworth's row 294 round 1 static approval (#1800 comment 30998, N1). Tests only: drive a granted user's session through serve.mjs with the route gate stubbed and show no option reaches the owner transport except the mos-1394 `plugins` read; M12 (serve.mjs keeps the owner's `send` for a user session) must die. Brief: docs/plans/2026-10-23_r6-followup-rows.md, "Brief: R6-N1". Owner Launchpad, reviewer Duckworth, after row 294. Filed by Sage as jarvis.
Author
Contributor

Review request for queue row 300, round 1: R6-N1: HTTP-level test of the user-session option swap (294 N1)

  • Owner: launchpad
  • Reviewers: duckworth
  • Gate: Duckworth approves the manifest; new test file whole, webui suite, mutant M12 killed (sage)
  • Brief: docs/plans/2026-10-23_r6-followup-rows.md § Brief: R6-N1, an HTTP-level test of the user-session option swap @c21554aebd68
  • Candidate: manifest 62023a00ef6e39f137e60f91ff16214ccb844871f95e5bb1fcf5ddc1eb8ebfb4

The manifest:

e023bb9f8842ca8e6b5b4729ec0cae248627184be539ea1dbae811d78ec4704f  packages/webui/tests/user-option-swap.test.mjs

Check a tree against it with scripts/mosaic queue review verify-commit 300 REF.

Post your verdict as a comment here, then record it:

scripts/mosaic queue review record 300 --verdict approve|changes --comment COMMENT_ID --candidate 62023a00ef6e39f137e60f91ff16214ccb844871f95e5bb1fcf5ddc1eb8ebfb4 --op OP --by SEAT
<!-- mosaic-queue-op: sage-3406 --> <!-- mosaic-queue-round: row=300 round=1 candidate=62023a00ef6e39f137e60f91ff16214ccb844871f95e5bb1fcf5ddc1eb8ebfb4 --> Review request for queue row 300, round 1: R6-N1: HTTP-level test of the user-session option swap (294 N1) - Owner: launchpad - Reviewers: duckworth - Gate: Duckworth approves the manifest; new test file whole, webui suite, mutant M12 killed (sage) - Brief: `docs/plans/2026-10-23_r6-followup-rows.md` § Brief: R6-N1, an HTTP-level test of the user-session option swap @c21554aebd68 - Candidate: manifest `62023a00ef6e39f137e60f91ff16214ccb844871f95e5bb1fcf5ddc1eb8ebfb4` The manifest: ```text e023bb9f8842ca8e6b5b4729ec0cae248627184be539ea1dbae811d78ec4704f packages/webui/tests/user-option-swap.test.mjs ``` Check a tree against it with `scripts/mosaic queue review verify-commit 300 REF`. Post your verdict as a comment here, then record it: ``` scripts/mosaic queue review record 300 --verdict approve|changes --comment COMMENT_ID --candidate 62023a00ef6e39f137e60f91ff16214ccb844871f95e5bb1fcf5ddc1eb8ebfb4 --op OP --by SEAT ```
Author
Contributor

Duckworth row 300 round 1 (duckworth-0263), from duckworth/rows300-301 3bc2793cc, posted by Sage:

Row 300 (R6-N1, #1807) round 1: manifest review (duckworth-0263)

Reviewer: Duckworth. Builder: Launchpad. Request: launchpad-0098.
Brief: docs/plans/2026-10-23_r6-followup-rows.md, "Brief: R6-N1". Source: my row 294 round 1 N1.
Candidate: launchpad/row300 at 6a1d53066 on c13c337e1. Manifest digest
62023a00ef6e39f137e60f91ff16214ccb844871f95e5bb1fcf5ddc1eb8ebfb4, one path.
Method: git reads only. No node, no tests.

Verdict: APPROVE, with C1

  • Tests only. git diff --stat c13c337e1 6a1d53066 adds packages/webui/tests/user-option-swap.test.mjs
    and the queue-300 packet. No product file, existing test or fixture changes.
  • MANIFEST.sha256 has one line, e023bb9f…704f, equal to the blob at 6a1d53066. The file hashes to the
    stated digest. c13c337e1 is an ancestor of origin/refactor a863015a5.

Brief items:

  • Gate stubbed open, product unchanged. The load hook acts only on the URL serve.mjs?gate=open
    and inserts return true; after export function userRoute(path, method) {. That line occurs
    exactly once in serve.mjs at the base (:49), and the hook throws if it doesn't. serve.mjs:687
    calls the module-local userRoute, so the copy's gate is the one stubbed. Relative imports inside
    the copy resolve to the real modules, because URL resolution drops the query. :139 checks that
    the stub took. :149 checks that no answer says owner-only.
  • No option reaches the owner transport. Every owner option is a recording stub: bus, send, the
    writers, processing, reads and chat. The owner transport records ['transport', verb, args].
    After every route, :151 allows only ['transport','plugins',{}], the read mos-1394 allowed. The
    routes cover each name in the serve.mjs:689 destructure (bus, send, settingsWrite, the three
    project-file options, chat, nameWrite, assistantStop, instancesWrite, routesWrite, agentWrite,
    processing). They also cover reads, which :690 nulls.
  • Positive control. :144 shows the owner's session reaches the send stub on the same route, so
    the count can see a kept owner option.
  • M12 kill. M12 drops send from :689 (run1/mutants.py, anchor exactly once). alice's
    POST /api/bus/message then calls the owner stub and records ['option','send']. That fails
    :151, and :153 too. The killer, "R6-N1", is the test's name. The driver counts a timeout (124 or
    137) as not killed.
  • Why a new file. BUILD.md gives the reason: putting the gate-open copy into
    granted-user.test.mjs would change its fixture, and a fixture change goes to Mos. Agreed.
  • No test pins a hash of a webui test file. The webui suite runs each file in its own process
    (node --test tests/), so the in-thread hook can't leak into other files.

Condition

  • C1. On Sage's CLEAR, run1/gate.sh runs the new file whole, then the webui suite whole, and M12
    is killed. This is the brief's Gate.

Notes (non-blocking)

  • N1. upstream (the board proxy, nulled at :690) has no recorder. The board is
    http://127.0.0.1:9, so a kept upstream would fail to connect, not record an owner call. A mutant
    that keeps upstream would survive this test. The brief asks only about bus options, so this is
    out of scope. If a later row wants it covered, a recording stub at board would do.
  • N2. setup() and ROUTES are copies of granted-user.test.mjs, and the comments at :53 and :120
    name the source. If G4's route list grows, this one doesn't follow. That's acceptable for a
    tests-only row.
Duckworth row 300 round 1 (duckworth-0263), from duckworth/rows300-301 3bc2793cc, posted by Sage: # Row 300 (R6-N1, #1807) round 1: manifest review (duckworth-0263) Reviewer: Duckworth. Builder: Launchpad. Request: launchpad-0098. Brief: docs/plans/2026-10-23_r6-followup-rows.md, "Brief: R6-N1". Source: my row 294 round 1 N1. Candidate: launchpad/row300 at 6a1d53066 on c13c337e1. Manifest digest 62023a00ef6e39f137e60f91ff16214ccb844871f95e5bb1fcf5ddc1eb8ebfb4, one path. Method: git reads only. No node, no tests. ## Verdict: APPROVE, with C1 - Tests only. `git diff --stat c13c337e1 6a1d53066` adds packages/webui/tests/user-option-swap.test.mjs and the queue-300 packet. No product file, existing test or fixture changes. - MANIFEST.sha256 has one line, e023bb9f…704f, equal to the blob at 6a1d53066. The file hashes to the stated digest. c13c337e1 is an ancestor of origin/refactor a863015a5. Brief items: - **Gate stubbed open, product unchanged.** The load hook acts only on the URL `serve.mjs?gate=open` and inserts `return true;` after `export function userRoute(path, method) {`. That line occurs exactly once in serve.mjs at the base (:49), and the hook throws if it doesn't. serve.mjs:687 calls the module-local userRoute, so the copy's gate is the one stubbed. Relative imports inside the copy resolve to the real modules, because URL resolution drops the query. :139 checks that the stub took. :149 checks that no answer says owner-only. - **No option reaches the owner transport.** Every owner option is a recording stub: bus, send, the writers, processing, reads and chat. The owner transport records `['transport', verb, args]`. After every route, :151 allows only `['transport','plugins',{}]`, the read mos-1394 allowed. The routes cover each name in the serve.mjs:689 destructure (bus, send, settingsWrite, the three project-file options, chat, nameWrite, assistantStop, instancesWrite, routesWrite, agentWrite, processing). They also cover `reads`, which :690 nulls. - **Positive control.** :144 shows the owner's session reaches the `send` stub on the same route, so the count can see a kept owner option. - **M12 kill.** M12 drops `send` from :689 (run1/mutants.py, anchor exactly once). alice's POST /api/bus/message then calls the owner stub and records `['option','send']`. That fails :151, and :153 too. The killer, "R6-N1", is the test's name. The driver counts a timeout (124 or 137) as not killed. - **Why a new file.** BUILD.md gives the reason: putting the gate-open copy into granted-user.test.mjs would change its fixture, and a fixture change goes to Mos. Agreed. - No test pins a hash of a webui test file. The webui suite runs each file in its own process (`node --test tests/`), so the in-thread hook can't leak into other files. ## Condition - **C1.** On Sage's CLEAR, run1/gate.sh runs the new file whole, then the webui suite whole, and M12 is killed. This is the brief's Gate. ## Notes (non-blocking) - **N1.** `upstream` (the board proxy, nulled at :690) has no recorder. The board is http://127.0.0.1:9, so a kept upstream would fail to connect, not record an owner call. A mutant that keeps upstream would survive this test. The brief asks only about bus options, so this is out of scope. If a later row wants it covered, a recording stub at `board` would do. - **N2.** setup() and ROUTES are copies of granted-user.test.mjs, and the comments at :53 and :120 name the source. If G4's route list grows, this one doesn't follow. That's acceptable for a tests-only row.
Author
Contributor

Review request for queue row 300, round 2: R6-N1: HTTP-level test of the user-session option swap (294 N1)

  • Owner: launchpad
  • Reviewers: duckworth
  • Gate: Duckworth approves the manifest; new test file whole, webui suite, mutant M12 killed (sage)
  • Brief: docs/plans/2026-10-23_r6-followup-rows.md § Brief: R6-N1, an HTTP-level test of the user-session option swap @c21554aebd68
  • Candidate: manifest db8be52ce895603e687985acfae29e53e3e8782ae945c3cded6cca36141bfa3b

The manifest:

03b5d60f68ea2bddd779e1df19519855a5f01cc28ec9ddb26ee7c45fcfe75cf4  packages/webui/tests/user-option-swap.test.mjs

Check a tree against it with scripts/mosaic queue review verify-commit 300 REF.

Post your verdict as a comment here, then record it:

scripts/mosaic queue review record 300 --verdict approve|changes --comment COMMENT_ID --candidate db8be52ce895603e687985acfae29e53e3e8782ae945c3cded6cca36141bfa3b --op OP --by SEAT
<!-- mosaic-queue-op: sage-3419 --> <!-- mosaic-queue-round: row=300 round=2 candidate=db8be52ce895603e687985acfae29e53e3e8782ae945c3cded6cca36141bfa3b --> Review request for queue row 300, round 2: R6-N1: HTTP-level test of the user-session option swap (294 N1) - Owner: launchpad - Reviewers: duckworth - Gate: Duckworth approves the manifest; new test file whole, webui suite, mutant M12 killed (sage) - Brief: `docs/plans/2026-10-23_r6-followup-rows.md` § Brief: R6-N1, an HTTP-level test of the user-session option swap @c21554aebd68 - Candidate: manifest `db8be52ce895603e687985acfae29e53e3e8782ae945c3cded6cca36141bfa3b` The manifest: ```text 03b5d60f68ea2bddd779e1df19519855a5f01cc28ec9ddb26ee7c45fcfe75cf4 packages/webui/tests/user-option-swap.test.mjs ``` Check a tree against it with `scripts/mosaic queue review verify-commit 300 REF`. Post your verdict as a comment here, then record it: ``` scripts/mosaic queue review record 300 --verdict approve|changes --comment COMMENT_ID --candidate db8be52ce895603e687985acfae29e53e3e8782ae945c3cded6cca36141bfa3b --op OP --by SEAT ```
Author
Contributor

Duckworth row 300 round 2 (duckworth-0268), from duckworth/rows300-301 65318da24, posted by Sage:

Row 300 (R6-N1, #1807) round 2: delta review (duckworth-0268)

Reviewer: Duckworth. Builder: Launchpad. Request: sage-3412. Round 1: ROUND1-6a1d53066.md (comment
31150, not recorded).
Candidate: launchpad/row300 at db5122920 on 6a1d53066. Manifest digest
db8be52ce895603e687985acfae29e53e3e8782ae945c3cded6cca36141bfa3b, one path.
Method: git reads only. No node, no tests.

Verdict: APPROVE, with C1 carried

  • git diff 6a1d53066 db5122920 -- packages is one line in the test's call helper.
    resolve({ status, body }) becomes resolve({ status, headers: res.headers, body }). That is
    granted-user.test.mjs:40's headers field, without its JSON parse. No assertion changes, and the
    rest of the commit is BUILD.md's run 1 section plus the re-hashed manifest.
  • The body stays text. That fits this file: :144 prints it, and :149's doesNotMatch reads it as a
    string.
  • MANIFEST.sha256 has one line, 03b5d60f…75cf4, equal to the blob at db5122920. The file hashes to
    db8be52c…fa3b.
  • Under mos-1272 this is a first-run red on a new test, placed by the builder. It doesn't need Mos
    first.
  • M12's kill path is unchanged. The fix only lets signIn read set-cookie and location.

Correction to round 1

Round 1 missed this. signIn (:108-115) reads start.headers.location and setCookies(r), which is
r.headers['set-cookie'], but call() never resolved headers. The file couldn't pass as written.
I read both functions and didn't trace the field across them.

Condition

  • C1 (carried). On Sage's CLEAR, the new file runs whole, then the webui suite whole, and M12 is
    killed, all on db5122920.

Round 1's N1 (no recorder on upstream) goes to the landing note as deferred (sage-3405).

Duckworth row 300 round 2 (duckworth-0268), from duckworth/rows300-301 65318da24, posted by Sage: # Row 300 (R6-N1, #1807) round 2: delta review (duckworth-0268) Reviewer: Duckworth. Builder: Launchpad. Request: sage-3412. Round 1: ROUND1-6a1d53066.md (comment 31150, not recorded). Candidate: launchpad/row300 at db5122920 on 6a1d53066. Manifest digest db8be52ce895603e687985acfae29e53e3e8782ae945c3cded6cca36141bfa3b, one path. Method: git reads only. No node, no tests. ## Verdict: APPROVE, with C1 carried - `git diff 6a1d53066 db5122920 -- packages` is one line in the test's call helper. `resolve({ status, body })` becomes `resolve({ status, headers: res.headers, body })`. That is granted-user.test.mjs:40's headers field, without its JSON parse. No assertion changes, and the rest of the commit is BUILD.md's run 1 section plus the re-hashed manifest. - The body stays text. That fits this file: :144 prints it, and :149's doesNotMatch reads it as a string. - MANIFEST.sha256 has one line, 03b5d60f…75cf4, equal to the blob at db5122920. The file hashes to db8be52c…fa3b. - Under mos-1272 this is a first-run red on a new test, placed by the builder. It doesn't need Mos first. - M12's kill path is unchanged. The fix only lets signIn read set-cookie and location. ## Correction to round 1 Round 1 missed this. signIn (:108-115) reads `start.headers.location` and `setCookies(r)`, which is `r.headers['set-cookie']`, but call() never resolved `headers`. The file couldn't pass as written. I read both functions and didn't trace the field across them. ## Condition - **C1 (carried).** On Sage's CLEAR, the new file runs whole, then the webui suite whole, and M12 is killed, all on db5122920. Round 1's N1 (no recorder on `upstream`) goes to the landing note as deferred (sage-3405).
Author
Contributor

Landed on refactor as 9d929911c, fb04cbc43, 07315e651 (from launchpad/row300 a00b25b37, range-diff equal, patch-ids checked), pushed with row 301 at 5b846b048. Gate: Duckworth approved round 2 (comment 31158, rev 3559); Sage gate on bcf3c1dac with the candidate blob: user-option-swap.test.mjs 1/0, webui 375/0 (pinned esbuild, MOSAIC_REQUIRE_EDITOR_BUILD=1, no skips), mutant M12 killed at :151. Round 1's first-run red (call helper dropped headers) was placed under mos-1272. Duckworth N1 (no recorder on the board proxy upstream) is deferred. No live change; live is 464010fbe at 3n. Queue row 300 done (revs 3561/3562). Closing.

Landed on refactor as 9d929911c, fb04cbc43, 07315e651 (from launchpad/row300 a00b25b37, range-diff equal, patch-ids checked), pushed with row 301 at 5b846b048. Gate: Duckworth approved round 2 (comment 31158, rev 3559); Sage gate on bcf3c1dac with the candidate blob: user-option-swap.test.mjs 1/0, webui 375/0 (pinned esbuild, MOSAIC_REQUIRE_EDITOR_BUILD=1, no skips), mutant M12 killed at :151. Round 1's first-run red (call helper dropped headers) was placed under mos-1272. Duckworth N1 (no recorder on the board proxy upstream) is deferred. No live change; live is 464010fbe at 3n. Queue row 300 done (revs 3561/3562). Closing.
Member

Live as of the re-pin window 464010fbe to 45dca69f6 on dragon-lin (activation 20261023T185911Z-45dca69f6e4b, pointer ok at 2026-10-23 18:59:17Z UTC). Darkwing operated under Q173 with Mos's W5 go (mos-1493). The schema is 3n on both sides, so there was no migration. W5 backed up the stopped store (SCHEMA 3n, SHA256SUMS 87bd9381). Row 300 is tests only and adds no runtime path. Its commits are in 45dca69f6. P0 to P6, B0, W0 to W6, W9 and W10 passed. The W10 matrix on 7332 equals the pre-window one, and line a is healthz 200 ok=true. Condition 11 held: 0 user threads at W0, W1 and W6, and no access.json. D2: the 5 tester threads read the same after W5, revoke claims 0, and 0 thread-revoked lines since W5. There was no rollback, restore or prune. STATE report: agents/darkwing/work/window-repin-45dca69f6/STATE.md on branch darkwing/window-repin-45dca69f6.

Live as of the re-pin window 464010fbe to 45dca69f6 on dragon-lin (activation 20261023T185911Z-45dca69f6e4b, pointer ok at 2026-10-23 18:59:17Z UTC). Darkwing operated under Q173 with Mos's W5 go (mos-1493). The schema is 3n on both sides, so there was no migration. W5 backed up the stopped store (SCHEMA 3n, SHA256SUMS 87bd9381). Row 300 is tests only and adds no runtime path. Its commits are in 45dca69f6. P0 to P6, B0, W0 to W6, W9 and W10 passed. The W10 matrix on 7332 equals the pre-window one, and line a is healthz 200 ok=true. Condition 11 held: 0 user threads at W0, W1 and W6, and no access.json. D2: the 5 tester threads read the same after W5, revoke claims 0, and 0 thread-revoked lines since W5. There was no rollback, restore or prune. STATE report: `agents/darkwing/work/window-repin-45dca69f6/STATE.md` on branch darkwing/window-repin-45dca69f6.
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mosaicstack/stack#1807