Repository navigation
fix: restore two OpenClaw regression suites - #203569
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. |
|
Codex review: blocked before merge. What this changesThis PR configures models in lifecycle fixtures and updates Doctor recovery fixtures and assertions. Example: A heartbeat fixture contains a recorded 500 ms failure after nine earlier failures.
Review scores
ProductKind: Test only · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 1 item remains Keep open: this PR repairs concrete regression-suite failures while preserving intentional model-selection and cron recovery behavior; no actionable patch defect was found. Priority: P2 Before merge
FindingsNone. Agent review detailsHow this fits togetherThese suites exercise subagent lifecycle handling and update-time Doctor recovery using the existing runtime, cron, and SQLite owners. flowchart TD
A[Lifecycle fixtures] --> B[Sessions spawn tool]
B --> C[Subagent lifecycle]
D[Legacy heartbeat fixture] --> E[Doctor recovery]
E --> F[Cron recovery and SQLite]
F --> G[Gateway cron startup]
Technical reviewBest possible solution: Restore the existing suites with explicit fixture inputs and current recovery expectations while preserving lifecycle and restart coverage. Do we have a high-confidence way to reproduce the issue? Current-main fixture inputs and assertions conflict with the inspected production contracts, matching the collaborator's reported failures; this read-only review ran no tests. Is this the best way to solve the issue? The repair uses existing configuration and receipt helpers, retains distinct lifecycle and recovery cases, and avoids reverting deliberate runtime policy. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 5626902006c8. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceTests +16. Total +16 across 2 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. LabelsLabel changes:
Label justifications:
Rating scale6/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. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 22, 2026, 12:44 PM ET / 17:44 UTC. |
`src/agents/tools/sessions-spawn-outcome.test.ts` passes again: its fixture config now names a model for the `main` agent. Part of #204008. ## Problem Since #203271 ("stop sending chats to OpenAI when no model is configured"), model selection throws `No model is configured…` when neither the agent nor defaults name a model. This fixture had `entries: { main: {} }`, so three spawn cases failed before dispatch (`expected "callInProcessGatewayTool" to be called once, but got 0 times`) in every scheduled `main` run (latest: 45147591436, `checks-node-compact-large-39`). ## Solution Set `entries.main.model` to `openai/gpt-4.1`, the same fixture change #204022 made for the cron failure-repair test. No product change. `openclaw-tools.subagents.sessions-spawn.lifecycle.test.ts` has the same cause but is owned by open PR #203569, so it is left alone. ## Evidence - Scheduled `main` run 45147591436: 3 cases fail with the error above. - This branch, locally: `sessions-spawn-outcome.test.ts` 16/16 pass. Co-authored-by: Ayaan Zaidi <[email protected]>
65401e0 to
b72c28b
Compare
Co-authored-by: obviyus <[email protected]>
…aw#204033) `src/agents/tools/sessions-spawn-outcome.test.ts` passes again: its fixture config now names a model for the `main` agent. Part of openclaw#204008. ## Problem Since openclaw#203271 ("stop sending chats to OpenAI when no model is configured"), model selection throws `No model is configured…` when neither the agent nor defaults name a model. This fixture had `entries: { main: {} }`, so three spawn cases failed before dispatch (`expected "callInProcessGatewayTool" to be called once, but got 0 times`) in every scheduled `main` run (latest: 45147591436, `checks-node-compact-large-39`). ## Solution Set `entries.main.model` to `openai/gpt-4.1`, the same fixture change openclaw#204022 made for the cron failure-repair test. No product change. `openclaw-tools.subagents.sessions-spawn.lifecycle.test.ts` has the same cause but is owned by open PR openclaw#203569, so it is left alone. ## Evidence - Scheduled `main` run 45147591436: 3 cases fail with the error above. - This branch, locally: `sessions-spawn-outcome.test.ts` 16/16 pass. Co-authored-by: Ayaan Zaidi <[email protected]>
## Problem Two suites are red on scheduled `main`: - `src/agents/openclaw-tools.subagents.sessions-spawn.lifecycle.test.ts` (checks-node-compact-large-13): 4 cases throw "No model is configured". Since openclaw#203271, a spawn refuses to start without a configured model, and these fixtures set none. - `src/flows/doctor-health.legacy-update.test.ts` (checks-node-compact-large-4): the legacy-update cases that replay a finished run had no run receipt, so they no longer match how a finished run is recorded. ## Fix - The lifecycle fixtures set a default model. - The doctor-health cases that replay a finished run claim a run receipt first, through the existing test support. - Imports sorted (format only). No product code changes. ## Impact Test-only. Restores checks-node-compact-large-4 and -13 on `main`. ## Evidence - Scheduled `main` runs 45165162201 and 45175216085: both jobs red on these files. - This head (6d68b45, on current `main`): CI run 45187939922 green. - Local ClawSweeper review on this head: patch is correct, no findings. Co-authored-by: Ayaan Zaidi <[email protected]>
…ate acts on it (#201668) * fix(update): verify recorded data-at-risk marks before repair acts on them * fix(update): verify any unverified data-at-risk mark and honor receipts in handoff recovery * fix(update): recognize a Git release-mode service as its checkout's own * fix(update): check a recorded data-at-risk mark before the next update, including already-current runs * fix(update): lead data-at-risk refusals with triage and record them on the refused run * fix(update): keep data-at-risk refusals within the recorded warning limit * test(e2e): finish the seeded data-at-risk run with a terminal phase * fix(update): name the agent route in killed-update recovery refusals * fix(update): drop an unused import * test(update): expect the agent route in killed-update refusals * fix(update): verify the newest mark before restoration without comparing run ids * fix(update): address review: keep the Gateway down on any inconsistent mark, resolve all marks, harden release ownership * fix(update): break the admission-root import cycle and type the e2e schema read * fix(update): address rating findings: agent rollback leftovers, helper restart, blocking findings first, shared Git metadata * test(e2e): prove the next plain update resolves a mark with the Gateway running * fix(update): address rating round 2: refuse marks before Doctor, registry-based rollback check, handoff fallback, async history read * test(update): pick the repair run, not a settlement row, in the data-at-risk cell * fix(update): resolve live-writer marks after Doctor holds the state * fix(doctor): say a skipped stale-Gateway stop left the PID running * fix(update): address rating round 3: leftovers before deferrals, retained rollback files, refusal after Doctor fails finalization * docs(update): note retained rollback files and refusals after Doctor * fix(doctor): say a stale Gateway stop could not be confirmed when nothing shows it running * fix(update): address landing review: revert release-mode ownership, check leftovers first, handoff entry guard, durable rollback evidence * test(update): follow main's Git release link layout in the launcher refusal test * fix(update): treat uninspectable leftovers and unreadable databases as unchecked; true wording after Doctor Release adaptation: Retain the stable installed-recovery harness. Do not add main's installed Docker service cell, later retired by #203808, or Git release-launcher wording/test because stable uses the in-place Git updater. Keep the state-verification, next-update, repair and interrupted-handoff paths and their compatible regressions. Companion audit: #203486 is present-equivalent at 3081077 (preserved). #201978 is selected next in this lane. #203808 and #203966 involve the inapplicable installed service-cell layout; #203497 and #203194 change main's package/Git activation layout and are not applicable; #204017 depends on that release-install layout. #204077, #204043, #203555 and #203520 are independent authority, cleanup, helper-fixture and config-validation changes. #204151, #203917, #203849 and #203406 are separate guidance, cleanup or status changes, not required by the data-risk verifier. #203569 fixes a separate cron receipt fixture in the same Doctor suite; the touched stale-stop cases do not depend on it. (cherry picked from commit a28f211) Co-authored-by: RomneyDa <[email protected]> (cherry picked from commit f8d4bc138ed2512c413cf96f66fe0eefb3b28d65)
What Problem This Solves
Two existing regression suites fail on current
main: the sessions-spawn fixture has no configured model, and the Doctor fixture expects a finalized failed run to remain pending after recovery.Related: #203537
Why This Change Was Made
Give sessions-spawn tests the explicit model selection their production path now requires. Make the Doctor fixture receipt-aware and assert the current recovery behavior, including that Gateway startup does not replay the old alert.
User Impact
No user-visible behavior change. Contributors can run both affected regression suites successfully again.
Evidence
Before: the focused suites failed 4/4 and 3/14 cases respectively. After: sessions-spawn passes 4/4 and Doctor passes 14/14.
Tested head:
65401e050694dcdd8d59683870c65de50807fc3c(the focused tests ran against the same source tree before commit).Test proof script
AI-assisted: built with Codex