Repository navigation
refactor: separate session group membership reads from catalog writes - #155306
roboclaw-bot wants to merge 1 commit into
Conversation
Move the existing metadata-only resolver and all active consumers to one reader owner without changing global catalog behavior or authorization. Co-authored-by: vyctorbrzezowski <[email protected]> Co-authored-by: fuller-stack-dev <[email protected]> Co-authored-by: steipete <[email protected]> Co-authored-by: vincentkoc <[email protected]> Co-authored-by: shakkernerd <[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 21, 2026, 9:37 PM ET / September 22, 2026, 01:37 UTC. ClawSweeper reviewWhat this changesSeparates session-group membership discovery from catalog writes and updates all existing consumers and test imports without changing user-visible behavior. Merge readiness✅ Ready for maintainer review Keep open: this is a coherent, behavior-preserving extraction within the requested session-group stack. No introduced correctness defect was found, and current main still contains the combined implementation. Priority: P3 Review scores
Verification
How this fits togetherThe Gateway discovers group membership from session category metadata across agent stores. Authorization checks and catalog mutations consume those membership results to select and validate affected sessions. flowchart TD
A[Agent configuration] --> C[Membership reader]
B[Session category metadata] --> C
C --> D[Group member targets]
D --> E[Authorization checks]
D --> F[Catalog mutations]
E --> G[Permitted group operations]
F --> G
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource -3, Tests +2. Total -1 across 7 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep one metadata-only membership reader shared by the existing authorization and catalog owners, with migration activation qualified separately. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR proposes an internal extraction, and no introduced failing behavior was identified. Is this the best way to solve the issue? Yes: moving the unchanged resolver and every consumer together establishes a single reader owner without a compatibility facade or duplicate implementation. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 4311a4ecdf96. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
Related: #142863
Stack: follows #155288 (
openclaw/session-groups-active-registration-custody). The passive migration drafts remain separate and held.What Problem This Solves
Group membership discovery is mixed into the catalog writer and reused by authorization and mutations, making the ownership migration harder to review.
User Impact
No user-visible change. The global catalog, member selection, permission checks, defaults, ordering, and registration custody remain unchanged. This does not activate agent-owned groups or change state schema 17.
Why This Change Was Made
Move the existing metadata-only membership resolver into one reader module and switch all four production consumers together, preserving their six call points. The complete function signature/body is byte-identical, including the environment, physical store agent IDs, iteration order,
projection: "list", andclone: false. Remove its old export rather than adding a facade. Only the existing resolver test mock changes module ownership.Evidence
The first candidate invocation executed no tests because source-shaped proof copies were created during compilation. Those copies were changed to text artifacts after the checks stopped; the compiler guard was left intact. A fresh invocation with a frozen topology produced the 50 passing candidate cases above. The failed receipt remains retained.
Exact-head hosted CI passed. Run 35672510491, attempt 1 completed successfully on
0a5db52f064b1e9dbdd6992c3baf5bd0fc8d30f9: 146 successful jobs and 17 skipped, none failed or pending. Skips are not execution proof. The tested mergec2229aeac659d87d6e00aa1da9fefc660cdcce6ehas the exact declared base/head parents and matching tree3fec3d9dfc0e4afeb9e75720f26daf4161c9dcdd.All 50 named cases matched individual hosted passing log records: member reader — 3, catalog and registration — 26 + 5, group RPCs — 9, and sharing authorization — 7. Production/test types, production/full-tree dead-code checks, runtime/static cycles and relevant source/lint guards passed. The committed-source trace confirms one resolver, four production importers and six call points, with no old export/facade.
Browser/E2E, native, QA/Docker and compatibility jobs among the 17 skips remain unexecuted proof. The build-artifacts job succeeded, but installation/upgrade behavior was not independently qualified. No broader live-Gateway/native/upgrade claim follows; activation and predecessor qualification gaps remain open.
Extracted from the work requested by @vyctorbrzezowski. Original contributor history remains preserved while the smaller stack is prepared.
Work sessions