Repository navigation
Carry a person's Open-shared memory only into turns that carry their authority - #3974
Conversation
…thority In an Open shared conversation, in-process recall disclosed a person's carried memory on any turn that wasn't a bot's work, so a turn nobody started, such as an ambient read that isn't a live mention, could still show it. The memory API, the sharing sources for files and skills, and the security notes already require a turn that carries the person's authority. Recall now uses that same rule, and the context no longer needs a separate bot flag for it. The README's Open line now says the same thing as the security notes.
Both assertions stay; the change brings the net test lines added within the source lines added.
|
@16francej @ReganBell This changes which turns can see a person's Open-shared memory, so we're checking with you before it merges. It's ready at head 21dfdff. What changes: in an Open shared conversation, in-process recall and the memory tool's search now bring in a person's memory only on a turn that carries that person's authority. That's the rule files, skills and the memory API already follow. Until now, recall turned Open sharing on from the posture alone for any automation that wasn't a bot, so a reaction-style turn could show a fact the memory API would have withheld. The person's own messages, scheduled jobs and subagents still see it. The internal There's one point for you in Review points. SECURITY.md lines 105-106 say Open sharing doesn't change automation turns. But a person's own scheduled job already gets Open sharing on main, and it still does here. We left that text for you to word rather than edit your security notes. Two review rows are waived on our side, and each has its reason in the description: "Category gate without census" at 72, with the rows it asked for added to the outcome table, and "Prod-like QA" at 72, after the two subagent cells it asked about ran live on this branch. If you'd rather either stay open, say so. If neither of you objects or asks for changes before 2026-11-30 15:40 UTC (Mon Nov 30, 7:40 AM PT), we'll merge at this head as if approved. The deadline counts 48 working hours and skips Thanksgiving. A push that changes the PR's own diff restarts the clock with a new comment. |
In an Open shared conversation, QM now carries a person's memory into a turn only when that turn carries the person's authority, the same rule files, skills and the memory API already follow.
Why: a turn the person didn't start, such as QM answering their emoji reaction in a channel, could still show memory carried from their own notebook, while that same turn got none of their files or skills.
Nothing to do: a person's own messages in conversations QM can confirm are internal, and their own scheduled fires, keep seeing it.
What changes
resolveTurnContext(src/resolution/turn-context.ts) turns Open disclosure on only when the sharing posture is Open and the turn carries the person's authority. Before, it needed only an Open posture and a turn that wasn't a Slack bot's work.botActorfield had no other use and is gone, with the line that passed it from the orchestrator.Why this should go to main now
In an Open org today, a turn QM starts on its own in a shared conversation, such as its answer to a member's emoji reaction, can quote facts carried from that member's own notebook. The same turn already gets none of their files or skills, and the memory API already refuses it. Every Open org with private channels where QM follows threads has this gap. The fix is one condition plus the removal of a field nothing else used, so a later, cleaner version would look the same.
Review points this PR leaves for later
Turn kinds in the outcome table. The Category gate reviewer asked for outcome-table rows for every turn the new rule changes: groups outside a project, Slack channels opened in web chat, turns with no origin, subagents opened with no computer, private session messages and DM detection turns, plus a note that the memory tool's edit and delete refuse facts a turn no longer sees. The table now lists all of them, and the code is unchanged. Those turns already get none of the person's files or skills, so no risk stands beyond what the table says.
Live runs of subagent turns. The Prod-like QA reviewer asked for live runs of a subagent opened from the member's own message and one opened with no computer. Both ran on this branch: the first showed the carried fact and the second withheld it (see Live QA). Whether a subagent turn carries the person's authority is main's existing delegation check, which this PR doesn't change.
A sentence in SECURITY.md. Lines 105-106 say Open sharing doesn't change automation or ambient turns. A person's own scheduled job already gets Open sharing on main, and still does with this PR. The sentence predates this PR, and this PR makes its "ambient" half true. The security notes are the maintainers' text, so this PR leaves the sentence for them to word: keep it, or narrow it to automation that carries no person's authority.
A person's own message where QM can't confirm the members. In a web or partner-chat group outside a project, or a Slack channel opened in web chat, the person's own message now loses carried memory, because QM can't confirm that every member is internal. Their files and skills already follow that rule on main. If those turns should keep carried memory, the fix belongs in how those surfaces report members, for all three kinds of sharing at once.
Outcome table
What a turn in an Open shared conversation can see of a person's carried memory: facts in that conversation or the person's DM whose source is the person's own notebook or another Open conversation. A conversation's own facts, org facts and team facts don't change.
A turn carries the person's authority when the person started it (their own message, a live message of theirs QM picks up in a shared conversation, their own fire, or a subagent turn whose chain starts with one of those) and QM can confirm that every member of the conversation is internal: a DM, a Slack channel, or a web or partner-chat group tied to a project. File and skill sharing into a turn already follow this rule, so each row that changes below now matches what those turns get of the person's files and skills.
No turn gains access. On a turn that no longer sees a carried fact, the memory tool's edit and delete refuse that fact's id, as they already do for any fact a turn can't see. Nothing is sent differently.
Configuration, schema and prompt
No environment variable, setting, table, persisted shape or prompt changes. The internal
botActorinput toresolveTurnContextis removed; nothing outside the orchestrator passed it.Tests
test/sharing-context-e2e.test.ts: in an Open channel, a memory search on a turn QM starts on its own (an ambient turn that isn't a live message) no longer finds an ordinary fact sourced from the person's notebook. That assertion fails on main, which returns the fact. The other sharing, Open-posture, team and turn-context suites pass, and typecheck, eslint, oxlint and prettier are clean.Live QA
A dev instance of QM on a real Postgres and model with a Slack twin, main against this branch. The org is Open. A private channel's notebook holds a fact whose source is the member's own notebook (sensitivity ordinary) and a control fact whose source is the channel itself.
[no remembered facts match …]for the carried one; QM says it found nothing for itQM's check for whether to answer a reaction declined some reactions on both builds before any memory search ran; those tries are left out above.
Wall of shame review report
Reviewed commit:
21dfdff3ec0fc6a280f580682d8a6bce07c39a05Every lens was read at
b668ada2. This head merges main, which leaves the PR's own added and removed lines unchanged, and folds the bot and ambient assertions into one loop so the test lines fit Over-testing. gstack's review plan ran again over the whole diff at this head and found nothing blocking. Every row carries forward, because the test reshape changes nothing a lens judges. Over-testing is checked by CI.personAuthorityinput thatresolveTurnContextalready receives, the same flagsharingSourcesForTurnchecks, and the redundantbotActorfield is deleted with its only caller, so no helper, flag, setting or layer is added.!botActorcheck and now usespersonAuthorityTurn, the rule file and skill sharing and the memory API already use, with no new branch, string match or exception. Every other place that builds a memory disclosure either uses the same rule or hardcodesopen: false.!botActorrule and now reads the existingpersonAuthorityinput, which already gates file and skill sharing and the memory API. The README Open line now matches SECURITY.md:88, and the test reuses the existing harness.botActorplumbing and reuses the existinginput.personAuthority, so it adds no custom plumbing in place of a library or SDK.personAuthorityalready owns, with nothing new to configure.!botActorrule with the existing typedpersonAuthorityfield and deletes the unusedbotActorinput outright, with no shim, fallback or second path. Nothing persisted changes shape.Agent notes
Plan: exempt: diagnosed fix of a reported inconsistency.
b668ada2: /ship's review plan (a specialist reader and a native adversarial reader), the triaged lens set and live QA. Neither reader marked anything blocking. The adversarial reader left four notes: a fact hidden on a turn without authority is described to the model as consolidated or removed (src/memory/recall-delta.ts:121); the SECURITY.md sentence in Review points; the new assertion covered one turn shape; and turns with no origin lose carried memory, which the outcome table lists.8dc5bb46: one conflict in test/sharing-context-e2e.test.ts, next to the new assertion. Main's line was kept, and the PR's own added and removed lines are unchanged.REVIEW_LOOP: passes=2 blocking_found=0 deferred=0 noted=0 fixed=0 scope=frozen ledgers_read=2
Tests: CI is green at this head apart from this report's check. Locally: test/turn-context.test.ts and test/sharing-context-e2e.test.ts (24 pass on the merge), typecheck, and eslint, oxlint and prettier on the changed test.
Pregate: the test stage is attested by this head's CI run.
Version: none (the repo has no version file).
Documentation exception: accepted by qm minder 2026-11-25 via reply to the documentation-risk question, 2026-11-25 15:03 UTC: qm minder accepts the pre-existing SECURITY.md lines 105-106 as a named documentation risk on #3974. The security-model text belongs to the maintainers, so this PR leaves it unchanged and puts the sentence in Review points for Josh and Regan.
Documentation:
Status: blocked. This branch's own change needed no doc edits, but one sentence in SECURITY.md needs a maintainer's wording decision, so it was left as is.
Scope: the one commit on this branch against its base: README.md, src/core/orchestrator.ts, src/resolution/turn-context.ts and two tests, with nothing staged, unstaged or untracked. The change: in an Open shared conversation, memory recall now shares a person's opted-in memory only on a turn that carries that person's authority, the same rule the sharing sources for files and skills already use. Read in full: README.md, SECURITY.md, AGENTS.md, CONTRIBUTING.md, docs/capability-tokens.md, docs/composio.md, docs/memory-records.md, docs/sandbox-resources.md, docs/session-sharing.md, skills-seed/memory/SKILL.md and skills-seed/hand-off/SKILL.md. Read at the passages on authority, sharing and memory: docs/SPEC.md, docs/memory-providers.md, docs/persistent-subagent-sessions.md, docs/swarms.md and src/resolution/protocols/shared-core.md.
Needs a decision: SECURITY.md says Open "does not change ... automation or ambient turns" (lines 105-106). Since main moved Open from live human turns to turns that carry a person's authority, a person's own cron, loop, webhook or monitor fires do get Open sharing, as README.md, SECURITY.md lines 87-88, docs/capability-tokens.md, docs/composio.md and docs/sandbox-resources.md say. This branch doesn't change that for fires. It removes Open memory from ambient turns and other turns that carry no person's authority, which matches the "ambient" part. Security-model text isn't edited by this audit, so the owner decides: leave it, or narrow it to automation that carries no person's authority.
No new command, flag, setting, endpoint, environment variable or schema. The removed
botActorinput to turn context is internal, and no doc names it.Debt: docs/memory-records.md ("Fresh reads") says an ordinary personal fact can follow its owner into an eligible internal Open room, but doesn't say the turn must carry the owner's authority. That is a reference gap, left for a later doc pass. Unrelated to this branch: 26 of the 42 Markdown docs reviewed for discovery, including docs/composio.md, docs/capability-tokens.md and docs/memory-records.md, aren't linked from README.md or AGENTS.md.
Diagram drift: none. README.md's architecture diagram (Postgres, headless core, per-scope sandbox) names nothing this branch renamed or removed.