Repository navigation
fix: visible work sessions belong to the requester - #155349
Conversation
Co-authored-by: VACInc <[email protected]>
|
🦞👀 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. |
|
Codex review: needs maintainer review before merge. Reviewed September 22, 2026, 7:08 AM ET / 11:08 UTC (Revision 7). ClawSweeper reviewWhat this changesNew visible work sessions inherit a matching verified human requester’s ownership, preserve existing owners, and report the stored owner in spawn receipts. Merge readiness✅ Ready for maintainer review Keep open: the ownership improvement remains absent from current main, the prior findings are addressed, and no new blocking defect was found. The protected maintainer PR remains a useful landing candidate. Priority: P2 Review scores
Verification
How this fits togetherThe Gateway creates visible work sessions requested by agents running locally or on workers. It records responsibility in SQLite and returns ownership information for receipts and session presentation, while creator identity continues to govern access. flowchart TD
A[Agent requests visible work] --> B[Verify live requester authority]
B --> C[Lock parent and child lifecycle]
C --> D{Requester matches human owner?}
D -->|Yes| E[Select human owner]
D -->|No| F[Select spawning agent]
E --> G[Commit new session and owner]
F --> G
G --> H[Return stored owner receipt]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +189, Tests +479, Docs 0. Total +668 across 29 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep ownership selection in the Gateway creation owner, persist it atomically for new sessions, and preserve creator-based access and existing assignments. Do we have a high-confidence way to reproduce the issue? Not applicable as an established-contract bug: the prior documentation explicitly assigned visible spawns to the agent. Current-main source confirms that behavior; this PR introduces requester-matching ownership inheritance. Is this the best way to solve the issue? Yes. The patch extends the existing creation and ownership writers, uses trusted requester context, and preserves existing assignments without introducing a competing ownership store. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 6b13f55aaf71. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (6 earlier review cycles)
|
Co-authored-by: VACInc <[email protected]>
Co-authored-by: VACInc <[email protected]>
|
@clawsweeper review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Co-authored-by: VACInc <[email protected]>
Co-authored-by: VACInc <[email protected]>
Co-authored-by: VACInc <[email protected]>
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
Co-authored-by: VACInc <[email protected]>
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
* fix(sessions): preserve requester ownership on visible spawns Co-authored-by: VACInc <[email protected]> * docs(sessions): describe inherited visible-session owners Co-authored-by: VACInc <[email protected]> * fix: constrain spawned session ownership Co-authored-by: VACInc <[email protected]> * fix: isolate initial owner persistence Co-authored-by: VACInc <[email protected]> * fix: preserve assignment visibility authorization Co-authored-by: VACInc <[email protected]> * fix: preserve owner labels in spawn receipts Co-authored-by: VACInc <[email protected]> * chore: refresh CI after main repairs Co-authored-by: VACInc <[email protected]> --------- Co-authored-by: roboclaw-bot <[email protected]> Co-authored-by: VACInc <[email protected]>
What Problem This Solves
Fixes visible Team sessions created by
sessions_spawnbeing assigned to the spawning agent even when the verified human requester owns the parent session.User Impact
New visible child sessions inherit human ownership only when the trusted active requester profile matches the parent session's effective human owner. Different owners, unlinked or missing requesters, agent-owned parents, and system-triggered spawns keep the requesting agent as owner. Existing target ownership is never replaced.
Why This Change Was Made
The Gateway now derives ownership from the lifecycle-locked parent, canonicalizes merged profile aliases through the resident profile catalog, and commits the owner atomically with a genuinely new child. The same requester authority crosses local, signed-runtime, and worker-backed spawn paths. Owner reassignment shares the session lifecycle fence, so a queued or revoked caller cannot race child creation. Required-sandbox creator provenance remains intact without masquerading as human ownership.
Evidence
Roboclawlabel.pnpm check:changedpassed on the final candidate, including formatting, line caps, production and test typechecks, lint, dead exports, database guards, import-cycle checks, and policy guards.pnpm docs:check-linkspassed with 14,313 internal links checked and 0 broken links.scoped-cleanafter all actionable findings were repaired.Contributed by: Vito
Work sessions