From 333e34a48421d5df52bbbf5f27cb047d90e56d2d Mon Sep 17 00:00:00 2001 From: Jason Woltje Date: Fri, 23 Oct 2026 14:26:45 -0500 Subject: [PATCH] webby: row 288 early look on 7dc4fb2cc; and session line --- .../work/queue-288/EARLY-LOOK-7dc4fb2cc.md | 86 +++++++++++++++++++ docs/SESSIONS.md | 1 + 2 files changed, 87 insertions(+) create mode 100644 agents/webby/work/queue-288/EARLY-LOOK-7dc4fb2cc.md diff --git a/agents/webby/work/queue-288/EARLY-LOOK-7dc4fb2cc.md b/agents/webby/work/queue-288/EARLY-LOOK-7dc4fb2cc.md new file mode 100644 index 000000000..1c28198c1 --- /dev/null +++ b/agents/webby/work/queue-288/EARLY-LOOK-7dc4fb2cc.md @@ -0,0 +1,86 @@ +# Row 288 early look: C2-02 agent writes, notice, revert and human saves + +Webby, 2026-10-23. Requests: bubba-0005 (c867cada9) and bubba-0008 (7dc4fb2cc). This is a +static read, not a verdict. I ran nothing. Runs wait for Sage's CLEAR, and 284 isn't built. + +- Branch: bubba/row288 at 7dc4fb2cc. It fast-forwards from c867cada9 with one commit, and + neither commit has a trailer. +- c867cada9 merges 283 e67c27b32, 285 53db6b7ca and 286 573fa0be0. Bubba's own code is in + c867cada9 (16 files, +760/-24) and 7dc4fb2cc (7 files, +244/-58). +- Brief: docs/plans/2026-10-20_case2-rows.md, "C2-02 agent writes, the notice, revert and her + Console saves" (blob 3a5ed91a4, :2031-2125). + +## Nothing blocking so far + +Each item below is something I read against the brief and found right. + +- Path rules. classify (scope.mjs:15) refuses anything that isn't `.md`, so supportingPath + refuses `.canvas`, `.base` and `.png`. The new broker M12 test lists all three. A human + save goes through classify, then a synthetic supporting entry for the file's own folder, + so M12's segment, symlink, gitlink and case/NFC rules still apply. It reaches any mapped + `.md` file, as the brief says. +- Caller gate. broker `#requestLibrary` checks tester, then human/reader/definition/ + `library.write`, then `#agent`, before any argument check. `#libraryWriter` repeats the + gate, then requires a gitea_grants row that isn't held, firing or past `rotate_by`. The + project must be in `role.publish` and in the grant's projects, and the grant user must be + the role's gitea user. The agent supplies no identity, credential or message: + `{ ...args(), author }` refuses invalid-request (keys() is strict). +- Content. The broker's checks (no NUL, at most 1 MiB, UTF-8 round trip, base null or + 40-hex) match write.mjs contentOf. Agent requests stay under the 64 KiB socket limit. The + socket test with `library.file.save` nested in the proof shows the start-of-request regex + lets that request through, and the parsed-verb check at server.mjs:65 then refuses it. +- Commit. plumbing uses a temporary GIT_INDEX_FILE in a stage dir beside the mirror, + `hash-object --no-filters`, `--cacheinfo 100644` and `commit-tree -p tip`, with + `Mosaic-Agent:` only when the writer isn't human. The library test pins the message, + the one parent and both idents. +- Race. withLibraryWriteGuard holds `running` for the whole write, with a frozen token. + push's race fetch re-enters only when `writers.get(mirror) === writeToken`, and a second + race refuses `stale-base` through `retried`. The tracking ref is restored in the finally + block only when nothing was pushed. +- Notice. The broker inserts `{notice, op, path, commit}` from the writing role to `human` + and routes it to the session's thread. The `action.allowed` event goes in the same + transaction. The new bare-repo test pins both notice bodies. +- Revert. Human only. It needs the commit reachable from served, one parent, one changed + path of 100644 blobs, and the trailer. base is the commit's own blob, so a later change + refuses `stale-base`. It uses the editor and the `library-human` slot, and the new test + shows it works with the grant deleted and the seat held. +- F1 (7dc4fb2cc, sync.mjs:272-292). If writeState fails after served moved, + readSyncState only returns `served === commit` when the state on disk already matches + the new ref. Otherwise served goes back by compare-and-swap, and the caller gets + `outcome-unknown`. The remote then holds a commit served doesn't, and the next sync + fast-forwards to it. That's the safe direction. +- lastPush. readStateHeld accepts it only as `{commit, at}`. sync keeps it through + `{ ...prev }`. + +## Early items for the manifest round + +- E1. write.mjs:98 builds `new RegExp(`^${context.business.id}/...`)` from the business id + unescaped. ID_PATTERN (vocabulary.mjs:206) allows `.`, so for business `acme.co` the + trailer `acme-co/bean` passes. That only matters if two businesses' agents write to one + library remote, and revert is human only, so it doesn't block. A `startsWith(id + '/')` + check plus the regex on the rest would close it, with one test. +- E2. The live-grant recheck before push has no test and no mutant. `beforePush` in the + broker (`#processingWork()` and `#libraryWriter` again) is the only thing that catches a + grant revoked, held or expired during the fetch. The BUILD.md mutant list doesn't name + it. A test that holds the seat from the fetch command, and expects + `library-write-no-grant` with every ref unchanged, would pin it. A mutant that drops + `beforePush` would show it's killed. Processing halted mid-write is the same check. +- E3. Several `#libraryWriter` refusals have no case yet: `rotate_by` in the past, + `#firing`, a project missing from `role.publish`, a grant user that isn't + `identity.gitea.user`, and a role with no identity name or email. The test at + library-write.test.mjs:56 covers held, no grant and a grant on another project. Each + missing branch is one line in that loop. +- E4. A write whose publication fails with `outcome-unknown` inserts no notice, so a + commit with her agent's trailer can be on her branch with no notice line in the + Console. It can still be reverted by commit id. If that's intended, a line in BUILD.md + should say so. +- E5. Still pending per BUILD.md: the typed tools and the tool snapshot (8 names, or 10 for + companion and research) wait on 284. startServer (serve.mjs:604) doesn't take + `librarySave` yet. cli.mjs passes it and it's ignored. That matches "225 keeps + libraryRevert" and the C2-11b library pages. I'll check both at the manifest round. + +## Gate left to Sage + +Per the brief: library, bus and harness suites whole and every scripts/test-*.sh on CLEAR, +the mutants killed, and a search of the run output for the fixture tokens. Nothing above +has been run. diff --git a/docs/SESSIONS.md b/docs/SESSIONS.md index 7d32b7fc5..49fa40b45 100644 --- a/docs/SESSIONS.md +++ b/docs/SESSIONS.md @@ -1529,3 +1529,4 @@ are never rewritten or removed; corrections are new entries. 2026-10-23T19:14Z | Webby (Opus 5.5, reviewer seat) | row 283 E4 follow-up on 76d651dba, static | E4 fixed; E5 round-trip test env keeps GIT_DIR family and global config 2026-10-23T19:15Z | Webby (Opus 5.5, reviewer seat) | row 283 E5 follow-up on e67c27b32, static | E5 fixed; nothing open before the manifest round 2026-10-23T19:17Z | Webby (Opus 5.5, reviewer seat) | row 198 r4 B1 scope correction on 4d8123b0a | B1 is six test files (browser, return-flow, history-return-flow, discord, board-held besides browser-edge); canReply/seen gating owned by 198 +2026-10-23T19:26Z | Webby (Opus 5.5, reviewer seat) | row 288 early static look on c867cada9 and 7dc4fb2cc (bubba-0005, bubba-0008) | nothing blocking; E1-E5 for the manifest round; nothing run