Repository navigation
test(gateway): match concurrent session title recovery - #170890
Merged
Merged
Conversation
Observe title generation while the reply is still running and preserve the post-turn retry expectation when both generation attempts fail. Keep the branch, fallback naming, and delayed-title persistence assertions intact.
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. |
Contributor
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. |
Linux2010
added a commit
to Linux2010/openclaw
that referenced
this pull request
Oct 13, 2026
… fix/167365-effective-tool-inventory
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Oct 14, 2026
## What Problem This Solves The two background title-recovery cases still expected title generation to wait for reply completion. Commit `02a0d2450dc458efd3f80cde982785b5cbd912da` (openclaw#170794) intentionally starts naming alongside worktree and reply preparation, with one retry after the overlapping turn settles. Both cases therefore fail as soon as they observe the legitimate first call. Use the existing title-start signal to verify that first attempt while dispatch remains held. The generator-error fixture now rejects both attempts and expects two calls; the delayed-success fixture still expects one. The assertions for stable worktree branches, no premature display name, late title persistence, and fallback slug remain intact, as do cleanup and timing budgets. This is a test-only correction (+4/−4 lines); production behavior, SQL statements/requests, and main-thread SQLite (T1) are unchanged. ## Evidence Scheduled [run 38371740449, large15 job 115210402491](https://github.com/openclaw/openclaw/actions/runs/38371740449/job/115210402491) failed on head `ef293ea529c1a0c2df2feda94ca8096fb5028218` at the obsolete zero-call assertion in `src/gateway/server.sessions.create.titles.test.ts:319`: - `sessions.create preserves background title recovery after generator error` — 6.628 s; received one call before dispatch completed. - `sessions.create preserves background title recovery after delayed title` — 5.249 s; same assertion and observed call. The old ordering assertion originated in `47690293a683ec6f6b7a8aba94ea6cd368ab56d2` (openclaw#169136). The parent-relative patch for openclaw#170794 removes the first-progress/finish gate, schedules naming immediately, and retains the turn promise as the retry signal. The production owner and session documentation agree on this contract; existing dispatch and title-owner tests cover retry-after-turn and exhausted fallback. The failing test and affected owners are unchanged between the failing head and candidate base `e1d88bce4ac5d2c81ff503871be418f5a1dc42c2`. Changed-file formatting (0.551 s), lint (8.803 s), and `git diff --check` (2.020 s) passed. One Codex review completed with no actionable findings (`scoped-clean`). Normal commit hooks passed. The committed patch is byte-identical to the reviewed patch. [Ordinary PR CI 38375413292](https://github.com/openclaw/openclaw/actions/runs/38375413292/job/115223087521) on candidate `55418e4dd417403d7726fd93531dcc4f2e426c7c` passed all eight tests in `server.sessions.create.titles.test.ts` in 66.96 s (69.19 s command wall time). The original generator-error and delayed-title cases passed in 2.738 s and 2.226 s. All selected type, lint, architecture, ratchet, security, and aggregate gates passed (47 successful checks, 61 unselected/skipped, one neutral advisory result). No local test runtime is claimed. No product checks were removed, no schema or lifecycle code changed, and no SQL/T1 or update-cell measurement is applicable to this test-only change.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Problem This Solves
The two background title-recovery cases still expected title generation to wait for reply completion. Commit
82acd0a1c02ab215314a7a45b84589c0677026a9(#170794) intentionally starts naming alongside worktree and reply preparation, with one retry after the overlapping turn settles. Both cases therefore fail as soon as they observe the legitimate first call.Use the existing title-start signal to verify that first attempt while dispatch remains held. The generator-error fixture now rejects both attempts and expects two calls; the delayed-success fixture still expects one. The assertions for stable worktree branches, no premature display name, late title persistence, and fallback slug remain intact, as do cleanup and timing budgets. This is a test-only correction (+4/−4 lines); production behavior, SQL statements/requests, and main-thread SQLite (T1) are unchanged.
Evidence
Scheduled run 38371740449, large15 job 115210402491 failed on head
4dd4b8ef9c8fd0c8dd9286f70f98b0842efca758at the obsolete zero-call assertion insrc/gateway/server.sessions.create.titles.test.ts:319:sessions.create preserves background title recovery after generator error— 6.628 s; received one call before dispatch completed.sessions.create preserves background title recovery after delayed title— 5.249 s; same assertion and observed call.The old ordering assertion originated in
325c56d230bcc91a9fe079e31d885c1e3f26cc6e(#169136). The parent-relative patch for #170794 removes the first-progress/finish gate, schedules naming immediately, and retains the turn promise as the retry signal. The production owner and session documentation agree on this contract; existing dispatch and title-owner tests cover retry-after-turn and exhausted fallback. The failing test and affected owners are unchanged between the failing head and candidate basec86d3033301f51b7b53637c035e3476faa56fdef.Changed-file formatting (0.551 s), lint (8.803 s), and
git diff --check(2.020 s) passed. One Codex review completed with no actionable findings (scoped-clean). Normal commit hooks passed. The committed patch is byte-identical to the reviewed patch. Ordinary PR CI 38375413292 on candidate55418e4dd417403d7726fd93531dcc4f2e426c7cpassed all eight tests inserver.sessions.create.titles.test.tsin 66.96 s (69.19 s command wall time). The original generator-error and delayed-title cases passed in 2.738 s and 2.226 s. All selected type, lint, architecture, ratchet, security, and aggregate gates passed (47 successful checks, 61 unselected/skipped, one neutral advisory result). No local test runtime is claimed.No product checks were removed, no schema or lifecycle code changed, and no SQL/T1 or update-cell measurement is applicable to this test-only change.