Repository navigation
feat(context): enforce explicit context sharing across owners (#53) - #101
Conversation
f87ed85 to
985c82e
Compare
58fdae3 to
775bae1
Compare
|
Review round 1 (independent Verifier) — verdict FAIL at
Gates at |
985c82e to
364e3ba
Compare
775bae1 to
d464235
Compare
|
Rebased onto the #94 tip (
|
|
Review round 3 (final delta) — verdict PASS on
Verdict history: |
|
Design review against the owner's sharing model (per-Bot grants, no publish; a granted Bot is a child Bot that manages only its own downstream; every human in a group can talk to and operate it within that group; Bot Social holds are approved in-chat by the owner only). Read-only review of d464235, no UI run. No conflict in
Follow-ups from #94 (not blockers): |
d464235 to
2657bf8
Compare
|
Review round 4 (independent Verifier, rebase onto main after #94) — verdict PASS on Codex unreachable from this box (Cloudflare 403 on chatgpt.com/backend-api/codex and workspace routing discovery failed) — same blocker as prior Magpie notes. This round is the mechanical delta re-review the round-3 note promised after retarget.
Verdict history: |
On a host with member sessions, a member Bot's group Session began with its owner's own-chat brief whoever else sat in the room, the memory review read every human as 'the user' and could publish team memory from another owner's room, list_bots disclosed other owners' folders and instructions, and a chat reference chip copied any Session's snapshot to every recipient. Now the own-chat brief rides into a room with more than one owner only when the Bot's owner shares it there (share-brief, a per-room briefShared flag on the participant that leaving drops); a review that reads a cross-owner room keeps entries in the Bot's own memory and reads only its own owner as the user; list_bots shows another owner's Bot by name, role and model only; and reference chips in send and room-post must resolve through sessionOwnedBy for the author. Previously received messages are not retroactively unseen; the secrets surface stays blocked-shared. Team mode stays disabled; this is the context half of the authority contract (docs/subsystems/team.md). Fixes #53
2657bf8 to
f1b034c
Compare
|
Follow-up (arch-docs / merge-queue): tip moved Merge-queue run 38778004985 failed arch-docs because the queue squash commit message is built from the PR body (repo setting Fix: updated |
|
Review round 4b (delta) — verdict PASS on
|
Why
On a host with member sessions, private context leaked across owners through four seams: a member Bot's group Session began with its owner's own-chat brief whoever else sat in the room; the memory review read every attributed human as a peer and could publish team memory out of another owner's room (any room admin could, and still can on single-owner rooms);
list_botsdisclosed other owners'workDirand instructions; and adsh-session:reference chip copied any Session's snapshot to every recipient of the message. #53's acceptance: markers in each owner's private context are unreachable from another owner's requests and shared-room context without an explicit authorized share.Stacked on #94 (
fix-52-approval-binding, f87ed85) — this branch bases on it; retarget tomainafter #94 merges. Host mechanism only: the share has no room-UI toggle yet (documented), and previously received messages are not retroactively unseen (the issue says to document exactly that).What
src/host/groups.js): the own-chat brief enters a group Session only for a single-owner room, or where the Bot's owner shared it —share-briefendpoint →rt.setBriefShare(src/host/room-membership.js), abriefSharedflag on the room participant (leaving drops it; owner-checked, not admin-checked). Enforcement off = shipped single-human behavior.src/host/memory.js):isUserLinereads the member Bot's owner as "the user" (retention + read-back anchor) and another owner's human as a named peer;teamAllowedFromrefuses team-scope writes out of a room with more than one owner — entries land in the Bot's own memory.src/host/tools.js):list_botsshows another owner's Bot by name, role, model; its folder and instructions stay private.src/host/channel.js):dsh-session:chips insendandroom-postmust resolve throughsessionOwnedByfor the author (bot/forbiddenotherwise); authz allows the newshare-brieffor any signed-in actor (the owner check is on the record).Fixes #53
Verification (updated: rebase + review round 1)
Tips:
58fdae3(initial, Verifier FAIL on packaging + narrative) →775bae1(current; branch rewritten as ONE commitShare private context across owners only by an explicit share (#53)directly on the rebased #94 tip985c82e, which sits on origin/main1736161).Ran at
775bae1:bot/not-found: Unknown endpoint share-briefon the owner-share and foreign-share tests — so the round-1 "2 passing guards" claim was wrong: the foreign-share guard fails at base too, viabot/not-foundrather thanbot/forbidden); memory 2 fail — the classification test fails on the batch text, and the team-gate test fails with nothing written at all (base never writes b3's MEMORY.md from this fixture), not a cross-owner team write.Round-1 findings → fixes
context-sharing.test.jsjoined topic 0002, patches regenerated in-commit.briefAllowed(groups.js) andteamAllowedFrom(memory.js); a remote participant in an otherwise single-owner room suppresses the brief (new test).Fixes #53
Docs-not-needed: #53 context-sharing narrative lives in docs/subsystems/team.md (Context sharing foundation) with core-host.md cross-ref; merge-queue squash must retain this trailer.