Skip to content

test(gateway): repair catalog client fixtures - #183065

Merged
steipete merged 1 commit into
mainfrom
steipete/fix-session-catalog-phase-diagnostics-lane1674
Oct 25, 2026
Merged

steipete merged 1 commit into
mainfrom
steipete/fix-session-catalog-phase-diagnostics-lane1674

Conversation

@steipete

@steipete steipete commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Catalog tests can time out waiting for a provider that never starts because their synthetic clients omit the required connection handshake.

User Impact

Restores CI coverage for catalog coalescing, progress, budgets and reconnect retention. Production behavior is unchanged.

Why This Change Was Made

The regression starts at 219e9181aab075e31903d62a3bb50cf7875ba097 (#182897): the visibility owner now trusts the admitted client contract and reads client?.connect.scopes. The diagnostic fixture supplied only a connection ID, so the leader rejected while building its visibility key, before snapshot creation or provider enumeration. The test collected that rejection with Promise.allSettled and waited indefinitely for the provider's start signal; the follower was never created.

Build catalog clients with the existing gatewayConnect fixture and require the real connection shape in the shared test helper. Each caller retains the same client object across requests, preserving the WeakMap identity used for coalescing and retention. Existing assertions and the 120-second timeout are retained.

This predates #182986: the failing scope-read commit is already in that merge's parent, 05740a6c078a53fdde9457e783ea8b398472d900.

Evidence

Unmodified single-file runs on both requested revisions:

Revision Node 26.12.1 Pinned Bun 1.4.4-canary.1
7b30ad9167e7 4 passed, coalesced-follower timeout at 120 s Same
6188758f^ = 05740a6c078a 4 passed, coalesced-follower timeout at 120 s Same

Source history narrowed the regression to #182897. Exact adjacent-commit verification under Node passed all five tests on 61164bfcd411 and reproduced the timeout on 219e9181aab0; the bounded bisect reports 219e9181aab0 as the first bad commit. No test source, assertion or timeout was changed for these runs.

Command for each runtime: OPENCLAW_VITEST_RUNTIME=node (or bun) followed by node scripts/run-vitest.mjs src/gateway/server-methods/session-catalog-phase-diagnostics.test.ts --maxWorkers=1.

With the fix, all five phase-diagnostic tests pass under both runtimes, including the formerly hanging coalesced follower. Focused runs of the five affected test files finish with 54 passed / 1 separately inherited failure on both Node and Bun. Coalescing, progress, budget, reconnect-retention, permission-scope and caller-identity assertions are retained. Changed-file oxfmt and core-config oxlint pass. Production LOC delta is zero.

The remaining failure is session-catalog.test.ts → keeps a delayed source off the catalog RPC path: expected CATALOG_LOADING, received pending: true. The identical single-file run on unchanged base dde57d3e897e65597b61750b3b431e550f36b04d fails with 14 passed / 1 failed on both Node and Bun. #182242 (ae2a9dd8ec74) introduced fresh authorization, pending progressive pages and awaited non-progressive reads; its plugin tests were updated, but this Gateway integration fixture still assumes the old loading/caching contract. This PR preserves those assertions and does not alter that implementation. That separately inherited failure is not claimed green.

Independent subagent review (autoreview route unavailable): clean through P2. The helper's previously observed provider mismatch remains unresolved; operator configuration was unchanged. The fresh reviewer checked scopes, the required handshake type, shared-helper caller migration, object identity and unchanged assertions/timeouts. The simplification pass retained only fixture construction and the shared type correction.

Exact-head CI and inherited-failure qualification

Run 40147978172, attempt 1, tested head 2bc9a782be4630eeed6ff3277f6a738151952a06: 29 jobs passed. The repaired phase-diagnostic file passed all five tests in the Bun shard; the coalesced-follower case completed in 3 ms. Budget, progress and retention coverage also passed.

The sole non-aggregate failed job is checks-node-changed-compact-large-17, solely from the delayed-source assertion described above; openclaw/ci-gate is its downstream aggregate failure. The automated comparison labels it unknown: no matching job on scheduled main, so attribution rests on the independent unchanged-base Node/Bun reproductions, not a claimed matching-signature table. The producer and relevant test inputs did not change between that baseline and the final rebased parent; this PR's fixture edits preserve the same scope values and object identities. No test assertion or timeout changed.

Security-fast, dependency review and security-sensitive review passed. CI was not rerun. Landing uses the standing exception for this independently proven pre-existing failure; the failed CI result is retained and is not described as green.

@clawsweeper

clawsweeper Bot commented Oct 25, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@steipete
steipete marked this pull request as ready for review October 25, 2026 00:46
@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime size: S labels Oct 25, 2026
@chatgpt-codex-connector

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 🔄 Running since 2026-10-25T00:46:10.689992Z 2bc9a78 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.

@steipete

Copy link
Copy Markdown
Contributor Author

The requested regression is fixed on head 2bc9a782be4630eeed6ff3277f6a738151952a06: CI run 40147978172 passed all five phase-diagnostic tests under Bun, including the coalesced follower in 3 ms. The local Node/Bun runs also pass it; assertions and the 120-second timeout are unchanged.

The only causal CI failure is session-catalog.test.ts → keeps a delayed source off the catalog RPC path, in job checks-node-changed-compact-large-17 (121033597424). It expects CATALOG_LOADING and receives pending: true. On unchanged base dde57d3e897e65597b61750b3b431e550f36b04d, the same single-file command fails identically with 14 passed / 1 failed under both Node and pinned Bun. Source attribution is ae2a9dd8ec74 (#182242), which changed fresh authorization/loading semantics. The producer code and failed expectations are unchanged here.

The automated table has no comparable main job and says unknown; the independent baseline reproductions establish the inherited classification. Twenty-nine CI jobs passed, including security-fast, and dependency/security-sensitive review passed. Only that known failure and its aggregate gate remain red. No CI rerun was requested. This is the standing pre-existing-failure landing exception, not a claim of green CI.

@steipete
steipete merged commit 4ff6361 into main Oct 25, 2026
192 of 196 checks passed
@steipete
steipete deleted the steipete/fix-session-catalog-phase-diagnostics-lane1674 branch October 25, 2026 00:58
steipete added a commit that referenced this pull request Oct 25, 2026
285029f defaulted missing connect/scopes in the shared catalog test
helper; #183065 then made fixture clients carry a full connect object, so
assigning {} became TS2739 in check-prod-types/check-test-types. Fixtures
now always supply connect, so the fallback is unnecessary.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 25, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 25, 2026
ea0cd8e defaulted missing connect/scopes in the shared catalog test
helper; openclaw#183065 then made fixture clients carry a full connect object, so
assigning {} became TS2739 in check-prod-types/check-test-types. Fixtures
now always supply connect, so the fallback is unnecessary.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gateway Gateway runtime size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant