Skip to content

fix(gateway): title-source test fails after config snapshot capture - #182780

Merged
steipete merged 1 commit into
mainfrom
fix/session-title-bun
Oct 24, 2026
Merged

steipete merged 1 commit into
mainfrom
fix/session-title-bun

Conversation

@steipete

@steipete steipete commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes the main-branch session-title test failure blocking #182053: the assertion reads an empty custom session store even though the Gateway generated and saved the title successfully.

User Impact

No user-visible behavior change. The Gateway title regression reliably checks task-bearing sends, attachments, control-only messages, and manual names against the store used by the handlers.

Why This Change Was Made

#182582 made published configuration captures eager. The title-provider fixture published its config before the test added session.store, so store discovery retained the default agent store while assertions selected the custom store. Initialize the fixture's store before publication and remove the late caller mutation. Production title generation and persistence need no change.

Related: #182053.

Evidence

  • On trusted main efe1c0dabba4c859f25e68984a1cb958bebbafe9, the existing title-source test failed with the reported assertion twice under the pinned Bun fork (66.13s cold, 31.41s warm) and once under Node 26.12.1 (44.61s). This is not Bun-specific.
  • Diagnostics on main f2fccfab05f36f400a671026d95263db790affd2 confirmed the default-store row already had displayName: "Repair request routing"; the custom-store read found no row. All diagnostic edits were removed.
  • With the fix, Bun passed the existing title-source regression (1 test, 32.04s) and every shared-fixture transport test (44 tests, 73.97s; wrapper total 132.68s). These tests exercise real session handlers and a local HTTP provider fixture; no additional duplicate test was added.
  • Node passed the repaired title-source regression (1 test, 14.28s; test body 5.989s).
  • Focused core oxlint, oxfmt, and git diff --check passed. The first lint invocation began plugin declaration preparation; it was stopped and replaced with the focused core config.
  • Simplification complete; Codex autoreview is scoped-clean through P2. GitHub Codex and ClawSweeper also completed exact-head reviews with no findings. Exact numstat: production +0/-0; tests/support +3/-2; docs +0/-0.
  • Exact-head CI run 40121641317 passed on 65bdb441f2d9a9d213df0f0ca56cbc6f579c6544: 34 successful jobs, 28 skips, no failures. The earlier draft CI run was skipped; no CI retry was needed.
  • Live Gateway/channel e2e, remote leases, broad local suites, and full local typechecks were skipped per explicit maintainer policy. PR CI provides the broad proof.

Reproduction command (use node instead of bun for the comparison):

OPENCLAW_VITEST_RUNTIME=bun node scripts/run-vitest.mjs run --config test/vitest/vitest.gateway-server.config.ts src/gateway/server.sessions.title-source.test.ts

Shared-fixture verification:

OPENCLAW_VITEST_RUNTIME=bun node scripts/run-vitest.mjs src/gateway/server.sessions.title-source.test.ts src/gateway/dashboard-session-title.transport.test.ts

Initialize the title provider fixture's session store before publishing its
runtime config. Eager snapshot capture otherwise leaves Gateway create/send
using the default store while the test reads an empty custom store.

Preserve the existing task, attachment, control-only, and manual-name proof.
Related: #182053
@clawsweeper

clawsweeper Bot commented Oct 24, 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.

@steipete
steipete marked this pull request as ready for review October 24, 2026 18:38
@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime size: XS labels Oct 24, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 24, 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-24T18:40:28.145533Z 65bdb44 Draft marked ready
ℹ️ 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.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. labels Oct 24, 2026
@clawsweeper

clawsweeper Bot commented Oct 24, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR initializes the title fixture’s session store before publishing its configuration and removes the caller’s late mutation.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The patch is focused and correct; verification consists of reported production-owner integration tests and exact-head CI rather than shipped-entry-point evidence.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored test-fixture repair has reported before/after handler verification and sibling transport coverage; the ordinary shipped-entry-point proof gate does not apply.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
User problem: A fixture mismatch makes the title-source regression fail despite successful title generation and persistence.
Reason: The maintainer-authored repair restores meaningful regression coverage using the existing fixture and leaves production behavior intact.

Merge readiness

✅ Ready for maintainer review

This PR is a focused, correct repair of a main-branch test fixture; no actionable findings remain, and ordinary CI is still pending.

Priority: P3
Reviewed head: 65bdb441f2d9a9d213df0f0ca56cbc6f579c6544

Before merge

None.

Findings

None.

Agent review details

How this fits together

The shared fixture supplies isolated configuration and a local HTTP title provider to Gateway handler and transport tests, which verify generated titles and persisted session entries.

flowchart LR
A[Isolated test state] --> B[Title provider fixture]
B --> C[Published config snapshot]
C --> D[Gateway session handlers]
D --> E[Local HTTP provider]
D --> F[Configured session store]
F --> G[Regression assertions]
Loading

Technical review

Best possible solution:

Keep store selection in the shared fixture before configuration publication, preserving the existing handler and transport assertions.

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

Source confirms that publication precedes the custom-store mutation on main, while the PR records matching baseline failures under Bun and Node; this read-only review ran no tests.

Is this the best way to solve the issue?

This is the smallest complete fix: initialize the existing fixture’s configuration before its snapshot is captured, without changing runtime capture semantics or weakening coverage.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Title-provider fixture and caller-side session-store setup keeps the original intent (2b1f0f5: The original change verified task-bearing skill titles, control-only messages, attachments, and explicit names through real title-generation owners.)
  • Publication-time configuration capture keeps the original intent (f4e0d47: Capture immutable publication-time values once and reuse them across reads, preserving isolation from later live-object mutations.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Jason (Json): Raw commit 2b1f0f5 adds src/gateway/dashboard-session-title.test-support.ts:29 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 2b1f0f5e486c; files: src/gateway/dashboard-session-title.test-support.ts)

PR surface

Tests +1. Total +1 across 2 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 2 3 2 +1
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 3 2 +1

Labels

Label changes:

  • add P3: This repairs regression-test setup without changing user-visible runtime behavior.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P3: This repairs regression-test setup without changing user-visible runtime behavior.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

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

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 24, 2026, 2:54 PM ET / 18:54 UTC.

@steipete
steipete merged commit 81d1264 into main Oct 24, 2026
210 of 212 checks passed
@steipete
steipete deleted the fix/session-title-bun branch October 24, 2026 19:27
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 25, 2026
…enclaw#182780)

Initialize the title provider fixture's session store before publishing its
runtime config. Eager snapshot capture otherwise leaves Gateway create/send
using the default store while the test reads an empty custom store.

Preserve the existing task, attachment, control-only, and manual-name proof.
Related: openclaw#182053
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gateway Gateway runtime P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant