Skip to content

fix: restore two OpenClaw regression suites - #203569

Merged
obviyus merged 2 commits into
openclaw:mainfrom
RileyJJY:sunlit/fix/issue-203537
Nov 23, 2026
Merged

obviyus merged 2 commits into
openclaw:mainfrom
RileyJJY:sunlit/fix/issue-203537

Conversation

@RileyJJY

@RileyJJY RileyJJY commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

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).

$ pnpm test src/agents/openclaw-tools.subagents.sessions-spawn.lifecycle.test.ts --maxWorkers=1
Test Files  1 passed (1)
Tests  4 passed (4)

$ pnpm test src/flows/doctor-health.legacy-update.test.ts --maxWorkers=1
Test Files  1 passed (1)
Tests  14 passed (14)
Test proof script
import { spawnSync } from "node:child_process";

const files = [
  "src/agents/openclaw-tools.subagents.sessions-spawn.lifecycle.test.ts",
  "src/flows/doctor-health.legacy-update.test.ts",
];

for (const file of files) {
  const result = spawnSync("pnpm", ["test", file, "--maxWorkers=1"], {
    encoding: "utf8",
  });
  process.stdout.write(result.stdout ?? "");
  process.stderr.write(result.stderr ?? "");
  if (result.error) throw result.error;
  if (result.status !== 0) process.exit(result.status ?? 1);
}

AI-assisted: built with Codex

@clawsweeper

clawsweeper Bot commented Nov 22, 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.

@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: S labels Nov 22, 2026
@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. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on maintainer Only explicit maintainer approvals or decisions remain; merge is still blocked. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 22, 2026
@clawsweeper

clawsweeper Bot commented Nov 22, 2026

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge.

What this changes

This 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.

  • Before: The test expects recovery to remain pending until Gateway startup auto-disables the job.
  • After: The test expects Doctor to settle the tenth failure, preserve operator enablement, and avoid replaying an alert at startup.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A focused, source-supported test repair with reported passing harness results; hosted validation has not run.
Proof confidence 🦐 gold shrimp (3/6) No shipped behavior changes; the body reports all four lifecycle and fourteen Doctor cases passing on the reviewed source, exercising existing production owners through test harnesses.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
User problem: Contributors encounter failing regression suites when unrelated PR validation selects them.
Reason: Both repairs follow verified, deliberately changed production contracts and preserve useful regression coverage.

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
Reviewed head: 65401e050694dcdd8d59683870c65de50807fc3c

Before merge

  • Await maintainer action - Approve the action-required workflow runs for the reviewed head so required CI can start.

Findings

None.

Agent review details

How this fits together

These 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]
Loading

Technical review

Best 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

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • RoboClaw: Raw commit 92798ae adds src/flows/doctor-health.legacy-update.test.ts:314 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 92798ae0fa97; files: src/flows/doctor-health.legacy-update.test.ts)

PR surface

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

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 2 58 42 +16
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 58 42 +16

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

  • add P2: Deterministic fixture failures impair regression coverage and unrelated PR validation without establishing an urgent shipped-runtime failure.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: ⏳ waiting on maintainer: Only explicit maintainer approvals or decisions remain; merge is still blocked.

Label justifications:

  • P2: Deterministic fixture failures impair regression coverage and unrelated PR validation without establishing an urgent shipped-runtime failure.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: ⏳ waiting on maintainer: Only explicit maintainer approvals or decisions remain; merge is still blocked.

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 November 22, 2026, 12:44 PM ET / 17:44 UTC.

obviyus added a commit that referenced this pull request Nov 23, 2026
`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]>
@obviyus
obviyus force-pushed the sunlit/fix/issue-203537 branch from 65401e0 to b72c28b Compare November 23, 2026 13:36
@obviyus
obviyus merged commit 0df58d4 into openclaw:main Nov 23, 2026
100 checks passed
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 24, 2026
…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]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 24, 2026
## 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]>
tideclaw-bot pushed a commit that referenced this pull request Nov 24, 2026
…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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: S status: ⏳ waiting on maintainer Only explicit maintainer approvals or decisions remain; merge is still blocked.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants