Skip to content

fix: unblock core lint after cron history ordering changes - #160942

Closed
roboclaw-bot wants to merge 1 commit into
mainfrom
openclaw/fix-main-cron-history-lint-160465
Closed

roboclaw-bot wants to merge 1 commit into
mainfrom
openclaw/fix-main-cron-history-lint-160465

Conversation

@roboclaw-bot

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Fixes core lint failing on main and unrelated PR merge refs after the cron history ordering fixture added in #160897. This blocked #160465 without that PR changing the cron file.

User Impact

No production behavior changes. Restores the lint gate so unrelated changes can be validated and landed.

Why This Change Was Made

Project the fixture’s four identity/timestamp fields explicitly instead of spreading each record inside map. Timestamp values, ordering cases, and all assertions are preserved. No lint rules, suppressions, or timeouts change.

GitHub rejected the direct non-force main push with GH013: Changes must be made through a pull request; this PR follows that required route.

Evidence

  • The failing file is byte-identical between the main parent and the failed PR check.
  • In isolated rootless Node 24.19.0, the canonical single-file typed lint command reproduced oxc/no-map-spread before the fix: 1 error, 0 warnings, 11 s wall.
  • The same command passed after the fix: 0 errors/warnings across 263 rules, 12 s wall. Command: node scripts/run-oxlint.mjs --tsconfig config/tsconfig/oxlint.core.json src/cron/run-history.test.ts.
  • Formatting and git diff --check passed. The tested file is unchanged after rebasing onto the latest main snapshot. No runtime test suite was rerun; the existing ordering assertions are unchanged.

Worked on by

Work sessions


View the OpenClaw team session

Remove the map spread introduced by #160897 that fails core lint on main and unrelated PR merge refs. Preserve all timestamp values, sorting cases, and assertions.

Validation: the exact one-file canonical lint check reproduced no-map-spread, then passed with zero warnings and errors after this correction. No runtime suite rerun.

Co-authored-by: sallyom <[email protected]>
Co-authored-by: steipete <[email protected]>
@clawsweeper

clawsweeper Bot commented Sep 29, 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.

@roboclaw-bot
roboclaw-bot marked this pull request as ready for review September 29, 2026 03:59
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. 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 Sep 29, 2026
@clawsweeper

clawsweeper Bot commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 29, 2026, 12:06 AM ET / 04:06 UTC.

ClawSweeper review

What this changes

The branch replaces an object spread in a cron history ordering test fixture with explicit identity and timestamp fields.

Regression provenance

Possible regression — probable (reviewed change; failure trace). No predecessor PR is attributed.

Merge readiness

✅ Ready for maintainer review

Current main still contains the lint-breaking fixture expression. The proposed correction preserves the ordering inputs, and the current-head core lint check passes. No actionable patch defect was found.

Priority: P2
Reviewed head: b2278cca199cb88bd2cb20d4ded6eea18e5a5618

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The patch is narrow and source-consistent, with targeted before/after lint results and a passing current-head core lint check.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (terminal): The changed fixture is checked by the canonical typed core lint entrypoint. The PR body records one no-map-spread error before the change and zero diagnostics afterward in an isolated Node setup, and current-head core lint CI passed. No stored-data contract changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (terminal): The changed fixture is checked by the canonical typed core lint entrypoint. The PR body records one no-map-spread error before the change and zero diagnostics afterward in an isolated Node setup, and current-head core lint CI passed. No stored-data contract changes.
Evidence reviewed 6 items Introduced patch: The pinned branch replaces only the fixture spread with explicit id, createdAt, endedAt, and lastEventAt fields; the cases and assertions remain intact.
Current-main necessity: Fetched current main retains the spread in the same ordering fixture, so this repair is not already implemented there.
Ordering contract: The shared comparator reads endedAt, lastEventAt, createdAt, and id; explicit undefined optional fields do not change its timestamp selection.
Findings None None.
Security None None.

How this fits together

Cron history turns stored run records into paginated entries using a shared ordering rule. The changed test supplies synthetic records to that path, while core lint checks the test source in CI.

flowchart LR
  A[Run records] --> B[Ordering test fixture]
  B --> C[History page projection]
  C --> D[Shared ordering rule]
  D --> E[Order assertions]
  B --> F[Core lint]
  F --> G[CI gate result]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests +3. Total +3 across 1 file.

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

Review metrics

None.

Technical review

Best possible solution:

Keep the shared ordering rule and ascending and descending assertions, with fixture construction that satisfies typed core lint.

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

Yes. Current main contains the offending spread, and the PR gives the exact single-file typed lint command and its before/after diagnostics; this review did not execute it.

Is this the best way to solve the issue?

Yes. Explicitly projecting the fields removes the reported lint trigger without changing the comparator, test cases, assertions, or lint policy.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P2: This is a bounded repair to a core lint gate with no production behavior change.
  • add proof: sufficient: Contributor real behavior proof is sufficient. The changed fixture is checked by the canonical typed core lint entrypoint. The PR body records one no-map-spread error before the change and zero diagnostics afterward in an isolated Node setup, and current-head core lint CI passed. No stored-data contract changes.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): The changed fixture is checked by the canonical typed core lint entrypoint. The PR body records one no-map-spread error before the change and zero diagnostics afterward in an isolated Node setup, and current-head core lint CI passed. No stored-data contract changes.

Label justifications:

  • P2: This is a bounded repair to a core lint gate with no production behavior change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): The changed fixture is checked by the canonical typed core lint entrypoint. The PR body records one no-map-spread error before the change and zero diagnostics afterward in an isolated Node setup, and current-head core lint CI passed. No stored-data contract changes.
  • proof: sufficient: Contributor real behavior proof is sufficient. The changed fixture is checked by the canonical typed core lint entrypoint. The PR body records one no-map-spread error before the change and zero diagnostics afterward in an isolated Node setup, and current-head core lint CI passed. No stored-data contract changes.

Evidence

What I checked:

  • Introduced patch: The pinned branch replaces only the fixture spread with explicit id, createdAt, endedAt, and lastEventAt fields; the cases and assertions remain intact. (src/cron/run-history.test.ts:66, b2278cca199c)
  • Current-main necessity: Fetched current main retains the spread in the same ordering fixture, so this repair is not already implemented there. (src/cron/run-history.test.ts:66, 5902fd290c4c)
  • Ordering contract: The shared comparator reads endedAt, lastEventAt, createdAt, and id; explicit undefined optional fields do not change its timestamp selection. (src/cron/run-history-detail.ts:281, b2278cca199c)
  • Fixture provenance: GitHub identifies refactor(cron): deslop shared history ordering #160897 as merged at 27aa621; its commit patch added this ordering test, including the spread. (src/cron/run-history.test.ts:58, 27aa6213dfaa)
  • Lint failure and reported repair proof: The PR body reports that the exact single-file typed lint command found one oxc/no-map-spread error before this change and zero errors or warnings afterward on isolated Node 24.19.0. It also records that a direct main push was refused by GH013. (b2278cca199c)
  • Current-head CI: The current-head check-lint-core-1 check completed successfully; a linked check-lint-core-1 job on the unrelated worker PR had failed before this correction. (b2278cca199c)

Likely related people:

  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; confidence: low)

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.

@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

Superseded by the canonical main fix 743c2ce, which removes the same forbidden map spread while preserving the five ordering records and assertions. Verified that commit is contained in current main. Closing this redundant repair rather than reconciling two equivalent fixture rewrites; the worker PR can now incorporate the landed fix.

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

Labels

P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. 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