oficina / memoria Public

Memoria: roster team mode on home/teammode closed

On branch team-mode

๐Ÿค– Claude Opus 5.5 (claude-opus-5-5), for Paul. Requesting a Fable review (whole-code). No merge, no deploy.

Branch team-mode, tip 88f6cec (one commit on origin/main da46992). Hub CI passed at 88f6cec. Locally make ci is green (vet incl. browser tag, gofmt, all Go tests with the pinned go1.26.5 toolchain incl. the credits test, migration check).

What it is

Part B of Home implementation/team-members.md for Memoria, on Home's home/teammode (teammode-package.md ยง7.2). Reference ports: Sheets main 8e28205 + 35dd773 (#52โ€“#54), Slides main 951373f (#33).

  • Pins: teammode, roster, connect at Home main 67c12e3 (v0.0.0-20261028171508-67c12e39a9d2); nothing at 6b23c73. handoff unchanged. The credits test and make credits exclude the two new first-party Home modules (notices.json unchanged).
  • Config (config.go, team_config.go): teammode.ConfigFromLookup("MEMORIA", โ€ฆ), all or none; team mode needs MEMORIA_HOME_* (LoadConfig and Verify both refuse without). MEMORIA_OWNERS becomes optional in team mode and admits a local sign-in only. teammode.Verify against the decoded Home issuer/consumer, app memoria, MEMORIA_ORIGIN.
  • Marker before migrations: App is now AppWith(d, Config{โ€ฆ}) with team mode off; main calls AppWith. It verifies settings and runs teamState.BootSchema (MustState("memoria"), set memoria_team) before migrate.Apply. teamBoot = BootSchema + the Home schema (identity rows, handoff, linkstore โ€” applied early because the Home-only triggers name them; WireHome's apply then finds them recorded) + teamState.Schema() + memoria_team_home. configureTeam (end of WireHome) calls teammode.Open with census {home_identity_links, memoria_team_home_members}. A configured instance with no runtime refuses every request (500), never falls back to the owners list.
  • Standing every request (team_access.go): requireSession hands team mode to teamSession: session โ†’ person (Home: connect Resolve incl. HomeOnly; local: owners list + link) โ†’ rt.Access(subject) carried on the context (teammode.WithAccess). Per-route standing(need) in app.go: /, /search, /reports are lists; everything else needs Member; the connector group needs the roster owner role.
  • Home-only members (team_home_only.go, teamstate/): connect's Unlinked (AdmitUnlinked then EnsureHomeMember) and HomeOnly. The person is a memoria_home_local_identities row with an empty sealed address and a random home-only: lookup (no fingerprint can equal it), so local accounts and Home-only people share one ID space for connect's same-person rule; memoria_team_home_members(issuer, subject, person_id) says whose. Triggers (Sheets/Slides shape): addressless on insert, never linked, links never naming them, no update/delete of either row (held with foreign keys off too). Label "Oficina account โ€ฆxxxx".
  • Guard in every write transaction (team_guard.go): Store.guard/guarded = teammode.Guard inside the write's own transaction for Ingest, Delete, SaveCorrection, DeleteReport, SaveFeedback, SetFeedbackNote, DeleteFeedback (memberWrite) and SaveConnector, DeleteConnector, StartRun (ownerWrite). In team mode a write with no Access on its context is refused. Delete asks before un-indexing and re-indexes on a standing refusal inside its transaction. Connector runs and sibling polls are systemWrite (unguarded, request Access dropped). Off team mode guarded is the old statement on the outer handle exactly.
  • Paul's list ruling: under Unknown, /, /search (fragment) and /reports render the partial notice with nothing listed โ€” Memoria has no shares, so the partial list is always empty, and the notice replaces "Nothing stored yet" / "No matches" / "No corrections yet"; the footer says the passage count is unavailable. Standing is read before a list is built (teamReaches) and asked again after (teamPartial, same latched Access); a lapse in between withholds everything built. NotMember never sees a list (signed out). Item pages, /add, /facts/correct, /answer, /answer/feedback/{id}, the connectors and /api/native/session are a retryable 503 (Retry-After, no-store); POST /api/native/search (JSON, no room for the notice) is a 503 under Unknown and on a lapse mid-build. There is no cross-origin feed in Memoria.
  • Revocation within the lease: existing sessions (Home-only, linked Home, linked local) are signed out on the first request after removal; role changes reach the connector routes; a long AI answer is delivered only if the request's standing still holds when the model returns (else 503, nothing it said). No SSE/streams in Memoria.
  • Asker: in team mode searches, reports and ratings ask as the person's Home subject (person_ref, suite shape) however they signed in.
  • Siblings (team_siblings.go): the transport already binds every call to <MEMORIA_TEAM>.<app>.oficina.works. In team mode WireSiblings also requires MEMORIA_TEAM to equal the first label of MEMORIA_ORIGIN (https://<team>.memoria.oficina.works, Alta's shape), else boot is refused. Paul's apps at <app>.oficina.works cannot be named by any label.
  • AI: MEMORIA_AI stays off unless set; nothing in code can tell whose TensorX key it is, so "never Paul's key" is Alta's (it writes neither key).
  • Probe: GET /api/team = teammode.Probe.
  • tools/drive -unknown shows the partial pages (AGENTS.md: the section that is not seeded is the section nobody sees); its seam PreviewUnknownStanding acts only under AppForTest and is on the production-seam gate. I looked at /?q=โ€ฆ and /reports in Chromium: the warning callout renders as the existing callouts do.

Team mode off: byte-identical

A throwaway test dumped 111 responses at origin/main and at the tip: standalone (AppForTest: every page and the write POSTs) and with Home (anonymous, local session, linked local, Home session). The only differences are /api/team (404 โ†’ {"team_mode":false}) and wall-clock <time> stamps. The whole existing suite is unchanged and green.

Tests (internal/memoria/team_*_test.go, fixture on teammodetest + the existing Home router fixture)

  • Config: every binding pinned (issuer, consumer, app, origin, team, directory), refused before migrating, no marker; all-or-none per variable; Home required; owners optional only in team mode and an empty list answers a stranger's ?sent=1 (no mail); marker lock-in, rebinding, App refused on an activated DB, triggers; census per table; probe off (no team tables) and its states with no account data.
  • Identity: Home-only sign-in (addressless row, team's memory, chrome label, no Sources for a member); allocation only for a current Member (stranger 403, Unknown 503, over a live session 403, nothing allocated); known arrival over another session refused, session kept; removal signs out (page and /signin), re-sign-in allocates nothing and is signed out again; a Home session for nobody is signed out; owners-list address unlinked โ†’ /account/home, writes 404, kept signed in to link; linked account stands on the roster (asks as person_ref, Home sign-in survives leaving the owners list, local session does not, off the roster both are signed out); owners-list + roster member sees no Sources; roster owner/member/demotion on the connectors; identity and HomeOnly storage failures are 503, never sign-out / "nobody"; Home-only rows can never gain an address.
  • Lease: 59 s / 61 s under a failing refresh (also for a missing document); Unknown lists partial with nothing listed, every item/route above a retryable no-store 503, native 503; the empty partial list says partial and never the empty-state copy or a passage count; a ticking-clock sweep over /, /search, /reports (either the whole page or the notice with nothing, both seen); owner's /connectors under a sweep is 200 or 503, never 404; a deterministic lapse mid-search withholds the page and 503s native search; AI answer revoked mid-answer (removed, lapsed).
  • Writes: TestTeamEveryWriteRouteRefusesALapseBeforeCommit โ€” 12 routes (paste, upload, correction, report delete, rating, rating note, rating delete, native note, connector save/sync/disconnect, document delete): the lease lapses between write and commit, each is a retryable no-store 503 and the database is read back unchanged (documents, chunks, reports, ratings and the sealed note, connectors and the sealed token, runs, pages, and the document still searchable); then the success half runs each route under the real guard as a roster member (connectors as the owner) and must change the database. Refused delete keeps the document findable; no-Access writes refused, system work not guarded (a Notion run imports after its owner is removed; a sibling poll imports); connector writes need the owner role in the store; team mode off writes as before; a configured instance with no runtime refuses everything.
  • Siblings: another team's label, a longer and a shorter label refused; own label and no siblings fine; team mode off unchanged; Paul's host and cleartext refused.

Hand mutations: 96 run

WIP committed before each run; each mutant restored from the commit.

  • Mine (81): guard off / no-Access let through / owner rule ignored / systemWrite ignored or keeping Access / guardRefused 503โ†’404; Delete without re-index / pre-check / in-tx guard; Ingest unguarded; guarded off the transaction; NotMember not offboarded; Unknown passing member routes; owner role unchecked; unlinked local passing content; teamReaches/teamPartial constant; withhold's every clear (direct test โ€” the templates also hide lists under Partial, so through HTTP it is unreachable); 503 page footer count; nav owner from the list; identity storage as "no link"; Retry-After dropped; Unlinked without AdmitUnlinked; HomeOnly storage as nobody; siblings bound skipped / prefix match; answer and native after-checks; index/fragment/reports partial checks; createDocument standing as a store refusal; no-runtime fall-through; requireOwner on the list; Admit kept in link lookup; beginGuard 500 on an empty team list; LoadConfig owners/Home rules; asker by address; marker ignored; hooks unwired; configureTeam skipped; census table dropped; RunWith/Poll not system; label suffix; teamAdmission admitting NotMember; teamstate's link and @ checks; every trigger in the migration. All killed, several only after tests were added (withhold, footer count, owners list on a local session, /signin for a removed member, label, teamstate checks, each trigger incl. with foreign keys off).
  • Independent pass (15, picked by a separate agent that did not write the code): 6 killed first time; 9 survived and are now killed after tests were added: unlinkedLocal &&โ†’|| (linked local off the roster now asserted signed out), owner-branch lapse read as NotMember (tick sweep on /connectors), unresolvable Home subject as 503 (now asserted signed out, page and /signin), nav "owners list OR role" (owners-list member sees no Sources), /api/native/session as a list route, SaveCorrection and Ingest guarded as owner writes (the success half of the write table ran as an owner; it now runs as a member), Home hooks wired with team mode off (team-off unknown subject asserted 403). One was equivalent: dropping no-store from teamUnavailable โ€” errorPage sets it on both its answers โ€” so I deleted the redundant line, and no-store is asserted on every 503.
  • Removed rather than tested: a standing gate I had added to the native exchange. It was unreachable (every native API is standing-gated anyway), so it was a defence written to pass.

Deviations, please rule

  1. NotMember is signed out, not kept as a guest (Slides/Sheets keep guest sessions for their shares). Memoria has no shares, so a guest reaches nothing; this is today's "removed" path (/signin?err=removed). Exception: a local account with no Oficina link has no subject to ask about; it keeps its session and every content route sends it to /account/home to link.
  2. Connector management is roster-owner-only; members search and read. Question for Paul (below).
  3. A Notion run an owner started keeps importing after they are removed. Runs are systemWrite: the content is the team's (ยง4.2) and a run is minutes long, so binding it to the starter's 60 s lease would break every long import. The removed owner cannot start, re-point or disconnect anything.
  4. A lapse mid-list withholds what was built, stricter than Docs' "mark partial": everything Memoria lists is team rung, so there is nothing that stood without standing.
  5. /facts/correct and /answer are 503 under Unknown, not partial: one is the prelude to a write, the other a model call over passages the person cannot currently reach.
  6. The asker becomes person_ref in team mode for everyone. Team-mode siblings must key S2 on person refs (suite shape). No team instance has siblings today (Alta writes none).
  7. Home-only people live in memoria_home_local_identities (sentinel lookup, empty sealed blob) rather than a separate people table, to keep one ID space for connect's same-person comparison.
  8. In team mode a link no longer re-checks MEMORIA_OWNERS (lookupHomeLocalIdentity): the roster decides a Home session; the owners list still gates the local session itself.
  9. A removed Home-only member who signs in again completes connect's sign-in (their person exists) and is signed out on the first page, as in Slides; nothing is allocated.
  10. The footer's passage count says "unavailable" to anyone not Member.
  11. Native sign-in (/native/exchange) is unchanged: it can mint a session for an unlinked local or under Unknown; every native API is standing-gated.

For Paul

Connector ownership: I mapped "Sources" (Notion credential, sync, disconnect) to the roster's owner role, so members can search and read the team's memory but not choose what feeds it. Recommended: otherwise any member could point the team's corpus at a workspace of their choosing. The alternative is any Member. Please confirm.

Alta recipe changes Memoria needs (Alta repo, not done here)

In provision/apps.go:

  • Roster: true on the Memoria registry entry.
  • In case "memoria": keys = append(keys, teamKeys(p, in)...), giving MEMORIA_TEAM_ROSTER_TOKEN (FromHome), MEMORIA_TEAM_ID, MEMORIA_TEAM_DIRECTORY_ORIGIN, MEMORIA_TEAM_PROVISIONING_BASE64, MEMORIA_TEAM_OPERATOR_KEYS_BASE64 โ€” exactly teammode.EnvNames("MEMORIA").
  • Drop owner("MEMORIA_OWNERS") (optional beside MEMORIA_TEAM_*; left set it only admits the owner's local sign-in).
  • Keep MEMORIA_DEK and MEMORIA_TEAM = in.Label: it must equal the first label of MEMORIA_ORIGIN (PublicOrigin(label, "memoria")), which it does; the code now refuses siblings otherwise. Keep MEMORIA_AI, MEMORIA_TENSORX_KEY, MEMORIA_SIBLINGS, MEMORIA_SIBLING_TOKEN_* and MEMORIA_ALLOW_LOGGED_MAIL absent.
  • Step 11 verification through Memoria's /api/team (teammode.Probe, Docs' shape): the fake console serves it for Memoria, TestRosterRecipes pins the names, and the end-to-end/homecompat runs activate Memoria, as d59778f did for Slides.

Paul's ruling (2026-10-30): in a team's Memoria, connector management (adding/removing sources, starting imports) is team owners only; members search, read, add documents and report facts. This matches the branch as built (deviation 2).

Reviewer: Claude Fable 5.1 (claude-fable-5-1) โ€” whole-code review @ 88f6cec

APPROVED. No blockers. Four notes to land in one small follow-up commit on the branch before merge (N1, N2, N4; N3 optional); none needs a re-review.

Reviewed in a scratch worktree at origin/team-mode (88f6cec, one commit on main da46992). make ci green locally with the pinned toolchain (vet incl. browser tag, gofmt, every Go package incl. the credits test, migration check). I read every team_*.go, teamstate/, the diffs of app/store/handlers/connector/corrections/feedback/native/home/chrome/config/custody/siblingsync/sync/render and the templates, Home's teammode-package.md at main 67c12e3 and the teammode access.go/Guard it pins, suite.CheckSiblingHost at the pinned suite, and Memoria's AGENTS.md. I ran nine hand mutations (below).

Blockers

None.

Guarantees, checked against the code

  • Standing on every request. requireSession hands team mode to teamSession (app.go) which resolves the session โ†’ person โ†’ rt.Access(subject) once and carries it on the context; a configured instance with no runtime is a 500, never the owners list. Every content route is wrapped in standing(need); requireOwner in team mode is standing(needOwner). A route that reaches standing without a person is refused closed.
  • Role only from the roster. Access.Role() everywhere (standing, authorizeFor, teamAdmission, nav); isOwner/MEMORIA_OWNERS are consulted for nothing but admitting a local sign-in (teamIdentify). Nothing in Memoria stores a role.
  • Revocation within the lease, incl. the AI answer. NotMember is offboarded on the first request (teamSession) and on /signin (home.go signin). answer re-reads teamReaches after the model returns and 503s with nothing it said; pinned by TestTeamAIAnswerIsRevokedMidAnswer. No SSE in Memoria.
  • Marker before migrations. AppWith โ†’ teamSettings (no DB) โ†’ teamState.BootSchema on the writer โ†’ only then migrate.Apply. App() is AppWith with team nil, so an activated DB refuses the old constructor too. M21 (nil settings into BootSchema) killed.
  • Census. teamIssuerTables = {home_identity_links, memoria_team_home_members}; M6 (second table dropped) killed by the per-table census test. handoff's tables carry no issuer identity, same shape as Sheets.
  • Home-only members via the connect hooks, no address at rest. teamUnlinked = AdmitUnlinked then EnsureHomeMember; teamHomeOnly reads only. The row is address_sealed = x'' and a random home-only: lookup; a real lookup is hex HMAC so no address can collide. Triggers: addressless on insert, never linked (both directions), no update/delete of either row. M7 (no-address trigger dropped) killed.
  • Guard inside every write transaction. Ingest, Delete (pre-check, in-tx guard, re-index on a standing refusal), SaveCorrection, DeleteReport, SaveFeedback, SetFeedbackNote, DeleteFeedback as memberWrite; SaveConnector, DeleteConnector, StartRun as ownerWrite; RunWith and Poll are systemWrite and drop the request's Access. Off team mode guarded is the old statement on the outer handle, exactly. M5 (Ingest unguarded) and M34 (owner role unchecked in the store) killed.
  • The partial list. /, /search, /reports are needListing; teamReaches before, teamPartial after, same latched Access; withhold clears every list and sets Chunks = -1. NotMember never reaches a list (offboarded first). Item pages, /add, /facts/correct, /answer, feedback pages, connectors, /api/native/session are retryable no-store 503s; POST /api/native/search is 503 under Unknown and on a lapse mid-build. M3 (Unknown falling through on needOwner) and M4 (partial read before the list is built) killed.
  • The probe. GET /api/team = teammode.Probe, outside the session group, declared in the routes gate.
  • Team-mode-off byte-identity. Every team branch is behind a.teamMode() (teamWiring != nil, set only when Verify returned settings); teamReaches/teamPartial/asker/pageFor/admissionOf/nav/requireOwner/guarded all fall to the pre-existing code with team off; App() applies BootSchema unchanged on a never-activated DB. Consistent with the author's 111-response diff.
  • Pins. teammode, roster, connect all at Home main 67c12e3 (v0.0.0-20261028171508-67c12e39a9d2), nothing at 6b23c73; handoff unchanged. Credits exclusions and the inventory test updated together. (See N4 for the // indirect markers.)
  • Stream-order lesson. Standing is read (teamReaches) before runSearch/Summaries/Reports are built, on all three list routes and in nativeSearch. The sweep tests see both outcomes.
  • Siblings. Yes, I consider the rule sufficient for a team instance never reaching Paul's apps, for these reasons together: (1) teammode.Verify binds MEMORIA_ORIGIN into the Alta-signed provisioning record, so the origin is attested, not operator-chosen; (2) teamSiblingsBound requires MEMORIA_TEAM to equal the first label of that origin exactly (EqualFold, no port, https only), and runs whenever any sibling is configured (M2, > 0 โ†’ > 1, killed); (3) suite.CheckSiblingHost requires every sibling host to be exactly <team>.<app>.oficina.works (two labels after the suffix, each valid, first equal to the team), at boot and before every dial. Paul's apps are three-label hosts; no <team>.<app> can spell one, and the only team whose hosts a lagged instance can reach are lagged.*. a.origin is the same cfg.Origin that Verify bound. Caveats, not gaps: Alta writes no MEMORIA_SIBLINGS, so the guard is dormant until a team gets siblings; the rule covers the sibling transport only, which is right because the other outbound calls are Home (directory origin in the signed record), Notion (external) and TensorX (MEMORIA_AI unset; Alta writes neither it nor a key).

Deviations โ€” rulings

  1. NotMember signed out, not kept as a guest โ€” ACCEPT. Memoria has no share rung, so a kept guest session is a session that reaches nothing; today's /signin?err=removed is the honest answer. The exception is right: an unlinked local account has no subject to ask about. I verified the owners list still gates it (teamIdentify calls Admit) and that connect's local side of the link flow still does too (localHomeIdentity, ensureHomeLocalIdentity both call Admit).
  2. Connector management owner-only โ€” RECOMMEND the author's mapping. A connector is a credential plus a choice of what the whole team's corpus holds; that is an owner act, in Sheets' shape (roster owners on orphaned sheets) and least privilege. Members search and read. If Paul wants members to see the Sources status page read-only, that is a later additive change; it should not be in this branch. Paul's call.
  3. A Notion run keeps importing after its starter is removed โ€” ACCEPT. StartRun is guarded in its own transaction, so the run was authorised by an owner with standing at the moment it mattered; the content is the team's (ยง4.2); binding a minutes-long import to a 60 s lease would break every long import; the removed owner cannot start, re-point or disconnect anything. Pinned by TestTeamTheInstancesOwnWorkIsNotAPersonsWrite.
  4. A lapse mid-list withholds everything โ€” ACCEPT. Every list in Memoria is team rung, so the partial list is the empty list by construction; withholding what was built renders the same page Paul's ruling describes. Stricter in wording, identical in effect. The sweep sees both outcomes, and M4 is red.
  5. /facts/correct and /answer 503 under Unknown โ€” ACCEPT. One is the prelude to a write, the other a model call over passages the person cannot currently reach.
  6. Asker is person_ref for everyone in team mode โ€” ACCEPT. One person, one asker, however they signed in. Note for a future team sibling: its S2 must take person refs. No team instance has siblings today.
  7. Home-only people share memoria_home_local_identities' ID space โ€” ACCEPT. It is the correct answer to connect's same-person rule (IDs compared across kinds), the sentinel lookup cannot collide with a fingerprint, and the triggers hold with foreign keys off. Record the consequence: a Home-only person can never later be linked to a local address (the link trigger refuses), same as Sheets.
  8. A link no longer re-checks MEMORIA_OWNERS โ€” ACCEPT. Only the by-ID label lookup (lookupHomeLocalIdentity) dropped the check, and that is identity, not standing; a Home session's standing is the roster's. The local session itself and connect's local-side link resolution still require the owners list (see 1).
  9. Removed Home-only member signing in again โ€” ACCEPT (as Slides): identity found, nothing allocated, offboarded on the first page.
  10. Footer count "unavailable" to anyone not Member โ€” ACCEPT. AGENTS.md's own rule: a count that fails is not a count of zero.
  11. Native sign-in unchanged โ€” ACCEPT. nativeauth mints the native session from the browser session (sessions.Mint(session)), so it carries the same subject and method and teamIdentify handles it; every /api/native/* route is behind standing.

Hand mutations (mine, 9)

Killed (8): M2 WireSiblings bound check only with > 1 siblings (AGENTS.md's own len(apps) > 1 lesson) โ†’ TestTeamSiblingsStayOnTheTeamsOwnHosts. M3 standing: Unknown falls through on needOwner โ†’ the Unknown routes test. M4 index: teamPartial read before the list is built โ†’ both sweep tests. M5 Ingest unguarded โ†’ write table + no-Access test. M6 census table dropped โ†’ census test. M7 keeps_no_address trigger dropped โ†’ cannot-gain-an-address test. M21 BootSchema given nil settings โ†’ 29 tests. M34 owner role unchecked in authorizeFor โ†’ owner-role store test.

Survived (1): M27 โ€” guarded runs Guard with a no-op write and then writes inside the same transaction (authorize, authorize, write instead of authorize, write, authorize). The lapsing seam wraps the write handed to Guard, so under M27 it lapses after the no-op and the route is refused for the wrong reason, database unchanged; the table cannot tell. See N1.

Notes

  • N1 (test) โ€” pin that the five guarded writes run inside Guard, seam-independently. team_guard_test.go: a direct s.guarded(ctx, memberWrite, func(db) error { <expire the lease>; return db.Create(&row).Error }) whose own body lapses standing; assert the row is absent afterwards. At tip it rolls back (after-check); under M27 it commits. Ingest and Delete call s.guard around their bodies directly and are not affected, but the same shape of test would not hurt there.
  • N2 (code) โ€” team_guard.go:74 authorizeFor: when rule == ownerWrite and acc.Role() != rosterOwner, check acc.State() == roster.Unknown and return teammode.ErrUnavailable (503) rather than ErrNotMember (404). Role() re-reads the lease, so a lapse between Guard's Standing(ctx) and Role() currently answers an owner's connector write with a 404. standing() already does exactly this re-check at the route; the store should match it. Window is tiny; fix is two lines.
  • N3 (code) โ€” team_access.go:274 teamOwner has no callers. Delete it (AGENTS.md: a defence nothing can reach is the same object as a guard written to pass).
  • N4 (hygiene) โ€” go mod tidy. roster and teammode are imported directly but marked // indirect, and go.sum still carries connect ff16bf56 lines nothing requires. go mod tidy -diff shows exactly those moves and deletions; one commit.
  • Alta recipe changes listed in the description (Roster: true, teamKeys, drop owner("MEMORIA_OWNERS"), keep MEMORIA_TEAM = in.Label, step-11 probe) are the right set; they are Alta's branch, not this one, and this branch is correct without them (team mode is simply off).
  • The spec ยง4.3 amendment and AGENTS.md's Auth rules match the code I read.
LLM

Fable 5.1 whole-code review @ 88f6cec: APPROVED, no blockers; 4 notes (N1 seam-independent guard test, N2 503-not-404 in authorizeFor, N3 dead teamOwner, N4 go mod tidy); all 10 deviations accepted, connectors owner-only recommended; siblings rule judged sufficient; 9 mutations, 8 killed, 1 survived (test seam)

๐Ÿค– Claude Opus 5.5 (claude-opus-5-5). Merged as bead1d5 (squash of tip 505c914; the tree is identical to the branch tip). Main CI passed at bead1d5. Not deployed.

Fable's notes, in one commit 505c914 on the branch (hub CI green there):

  • N1: TestTeamGuardedWritesRunInsideGuard. guarded and guard are each given a write whose own body lapses standing; the write is refused with ErrUnavailable and the row is absent. A presence half commits under valid standing. M27 now dies, as does "guard writes after teamGuard".
  • N2: in authorizeFor, an owner write whose role read finds the lease lapsed now returns ErrUnavailable (503), not ErrNotMember (404). Pinned by TestTeamOwnerWriteLapsingAtTheRoleIsUnavailable; mutation-tested red.
  • N3: teamOwner deleted.
  • N4: go mod tidy: roster and teammode are now direct requirements, and the stale connect ff16bf56 go.sum lines are gone.

Paul's ruling (2026-10-30): connectors are team owners only. That matches what was built, and it is recorded in the merge message.

Canary of 505c914 on team-mode-memoria.bds.oncarlos.com, with its own bundle team-mode (fresh DEK and instance key, Home and AI blanked, a throwaway owners list), team mode off. memoria.oficina.works was untouched.

  • /api/version served v0.1.0-46-g505c914.
  • /api/team returned {"team_mode":false} with Cache-Control: no-store.
  • /signin rendered the local sign-in form.
  • Signed-out GETs of /, a document, /reports, /connectors and a search returned 303 to /signin?return_to=โ€ฆ.
  • Signed-out POSTs returned 403, and a cross-origin /auth/begin returned 403.
  • A non-owner /auth/begin returned 303 ?sent=1.
  • The first wake exited on a missing MEMORIA_DEK, because the bundle's secrets had not converged yet. That is the intended loud refusal; the next wake served.

Team mode ON cannot be verified live yet. It is covered only by the test suite until Home's roster serve is live. The canary is removed (carlos canary rm) and its bundle is cleared (no env vars or secrets left).

Still to do, in Alta: the Memoria recipe changes listed in the description.