Skip to content

fix: session groups leak across agents - #142863

Closed
vyctorbrzezowski wants to merge 9 commits into
mainfrom
fix/session-groups-per-agent
Closed

vyctorbrzezowski wants to merge 9 commits into
mainfrom
fix/session-groups-per-agent

Conversation

@vyctorbrzezowski

@vyctorbrzezowski vyctorbrzezowski commented Sep 9, 2026 •

Copy link
Copy Markdown
Member

Current cleanup status — September 23

The agent-owned group migration remains deferred; this PR stays a draft. The earlier replacement-stack list below is historical.


Smaller PR stack — in progress

This combined draft is being split for review; do not merge it as one large PR. The existing branch and contributor history are retained until the replacement stack is verified.

  1. refactor: retain session ownership during post-commit work #153828 — storage commit-continuation foundation (7 files; no schema, Gateway, or UI activation).

  2. refactor: isolate Doctor migration preparation #153848 — Doctor migration preparation (4 files; based on refactor: retain session ownership during post-commit work #153828).

  3. refactor: isolate session mutation preflight #153860 — Gateway mutation preparation (8 files; based on refactor: isolate Doctor migration preparation #153848).

  4. refactor: isolate sidebar group dialogs and child traversal #153870 — sidebar/dialog preparation (4 files; based on refactor: isolate session mutation preflight #153860; 22 hosted browser cases passed).

  5. fix: distinguish session group names from the create action #153883 — Sessions-page/view preparation and strict CI repair (9 files; based on refactor: isolate sidebar group dialogs and child traversal #153870; repaired guards/browser/CI-artifact evidence passed; one Node CI failure remains held).

  6. refactor: isolate mock session-group fixtures #153894 — mock-fixture/catalog-test partition (4 files; based on fix: distinguish session group names from the create action #153883; exact-head CI and 27 hosted browser cases passed).

  7. refactor: prepare legacy session-group source reads #153928 — passive legacy-index/receipt adapter (2 files; based on refactor: isolate mock session-group fixtures #153894; HELD for SQL-boundary and production-consumer repair; no activation).

  8. refactor: centralize session-group defaults replacement #154017 — active defaults-snapshot replacement (2 files, +45/−1; based directly on refactor: isolate mock session-group fixtures #153894, independent of held refactor: prepare legacy session-group source reads #153928; exact-head CI and 22 named hosted regression cases passed).

  9. fix: prevent deleted session groups from reappearing #155288 — retained global registration custody (14 files, +781/−256; based on refactor: centralize session-group defaults replacement #154017; exact-head CI passed, with all 17 named create/category and registration-worker cases executed successfully).

  10. refactor: separate session group membership reads from catalog writes #155306 — active global membership-reader extraction (7 files, +41/−42; based on fix: prevent deleted session groups from reappearing #155288; identical resolver and all current consumers; exact-head hosted CI and all 50 named cases passed, independent P2 review scoped-clean).

The passive inventory and planner drafts remain unpublished until their real activation consumer is present. The remaining core/bundled-web cutover is being reconciled against this stack and current main; dormant code is not an independently landable layer. No scoped behavior is activated by these preparations.

Related: #142226

What Problem This Solves

Fixes: custom session groups appear under other agents, and changing a same-named group can change another agent’s organization.

User Impact

Each agent gets independent group names, defaults, ordering, and mutations, including empty groups and identical names. The Control UI keeps the existing roster layout and personal empty-group visibility choices. Web and native actions retain the agent and connection that initiated them.

Migration: shared state advances from schema 17 to 18; agent-store schema stays at 21. Legacy groups used by several agents become independent catalogs. Empty legacy groups move to the configured default agent. Existing session contents and timestamps are preserved. Doctor backs up and verifies the source before committing catalog data and its receipt; unsafe or incomplete sources are refused rather than treated as empty.

Older Gateways remain usable for chat and ordinary session actions, but native group management—including category changes—requires the agent-scoped capability. Legacy client preferences keep their original destination and stable import receipt across retries; uncertain acknowledgements retain the source without blocking canonical catalog reads.

Why This Change Was Made

The previous hide-empty revision was only a visibility mitigation. This replaces it with one Gateway-owned catalog keyed by agent and name, owner-scoped RPCs and events, and scoped client projections. It removes global catalog writes and client-side member rewrite loops instead of hiding foreign groups. It uses the existing shipped-updater compatibility path; actual upgrade qualification remains a separate gate.

Requested by @vyctorbrzezowski. The original contribution remains credited in this branch’s history; the accepted refactor and landing direction are recorded in the linked work session.

Work sessions

Evidence

Implementation candidate; qualification is still in progress. This is not a merge-ready claim.

  • 354 integrated backend, tool, and protocol tests passed, including ownership isolation and stale-authority rejection.
  • 2,304 web unit cases passed across 122 files. UI production/test type graphs passed; scoped lint reports no errors (four file-length warnings remain).
  • The unchanged paired Control UI performance gate passed: 363,957 bytes startup gzip against the 363,983-byte enforcement limit; CSS growth was zero.
  • 693 Android JVM/Robolectric tests passed across 32 suites, with Kotlin/Java compilation, KSP and formatting. Room’s version-4 schema was generated by KSP. No device/UI or Apple execution is claimed by those tests.
  • Independent P2 reviews found lifecycle and native compatibility gaps. The corrections include deterministic red/green cache and request-admission regressions; native old-Gateway category writes now share the captured capability fence. Apple counterparts still need their actual hosted execution.
  • The earlier dirty-tree updater attempt was refused by the package provenance guard before the published driver ran. It is not migration proof and the guard was not bypassed.

Required before landing: exact-head hosted CI and Apple tests; actual published-driver upgrade cells against the clean candidate; new inspected before/after ownership screenshots delivered in the originating chat and embedded here with verified rendering. The superseded visibility-only screenshots are intentionally not presented as proof of ownership.

@vyctorbrzezowski vyctorbrzezowski self-assigned this Sep 9, 2026
@clawsweeper

clawsweeper Bot commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: ios App: ios app: macos App: macos app: web-ui App: web-ui gateway Gateway runtime commands Command implementations agents Agent runtime and tooling size: XL maintainer Maintainer-authored PR labels Sep 9, 2026
@vyctorbrzezowski
vyctorbrzezowski force-pushed the fix/session-groups-per-agent branch from c4dc4f7 to a2e1158 Compare September 9, 2026 05:55
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 9, 2026
@clawsweeper

clawsweeper Bot commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed September 23, 2026, 2:52 AM ET / 06:52 UTC (Revision 23).

ClawSweeper review

What this changes

The branch gives each agent an independent session-group catalog, migrates existing groups, and updates Gateway, web, and native clients to use agent-scoped operations.

Warning

SQLite table change

This PR modifies persisted SQLite tables in apps/android/app/schemas/ai.openclaw.app.chat.GatewayCacheDatabase/4.json, apps/android/app/src/main/java/ai/openclaw/app/chat/ClientDatabases.kt. Prefer a design that avoids changing persisted SQLite tables. If the change is necessary, verify migration and upgrade compatibility against an existing database before merge.

Merge readiness

⛔ Blocked before merge - 10 items remain

Keep this maintainer-owned draft open under the recorded migration deferral. Current main and the latest release still use a global catalog; the retained cleanup PRs do not replace the ownership fix. Both previous native findings remain unresolved.

Priority: P2
Reviewed head: 44e8239c9ffd3d2bd6bd767bf685d5585c798b53

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) The ownership implementation has useful regression coverage, but two concrete native defects and missing authority/upgrade qualification prevent readiness.
Proof confidence 🦪 silver shellfish (2/6) Needs real behavior proof before merge: Authority-chain proof required: the iOS group-dialog owner needs evidence of allowed final RPC dispatch and zero dispatch after its originating connection or credentials are replaced. Inspected injected-request tests do not exercise that dialog boundary. The MEMBER exemption from unrelated contributor proof remains intact; independently, published-driver and native existing-state migration compatibility are still unqualified. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Patch quality 🦐 gold shrimp (3/6) Security review found an item that needs attention.

Verification

Check Result Evidence
Real behavior Needs proof Needs real behavior proof before merge: Authority-chain proof required: the iOS group-dialog owner needs evidence of allowed final RPC dispatch and zero dispatch after its originating connection or credentials are replaced. Inspected injected-request tests do not exercise that dialog boundary. The MEMBER exemption from unrelated contributor proof remains intact; independently, published-driver and native existing-state migration compatibility are still unqualified. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed 9 items Pinned revision and current disposition: Live GitHub metadata confirms the reviewed head remains 44e8239, open, draft, assigned to vyctorbrzezowski, and not mergeable. The captured September 23 body explicitly defers migration and says not to merge the combined branch. Captured sourceRevision: f7e077763abbd28dde81ad87d5def1c865aedfd71da2b272fa458ab0f8a3317e.
Current main still has global ownership: Group listing has no agent argument, and rename/delete traverse member stores across agents. This does not provide independent same-name catalogs. No verified merged replacement establishes completion of the requested behavior.
Latest release boundary: The supplied latest release, v2026.9.5, also lists groups directly from the global session_groups table without an agent predicate. Its source was read through GitHub because the release blob was unavailable locally.
Findings 2 actionable findings [P2] Capture the iOS group connection lease when opening the dialog
[P2] Read native catalogs independently of pending legacy imports
Security Needs attention Dialog intent can cross authenticated connection replacement: The new group mutation path acquires current connection authority at submission rather than retaining the dialog's originating lease. A same-Gateway reconnect or credential replacement can therefore execute stale intent under replacement credentials; this does not establish a server-side ACL bypass.

How this fits together

Session groups organize conversations and supply defaults for new sessions. The Gateway stores their catalogs, while web and native clients display them and submit group mutations.

flowchart TD
  A[Web and native clients] --> B[Agent-scoped group requests]
  B --> C[Current authority checks]
  C --> D[Gateway group catalog]
  E[Legacy groups and preferences] --> F[Doctor and client imports]
  F --> D
  D --> G[Scoped catalogs and change events]
  G --> A
Loading

Before merge

  • Add real behavior proof - Needs real behavior proof before merge: Authority-chain proof required: the iOS group-dialog owner needs evidence of allowed final RPC dispatch and zero dispatch after its originating connection or credentials are replaced. Inspected injected-request tests do not exercise that dialog boundary. The MEMBER exemption from unrelated contributor proof remains intact; independently, published-driver and native existing-state migration compatibility are still unqualified. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • Capture the iOS group connection lease when opening the dialog (P2) - This prior finding remains. Opening a create/rename/delete dialog captures only the scope and a transport referencing the mutable Gateway session. If that Gateway reconnects or replaces credentials before submission, the scope can match again while this call acquires the replacement connection's lease. The old dialog then dispatches under new connection authority. Retain the originating route lease when opening the dialog and reject it before RPC dispatch if retired.
  • Read native catalogs independently of pending legacy imports (P2) - This prior finding remains. With legacy preferences present, refresh awaits the import acknowledgement before calling listGroups; catching an import error only helps after it settles. A delayed acknowledgement therefore blocks the canonical catalog, and iOS additionally delays its session roster because refreshSessions awaits this refresh first. Android has the same serialization in ChatSessionGroups.refresh. Let catalog/roster reads complete independently while retaining the import's claim, source, and acknowledgement guards.
  • Resolve security concern: Dialog intent can cross authenticated connection replacement - The new group mutation path acquires current connection authority at submission rather than retaining the dialog's originating lease. A same-Gateway reconnect or credential replacement can therefore execute stale intent under replacement credentials; this does not establish a server-side ACL bypass.
  • Resolve merge risk (P1) - Shared schema 18 makes older readers refuse migrated state, while older multi-agent clients lose unscoped group management; fresh-install, published-driver upgrade, and recovery compatibility remain unqualified.
  • Resolve merge risk (P1) - The iOS dialog can acquire replacement connection authority at submission; allowed dispatch and rejection before I/O after connection or credential replacement remain unproven.
  • Resolve merge risk (P1) - Actual Apple execution and inspected ownership before/after screenshots in the originating chat and PR remain outstanding under repository policy.
  • Complete next step (P2) - Honor the recorded migration hold: do not merge this combined draft; review the retained focused cleanups separately.
  • Review config compatibility - Confirm compatibility and upgrade impact for the changed config or default surface before merge.
  • Add data-model compatibility proof - Confirm migration or upgrade compatibility proof before merge.

Findings

  • [P2] Capture the iOS group connection lease when opening the dialog — apps/ios/Sources/Design/CommandCenterTab.swift:1168-1172
  • [P2] Read native catalogs independently of pending legacy imports — apps/ios/Sources/Design/SessionGroupStore.swift:55-61
  • [medium] Dialog intent can cross authenticated connection replacement — apps/ios/Sources/Design/CommandCenterTab.swift:1170
Agent review details

Security

Needs attention: The iOS dialog retains intent across connection replacement without retaining its original authority; no additional supply-chain concern was identified in the inspected changes.

PR surface

PR surface statistics unavailable: the file list is incomplete.

Review metrics

Metric Value Why it matters
Persistence changes Shared schema 17→18; Android cache 3→4; one Apple import migration Gateway and native stored-state contracts require independent upgrade qualification.
Production versus validation growth Production/tooling +2,580 net lines; tests/proof +4,886 net lines Excluding docs and generated schemas, growth serves the stated cross-client ownership cutover, which remains deferred.

Stored data model

Persistent data-model change detected: database schema: apps/android/app/schemas/ai.openclaw.app.chat.GatewayCacheDatabase/4.json, database schema: apps/android/app/src/main/java/ai/openclaw/app/chat/ClientDatabases.kt, migration/backfill/repair: apps/android/app/src/main/java/ai/openclaw/app/chat/ClientDatabases.kt, unknown-data-model-change: apps/android/app/schemas/ai.openclaw.app.chat.GatewayCacheDatabase/4.json, unknown-data-model-change: apps/android/app/src/main/java/ai/openclaw/app/chat/ClientDatabases.kt, unknown-truncated-pull-files. Confirm migration or upgrade compatibility proof before merge.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #142226
Summary: This deferred implementation addresses the canonical agent-owned catalog issue; the cleanup branches cover only narrower parts.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge-risk options

Maintainer options:

  1. Preserve the deferred draft (recommended)
    Honor the recorded migration hold and evaluate the retained focused cleanups independently.
  2. Qualify a focused activation when resumed
    Carry forward the native repairs and establish final-dispatch, existing-state upgrade, and platform evidence before activating agent ownership.

Technical review

Best possible solution:

A future focused cutover should give the existing catalog owner agent-qualified identity, preserve installed state through verified upgrades, and bind every client mutation to its originating live connection.

Do we have a high-confidence way to reproduce the issue?

Yes, from source: current main lists one global catalog, and the linked report supplies a two-agent, same-name reproduction. The remaining PR defects have explicit delayed-dialog and pending-import triggers; no runtime tests were executed in this read-only review.

Is this the best way to solve the issue?

The Gateway-owned agent-qualified catalog is the appropriate repair boundary, but this combined branch is not ready: the native lifecycle defects remain and migration compatibility is unqualified.

Full review comments:

  • [P2] Capture the iOS group connection lease when opening the dialog — apps/ios/Sources/Design/CommandCenterTab.swift:1168-1172
    This prior finding remains. Opening a create/rename/delete dialog captures only the scope and a transport referencing the mutable Gateway session. If that Gateway reconnects or replaces credentials before submission, the scope can match again while this call acquires the replacement connection's lease. The old dialog then dispatches under new connection authority. Retain the originating route lease when opening the dialog and reject it before RPC dispatch if retired.
    Confidence: 0.98
  • [P2] Read native catalogs independently of pending legacy imports — apps/ios/Sources/Design/SessionGroupStore.swift:55-61
    This prior finding remains. With legacy preferences present, refresh awaits the import acknowledgement before calling listGroups; catching an import error only helps after it settles. A delayed acknowledgement therefore blocks the canonical catalog, and iOS additionally delays its session roster because refreshSessions awaits this refresh first. Android has the same serialization in ChatSessionGroups.refresh. Let catalog/roster reads complete independently while retaining the import's claim, source, and acknowledgement guards.
    Confidence: 0.99

Overall correctness: patch is incorrect
Overall confidence: 0.97

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 2e9a2eceb11b.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: This addresses a concrete multi-agent organization defect without evidence of an urgent core outage.
  • merge-risk: 🚨 compatibility: Schema publication and scoped group RPCs change older-reader and older-client behavior without completed upgrade proof.
  • merge-risk: 🚨 session-state: The patch migrates catalogs, defaults, ordering, and native import claims, while pending imports can delay native catalog availability.
  • merge-risk: 🚨 security-boundary: An iOS group dialog can submit using a replacement authenticated connection instead of its originating connection lease.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🦐 gold shrimp.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: Authority-chain proof required: the iOS group-dialog owner needs evidence of allowed final RPC dispatch and zero dispatch after its originating connection or credentials are replaced. Inspected injected-request tests do not exercise that dialog boundary. The MEMBER exemption from unrelated contributor proof remains intact; independently, published-driver and native existing-state migration compatibility are still unqualified. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Evidence

Security concerns:

  • [medium] Dialog intent can cross authenticated connection replacement — apps/ios/Sources/Design/CommandCenterTab.swift:1170
    The new group mutation path acquires current connection authority at submission rather than retaining the dialog's originating lease. A same-Gateway reconnect or credential replacement can therefore execute stale intent under replacement credentials; this does not establish a server-side ACL bypass.
    Confidence: 0.98

What I checked:

  • Pinned revision and current disposition: Live GitHub metadata confirms the reviewed head remains 44e8239, open, draft, assigned to vyctorbrzezowski, and not mergeable. The captured September 23 body explicitly defers migration and says not to merge the combined branch. Captured sourceRevision: f7e077763abbd28dde81ad87d5def1c865aedfd71da2b272fa458ab0f8a3317e. (44e8239c9ffd)
  • Current main still has global ownership: Group listing has no agent argument, and rename/delete traverse member stores across agents. This does not provide independent same-name catalogs. No verified merged replacement establishes completion of the requested behavior. (src/gateway/session-groups.ts, 2e9a2eceb11b)
  • Latest release boundary: The supplied latest release, v2026.9.5, also lists groups directly from the global session_groups table without an agent predicate. Its source was read through GitHub because the release blob was unavailable locally. (src/gateway/session-groups.ts, ec9c1a13db89)
  • Prior iOS finding remains: Dialog opening captures a scope and transport, but submission acquires the route lease anew. IOSGatewayChatTransport resolves that lease from the mutable GatewayNodeSession's current connection. The scope identity contains gateway, agent, mode, and cache generation, not the captured socket or credential generation. (apps/ios/Sources/Design/CommandCenterTab.swift:1170, 44e8239c9ffd)
  • Prior native import finding remains: iOS awaits importLegacyIfNeeded before listGroups, and its Sessions screen awaits group refresh before loading the roster. Android likewise awaits importLegacy before sessions.groups.list. Error handling permits reads after rejection, but does not make reads independent while acknowledgement remains pending. (apps/ios/Sources/Design/SessionGroupStore.swift:56, 44e8239c9ffd)
  • Proof coverage and review continuity: The previous completed review examined this exact head and raised the same two findings. The inspected iOS migration tests use an injected request probe; suspended-acknowledgement cases release it before checking catalog completion. They do not exercise the group dialog through real connection replacement and final RPC dispatch. The captured body explicitly leaves Apple execution, published-driver upgrades, and replacement ownership screenshots unfinished. (apps/ios/Tests/CommandSessionGroupingTests.swift, 44e8239c9ffd)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • vincentkoc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • fuller-stack-dev: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • When resumed, retain the opening iOS dialog lease and demonstrate allowed dispatch plus rejection before I/O after connection or credential replacement.
  • Demonstrate native catalog reads and iOS roster completion while legacy import acknowledgement remains pending.
  • Complete published-driver upgrades, Apple execution, and required ownership screenshots; redact private details and update the PR body for automatic re-review, or ask a maintainer to comment @clawsweeper re-review.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (22 earlier review cycles; latest 8 shown)
  • reviewed 2026-09-20T18:07:58.310Z sha 44e8239 :: needs real behavior proof before merge. :: [P2] Capture the iOS group connection lease when opening the dialog | [P2] Read native catalogs independently of pending legacy imports
  • reviewed 2026-09-20T18:28:28.335Z sha 44e8239 :: needs real behavior proof before merge. :: [P2] Capture the iOS group connection lease when opening the dialog | [P2] Read native catalogs independently of pending legacy imports
  • reviewed 2026-09-20T18:48:01.896Z sha 44e8239 :: needs real behavior proof before merge. :: [P2] Capture the iOS group connection lease when opening the dialog | [P2] Read native catalogs independently of pending legacy imports
  • reviewed 2026-09-20T19:19:33.180Z sha 44e8239 :: needs real behavior proof before merge. :: [P2] Capture the iOS group connection lease when opening the dialog | [P2] Read native catalogs independently of pending legacy imports
  • reviewed 2026-09-20T20:19:43.266Z sha 44e8239 :: needs real behavior proof before merge. :: [P2] Capture the iOS group connection lease when opening the dialog | [P2] Read native catalogs independently of pending legacy imports
  • reviewed 2026-09-20T20:51:56.219Z sha 44e8239 :: needs real behavior proof before merge. :: [P2] Capture the iOS group connection lease when opening the dialog | [P2] Read native catalogs independently of pending legacy imports
  • reviewed 2026-09-22T00:54:51.403Z sha 44e8239 :: needs real behavior proof before merge. :: [P2] Capture the iOS group connection lease when opening the dialog | [P2] Read native catalogs independently of pending legacy imports
  • reviewed 2026-09-22T01:20:17.236Z sha 44e8239 :: needs real behavior proof before merge. :: [P2] Capture the iOS group connection lease when opening the dialog | [P2] Read native catalogs independently of pending legacy imports

@vyctorbrzezowski vyctorbrzezowski removed the app: ios App: ios label Sep 10, 2026
@vyctorbrzezowski

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

At ec3e5abb67263474da643365b8ea7749d3cce502, the draft now contains only the web feature and its server support. All apps/ios/** changes and native macOS/shared chat feature changes have been removed. The generated Swift RPC mirror and the existing schema-version contract/acceptance matrix remain required by the server consistency checks.

Addressing the five pre-merge items in the previous review:

  1. Migration and older clients: retained the approved offline Doctor cutover, source-preserving recovery, and downgrade documentation/tests. The body explicitly states that schema-16 readers refuse migrated state and older multi-agent clients without agentId cannot mutate groups.
  2. Native execution: no Swift execution is claimed. Native group implementation and its validation are deferred under the maintainer's requested web/server scope.
  3. Hide empty groups: removal remains intentional in the approved issue design. Per-agent catalogs retain that agent's empty groups.
  4. Native validation scenarios: fresh/migrated group operations and cached All Sessions with an unavailable catalog remain requirements for the separate native follow-up. They have not been marked passed.
  5. Compatibility: no additional config option or schema change was introduced by this cleanup. The body records the already-approved schema cutover, RPC ownership, and browser preference/cache changes.

The updated Deslop section records the cuts, split candidates and dependencies, and exact validation boundaries: 126 → 104 files, +5,465/-1,778 → +4,504/-1,281 (20.1% fewer changed lines), 328 focused tests plus 15 browser E2E cases passed, and a fresh cleanup-delta autoreview found no actionable P0–P2 findings. No server/web behavior assertions or scenarios were removed. Full check results and remaining proof limits are in the PR body.

This remains a draft. Native/client compatibility readiness requires maintainer judgment before any eventual merge; no merge is requested.

@clawsweeper

clawsweeper Bot commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

@clawsweeper clawsweeper Bot added the proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. label Sep 10, 2026
roboclaw-bot and others added 2 commits September 19, 2026 06:15
Reuse the personal visibility policy without changing SQLite or shared group ownership. Keep explicit visibility choices and team views unchanged.

Co-authored-by: vyctorbrzezowski <[email protected]>
Preserve the original PR commits as history while retaining the reviewed main-based visibility fix. The resulting tree is unchanged from f7234c0; no schema, RPC, or native changes remain in the PR diff.

Co-authored-by: vyctorbrzezowski <[email protected]>
@roboclaw-bot roboclaw-bot changed the title fix: prevent session groups from leaking across agents fix(ui): hide empty groups in agent-filtered sidebars Sep 19, 2026
@roboclaw-bot
roboclaw-bot marked this pull request as ready for review September 19, 2026 06:18
@clawsweeper clawsweeper Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Sep 19, 2026
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 20, 2026
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 20, 2026
@clawsweeper clawsweeper Bot added the merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. label Sep 20, 2026
roboclaw-bot added a commit that referenced this pull request Sep 23, 2026
Related: #142863

Reworked directly on main, replacing the retained foundation from #153828. This no longer depends on the defaults PR or the held migration drafts.

## What Problem This Solves

Fixes deleted groups reappearing when deletion overtakes session creation or category assignment before catalog registration settles.

## User Impact

Group deletion waits for earlier committed session writes and their registration. Bookkeeping failures warn and reload the catalog instead of falsely reporting that an already-saved session write failed. Reassigning the same category can repair missing bookkeeping. Session updates retain their place in the writer queue, and closing a session database no longer hangs behind revoked cleanup waiting for that same writer. Already-admitted writes still settle before close.

The catalog remains global. No agent-owned-group activation, schema change, new configuration, public RPC change, or Gateway deployment is included. Fresh creation remains isolated from unrelated archive-export failures; existing-session and alias adoption retain their historical retry and visible failure behavior. Canonical bytes, retention protection and explicit recovery are preserved.

## Why This Change Was Made

Keep the original physical writer through commit settlement, existing publication and registration, with live authority checked before committing and installing results. Remove late duplicate registration and the redundant replacement wrapper.

Touched durable access now uses the existing history reader, agent executor and shared-state reader. Supported aliases retain canonical replacement and native deletion custody. CI-exposed custom-store and first-creation identity defects are repaired at those existing owners; no parallel registry, writer or archive-retry manager is introduced.

## Evidence

- Actual registered create/patch versus group-delete races demonstrate the original defect and its repair. Proof includes close joining, physical-path/environment changes, transaction/commit revocation, uncertain publication, native rollback and rejected/no-write suppression.
- Unchanged guarded SDK suite: **24/24**. Creation/replacement/archive owners: **36/36**. Registered Gateway race/siblings: **14/14**. Reclamation repair: **73/73**, including the original board and Zalouser failures. These selections overlap earlier proof and are not combined into a larger total.
- Historical adoption-triggered archive retry is restored. Real collision/recovery fixtures verify exact bytes/hash, attempts, retained transcript/metadata, publication ordering and zero host data SQL. Fresh creation and generic recovery controls remain intact.
- Static dependency-cycle and test-inventory defects found by hosted CI are corrected. Architecture checks pass; both original routing suites pass **501/501**.
- Fresh independent review (R3) of the complete revised candidate is **scoped-clean through P2**, with no actionable findings. It reviewed source/evidence, not an independent execution of the tests. The subsequent mechanical removal of an unreachable snapshot wrapper migrated its three test callers to the existing connection-bound kernel; final snapshot/type/lint/export/build checks cover that cutover.

- A subsequent hosted-CI teardown race is repaired: read-admission retirement no longer loses an already-acquired exact lease receipt needed after native exit. A real-worker regression fails on the published predecessor and passes with the base owner and repair; this substitutes one owner, not a full baseline. **109 focused tests pass**, including original failing consumers, with core/test types and typed lint clean. Fresh independent R4 review of this two-file correction is **scoped-clean through P2**; it did not rerun tests.

- The next hosted run exposed replacement callbacks losing their FIFO turn and a planning-close deadlock. Exact database locators now reserve the existing queue before worker-owned schema discovery; revocation removes only pending maintenance admissions. Unchanged original cases reproduce RED and pass after repair. Final-source ownership proof is **93/93**, with production/test types, typed lint, formatting and delta ratchets clean. Independent R5 review of the 11-file correction is **scoped-clean through P2**; tests were not independently rerun by the reviewer. A separate final integration applied the frozen repair to the actual failing CI merge `27bf437c`, including its main-side worker-runtime changes: the original config lane passed **90 files / 1,654 tests in 189.63s**, on Node 24.19.0 with two workers and retries disabled. This is local exact-merge integration, not a substitute for current-head hosted CI.

**Current-head Claw review (c3860f0, September 23 at 16:52 UTC):** no actionable introduced or security defect was found. Its explicit source assessment withdraws the prior generic migration-proof request and confirms no schema, serialized representation, retention-policy or public-RPC change. The generated checklist still repeats that withdrawn request; it is not an unresolved source finding. Existing-state alias, archive-recovery, authority and lease-cleanup evidence above remains applicable. Current-head hosted CI and native merge gates remain required.

**Qualified integration baseline (11cc34f):** production and all source core-test type graphs, revised-candidate typed lint, all three canonical unused-export scans, and canonical build passed. After the final mechanical cutover, creation snapshots passed **13/13**, production/session-test types and two-path typed lint passed, all three unused-export scans reported zero entries, and the final build passed in **225s**. All 48 source hashes stayed unchanged through that baseline qualification and publication. The subsequent seven-line production receipt-lifetime correction and its regression have separate focused qualification above; at that stage the other 46 paths were unchanged. The later FIFO/cancellation correction has separate proof above; no fresh full local build is claimed for it. Current-head hosted CI remains required.

**Retained limitation:** the earlier full-tree core lint scan failed on unchanged `src/cron/service/timer.test.ts` (1,022 counted lines versus its 1,000-line allowance). Its Git blob is identical to the selected main base. No allowance was raised; the full changed-check wrapper is not claimed green. Earlier local proof used Node 26 versus hosted Node 24.19. New FIFO/cancellation reproduction and qualification use verified Node 24.19.0. No live-Gateway, native-platform or published-driver upgrade proof is claimed.

**Unresolved timing evidence:** hosted predecessor CI observed dirty session describe at 124.39ms against its unchanged 100ms assertion (zero transcript reads; 1,995 rows still pending). One original-order attempt stopped earlier in the separate cron process on six real-HTTP delivery cases, including a 120s timeout (1,567 passed); those failures remain unexplained and were not retried. The still-unexercised 89-selector Gateway plan was then run once, with unchanged assertions: describe 32.62ms, dirty describe 15.25ms, zero transcript reads and 1,983 rows pending. The Gateway shard itself was not green: 29 failed, 974 passed, one skipped and two unhandled errors; HTTP cases observed the host secret-egress proxy refusal/502 response rather than their expected local endpoint payload. That transport boundary was not bypassed. The latency case is a non-reproduction, not a timing fix or CI waiver. Local Node 26 differs from hosted Node 24.19; no timing limit was changed.

<details>
<summary>Regression attribution, review dispositions and measured costs</summary>

The custom-store transcript failure came from reinterpreting a prepared physical database as a logical store. Reading its already-resolved owner fixes the producer; transcript guards are unchanged.

The original board deletion failure directly showed an unresolved host shared-state identity versus the worker's first-created physical identity. Restoring only the baseline deletion lookup made the unchanged test pass. The repair publishes first creation through the canonical admission owner before unchanged receipt checks, and settles errors through existing failure/termination handling. This was a narrow counterfactual, not a whole-baseline run. Board 22/22, Zalouser 5/5, reclamation custody 33/33, shared-state lifecycle 11/11 and the extended owner file 2/2 pass.

The earlier Signal-alias P2 was reproduced at the actual admitted entry point and repaired. R2 alleged a newly missing original-snapshot CAS across an asynchronous creation callback. A deterministic comparison with the old entry/projection owners showed the same low-level lost-update behavior in both; newer persisted ownership survived. Normal Gateway create/patch retain the lifecycle fence and caller/session checks. That finding remains disposed as inherited, not claimed fixed; the comparison substituted two owners, not the entire baseline. The earlier archive comparison restored 22 production paths, likewise not a full-baseline run. Revised archive tests fail on the pre-repair candidate and pass after restoring the historical retry.

Measured standalone test commands use the canonical repository runner with `--maxWorkers=1` (direct wrapper when avoiding dependency reconciliation):

- Revised archive file: 8/8, **19.24s wall**, including 2.505s warm worker preparation; canonical/alias adoption 2.368s/2.422s; max RSS 866,692 KiB.
- Earlier reclamation file: 2/2, **38.70s wall**, including 29.43s cold compilation; test bodies total 1.507s. No new test case or worker boot. The 71-case boundary batch took 96.02s.
- Latest reclamation file: 3/3, **33.60s wall**, including 26.148s cold compilation; new real-worker late-receipt regression 966ms. The 106-case sibling/consumer batch took 102.29s. Neither passing uncontrolled replay proves the CI interleaving was fixed; the deterministic RED/base-owner/GREEN regression establishes the repair.
- New queue-cancellation case: changed file **12/12, 31.70s wall**, cold compiler dominated; new case **1ms**. Revised replacement-worker file: **7/7, 22.74s wall**; new unkeyed shared-owner/zero-host-SQL case **1,656ms**. Final 93-case owner batch took **51.99s**. The real worker case proves schema discovery and the no-host-SQL boundary that a mocked publisher cannot. Hosted cost for these new cases is not yet available.
- Creation-worker: 34.01s cold wall, including 18.074s preparation; its three alias cases total 4.011s. Prior unchanged-owner measurements: replacement-worker 14.64s, creation-snapshot 19.97s, create/category 23.58s, patch effects 2.69s, registration 24.10s, catalog 48.41s, create preparation 18.36s, atomic initialization 13.82s.

One counterfactual compiler subprocess exited 139 before tests. One prerequisite retry with supported bounded compiler concurrency completed. That tooling crash remains unexplained, not relabeled as a product failure or claimed fixed. No manual CI reruns, weaker assertions, relaxed limits or modified baselines were used. The isolated exact-merge proof initially lacked workspace-local `quickjs-wasi`/Markdown dependency links; its own frozen install repaired that setup, and the single prerequisite retry passed. Shared candidate dependencies and source were not changed.

55 files, +2,477/−460: production 42 files, +1,151/−331; tests/support 12 files, +1,315/−125; owning documentation 1 file, +11/−4. Growth comes from required worker adaptation, pending-admission cancellation at the existing queue owner, and lifecycle/data-preservation proof—not another queue or presentation-module extraction.

The [failed predecessor run](https://github.com/openclaw/openclaw/actions/runs/35878886549) tested merge 27bf437c (2ab085b plus main 60d25b9). Its sole failed test job first showed three replacement FIFO failures, then a planning-close wait cycle and teardown cascades; this is not attributed to infrastructure or waived. The accepted auto-merge request was explicitly canceled through native recovery before repair. Current-head hosted CI and native replacement recovery remain required.

Historical [CI run 35670778480](https://github.com/openclaw/openclaw/actions/runs/35670778480) qualified the retired stacked head `57fecf53`, not this rewrite. The first rewritten head `92fa7c88` passed its focused local selection/build, then hosted CI exposed the defects repaired here. Neither old head's checks qualify this revision.

</details>

Derived from the work requested by @vyctorbrzezowski; contributor credit is retained.

## Work sessions

- [Original discussion](https://team.openclaw.ai/chat/roboclaw/dashboard/28feaf46-a23c-468e-bfad-ab44a1d5ac7b)
- [Implementation and verification](https://team.openclaw.ai/chat/roboclaw/dashboard/77bcdbfb-d371-44a4-b5fb-71982a391c73)
- [Earlier registration implementation](https://team.openclaw.ai/chat/roboclaw/070c58af)
- [Transcript and archive compatibility repair](https://team.openclaw.ai/chat/roboclaw/~key/subagent/efba26c0-af82-4536-9304-fc99efa8f5d1)
- [Reclamation diagnosis and repair](https://team.openclaw.ai/chat/roboclaw/~key/subagent/b6e66b22-c1f6-4497-9a12-8a90796014e3)
- [Late-lease cleanup repair](https://team.openclaw.ai/chat/roboclaw/~key/subagent/04bbd182-7274-4ed0-b7ac-63095b94a425)
- [FIFO and handle-lifecycle repair and verification](https://team.openclaw.ai/chat/roboclaw/~key/subagent/95ed6726-6bcd-4cf0-88d9-608a6cd292d1)

Co-authored-by: vyctorbrzezowski <[email protected]>
Co-authored-by: steipete <[email protected]>
Co-authored-by: fuller-stack-dev <[email protected]>
Co-authored-by: vincentkoc <[email protected]>
Co-authored-by: shakkernerd <[email protected]>
roboclaw-bot added a commit that referenced this pull request Sep 23, 2026
Related: #142863
Replaces #153883; the original stays open until this fix lands.

## What Problem This Solves

Selecting an existing session group named `__new-group__` opens New Group instead of assigning the session to that group.

## User Impact

All group names behave as data. New Group, ordinary assignment, drag-and-drop and denied-write behavior stay intact. No appearance, permission, schema or RPC changes.

## Why This Change Was Made

Mark the create option explicitly and inspect the selected option rather than reserving a group-name string. Keep the current `category-cell.ts` owner and its existing DOM guard; do not restore the earlier extraction.

The two category tests move out of the oversized view test file without losing assertions, adding a colliding-name case and a positive create-action control. Production shrinks by two lines; three files total, +120/−104.

## Evidence

- On main `764c9331a31`, the real Sessions renderer regression failed for `__new-group__` while two controls passed. With the fix, all three category cases and all 51 remaining view cases pass.
- Per-file `pnpm test <file> --maxWorkers=1`: category suite 2.25s wall (collision 17ms); remaining view suite 2.64s wall. [Hosted CI](https://github.com/openclaw/openclaw/actions/runs/35928486234): category test execution 0.128s (collision 48ms); remaining view tests 1.087s.
- Fresh canonical changed checks passed (format, lint, typegraphs, line/assertion guards and dead exports). Independent P0–P2 review: scoped-clean, no findings. Current-head ClawSweeper review completed with no findings. Exact-head hosted CI remains enforced for landing.
- Behavior-only DOM boundary proof; no live Gateway or screenshot evidence is claimed.

<details>
<summary>Replacement provenance and earlier CI limitation</summary>

The original PR could not be safely rebased through the native ancestry-preserving publisher. Its accepted auto-merge was cancelled through native retained-outcome recovery before this authorized replacement was started from current main. No old receipt or guard was removed.

The old head’s [Node small-18 failure](https://github.com/openclaw/openclaw/actions/runs/35830173387/job/107080979527) reported forced rather than cooperative SIGINT cleanup. Matching-runtime investigation did not reproduce it; that is not a verified fix or proof of flakiness. The older extraction also had a separate Node dispatch failure and 2-byte startup diagnostic. This replacement includes no process-code or budget changes, and neither old passing checks nor nonreproduction qualify its new head. Earlier diagnostics remain in the original PR.

</details>

Continues the work requested by @vyctorbrzezowski, preserving credit to @vyctorbrzezowski, @steipete, @fuller-stack-dev, @vincentkoc and @shakkernerd.

## Work sessions

- [Original discussion](https://team.openclaw.ai/chat/roboclaw/dashboard/28feaf46-a23c-468e-bfad-ab44a1d5ac7b)
- [Implementation and verification](https://team.openclaw.ai/chat/roboclaw/~key/subagent/949fe0ab-0f88-4056-a482-913b7f4974f4)

Co-authored-by: vyctorbrzezowski <[email protected]>
Co-authored-by: steipete <[email protected]>
Co-authored-by: fuller-stack-dev <[email protected]>
Co-authored-by: vincentkoc <[email protected]>
Co-authored-by: shakkernerd <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 24, 2026
Related: openclaw#142863

Reworked directly on main, replacing the retained foundation from openclaw#153828. This no longer depends on the defaults PR or the held migration drafts.

## What Problem This Solves

Fixes deleted groups reappearing when deletion overtakes session creation or category assignment before catalog registration settles.

## User Impact

Group deletion waits for earlier committed session writes and their registration. Bookkeeping failures warn and reload the catalog instead of falsely reporting that an already-saved session write failed. Reassigning the same category can repair missing bookkeeping. Session updates retain their place in the writer queue, and closing a session database no longer hangs behind revoked cleanup waiting for that same writer. Already-admitted writes still settle before close.

The catalog remains global. No agent-owned-group activation, schema change, new configuration, public RPC change, or Gateway deployment is included. Fresh creation remains isolated from unrelated archive-export failures; existing-session and alias adoption retain their historical retry and visible failure behavior. Canonical bytes, retention protection and explicit recovery are preserved.

## Why This Change Was Made

Keep the original physical writer through commit settlement, existing publication and registration, with live authority checked before committing and installing results. Remove late duplicate registration and the redundant replacement wrapper.

Touched durable access now uses the existing history reader, agent executor and shared-state reader. Supported aliases retain canonical replacement and native deletion custody. CI-exposed custom-store and first-creation identity defects are repaired at those existing owners; no parallel registry, writer or archive-retry manager is introduced.

## Evidence

- Actual registered create/patch versus group-delete races demonstrate the original defect and its repair. Proof includes close joining, physical-path/environment changes, transaction/commit revocation, uncertain publication, native rollback and rejected/no-write suppression.
- Unchanged guarded SDK suite: **24/24**. Creation/replacement/archive owners: **36/36**. Registered Gateway race/siblings: **14/14**. Reclamation repair: **73/73**, including the original board and Zalouser failures. These selections overlap earlier proof and are not combined into a larger total.
- Historical adoption-triggered archive retry is restored. Real collision/recovery fixtures verify exact bytes/hash, attempts, retained transcript/metadata, publication ordering and zero host data SQL. Fresh creation and generic recovery controls remain intact.
- Static dependency-cycle and test-inventory defects found by hosted CI are corrected. Architecture checks pass; both original routing suites pass **501/501**.
- Fresh independent review (R3) of the complete revised candidate is **scoped-clean through P2**, with no actionable findings. It reviewed source/evidence, not an independent execution of the tests. The subsequent mechanical removal of an unreachable snapshot wrapper migrated its three test callers to the existing connection-bound kernel; final snapshot/type/lint/export/build checks cover that cutover.

- A subsequent hosted-CI teardown race is repaired: read-admission retirement no longer loses an already-acquired exact lease receipt needed after native exit. A real-worker regression fails on the published predecessor and passes with the base owner and repair; this substitutes one owner, not a full baseline. **109 focused tests pass**, including original failing consumers, with core/test types and typed lint clean. Fresh independent R4 review of this two-file correction is **scoped-clean through P2**; it did not rerun tests.

- The next hosted run exposed replacement callbacks losing their FIFO turn and a planning-close deadlock. Exact database locators now reserve the existing queue before worker-owned schema discovery; revocation removes only pending maintenance admissions. Unchanged original cases reproduce RED and pass after repair. Final-source ownership proof is **93/93**, with production/test types, typed lint, formatting and delta ratchets clean. Independent R5 review of the 11-file correction is **scoped-clean through P2**; tests were not independently rerun by the reviewer. A separate final integration applied the frozen repair to the actual failing CI merge `27bf437c`, including its main-side worker-runtime changes: the original config lane passed **90 files / 1,654 tests in 189.63s**, on Node 24.19.0 with two workers and retries disabled. This is local exact-merge integration, not a substitute for current-head hosted CI.

**Current-head Claw review (c3860f0, September 23 at 16:52 UTC):** no actionable introduced or security defect was found. Its explicit source assessment withdraws the prior generic migration-proof request and confirms no schema, serialized representation, retention-policy or public-RPC change. The generated checklist still repeats that withdrawn request; it is not an unresolved source finding. Existing-state alias, archive-recovery, authority and lease-cleanup evidence above remains applicable. Current-head hosted CI and native merge gates remain required.

**Qualified integration baseline (11cc34f):** production and all source core-test type graphs, revised-candidate typed lint, all three canonical unused-export scans, and canonical build passed. After the final mechanical cutover, creation snapshots passed **13/13**, production/session-test types and two-path typed lint passed, all three unused-export scans reported zero entries, and the final build passed in **225s**. All 48 source hashes stayed unchanged through that baseline qualification and publication. The subsequent seven-line production receipt-lifetime correction and its regression have separate focused qualification above; at that stage the other 46 paths were unchanged. The later FIFO/cancellation correction has separate proof above; no fresh full local build is claimed for it. Current-head hosted CI remains required.

**Retained limitation:** the earlier full-tree core lint scan failed on unchanged `src/cron/service/timer.test.ts` (1,022 counted lines versus its 1,000-line allowance). Its Git blob is identical to the selected main base. No allowance was raised; the full changed-check wrapper is not claimed green. Earlier local proof used Node 26 versus hosted Node 24.19. New FIFO/cancellation reproduction and qualification use verified Node 24.19.0. No live-Gateway, native-platform or published-driver upgrade proof is claimed.

**Unresolved timing evidence:** hosted predecessor CI observed dirty session describe at 124.39ms against its unchanged 100ms assertion (zero transcript reads; 1,995 rows still pending). One original-order attempt stopped earlier in the separate cron process on six real-HTTP delivery cases, including a 120s timeout (1,567 passed); those failures remain unexplained and were not retried. The still-unexercised 89-selector Gateway plan was then run once, with unchanged assertions: describe 32.62ms, dirty describe 15.25ms, zero transcript reads and 1,983 rows pending. The Gateway shard itself was not green: 29 failed, 974 passed, one skipped and two unhandled errors; HTTP cases observed the host secret-egress proxy refusal/502 response rather than their expected local endpoint payload. That transport boundary was not bypassed. The latency case is a non-reproduction, not a timing fix or CI waiver. Local Node 26 differs from hosted Node 24.19; no timing limit was changed.

<details>
<summary>Regression attribution, review dispositions and measured costs</summary>

The custom-store transcript failure came from reinterpreting a prepared physical database as a logical store. Reading its already-resolved owner fixes the producer; transcript guards are unchanged.

The original board deletion failure directly showed an unresolved host shared-state identity versus the worker's first-created physical identity. Restoring only the baseline deletion lookup made the unchanged test pass. The repair publishes first creation through the canonical admission owner before unchanged receipt checks, and settles errors through existing failure/termination handling. This was a narrow counterfactual, not a whole-baseline run. Board 22/22, Zalouser 5/5, reclamation custody 33/33, shared-state lifecycle 11/11 and the extended owner file 2/2 pass.

The earlier Signal-alias P2 was reproduced at the actual admitted entry point and repaired. R2 alleged a newly missing original-snapshot CAS across an asynchronous creation callback. A deterministic comparison with the old entry/projection owners showed the same low-level lost-update behavior in both; newer persisted ownership survived. Normal Gateway create/patch retain the lifecycle fence and caller/session checks. That finding remains disposed as inherited, not claimed fixed; the comparison substituted two owners, not the entire baseline. The earlier archive comparison restored 22 production paths, likewise not a full-baseline run. Revised archive tests fail on the pre-repair candidate and pass after restoring the historical retry.

Measured standalone test commands use the canonical repository runner with `--maxWorkers=1` (direct wrapper when avoiding dependency reconciliation):

- Revised archive file: 8/8, **19.24s wall**, including 2.505s warm worker preparation; canonical/alias adoption 2.368s/2.422s; max RSS 866,692 KiB.
- Earlier reclamation file: 2/2, **38.70s wall**, including 29.43s cold compilation; test bodies total 1.507s. No new test case or worker boot. The 71-case boundary batch took 96.02s.
- Latest reclamation file: 3/3, **33.60s wall**, including 26.148s cold compilation; new real-worker late-receipt regression 966ms. The 106-case sibling/consumer batch took 102.29s. Neither passing uncontrolled replay proves the CI interleaving was fixed; the deterministic RED/base-owner/GREEN regression establishes the repair.
- New queue-cancellation case: changed file **12/12, 31.70s wall**, cold compiler dominated; new case **1ms**. Revised replacement-worker file: **7/7, 22.74s wall**; new unkeyed shared-owner/zero-host-SQL case **1,656ms**. Final 93-case owner batch took **51.99s**. The real worker case proves schema discovery and the no-host-SQL boundary that a mocked publisher cannot. Hosted cost for these new cases is not yet available.
- Creation-worker: 34.01s cold wall, including 18.074s preparation; its three alias cases total 4.011s. Prior unchanged-owner measurements: replacement-worker 14.64s, creation-snapshot 19.97s, create/category 23.58s, patch effects 2.69s, registration 24.10s, catalog 48.41s, create preparation 18.36s, atomic initialization 13.82s.

One counterfactual compiler subprocess exited 139 before tests. One prerequisite retry with supported bounded compiler concurrency completed. That tooling crash remains unexplained, not relabeled as a product failure or claimed fixed. No manual CI reruns, weaker assertions, relaxed limits or modified baselines were used. The isolated exact-merge proof initially lacked workspace-local `quickjs-wasi`/Markdown dependency links; its own frozen install repaired that setup, and the single prerequisite retry passed. Shared candidate dependencies and source were not changed.

55 files, +2,477/−460: production 42 files, +1,151/−331; tests/support 12 files, +1,315/−125; owning documentation 1 file, +11/−4. Growth comes from required worker adaptation, pending-admission cancellation at the existing queue owner, and lifecycle/data-preservation proof—not another queue or presentation-module extraction.

The [failed predecessor run](https://github.com/openclaw/openclaw/actions/runs/35878886549) tested merge 27bf437c (2ab085b plus main fe14430). Its sole failed test job first showed three replacement FIFO failures, then a planning-close wait cycle and teardown cascades; this is not attributed to infrastructure or waived. The accepted auto-merge request was explicitly canceled through native recovery before repair. Current-head hosted CI and native replacement recovery remain required.

Historical [CI run 35670778480](https://github.com/openclaw/openclaw/actions/runs/35670778480) qualified the retired stacked head `57fecf53`, not this rewrite. The first rewritten head `92fa7c88` passed its focused local selection/build, then hosted CI exposed the defects repaired here. Neither old head's checks qualify this revision.

</details>

Derived from the work requested by @vyctorbrzezowski; contributor credit is retained.

## Work sessions

- [Original discussion](https://team.openclaw.ai/chat/roboclaw/dashboard/28feaf46-a23c-468e-bfad-ab44a1d5ac7b)
- [Implementation and verification](https://team.openclaw.ai/chat/roboclaw/dashboard/77bcdbfb-d371-44a4-b5fb-71982a391c73)
- [Earlier registration implementation](https://team.openclaw.ai/chat/roboclaw/070c58af)
- [Transcript and archive compatibility repair](https://team.openclaw.ai/chat/roboclaw/~key/subagent/efba26c0-af82-4536-9304-fc99efa8f5d1)
- [Reclamation diagnosis and repair](https://team.openclaw.ai/chat/roboclaw/~key/subagent/b6e66b22-c1f6-4497-9a12-8a90796014e3)
- [Late-lease cleanup repair](https://team.openclaw.ai/chat/roboclaw/~key/subagent/04bbd182-7274-4ed0-b7ac-63095b94a425)
- [FIFO and handle-lifecycle repair and verification](https://team.openclaw.ai/chat/roboclaw/~key/subagent/95ed6726-6bcd-4cf0-88d9-608a6cd292d1)

Co-authored-by: vyctorbrzezowski <[email protected]>
Co-authored-by: steipete <[email protected]>
Co-authored-by: fuller-stack-dev <[email protected]>
Co-authored-by: vincentkoc <[email protected]>
Co-authored-by: shakkernerd <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 24, 2026
Related: openclaw#142863
Replaces openclaw#153883; the original stays open until this fix lands.

## What Problem This Solves

Selecting an existing session group named `__new-group__` opens New Group instead of assigning the session to that group.

## User Impact

All group names behave as data. New Group, ordinary assignment, drag-and-drop and denied-write behavior stay intact. No appearance, permission, schema or RPC changes.

## Why This Change Was Made

Mark the create option explicitly and inspect the selected option rather than reserving a group-name string. Keep the current `category-cell.ts` owner and its existing DOM guard; do not restore the earlier extraction.

The two category tests move out of the oversized view test file without losing assertions, adding a colliding-name case and a positive create-action control. Production shrinks by two lines; three files total, +120/−104.

## Evidence

- On main `2503f1b799d`, the real Sessions renderer regression failed for `__new-group__` while two controls passed. With the fix, all three category cases and all 51 remaining view cases pass.
- Per-file `pnpm test <file> --maxWorkers=1`: category suite 2.25s wall (collision 17ms); remaining view suite 2.64s wall. [Hosted CI](https://github.com/openclaw/openclaw/actions/runs/35928486234): category test execution 0.128s (collision 48ms); remaining view tests 1.087s.
- Fresh canonical changed checks passed (format, lint, typegraphs, line/assertion guards and dead exports). Independent P0–P2 review: scoped-clean, no findings. Current-head ClawSweeper review completed with no findings. Exact-head hosted CI remains enforced for landing.
- Behavior-only DOM boundary proof; no live Gateway or screenshot evidence is claimed.

<details>
<summary>Replacement provenance and earlier CI limitation</summary>

The original PR could not be safely rebased through the native ancestry-preserving publisher. Its accepted auto-merge was cancelled through native retained-outcome recovery before this authorized replacement was started from current main. No old receipt or guard was removed.

The old head’s [Node small-18 failure](https://github.com/openclaw/openclaw/actions/runs/35830173387/job/107080979527) reported forced rather than cooperative SIGINT cleanup. Matching-runtime investigation did not reproduce it; that is not a verified fix or proof of flakiness. The older extraction also had a separate Node dispatch failure and 2-byte startup diagnostic. This replacement includes no process-code or budget changes, and neither old passing checks nor nonreproduction qualify its new head. Earlier diagnostics remain in the original PR.

</details>

Continues the work requested by @vyctorbrzezowski, preserving credit to @vyctorbrzezowski, @steipete, @fuller-stack-dev, @vincentkoc and @shakkernerd.

## Work sessions

- [Original discussion](https://team.openclaw.ai/chat/roboclaw/dashboard/28feaf46-a23c-468e-bfad-ab44a1d5ac7b)
- [Implementation and verification](https://team.openclaw.ai/chat/roboclaw/~key/subagent/949fe0ab-0f88-4056-a482-913b7f4974f4)

Co-authored-by: vyctorbrzezowski <[email protected]>
Co-authored-by: steipete <[email protected]>
Co-authored-by: fuller-stack-dev <[email protected]>
Co-authored-by: vincentkoc <[email protected]>
Co-authored-by: shakkernerd <[email protected]>
@RomneyDa
RomneyDa deleted the fix/session-groups-per-agent branch October 22, 2026 05:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling app: android App: android app: ios App: ios app: macos App: macos app: web-ui App: web-ui commands Command implementations docker Docker and sandbox tooling docs Improvements or additions to documentation gateway Gateway runtime maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. P2 Normal backlog priority with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. scripts Repository scripts size: XL status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants