Repository navigation
feat(session-share): filter shared groups by person - #182286
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
Baseline-Refresh: a63e9bac1fc70712a3ab22ead75a0faf909244ea
|
Codex review: needs maintainer review before merge. What this changesAdds an optional person filter that narrows explicitly shared session groups to canonical owners or direct profile participants. Example: Share the Team group while selecting the person owning agent:main:owner.
Review scores
ProductKind: Feature · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open: it provides a useful, maintainer-approved capability absent from current main, with no actionable findings at the reviewed head. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe source Session Share plugin reads local session and profile state, applies publication filters, and sends read-only catalog metadata and transcripts through a paired node to the receiver Gateway. flowchart LR
A[Source sharing configuration] --> B[Session Share publisher]
C[Session store owner] --> D[Scoped SDK reader]
E[Profile read worker] --> D
D --> B
B --> F[Final disclosure checks]
F --> G[Paired node transport]
G --> H[Receiver catalog]
Technical reviewBest possible solution: Keep person selection in the existing Session Share publisher, using one scoped SDK consumption boundary while preserving group-only sharing. Do we have a high-confidence way to reproduce the issue? This is a feature request; current-main source confirms group-only selection, and supplied receiver output demonstrates the added person-filtered behavior. Is this the best way to solve the issue? The change uses existing session and profile owners, replaces the publisher's previous selection path, and retains the native final guard justified by cross-process writers; the added proof covers distinct disclosure, lifecycle, and upgrade boundaries. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 979c8decf7df. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +260, Tests +1443, Docs +51, Generated 0, Other +342. Total +2096 across 39 files. Added test files: 3. View PR surface stats
Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (3 earlier review cycles)
Reviewed October 27, 2026, 6:59 AM ET / 10:59 UTC (Revision 4). |
Baseline-Refresh: e16d3ca087e1b15f2ab5e8b06f18268f8085ecc1
Baseline-Refresh: 03bc4176ccd81afaa501c9f650502fd9abbfa43c
Baseline-Refresh: 22f5f2a6c52aff4889411810bfba58811f8eae8b
|
@clawsweeper re-review Exact head: |
|
🦞👀 Re-review progress:
|
|
Merged via squash.
|
* feat(session-share): filter shared groups by canonical person * fix(session-share): prepare person selection through the state worker * test(session-share): exercise paired-node disclosure * fix(sessions): simplify async cohort return * docs(config): regenerate session sharing baseline * test(session-share): prove paired disclosure and stable upgrade * test(e2e): select native runtime for sharing upgrade fixture * test(e2e): wait for shipped sharing catalog readiness * test(e2e): own sharing node pairing before catalog reads * docs(config): regenerate composed sharing baseline * docs(config): regenerate successor sharing baseline * test(e2e): bind upgrade sharing reads to fixture store * docs(config): regenerate composed sharing baselines * test(session-share): initialize fresh receiver state
What Problem This Solves
Operators need to share selected session groups with teammates while limiting them to sessions owned by or including one person.
User Impact
share.groupsremains mandatory. Optionalshare.involvingProfileIdnarrows those groups to an exact source-local canonical human owner or direct profile participant, including merged aliases. Mentions, display names, remote attribution, and personal hide/show choices do not qualify. Missing or malformed selections publish nothing; omitting the selector preserves group-only sharing.Restart the source node host after changing plugin configuration. Existing exclusions and receiver access checks remain in force.
Implementation
The source uses one scoped SDK reader for discovery, final selection, and synchronous publication. Fresh profile identity and aliases are prepared through the shared-state worker while the selected session read remains admitted. After the last asynchronous step, final native session reads and synchronous configuration, identity, and local-authority checks guard publication.
This removes the extra host-thread profile query identified in the previous review without weakening the final session guard. Profile data is a fresh as-of snapshot, not a promise to observe a foreign profile commit after that snapshot or an atomic snapshot across separate databases. Group-only sharing avoids participant hydration.
This is the person-selection slice extracted from #156736, following #182242. Vincent Koc's original implementation remains preserved there; Open original remains a separate slice.
Evidence
Exact reviewed and published source:
f7e4f14ee53fb17d2043a3fd1d70999ca832211e, tree24ce272b098108253c3ee11b3d62bc4106b8c659.[email protected]/session-shareupgrade lane all passed. Download the small scenario proof artifact.Person-filtered receiver effects
The separately started receiver Gateway uses the production source dispatcher in the test process. Exact synthetic output from the final-head run:
{"listed":["agent:main:participant","agent:main:owner"],"delivered":[[{"type":"userMessage","text":"Allowed owner transcript"}],[{"type":"userMessage","text":"participant"}]],"rejected":["group-only","mention","unrelated","other-group"]} {"revoked":"group","receiver":"rejected","nodeResults":[false],"heldTranscriptInNodeResult":false} {"revoked":"owner","receiver":"rejected","nodeResults":[false],"heldTranscriptInNodeResult":false}Allowed owner/direct-participant transcripts reach the receiver. Group-only, mention-only, unrelated, and other-group sessions do not. In-flight group revocation and owner reassignment reject the receiver read and keep held transcript bytes out of
node.invoke.result. This test does not claim a separate source-node CLI startup; the upgrade scenario below exercises that path.Shipped group-only upgrade
The hosted workflow built and admitted package SHA-256
e42bb16e676d388a76d40d8542b0b5e40c31eefb60496863989548766ee5aeb7from this exact head. Installed candidate identity independently records commitf7e4f14ee53fb17d2043a3fd1d70999ca832211e, manifest SHA-2567a530f11d0e3576984097f07466db07bebe706e9285c9bfdd6a8a041b93f52b4.The real published baseline
[email protected]was configured with group-only sharing and seeded with Team and Private sessions. Native update succeeded, then immediate inspection preserved configuration, both session identities/categories, and both transcripts. No standalone Doctor or candidate Gateway ran between update and inspection; the updater's own required migration/check phases remained enabled.Recorded first-hop result:
{"stage":"first-hop","baseline":{"version":"2026.10.7","commit":"157d8c2bc3ea2fa183afdc11088e69690bf8e64e","manifestSha256":"362f8c0fda7b71a116e0ca2f812e896bfe9cfec41e64b6b66243f95703aaf7b8"},"candidate":{"version":"2026.10.7","commit":"f7e4f14ee53fb17d2043a3fd1d70999ca832211e","manifestSha256":"7a530f11d0e3576984097f07466db07bebe706e9285c9bfdd6a8a041b93f52b4"},"share":{"groups":["Team"]},"sessions":[{"key":"agent:main:upgrade-shared","category":"Team","text":"Preserved Team transcript","sessionId":"ab7e7070-ab82-4ade-bcdd-dd9d8bb5fbff","transcriptPreserved":true},{"key":"agent:main:upgrade-private","category":"Private","text":"Excluded private transcript","sessionId":"cce0fc1c-7de8-4d24-bb3b-d593c2e2d102","transcriptPreserved":true}],"beforeStandaloneDoctor":true}The phase chain records native update success at 10:41:59.801 UTC, first-hop inspection success at 10:42:04.328, and candidate Gateway startup beginning at 10:42:04.358. The real source-node CLI then paired with the candidate Gateway; recorded receiver result:
{"listed":["agent:main:upgrade-shared"],"delivered":[{"type":"agentMessage","text":"Preserved Team transcript"}],"excluded":"agent:main:upgrade-private"}The scenario and outer Docker summaries both passed: attempt 1, exit 0, 694 seconds, no timeout, cleanup joined. The hosted job and entire workflow also completed successfully. The scenario-specific first-hop JSON above supplies the preservation evidence; the generic
firstHopPostCorediagnostic in the summary is unavailable and is not used as proof.Validation notes
The fresh receiver fixture uses the existing
initializeCurrentRuntimeStateowner. This corrects an earlier fixture-bootstrap timeout without changing the original 180-second timeout, disclosure assertions, production code, or released-upgrade fixture. The repaired final-head run passed. Canonical generation and this one E2E file used the documented local fallback after the owned remote allocation queued and was stopped; normal packaging and the released upgrade ran in hosted CI.Historical evidence remains separate: the earlier
08014ceupgrade scenario passed but its outer Testbox wrapper failed during collection; it is not counted as this head's gate. Earlier declaration, SDK-initialization, and fixture-bootstrap failures are superseded by the successful exact-head runs above. Original0764086Canvas and replaced-file compatibility runs remain historical sibling coverage. An unrelated private-QA declaration-size failure and OpenShell fixture failure are not claimed fixed here.The composition preserves the 39 product paths against frozen baseline
aaa0f434e956cb25684d107a1815535fd6d683f0; generated artifacts were regenerated canonically. One optional config field is added; no existing key is removed. This product delta changes no database schema or protocol version. Production: +384/-119; tests/helpers: +1855/-75; docs/generated: +67/-16. Production growth supplies optional person selection and the scoped read/disclosure owner.Settings surface
Before — selected groups:
After — optional person filter within those groups:
Screenshots use synthetic Gateway data with the schema publisher and settings renderer; execution proof is recorded above.