feat(ask-owner): owner-only fail-safe decisions in the nest log (#41) #49

Merged
jacisjake merged 2 commits from task/41-ask-owner into main 2026-10-28 14:59:07 +00:00
jacisjake commented 2026-10-28 14:51:44 +00:00 (Migrated from github.com)

What was addressed

  • ask_owner is a real nest message kind: postable by the owner and the owner-facing service roles (Quill, Sentry), carrying an exact approval_phrase.
  • Resolution is computed at read time: approved only when an owner reply with refers_to the ask has trimmed lowercased text equal to the phrase; anything else, including the 10-minute timeout (Server.askTimeout, fail-safe like WebApprover), is not a yes.
  • An ordinary crow's ask_owner header is dropped and the message tags as it otherwise would (say/default), never an error.
  • EVENTS.md updated first: kind row, approval_phrase and resolved payload fields, POST body field, GET messages row, guardrails, timeout cross-reference.

How to test / validate

  • go test -race -count=1 -run 'TestAskOwner' -v . — five tests pass (posted-and-surfaced, owner-only resolves, wrong phrase stays open, timeout rejected, crow header retagged).
  • gofmt -l . && go vet ./... — silent.
  • go test -race -count=1 -timeout 180s . — ok somanycrows 6.001s.
  • RED excerpt (before implementation, commit ebaf40c):
    # somanycrows [somanycrows.test]
    ./askowner_test.go:118:3: unknown field ApprovalPhrase in struct literal of type Message
    ./askowner_test.go:125:4: s.askTimeout undefined (type *Server has no field or method askTimeout)
    FAIL	somanycrows [build failed]
    

Configurations or dependencies

  • None new: no keys, no env vars, no new endpoints beyond existing nest POST/GET.
  • No SSE change: nest.message relays the same records, now with approval_phrase/resolved.

Closes #41
Epic: #36

## What was addressed - `ask_owner` is a real nest message kind: postable by the owner and the owner-facing service roles (Quill, Sentry), carrying an exact `approval_phrase`. - Resolution is computed at read time: `approved` only when an owner reply with `refers_to` the ask has trimmed lowercased text equal to the phrase; anything else, including the 10-minute timeout (`Server.askTimeout`, fail-safe like `WebApprover`), is not a yes. - An ordinary crow's `ask_owner` header is dropped and the message tags as it otherwise would (`say`/`default`), never an error. - `EVENTS.md` updated first: kind row, `approval_phrase` and `resolved` payload fields, POST body field, GET messages row, guardrails, timeout cross-reference. ## How to test / validate - [ ] `go test -race -count=1 -run 'TestAskOwner' -v .` — five tests pass (posted-and-surfaced, owner-only resolves, wrong phrase stays open, timeout rejected, crow header retagged). - [ ] `gofmt -l . && go vet ./...` — silent. - [ ] `go test -race -count=1 -timeout 180s .` — `ok somanycrows 6.001s`. - [ ] RED excerpt (before implementation, commit `ebaf40c`): ``` # somanycrows [somanycrows.test] ./askowner_test.go:118:3: unknown field ApprovalPhrase in struct literal of type Message ./askowner_test.go:125:4: s.askTimeout undefined (type *Server has no field or method askTimeout) FAIL somanycrows [build failed] ``` ## Configurations or dependencies - [ ] None new: no keys, no env vars, no new endpoints beyond existing nest POST/GET. - [ ] No SSE change: `nest.message` relays the same records, now with `approval_phrase`/`resolved`. Closes #41 Epic: #36
Sign in to join this conversation.