Repository navigation
fix: avoid resolving prepared chat identity twice - #185661
Conversation
Settle matching prepared route confirmation through its existing canonical location and ordinary replacement. Preserve draft consumption and live title updates without reloading the confirmed session. Release-note context: canonical short chat URLs keep early history and composer readiness while issuing one session resolution. Related: #185454.
|
🦞👀 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 SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex review: needs maintainer review before merge. What this changesThis PR settles confirmed prepared chat routes without reloading the route and resolving the same conversation again. Example: Reload /chat/main/current-title-12345678 and receive matching prepared identity before session resolution completes.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readiness✅ Ready for maintainer review Keep this PR open: it removes a source-confirmed redundant lookup using the existing route owner, with no actionable patch defects found; exact-head CI remains unresolved. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe Control UI route loader combines prepared Gateway identity with authoritative session resolution; the chat page publishes the confirmed location through the router, and shell navigation uses the settled identity for live URL updates. flowchart LR
A[Prepared Gateway identity] --> C[Chat route loader]
B[Session resolution] --> C
C --> D[Chat page]
D --> E[Router replacement]
E --> F[Shell route state]
F --> G[Live title URL updates]
Technical reviewBest possible solution: Keep confirmed identity in the existing route data and publish ordinary replacement while preserving authoritative refresh and reconnect paths. Do we have a high-confidence way to reproduce the issue? Current-main source directly connects same-location confirmation to revalidation and an exact-key lookup, consistent with the reported two-request browser reproduction; this review executed no target code. Is this the best way to solve the issue? The patch is the smallest complete repair: it settles the existing pending route fields and removes the reload, without adding another cache, owner, or API. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against f92b9727b6b7. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +2, Tests +14. Total +16 across 4 files. Added test files: 0. View PR surface stats
LabelsLabel changes:
Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
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 Reviewed October 27, 2026, 4:06 AM ET / 08:06 UTC. |
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
Settle matching prepared route confirmation through its existing canonical location and ordinary replacement. Preserve draft consumption and live title updates without reloading the confirmed session. Release-note context: canonical short chat URLs keep early history and composer readiness while issuing one session resolution. Related: openclaw#185454.
What Problem This Solves
Reloading an already-canonical short chat URL can resolve the same conversation twice after its prepared identity is confirmed.
Related: #185454.
User Impact
Chat keeps its early prepared display, editable draft, and live title/URL updates while avoiding the second session-discovery request. Snapshot verification, reconnect checks, and explicit refresh retain their authoritative lookups.
Why This Change Was Made
The same-URL confirmation introduced in #185454 released pending route state by reloading the route. That issued an exact-key
sessions.resolveafter the short-ID request had already confirmed the same identity. The route owner now changes its existing pending fields into the confirmed location, and the page uses ordinary URL replacement. The router can publish that same-location update without running the loader again. Both immediate and deferred canonicalization preserve consumed drafts.The existing held-response E2E now asserts one resolution after its title, URL, draft, and history checks. Test-only artifacts retain synthetic resolution parameters before assertions fail; no production diagnostic or cache was added.
Evidence
eec9cd2790eshortId, thenreference.key; prior title/URL/draft/history assertions passeduptimeinscripts/perf/local-workspace-manifest-measure.ts; identical base failure one990b80. Owner/package/lock/runner hashes unchanged; config delta adds only unrelated performance entriesSame-machine production builds with identical installed dependencies, prepared plugin inventory and build-input paths (3,562 entries, 3,555 unique):
Startup raw JS is 840,734 B on both sides. The base was rebuilt with the same prepared distributions as the final head after the real-Gateway test prepared additional plugin outputs; earlier unmatched-build receipts are retained but are not used for patch attribution. Both strict absolute and relative checks pass, with no budget changes. No eager import or dependency was added.
This proves removal of one redundant RPC, not a measured latency or CPU improvement. The earlier real-Gateway failure also reproduced on base
e990b80; scheduled main1299676predates #185454 and passed that case. No claim is made that all historical main runs failed.Production LOC: 1,416 → 1,418 (+2). Test LOC: 841 → 855 (+14). Four files, +40/−24 overall. UI appearance is unchanged.
Full CI attribution
CI run 40469618451 completed with 33 successful jobs, 27 skipped, and two failed leaf jobs plus the aggregate.
security-fastpassed. The two failures are retained as failures:Control UI agent config save > recovers failed loads and resumes autosave after reloading a reconnected draft7bf995reproduces the same disabled/aria-busy Reload Config at line 76. Local timeout 10 s versus CI 30 s; functional evidence includes disclosed native-materialization overlap. The test and three config owners are byte-identical to this CI's main parent3939d79.Control UI catalog bootstrap > real chat route recovers current account state after pending snapshot ordering9b7db694through this PR head.No CI rerun or local replay was used to replace either failure. The original auto-merge request was confirmed cancelled after a 502 response; landing uses the documented inherited-failure recovery route.