Skip to content

fix(test): type overflow resolver mock#91098

Merged
RomneyDa merged 1 commit into
mainfrom
fix/main-test-types-resolve-model-mock
Jun 7, 2026
Merged

fix(test): type overflow resolver mock#91098
RomneyDa merged 1 commit into
mainfrom
fix/main-test-types-resolve-model-mock

Conversation

@RomneyDa

@RomneyDa RomneyDa commented Jun 7, 2026

Copy link
Copy Markdown
Member

Summary

  • Fixes the current check-test-types failure on main by typing the shared overflow compaction mockedResolveModelAsync test double with the partial resolved-model shape the harness actually uses.
  • Keeps the harness permissive for existing partial authStorage and modelRegistry test doubles while allowing model overrides to include reasoning.

Verification

  • node scripts/run-tsgo.mjs -p test/tsconfig/tsconfig.core.test.json --incremental --tsBuildInfoFile .artifacts/tsgo-cache/core-test.tsbuildinfo
  • node scripts/run-vitest.mjs src/agents/embedded-agent-runner/run.overflow-compaction.loop.test.ts
  • .agents/skills/autoreview/scripts/autoreview --mode local

Notes

The CI failure is unrelated to PRs #90780 and #90782. Both were failing the same check-test-types error from src/agents/embedded-agent-runner/run.overflow-compaction.loop.test.ts; current origin/main still had the stale mock type at the time this branch was created.

@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: XS maintainer Maintainer-authored PR labels Jun 7, 2026
@clawsweeper

clawsweeper Bot commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed June 7, 2026, 2:36 AM ET / 06:36 UTC.

Summary
The branch adds a local partial resolved-model return type for the overflow compaction harness mockedResolveModelAsync Vitest mock so overrides can include reasoning while keeping partial auth and model-registry doubles.

PR surface: Source +14. Total +14 across 1 file.

Reproducibility: yes. source-reproducible: current main infers the resolver mock return type without reasoning, while a current test overrides that mock with reasoning: true. I did not run the typecheck in this read-only sweep.

Review metrics: none identified.

Merge readiness
Overall: 🐚 platinum hermit
Proof: 🌊 off-meta tidepool
Patch quality: 🐚 platinum hermit
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • none.

Risk before merge

  • I did not rerun check-test-types or Vitest in this read-only sweep, so merge should still rely on the reported verification and required checks.

Maintainer options:

  1. Decide the mitigation before merge
    Land the narrow harness typing fix after required checks/review, keeping the mock partial instead of forcing production-shaped model, auth, and registry objects into focused tests.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Next step before merge

  • [P2] No repair job is needed; the PR is a narrow maintainer test-harness type fix awaiting normal merge gates.

Security
Cleared: The diff is test-harness typing only and does not change runtime code, dependencies, workflows, secrets, or package resolution.

Review details

Best possible solution:

Land the narrow harness typing fix after required checks/review, keeping the mock partial instead of forcing production-shaped model, auth, and registry objects into focused tests.

Do we have a high-confidence way to reproduce the issue?

Yes, source-reproducible: current main infers the resolver mock return type without reasoning, while a current test overrides that mock with reasoning: true. I did not run the typecheck in this read-only sweep.

Is this the best way to solve the issue?

Yes, this is the narrowest maintainable fix for the test-harness type failure; a full production resolver return type would make focused tests construct irrelevant model, auth, and registry fields.

AGENTS.md: found and applied where relevant.

Codex review notes: model gpt-5.5, reasoning high; reviewed against cd9c643dc6ef.

Label changes

Label changes:

  • add P2: The PR addresses a current core test typecheck failure on main with limited blast radius and no runtime behavior change.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The real-behavior proof gate is not applicable because this is a maintainer/member test-only type fix with verification commands listed in the PR body.

Label justifications:

  • P2: The PR addresses a current core test typecheck failure on main with limited blast radius and no runtime behavior change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The real-behavior proof gate is not applicable because this is a maintainer/member test-only type fix with verification commands listed in the PR body.
Evidence reviewed

PR surface:

Source +14. Total +14 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 1 15 1 +14
Tests 0 0 0 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 15 1 +14

What I checked:

Likely related people:

  • Vincent Koc: git blame points the shared overflow-compaction harness mock, including the untyped resolver double, to commit f8f53de. (role: introduced shared harness behavior; confidence: high; commits: f8f53de45a62; files: src/agents/embedded-agent-runner/run.overflow-compaction.harness.ts)
  • Vinayaka Jyothi: git blame points the MiniMax-M3 reasoning override that exposed the resolver mock type issue to commit 443ac73. (role: recent adjacent test contributor; confidence: high; commits: 443ac732a11d; files: src/agents/embedded-agent-runner/run.overflow-compaction.loop.test.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P2 Normal backlog priority with limited blast radius. labels Jun 7, 2026
@RomneyDa
RomneyDa merged commit a77d0fd into main Jun 7, 2026
205 of 211 checks passed
@RomneyDa
RomneyDa deleted the fix/main-test-types-resolve-model-mock branch June 7, 2026 06:40
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jun 8, 2026
wangmiao0668000666 pushed a commit to wangmiao0668000666/openclaw that referenced this pull request Jun 9, 2026
badgerbees pushed a commit to badgerbees/openclaw that referenced this pull request Jul 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant