Repository navigation
test(gateway): repair catalog client fixtures - #183065
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
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. |
|
The requested regression is fixed on head The only causal CI failure is 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. |
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.
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 readsclient?.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 withPromise.allSettledand waited indefinitely for the provider's start signal; the follower was never created.Build catalog clients with the existing
gatewayConnectfixture 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:
7b30ad9167e76188758f^=05740a6c078aSource history narrowed the regression to #182897. Exact adjacent-commit verification under Node passed all five tests on
61164bfcd411and reproduced the timeout on219e9181aab0; the bounded bisect reports219e9181aab0as the first bad commit. No test source, assertion or timeout was changed for these runs.Command for each runtime:
OPENCLAW_VITEST_RUNTIME=node(orbun) followed bynode 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: expectedCATALOG_LOADING, receivedpending: true. The identical single-file run on unchanged basedde57d3e897e65597b61750b3b431e550f36b04dfails 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-gateis 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.