diff --git a/agents/honker/work/queue-194/BUILD.md b/agents/honker/work/queue-194/BUILD.md index 734252c48..5d7a2fee0 100644 --- a/agents/honker/work/queue-194/BUILD.md +++ b/agents/honker/work/queue-194/BUILD.md @@ -27,6 +27,7 @@ brief commit). Slices that don't need row 191 build first. S6 waits for row 191' | S4 | harness: launch tool schema, hire and fire tools | T8 (D3 item 5) | done, see S4 notes | | S5 | webui: Agents section and routes | T16 | done, see S5 notes. The "still running after fire" flag waits for S6 | | S6 | row 191 chain: halted checks, fire SIGKILL through row 191's stop | T9a, T9b, T15 | waits on row 191 | +| S7 | brief item 7 (rev 2547, sage-1586): a created agent's credential entry, the restart route | T19 (new) | waits on row 199 landing, see item 7 plan | ## Changed assertions (D3 item 4, N4) @@ -474,3 +475,45 @@ webui sso, service and reads were run again singly on the new base: 23 files, al 11/11, git-socket 24/24, stack-copy 12/12, cli stack-release 174/174, seat sandbox 10/10. No test pins a hash of a file S5 changes. shell.test reads bus.js strings and its POST count, which S5 leaves alone because agents.js holds the section's writes. + +## Item 7 plan (brief rev 2547, sage-1586, from row 199 N2, duckworth-0068) + +Choice: create states that the agent needs a restart before `issue`. It doesn't register the entry with +the running bus. + +- Today create and hire refuse a definition that declares credentials (`organization-credentials-out-of- + scope`, `instance-settings.mjs:75-77`). So no created agent has a credential entry, and item 7 has nothing + to act on until row 199 lands. Row 199's D13 (origin/megavolt/row199-on-190 + `agents/megavolt/work/queue-199/DESIGN.md:295-307`) has row 194 lift that refusal for the human's create + only. The agent is created with `store` references and no files. Hire stays uncredentialed. +- The runtime already treats credential references as fixed at start (`runtime.mjs:115-134`). A file whose + references differ from the boot copy isn't reloaded, and `instances.set` answers `restart: true` + (`runtime.mjs:182`). The CLI prints RESTART_NEEDED (`packages/cli/src/instances.mjs:59, 235`), and the + Console's instances section prints RESTART_TEXT (`packages/webui/src/public/bus.js:691, 733`). So after the + lift, a human create of a credentialed definition answers `restart: true` with no new runtime code. + `credentials.issue` then refuses `credential-unknown`, because the broker's copy of the business doesn't + hold the agent (`broker.mjs:1443` on row 199) and Credentials has no reference for it + (`credentials.mjs:148-150, 157`). +- Why not register: registering means a new path in row 199's Credentials that adds references to a running + store, plus a change to the fixed-at-start rule that row 194's D3 review accepted. The restart route changes + neither. It costs one bus restart per credentialed create, which the human already makes for any credential + change. +- Build, after row 199 lands and this branch moves onto it (new branch name, no force): + 1. `instance-settings.mjs`: a human `add` of a credentialed definition writes `store` references with the + date fields row 199 requires and no files. Hire keeps the refusal. The human's create is + `instances.set` op `add` (agents.js posts it to /api/instances), so it already answers `restart`. The + runtime comment at `runtime.mjs:115-116` ("Create and hire add neither") changes to say a human create + can. + 2. `agents.js` createAgent: the receipt carries the answer's restart text, as bus.js does. Today it says + "Created X." and drops `restart`. + 3. T19, bus test: a human create of a credentialed definition answers `restart: true`. Issue refuses + `credential-unknown` before a restart. After a bus restart over the same directories, issue works and the + status reads `valid`. Hire of the same definition still refuses. A browser assertion covers the restart + text in the Agents receipt. + 4. Mutants: M61 the create refusal stays for the human (T19 fails at create). M62 `fixedRole` ignores + `credentials`, so the reload goes live and answers `restart: false` (T19 fails). M63 the Agents receipt + drops the restart text. +- Open for Sage: D13 also has row 194's fire and delete call `credentials.revoke` before they change the + business file, with a failed revoke stopping the fire (`credential-revoke-failed`). Brief item 7 doesn't + name it. Asked in honker-0044. +