oliver-zehentleitner / maity

hub: the roles an outside owner's agent may hold follow the contract

Sign in to report

tsk-mqzhnmf4bak6 Done Maity Coder Claude 007

docs/api.md §6.1-§6.2 (around :7293, :7705-7708 and :8061-8110) say what roles an agent of an outside owner may hold, and what happens when its owner leaves or the policy changes. The code differs in what policy.outside_roles accepts and in the fallback role.

What:

  • Bring policy.OUTSIDE_BASES, the read of outside_roles, and the reconcile and fallback paths in agent_owners.py in line with the contract text, as written today.
  • If part of that text describes something deliberately not built, mark that part "not built yet" instead, and say so in the PR.

Tests: one per rule (accepted roles, read, fallback), each failing with the fix reverted.

Review: two legs.

Notes

  1. Maity Coder Claude 007 · Nov 23, 2026, 20:46 UTC

    Plan (6jrx): build what the contract says for blue-team (closed in outside_roles, dropped on read, an outside owner's blue-team agent falls back to coder in reconcile and at resume, through members.apply_patch, with the owner's notice). Keep reviewer, tester, red-team, purple-team and project roles on reviewer/tester closed and mark them "not built yet" in docs/api.md: the contract's rule that such a role gives an outside owner's agent no done authority is not built (cards.has_done_authority reads only the scopes), and hub/context/isolation.md 382a0e40 relies on those roles staying closed. Boundary, tests and the question for the lead: the go_request to lotse on this card.

  2. Maity Coder Claude 007 · Nov 23, 2026, 20:47 UTC

    Boundary (plan agreed by lotse, seq 206654)

    • In: policy.OUTSIDE_BASES without blue-team, and policy.outside_roles() dropping blue-team on read (the next policy write stores it so); the blue-team → coder fallback in agent_owners.py, run in reconcile (owner leaves, policy change) and at POST /me/resume before the packet, written through members.apply_patch with the hub as actor, plus the owner's personal notice (class info); check_policy not refusing a narrower list for such an agent; the web mock (web/js/api.js) and the settings form's OUTSIDE_BASES; "not built yet" marks in docs/api.md :7293, :8063-8075 and B.1 for the reviewing and testing roles; a Keep the Why entry next to hub/context/isolation.md 382a0e40; a changelog fragment.
    • Out: withholding done authority from an outside owner's agent and opening reviewer, tester, red-team, purple-team and project roles on reviewer/tester (a follow-up card); trust outside joins (OUTSIDE_ROLE_BASES already excludes blue-team); PR 2145's own-approvals gate; any migration (the contract says none).
    • Tests, one per rule, each failing with its fix reverted: a policy PATCH naming blue-team is invalid; a stored list with blue-team reads without it and is stored without it on the next write; reconcile falls a blue-team agent back to coder when its owner leaves and coder is listed (event and notice), and isolates it when coder is not; resume falls it back before the packet; a narrower list is not refused for such an agent; reviewer/tester stay invalid until the follow-up is built.