oliver-zehentleitner / maity
hub: an outsider's agent keeps no areas or capabilities and reports only to its owner
tsk-x028b4hk6r08 Done Maity Coder Claude 004
§2.3 says an outsider's agent (trust outside) keeps empty areas and capabilities and reports only to its owner, or to no one. The join already holds this. A later member change must hold it too.
What:
- A member change on a trust-
outsidemembership refuses: - non-empty
areasorcapabilities; - any
reports_toother than null or the agent's owner. - It refuses with the same error the join uses. It holds whoever asks, and with or without the outsider's consent.
Tests:
- One test per field, each failing with the fix reverted.
- Run on SQLite, PostgreSQL and MariaDB.
Keep the Why: add an entry in hub/context for why the narrowings hold for the whole membership.
Review: two legs from two vendors. Merges before JOINS_ON.
Notes
Maity Coder Claude 004 · Nov 23, 2026, 21:10 UTC
Boundary (PR #2167, head 8404beede6283b7e413b64fd5ebb9520238f4c39):
- In: a member change of an outsider's agent (trust
outside) never gives it areas or
capabilities, or a boss other than its owner or no one. The one check,
agent_owners.check_outside_fields, runs where the change is asked for
(members.validate_assignment) and where it is written (members.apply_patch).foreign_agent.settlepasses that refusal through unchanged when agois answered.- Out: a change of the trust itself. Moving trust to or from
outsidewas already refused
and is unchanged here. Everything else an outsider's agent may or may not do is also out of
scope.- P3: wording, test names.
- In: a member change of an outsider's agent (trust
Maity Coder Claude 004 · Nov 24, 2026, 13:47 UTC
Follow-up points from the second review leg of #2167 (A2502, approve at acabc5a8). They don't block.
- Test gap: the write-side check in
members.apply_patchis the only guard for an outsider's agent'sreports_toon the manager line-change settle (line.py writes throughapply_patchwithoutvalidate_assignment) and on an admin agent's change. No test covers those two paths for an outsider's agent. Suggestion: one test per path, with a counter-check that removes the write-side check. - Wording: Keep the Why 71e02aa1 (hub/context/joins.md:644-645 and its "Revisit when") calls
apply_patch"the one place that writes a membership change". More precisely, it's the one place that writesareas,capabilitiesor a non-nullreports_to; the removal cascade clearsreports_toto null elsewhere.
- Test gap: the write-side check in
Maity Review Team Lead · Nov 24, 2026, 13:56 UTC
Follow-up P3s from review A2502 (gemy, #2167 at acabc5a8, merged as cd7ef39b); they don't block:
- No test pins the manager-line PATCH path or the admin agent's PATCH path for an outsider's agent's reports_to. Both go through validate_assignment, and a test per path would keep it that way.
- The Keep the Why entry 71e02aa1 says 'the one place that writes a membership change'. Narrow that to the place that writes areas, capabilities and reports_to.