Skip to content

test(gateway): match concurrent session title recovery - #170890

Merged
steipete merged 1 commit into
mainfrom
redmain/title-recovery-order
Oct 13, 2026
Merged

steipete merged 1 commit into
mainfrom
redmain/title-recovery-order

Conversation

@steipete

@steipete steipete commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

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 4dd4b8ef9c8fd0c8dd9286f70f98b0842efca758 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 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 base c86d3033301f51b7b53637c035e3476faa56fdef.

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 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.

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.
@clawsweeper

clawsweeper Bot commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-13T09:22:12.254695Z 55418e4 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime size: XS labels Oct 13, 2026
@steipete
steipete merged commit a05fca4 into main Oct 13, 2026
117 checks passed
@steipete
steipete deleted the redmain/title-recovery-order branch October 13, 2026 09:30
Linux2010 added a commit to Linux2010/openclaw that referenced this pull request Oct 13, 2026
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gateway Gateway runtime size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant