Skip to content

chore(cron): remove duplicate session override tests - #129736

Merged
steipete merged 1 commit into
mainfrom
test-audit/cron-session-override-duplicate
Aug 26, 2026
Merged

steipete merged 1 commit into
mainfrom
test-audit/cron-session-override-duplicate

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Two cron model-selection tests still claimed to cover stored-session behavior after a runtime-seam refactor had reduced them to direct calls that exactly replayed the model-precedence cases above. They added maintenance and CI work without detecting another regression.

Why This Change Was Made

Remove the obsolete stored session overrides block. The retained model-precedence tests pass the same provider/model session entry and the same effective empty session entry to resolveCronModelSelection.

The original storage contract remains covered at its owner in isolated-agent/session.test.ts, including preservation of modelOverride/providerOverride from an existing session and missing-override behavior. History confirms 8727338372b4 collapsed the formerly distinct force-new/store flows into the duplicate direct calls.

User Impact

No user-visible behavior changes. Cron model-selection coverage remains intact while the suite has two fewer duplicate tests.

Production LOC: +0/-0 | Tests: +0/-18

Evidence

  • Baseline: node scripts/run-vitest.mjs src/cron/isolated-agent.model-formatting.test.ts — 39/39 passed.
  • Post-change and post-rebase: node scripts/run-vitest.mjs src/cron/isolated-agent.model-formatting.test.ts src/cron/isolated-agent/session.test.ts — 59/59 remaining tests passed (37 model-selection + 22 session-owner tests).
  • node scripts/check-changed.mjs --dry-run -- src/cron/isolated-agent.model-formatting.test.ts — classified the coreTests lane.
  • node scripts/check-changed.mjs -- src/cron/isolated-agent.model-formatting.test.ts — passed repository guards, format, dead-export scan, all core-test typecheck shards, and lint.
  • git diff --check origin/main...HEAD — passed.
  • Fresh autoreview — clean; no accepted/actionable findings; patch correctness 0.99.

@clawsweeper

clawsweeper Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@steipete
steipete marked this pull request as ready for review August 26, 2026 01:18
@openclaw-barnacle openclaw-barnacle Bot added size: XS maintainer Maintainer-authored PR labels Aug 26, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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. labels Aug 26, 2026
@clawsweeper

clawsweeper Bot commented Aug 26, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 25, 2026, 10:06 PM ET / August 26, 2026, 02:06 UTC.

ClawSweeper review

What this changes

This PR removes two duplicate cron model-selection tests after a runtime-seam refactor.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

The two deleted assertions are already covered by retained precedence tests, while stored-session preservation remains tested at its session owner. No patch defect found; merge after exact-head CI is green.

Priority: P3
Reviewed head: 189ee6574e2c35ae623e8900323c139ed228e8eb

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) This is a focused, source-supported cleanup with no actionable patch finding; exact-head CI remains the merge gate.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-authored, test-only cleanup has no changed user-visible behavior to demonstrate.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-authored, test-only cleanup has no changed user-visible behavior to demonstrate.
Evidence reviewed 5 items Current-main and PR diff: The exact current-main-to-head diff changes only this test file, deleting the two assertions.
Retained effective-model coverage: Retained tests cover the same stored OpenAI override and the no-override default outcome, including precedence against a payload override.
Owner-boundary persistence coverage: Session tests verify stored modelOverride/providerOverride preservation and missing-override behavior separately from model selection.
Findings None None.
Security None None.

Live Verification

Command: node scripts/run-vitest.mjs src/cron/isolated-agent.model-formatting.test.ts src/cron/isolated-agent/session.test.ts

Result: PASS (completed)

[test] starting test/vitest/vitest.cron.config.ts

 RUN  v4.1.10 /tmp/clawsweeper-live-proof-129736-VKWXWJ/target

 ✓  cron  src/cron/isolated-agent/session.test.ts (22 tests) 323ms
 ✓  cron  src/cron/isolated-agent.model-formatting.test.ts (37 tests) 18ms

 Test Files  2 passed (2)
      Tests  59 passed (59)
   Start at  02:07:05
   Duration  9.76s (transform 7.29s, setup 953ms, import 8.12s, tests 341ms, environment 0ms)

[test] passed 1 Vitest shard in 15.71s
[test] starting test/vitest/vitest.cron.config.ts

 RUN  v4.1.10 /tmp/clawsweeper-live-proof-129736-VKWXWJ/target

 ✓  cron  src/cron/isolated-agent/session.test.ts (22 tests) 309ms
 ✓  cron  src/cron/isolated-agent.model-formatting.test.ts (37 tests) 18ms

 Test Files  2 passed (2)
      Tests  59 passed (59)
   Start at  02:07:21
   Duration  4.89s (transform 2.50s, setup 442ms, import 3.88s, tests 327ms, environment 0ms)

[test] passed 1 Vitest shard in 10.72s

Assertions:

  • PASS expect_output: Tests

How this fits together

Cron resolves a session entry, then uses it with configuration, hooks, and job payload data to select a model for an isolated agent run. Session resolution owns preservation of stored override fields.

flowchart LR
A[Cron job] --> B[Resolve session]
B --> C[Session entry]
D[Configuration and hook] --> E[Model selection]
C --> E
E --> F[Isolated agent run]
G[Session owner tests] --> B
H[Precedence tests] --> E
Loading

Before merge

  • Resolve merge risk (P1) - The supplied exact-head check state includes failed lint and test-type runs; fix(ci): restore release validation lint #129733 is an open, adjacent CI repair, so this PR should not merge until its own exact-head checks are green.
  • Complete next step (P2) - No repair lane is needed; remaining work is normal exact-head CI verification before merge.
Agent review details

Security

None.

PR surface

Tests -18. Total -18 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 0 18 -18
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 0 18 -18

Review metrics

Metric Value Why it matters
Production versus test delta production 0, tests -18 The PR removes two duplicate test cases without changing runtime behavior.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Keep the stronger owner-boundary and precedence tests, remove these duplicates, and merge after the exact-head CI lanes pass.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Keep the stronger owner-boundary and precedence tests, remove these duplicates, and merge after the exact-head CI lanes pass.

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

Not applicable: this PR removes redundant coverage rather than fixing a runtime defect; retained source tests exercise both deleted outcomes.

Is this the best way to solve the issue?

Yes: removing only the duplicated selector assertions while retaining model-precedence and session-owner coverage is the narrowest maintainable solution.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against c841a9958abc.

Labels

Label justifications:

  • P3: This is a low-risk test-maintenance cleanup with no user-visible 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: This maintainer-authored, test-only cleanup has no changed user-visible behavior to demonstrate.

Evidence

What I checked:

Likely related people:

  • steipete: History attributes the cited seam refactor and the recent model-selection maintenance to this contributor. (role: recent area contributor and runtime-seam refactor author; confidence: high; commits: 8727338372b4, 1622c4f0f9e7, 85611e061265; files: src/cron/isolated-agent/model-selection.ts, src/cron/isolated-agent.model-formatting.test.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Resolve or verify the failed exact-head check-lint and check-test-types runs before merge.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
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.

Workflow

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

History

Review history (1 earlier review cycle)
  • reviewed 2026-08-26T01:23:31.770Z sha 189ee65 :: needs maintainer review before merge. :: none

@steipete
steipete force-pushed the test-audit/cron-session-override-duplicate branch from 189ee65 to 2c86509 Compare August 26, 2026 02:55

Copy link
Copy Markdown
Contributor Author

Land-ready verification for exact head 2c865097c082bdb8ef94591b1e73d884bc7be400:

  • Focused behavior/owner proof: node scripts/run-vitest.mjs src/cron/isolated-agent.model-formatting.test.ts src/cron/isolated-agent/session.test.ts — 59/59 passed.
  • Changed-file gate: node scripts/check-changed.mjs -- src/cron/isolated-agent.model-formatting.test.ts — passed, including core test type shards and targeted oxlint.
  • Format: node_modules/.bin/oxfmt --check src/cron/isolated-agent.model-formatting.test.ts — passed.
  • Fresh autoreview against origin/main — clean, no accepted/actionable findings; patch correct 0.99.
  • Exact-head CI: run 32924520636 — required checks green, 0 failure / 0 pending.
  • ClawSweeper's only rank-up move was to resolve the old-base lint/type failures; repaired-main exact-head CI now satisfies it. The new-head re-review is queued after the mechanical rebase and is not a behavior-change blocker.

Production LOC: +0/-0. Tests: +0/-18. No docs, changelog, runtime, or live-behavior proof gap applies to this test-only duplicate deletion.

@steipete
steipete merged commit a1a277f into main Aug 26, 2026
100 checks passed
@steipete
steipete deleted the test-audit/cron-session-override-duplicate branch August 26, 2026 03:05

Copy link
Copy Markdown
Contributor Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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.

2 participants