Repository navigation
refactor: consolidate session title request ownership - #153871
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. |
|
Codex review: blocked before merge. Reviewed September 20, 2026, 5:15 PM ET / 21:15 UTC (Revision 4). ClawSweeper reviewWhat this changesCentralizes session-title request settlement and cancellation, shares discussion request handling, corrects fallback-name documentation, and repairs test-fixture preparation and cleanup. Merge readiness⛔ Blocked before merge - 1 item remains Keep open as useful, distinct work with no blocking findings. The earlier migration concern does not apply to the introduced changes. Priority: P3 Review scores
Verification
How this fits togetherThe Gateway generates session names for chat, worktree creation, and discussion opening. Shared naming work feeds guarded session updates while callers retain bounded waits. flowchart TD
A[Chat and worktree requests] --> C[Shared title request owner]
B[Discussion opening] --> C
C --> D[Model title or fallback name]
C --> E[Cancellation and cleanup owner]
D --> F[Current session and source checks]
F --> G[Saved title and change notification]
B --> H[Discussion provider]
Before merge
Agent review detailsSecurityNone. PR surfaceSource -103, Tests -2, Docs 0. Total -105 across 8 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Keep title settlement and cancellation with their existing lifecycle owners while preserving saved names, final-write guards, and caller wait budgets. Do we have a high-confidence way to reproduce the issue? Not applicable to the primary refactor. The captured body documents fixture-failure reproductions; this read-only review inspected source and existing coverage without executing tests. Is this the best way to solve the issue? Yes. Reusing the existing lifecycle owner removes duplicate settlement logic while retaining the persistence boundary and existing caller contracts. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 6b1495903b21. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
65c3ad0 to
101dbcd
Compare
Follow up #153455 by centralizing joined title settlement and retries, reusing the async-resource owner for failure cleanup, and sharing discussion RPC handling. Preserve generated titles, two-word fallbacks, bounded waits, and source authority. Remove 103 net production lines.
The full Gateway agent suite reproduced a native-child RPC rejection because a preceding plugin fixture removed its database while an asynchronous worker was opening it. Reuse the canonical test-state fixture for the two leaking cases. Keep assertions, test order, timeouts, and production identity checks unchanged; the exact-merge Linux replay now passes 352 tests with no identity rejection.
Use the extracted codec in the task-identifier regression without restoring a competing re-export. Incorporates the matching correction from #154048. Co-authored-by: VACInc <[email protected]>
101dbcd to
731c3fc
Compare
|
Merged via squash.
|
* refactor: consolidate session title request ownership Follow up openclaw#153455 by centralizing joined title settlement and retries, reusing the async-resource owner for failure cleanup, and sharing discussion RPC handling. Preserve generated titles, two-word fallbacks, bounded waits, and source authority. Remove 103 net production lines. * test: retain subagent fixture state through cleanup The full Gateway agent suite reproduced a native-child RPC rejection because a preceding plugin fixture removed its database while an asynchronous worker was opening it. Reuse the canonical test-state fixture for the two leaking cases. Keep assertions, test order, timeouts, and production identity checks unchanged; the exact-merge Linux replay now passes 352 tests with no identity rejection. * test: prepare checkpoint history before the attempt deadline * test: bind ACP fixture cleanup to its state directory * test: import subagent bindings from their codec owner Use the extracted codec in the task-identifier regression without restoring a competing re-export. Incorporates the matching correction from openclaw#154048. Co-authored-by: VACInc <[email protected]> --------- Co-authored-by: VACInc <[email protected]>
Related: #153455, #154048
What Problem This Solves
The session-naming fix still spread request settlement and cleanup across callers, making late completion and cancellation harder to maintain. This consolidates that ownership and removes 103 net production lines.
User Impact
No user-visible or configuration change: generated titles, two-word fallback names, manual names, and existing Git branches keep their behavior. Worktree and discussion waits remain bounded without canceling shared naming.
Why This Change Was Made
The naming owner handles joins and the single dashboard retry; only the writer reports persistence. The existing async-resource owner cancels and drains failed naming work, replacing a separate scope and abort-listener implementation. Discussion info/open share validation and provider error handling.
CI also exposed fixture problems. Two Gateway fixtures now use canonical state cleanup, with the ACP fixture passing its state directory to the existing child-lifetime owner. The Codex checkpoint fixture prepares its existing history reader before starting the timed attempt. Assertions and deadlines are unchanged. A stale migration-test import now uses the extracted codec owner; thanks @VACInc for the matching correction in #154048.
No schema, database version, saved session shape, or wire protocol changes. The title persistence/source-guard block is unchanged and still writes only
displayName; the replaced result union and cancellation option are process-local. Source authority is reacquired before persistence. Existing saved names need no migration.Evidence