feat(boss): Boss creates nests and assigns registry crows (#43) #52

Merged
jacisjake merged 2 commits from task/43-boss-nests into main 2026-10-28 15:20:29 +00:00
jacisjake commented 2026-10-28 15:12:23 +00:00 (Migrated from github.com)

What was addressed

  • Boss system prompt now defines a NEST {"name","crows"} structured reply for nest-creation orders, beside the existing SPIN line.
  • respondBoss parses both prefixes; a valid NEST order runs NestStore.Create (the only mutation), a refused or garbled one posts a Boss say naming why.
  • Success posts two says: Boss announces membership in the new nest (to the owner) and confirms in the requesting nest.
  • Member names resolve against the persona roster or the spun-crow registry; any unknown member (service roles included) refuses the whole create — no partial nests.
  • NestStore gains a non-mutating AllowCrows hook (wired to the registry in Server.WithCrows); CrowStore gains Has.
  • EVENTS.md: harness may create nests via Boss; no new HTTP endpoint; nest-member guardrail wording updated.

How to test / validate

  • gofmt -l . — no output

  • go vet ./... — clean

  • go test -race -count=1 -run 'TestBoss' . — all pass; RED first was:

    --- FAIL: TestBossCreatesNest (2.03s)
        boss_test.go:405: Boss must create the nest Launch, nests: [map[crows:[] name:To do nest_id:todo] map[crows:[Hugin] name:Lab nest_id:lab]]
    --- FAIL: TestBossNestUnknownMemberRefused (0.00s)
        boss_test.go:450: Boss must interpret the order, not echo it back: "NEST {\"name\":\"Nope\",\"crows\":[\"Gandalf\"]}"
    --- FAIL: TestBossNestCapRespected (0.01s)
        boss_test.go:480: Boss must report the store's cap refusal, got "NEST {\"name\":\"Overflow\",\"crows\":[\"Hugin\"]}"
    
  • go test -race -count=1 -timeout 180s . — ok somanycrows

  • No server with a registry (WithCrows) is unchanged in behavior; spun crows are valid members there, refused without one.

Configurations or dependencies

  • Task #42 (Boss + crow registry) merged — this branch builds on it.
  • No new env vars, keys or config; guardrail defaults unchanged.

Closes #43
Epic: #37

## What was addressed - Boss system prompt now defines a `NEST {"name","crows"}` structured reply for nest-creation orders, beside the existing `SPIN` line. - `respondBoss` parses both prefixes; a valid NEST order runs `NestStore.Create` (the only mutation), a refused or garbled one posts a Boss `say` naming why. - Success posts two says: Boss announces membership in the new nest (to the owner) and confirms in the requesting nest. - Member names resolve against the persona roster or the spun-crow registry; any unknown member (service roles included) refuses the whole create — no partial nests. - `NestStore` gains a non-mutating `AllowCrows` hook (wired to the registry in `Server.WithCrows`); `CrowStore` gains `Has`. - EVENTS.md: harness may create nests via Boss; no new HTTP endpoint; nest-member guardrail wording updated. ## How to test / validate - [ ] `gofmt -l .` — no output - [ ] `go vet ./...` — clean - [ ] `go test -race -count=1 -run 'TestBoss' .` — all pass; RED first was: ``` --- FAIL: TestBossCreatesNest (2.03s) boss_test.go:405: Boss must create the nest Launch, nests: [map[crows:[] name:To do nest_id:todo] map[crows:[Hugin] name:Lab nest_id:lab]] --- FAIL: TestBossNestUnknownMemberRefused (0.00s) boss_test.go:450: Boss must interpret the order, not echo it back: "NEST {\"name\":\"Nope\",\"crows\":[\"Gandalf\"]}" --- FAIL: TestBossNestCapRespected (0.01s) boss_test.go:480: Boss must report the store's cap refusal, got "NEST {\"name\":\"Overflow\",\"crows\":[\"Hugin\"]}" ``` - [ ] `go test -race -count=1 -timeout 180s .` — `ok somanycrows` - [ ] No server with a registry (`WithCrows`) is unchanged in behavior; spun crows are valid members there, refused without one. ## Configurations or dependencies - [ ] Task #42 (Boss + crow registry) merged — this branch builds on it. - [ ] No new env vars, keys or config; guardrail defaults unchanged. Closes #43 Epic: #37
Sign in to join this conversation.