Repository navigation
fix(seat-decisions): an assignment kind never widens the seat-decision read (#3660) - #3666
Conversation
…n read (#3660) The role card's "Your relationship" line and the seat-decision reader gate both read the seam's optional `kinds_for`. The gate let anyone holding a kind on the agent read every person's seat decisions, so the enterprise provider kept `kinds_for` unregistered, and the card told the agent's primary and approver "no assignment recorded". `readable_seats` now gives the own seat, and every seat to the owner only. A kind is per agent, not per role, so it can no longer open other seats; per-role stakeholder reads stay with #3381. No behaviour change on any current build: the removed branch only switched on through the unregistered `kinds_for`. It lets the provider register `kinds_for` for the card line next. Fixes #3660 Co-Authored-By: Claude Opus 5.5 <[email protected]>
/review + /validate-prVerdict: APPROVE. No critical findings. Merge this first in the 1 → 2 → 3 order. /review (structural)Scope: clean. This is step 1 of 3 (option 1 from the #3660 comment). Execution coverage
Informational
Low confidence: the page tests run with Learnings: #3660's root cause is a new, durable class worth a fragment under /validate-prLane B (no schema), 7 files (+48/−28), 1 commit, head
Next: step 3, the OSS pointer bump, needs its own validation (it touches |
webmixgamer
left a comment
There was a problem hiding this comment.
Approving: no critical findings; the /review + /validate-pr report is in the comment above. Merge order: this PR, then abilityai/trinity-enterprise#884, then the pointer bump. Informational items 1–3 there are non-blocking, though I'd still move Fixes #3660 to the bump PR.
…c1e1) One enterprise commit: Abilityai/trinity-enterprise#884 registers the assignment provider's `kinds_for`, so the Workspace role card's "Your relationship" line names the viewer's kind (primary / approver / collaborator / viewer) instead of "no assignment recorded". Safe on this `dev`: Abilityai#3666 (merged) removed the seat-decision reader gate's kind branch, so registering `kinds_for` widens no read. Related to Abilityai#3660 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Summary
The Workspace role card tells an agent's primary and approver "Your relationship · no assignment recorded" (#3660, found on 1.0 release row A1).
Why: the card's line and the seat-decision reader gate both read the seam's optional
kinds_for. The gate (readable_seats) let anyone holding any kind on the agent read every person's seat decisions. A kind is per agent, not per role, so that is wider than the roster rule (#3381). The enterprise provider therefore keepskinds_forunregistered, and the card line always readsNone.Fix (step 1 of 3 — option 1 on the issue): separate the two.
readable_seatsnow gives the reader's own seat (writable), and every seat to the owner only. An assignment kind no longer widens the read.kinds_forbecomes a display read: it answers the card's relationship line and grants nothing.No behaviour change on any current build. The removed branch only switched on through
kinds_for, which no build registers. This PR is what makes registering it safe.Rollout order
dev).kinds_foron the provider. Merge only after this one; on its own it would switch the old wide read on.dev. This is what makes the line readprimary/approveron a build.Changes
services/seat_decision_service.py:readable_seatsdrops the kind branch; module docstring.services/assignment_provider.py,client_portal/seat_decisions.py: comments say whatkinds_foris now for.tests/unit/test_ent638_seat_decisions.py: the test that asserted "a provider kind reads every seat read-only" is split into the owner case, plus a regression for all four kinds. Each case uses a provider that does answerkinds_for:reader_kindreturns the kind (the card line works), andreadable_seatsis the own seat only, without even listing the other seats.requirements/core-agent.md(Readers),feature-flows/workspace-seat-decisions.md,architecture/workspace.md.What this gives up: the planned (never shipped) "stakeholders read others' seats read-only". Per-role scoping (#3381) is the way to bring it back.
Test plan
devfor all 4 kinds, passes with the fix.4 failed, 48 passed); file restored byte-identical.test_ent638_seat_decisions.py+test_ent527_role_card.py: 78 passed (the card's existingtest_the_relationship_is_the_viewers_assignment_kindstill pins the line whenkinds_foranswers).test_ent465_suggestions,test_ent596_skill_manager,test_ent839_seat_decisions_self_gate,test_ent814_served_seat: 164 passed.sales-companion, whose roster has Leo = primary (head-of-sales), Maya = approver (cfo), Priya = collaborator:GET …/client-portal/agents/sales-companion/role): Leorelationship: "primary", Maya"approver", Priya"collaborator"(RC3: all three "no assignment recorded").seat_decision_service.pyin the same live setup → Maya (approver) reads Leo's and Priya's decisions (writable: false). That's the leak this PR prevents, so the live check does detect it.Fixes #3660
🤖 Generated with Claude Code