Repository navigation
fix(test): synchronize post-login catalog observations - #148107
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
landpr-approve-admin-merge |
|
Codex review: needs maintainer review before merge. Reviewed September 14, 2026, 5:31 AM ET / 09:31 UTC. ClawSweeper reviewWhat this changesSynchronizes the post-login model catalog integration test with HTTP request receipt and catalog publication while retaining delayed-discovery, passive-read, and manual-refresh checks. Merge readiness✅ Ready for maintainer review This remains a useful, focused test repair: current main still uses timing-based observations, and no introduced correctness defect was found. The protected maintainer label also excludes automatic closure. Priority: P3 Review scores
Verification
How this fits togetherAfter login, the Gateway discovers account-specific models and publishes them to its model catalog. This integration test exercises login and model-list requests against a local HTTP provider fixture. flowchart LR
A[Login wizard] --> B[Gateway account discovery]
B --> C[HTTP provider fixture]
C --> D[Held discovery response]
D --> E[Catalog publication]
E --> F[Passive model list reads]
F --> G[Test assertions]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests +21. Total +21 across 1 file. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep fixture-controlled observation ordering while checking externally observable catalog results through the registered Gateway requests. Do we have a high-confidence way to reproduce the issue? Yes at the source level: current main samples asynchronous discovery using elapsed-time deadlines, allowing scheduler delays to invalidate observations. The reported hosted failures were not independently reproduced in this read-only review. Is this the best way to solve the issue? Yes. The fixture controls response timing, the existing publication event provides synchronization, and assertions still inspect Gateway results without adding production hooks or increasing the overall test timeout. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against a08cdc50bc04. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Thanks @obviyus! Proof: Both login cases pass in hosted CI and across 20 local runs. Removing automatic discovery still fails both cases.
|
Main now owns the request/publication synchronization repair in 464f199 (openclaw#148107). Remove the duplicate PR-side test change to resolve the overlap; the six-file capture repair is unchanged. Co-authored-by: VACInc <[email protected]>
## What Problem This Solves Login catalog tests can fail while automatic discovery is working correctly. ## Why This Change Was Made Wait for the automatic HTTP request, hold its response through early reads, then confirm the published account row through passive `models.list`. This state has one writer: the fixture. This extends openclaw#147228 and preserves coverage for openclaw#145190. The fixed final-observation deadline is removed; the seven-second endpoint delay, read-latency limit, and 120-second test timeout remain. ## User Impact No production behavior changes. ## Evidence Failures: [34761804381](https://github.com/openclaw/openclaw/actions/runs/34761804381), [34799773048](https://github.com/openclaw/openclaw/actions/runs/34799773048), [34817608735](https://github.com/openclaw/openclaw/actions/runs/34817608735). `node scripts/run-vitest.mjs src/gateway/server-methods/models-auth-login.catalog.integration.test.ts`: reversing the automatic discovery calls from openclaw#145190 fails both cases; twenty corrected runs pass. Local lint, types, protocol and guards pass. Both hosted cases [pass](https://github.com/openclaw/openclaw/actions/runs/34824551516/job/103914012589) on merge `e847ce8327cf`, combining main `37c97a239f5f` with head `f100a3fc2efb`. Both credential-refresh tests pass with this patch on main `1077e0c609e6`; they already observe request receipt or acknowledged publication. ## Compatibility No public contract changes. ## Consumers Only the login catalog test changes. The separate client-stop timeout remains outside this repair: no evidence links its socket-close failure to this observation race. ## Invalidation Request receipt and catalog publication drive observations; cleanup removes listeners. ## Tests Both endpoint delays and all passive-read and manual-refresh checks remain. Both held early responses must report pending; exactly one automatic request is required. Co-authored-by: Ayaan Zaidi <[email protected]>
) ## What Problem This Solves Multiline `/steer` and `/tell` messages lose later lines when incoming command text still contains newlines. A command-only first line returns usage. Closes #146007. ## Why This Change Was Made Extend the existing argument-preservation policy from goal to steer. Normalized command text has one writer. Match whitespace consistently in the reset reader so a configured `/steer` trigger still resets with newline or tab separators; authorization and anchored payload extraction stay unchanged. Production: `commands-registry-normalize.ts` +7/-2; `session-reset-command.ts` +2/-1. Tests: `commands-steer.test.ts` +17; `session.test.ts` +39. No new owner or configuration key. Growth accepted under the owner's standing acceptance (2026-09-15). ## User Impact Complete instructions reach the active run or normal idle fallback. Configured reset commands keep resetting the conversation with the complete payload. ## Evidence Raw WebChat `chat.send` reproduced truncation on main `3869ac66de02`. Retained real-Gateway recordings at `26d6274c2d67` passed three active-run and three idle cases with a deterministic provider. Each active case was matched to the original held task, and its complete current instruction was inspected at the provider boundary. Empty usage stayed correct. The Control UI's local steering shortcut removes the command prefix and is a separate path. The reset regression fails on `26d6274c2d67` for newline and tab delimiters, then passes with this correction. The non-boundary `/steering` case keeps the existing conversation. These tests call `initSessionState` with seeded state and check the reset revision and complete payload. ## Compatibility No configuration, schema, dependency, or API shape change. Group mention processing and some adapters flatten newlines before normalization; that separate formatting issue is outside this change. Per-channel scope comes from source inspection unless a runtime capture is cited. ## Consumers Shared text-command callers with newline-preserving ingress, plus configured reset detection during admission and session initialization. ## Invalidation No cache lifecycle change. ## Tests The three steering regressions exercise the real command-context builder and registered handler; the retained Gateway proof establishes delivery beyond that boundary. The pinned merge includes main `3869ac66de02`, where 79 focused tests passed before this correction. All 259 tests passed across session initialization, steering, and reset-model suites. After correcting two fixture typing errors, the three seeded-session cases passed again on `d86aebfa4701`. The existing session test file is selected once by the hosted test command. Historical CI failures have retained timing/compiler-launch evidence and passing focused checks with upstream repairs #148107 and #146491. Historical base/parent reruns and full current hosted CI are not claimed. | Before | After | | --- | --- | |  |  | Co-authored-by: Ayaan Zaidi <[email protected]>
…claw#146009) ## What Problem This Solves Multiline `/steer` and `/tell` messages lose later lines when incoming command text still contains newlines. A command-only first line returns usage. Closes openclaw#146007. ## Why This Change Was Made Extend the existing argument-preservation policy from goal to steer. Normalized command text has one writer. Match whitespace consistently in the reset reader so a configured `/steer` trigger still resets with newline or tab separators; authorization and anchored payload extraction stay unchanged. Production: `commands-registry-normalize.ts` +7/-2; `session-reset-command.ts` +2/-1. Tests: `commands-steer.test.ts` +17; `session.test.ts` +39. No new owner or configuration key. Growth accepted under the owner's standing acceptance (2026-09-15). ## User Impact Complete instructions reach the active run or normal idle fallback. Configured reset commands keep resetting the conversation with the complete payload. ## Evidence Raw WebChat `chat.send` reproduced truncation on main `0da26ff6b4cc`. Retained real-Gateway recordings at `26d6274c2d67` passed three active-run and three idle cases with a deterministic provider. Each active case was matched to the original held task, and its complete current instruction was inspected at the provider boundary. Empty usage stayed correct. The Control UI's local steering shortcut removes the command prefix and is a separate path. The reset regression fails on `26d6274c2d67` for newline and tab delimiters, then passes with this correction. The non-boundary `/steering` case keeps the existing conversation. These tests call `initSessionState` with seeded state and check the reset revision and complete payload. ## Compatibility No configuration, schema, dependency, or API shape change. Group mention processing and some adapters flatten newlines before normalization; that separate formatting issue is outside this change. Per-channel scope comes from source inspection unless a runtime capture is cited. ## Consumers Shared text-command callers with newline-preserving ingress, plus configured reset detection during admission and session initialization. ## Invalidation No cache lifecycle change. ## Tests The three steering regressions exercise the real command-context builder and registered handler; the retained Gateway proof establishes delivery beyond that boundary. The pinned merge includes main `0da26ff6b4cc`, where 79 focused tests passed before this correction. All 259 tests passed across session initialization, steering, and reset-model suites. After correcting two fixture typing errors, the three seeded-session cases passed again on `d86aebfa4701`. The existing session test file is selected once by the hosted test command. Historical CI failures have retained timing/compiler-launch evidence and passing focused checks with upstream repairs openclaw#148107 and openclaw#146491. Historical base/parent reruns and full current hosted CI are not claimed. | Before | After | | --- | --- | |  |  | Co-authored-by: Ayaan Zaidi <[email protected]>
What Problem This Solves
Login catalog tests can fail while automatic discovery is working correctly.
Why This Change Was Made
Wait for the automatic HTTP request, hold its response through early reads, then confirm the published account row through passive
models.list. This state has one writer: the fixture. This extends #147228 and preserves coverage for #145190. The fixed final-observation deadline is removed; the seven-second endpoint delay, read-latency limit, and 120-second test timeout remain.User Impact
No production behavior changes.
Evidence
Failures: 34761804381, 34799773048, 34817608735.
node scripts/run-vitest.mjs src/gateway/server-methods/models-auth-login.catalog.integration.test.ts: reversing the automatic discovery calls from #145190 fails both cases; twenty corrected runs pass. Local lint, types, protocol and guards pass.Both hosted cases pass on merge
e847ce8327cf, combining main43d413bd3938with headf100a3fc2efb. Both credential-refresh tests pass with this patch on main7066d660a6fd; they already observe request receipt or acknowledged publication.Compatibility
No public contract changes.
Consumers
Only the login catalog test changes. The separate client-stop timeout remains outside this repair: no evidence links its socket-close failure to this observation race.
Invalidation
Request receipt and catalog publication drive observations; cleanup removes listeners.
Tests
Both endpoint delays and all passive-read and manual-refresh checks remain. Both held early responses must report pending; exactly one automatic request is required.