E2: Boss creates nests and assigns members #43

Closed
opened 2026-10-28 13:42:54 +00:00 by jacisjake · 0 comments
jacisjake commented 2026-10-28 13:42:54 +00:00 (Migrated from github.com)

Epic: #37. Depends on: #42

Goal

Boss creates nests and assigns members from inside the chatroom: @Boss make a nest Launch with Hugin and Ash → structured instruction via Flock.ask ({"nest":"Launch","crows":[...]}) → NestStore.Create (guardrails already checked there, nests.go:94), and Boss reports the outcome in the room. Unknown or non-spinnable member names fail the whole create (no partial nests).

Acceptance criteria — falsifiable tests

  1. TestBossCreatesNest (boss_test.go) — Given registry crow Ash exists and Hugin is a persona, when owner posts @Boss make a nest Launch with Hugin and Ash, then GET /api/nests includes nest "Launch" whose crows are exactly Hugin and Ash, and Boss posts a message in Launch announcing it. Red now: no Boss nest path.
  2. TestBossNestUnknownMemberRefused — @Boss make a nest Nope with Gandalf: no nest is created (count in GET /api/nests unchanged), Boss posts a say naming the unknown member.
  3. TestBossNestCapRespected — with NestStore.Create guardrail at its cap for the test config, Boss's create posts the refusal message, not a 500 (read the cap error string from nests.go).
  4. TestBossNestGoesThroughFlock — saturated flock + short ctx: no nest, no Boss message.

Test command

go test -race -count=1 -run 'TestBoss' .

Blockers / unknowns

EVENTS.md first: note that nests may be created by the harness via Boss (who may author POST /api/nests-equivalent internals; no new HTTP endpoint needed unless the UI wants one — document either way).

Epic: #37. Depends on: #42 ## Goal Boss creates nests and assigns members from inside the chatroom: `@Boss make a nest Launch with Hugin and Ash` → structured instruction via `Flock.ask` (`{"nest":"Launch","crows":[...]}`) → `NestStore.Create` (guardrails already checked there, `nests.go:94`), and Boss reports the outcome in the room. Unknown or non-spinnable member names fail the whole create (no partial nests). ## Acceptance criteria — falsifiable tests 1. `TestBossCreatesNest` (`boss_test.go`) — Given registry crow Ash exists and Hugin is a persona, when owner posts `@Boss make a nest Launch with Hugin and Ash`, then `GET /api/nests` includes nest "Launch" whose `crows` are exactly Hugin and Ash, and Boss posts a message in Launch announcing it. Red now: no Boss nest path. 2. `TestBossNestUnknownMemberRefused` — `@Boss make a nest Nope with Gandalf`: no nest is created (count in `GET /api/nests` unchanged), Boss posts a `say` naming the unknown member. 3. `TestBossNestCapRespected` — with `NestStore.Create` guardrail at its cap for the test config, Boss's create posts the refusal message, not a 500 (read the cap error string from `nests.go`). 4. `TestBossNestGoesThroughFlock` — saturated flock + short ctx: no nest, no Boss message. ## Test command `go test -race -count=1 -run 'TestBoss' .` ## Blockers / unknowns EVENTS.md first: note that nests may be created by the harness via Boss (who may author `POST /api/nests`-equivalent internals; no new HTTP endpoint needed unless the UI wants one — document either way).
Sign in to join this conversation.