oficina / equipo Public

Abilities: Oficina tests give the second person a Base host

A person with no verified Base host has nothing switched, so their
finish never reaches connect's "not yours" check. The two tests about
another person's consent now register that person's Base first, as a
person reaching the Assistant through Base has. gofmt.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Paul Campbell pushed by paul@keymail.dev 87d221b097147469ddd29b20dff66a2844dc00b8 parent ffe6cb9
4 files changed, +20 −18
  • internal/equipo/chat/store.go +6 −6
  • internal/equipo/handlers.go +12 −12
  • internal/thintest/assistant_oficina_contract_test.go +1 −0
  • internal/thintest/assistant_oficina_resume_contract_test.go +1 −0
diff --git a/internal/equipo/chat/store.go b/internal/equipo/chat/store.go
index f9585718..2dc0486d 100644
--- a/internal/equipo/chat/store.go
+++ b/internal/equipo/chat/store.go
@@ -26,14 +26,14 @@ import (
)
var (
- ErrInvalid = errors.New("chat: invalid")
- ErrNotFound = errors.New("chat: not found")
- ErrConflict = errors.New("chat: idempotency conflict")
- ErrTerminal = errors.New("chat: turn already ended")
- ErrForbidden = errors.New("chat: forbidden")
+ ErrInvalid = errors.New("chat: invalid")
+ ErrNotFound = errors.New("chat: not found")
+ ErrConflict = errors.New("chat: idempotency conflict")
+ ErrTerminal = errors.New("chat: turn already ended")
+ ErrForbidden = errors.New("chat: forbidden")
// ErrAbilityOff: an ability the person needs is off (403 ability_off,
// spec 2026-11-26-assistant-abilities).
- ErrAbilityOff = errors.New("chat: ability off")
+ ErrAbilityOff = errors.New("chat: ability off")
ErrExpired = errors.New("chat: cursor expired")
ErrSuperseded = errors.New("chat: runner generation superseded")
ErrUnavailable = errors.New("chat: unavailable")
diff --git a/internal/equipo/handlers.go b/internal/equipo/handlers.go
index ff3a939d..bfacb64a 100644
--- a/internal/equipo/handlers.go
+++ b/internal/equipo/handlers.go
@@ -88,18 +88,18 @@ type pageData struct {
Nav []NavItem
Key, Title, EmptyKey, Address, TeamName string
// EmptyArg fills the %s in EmptyKey's copy, when it has one.
- EmptyArg string
- Owner bool
- Groups []ProjectGroup
- Count int
- Detail ProjectDetail
- Members []Member
- Owners []ownerField
- RequestID, Action string
- Budget BudgetConfig
- BudgetForms []budgetForm
- Specialist Specialist
- ErrorKey, Back string
+ EmptyArg string
+ Owner bool
+ Groups []ProjectGroup
+ Count int
+ Detail ProjectDetail
+ Members []Member
+ Owners []ownerField
+ RequestID, Action string
+ Budget BudgetConfig
+ BudgetForms []budgetForm
+ Specialist Specialist
+ ErrorKey, Back string
}
func (a *application) page(r *http.Request, key string) (pageData, error) {
diff --git a/internal/thintest/assistant_oficina_contract_test.go b/internal/thintest/assistant_oficina_contract_test.go
index 9c8525f3..194818e1 100644
--- a/internal/thintest/assistant_oficina_contract_test.go
+++ b/internal/thintest/assistant_oficina_contract_test.go
@@ -227,6 +227,7 @@ func TestContractAssistantOficinaConnectCard(t *testing.T) {
func TestContractAssistantOficinaCallbackState(t *testing.T) {
o := newOficinaRig(t)
ana := o.other("ana@example.com")
+ ana.connect(o.base.Mint())
state, code := o.handBack(o.base.Origin + "/ask")
if n := o.rows("SELECT count(*) FROM oficina_connections"); n != 0 {
t.Fatalf("the callback saved %d connections", n)
diff --git a/internal/thintest/assistant_oficina_resume_contract_test.go b/internal/thintest/assistant_oficina_resume_contract_test.go
index bbcbe88c..541e4995 100644
--- a/internal/thintest/assistant_oficina_resume_contract_test.go
+++ b/internal/thintest/assistant_oficina_resume_contract_test.go
@@ -173,6 +173,7 @@ func TestContractAssistantOficinaResumeWaits(t *testing.T) {
func TestContractAssistantOficinaNoResumeUnlessConnected(t *testing.T) {
o := newOficinaRig(t)
ana := o.other("ana@example.com")
+ ana.connect(o.base.Mint())
o.asked("Put lunch with Ana in my calendar on Friday.")
o.fake.Deny = true