Skip to content

fix(lint): copied runner checks fail after schema preparation - #162489

Merged
roboclaw-bot merged 10 commits into
mainfrom
openclaw/prepare-kysely-before-core-lint
Oct 1, 2026
Merged

roboclaw-bot merged 10 commits into
mainfrom
openclaw/prepare-kysely-before-core-lint

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Fixes copied lint runners failing to load the generated schema-type owner, and completes cold typed-lint preparation across direct and striped entrypoints. The original cold-checkout failure reported unchanged database types as error/any.

User Impact

Developers and CI can run direct or striped core lint without first building plugin declarations. There is no user-visible runtime, SQL schema, data, or migration change.

Why This Change Was Made

The existing Kysely generator already prepares types for TypeScript checks and plugin-boundary builds, but core lint intentionally skips those plugin builds. While this PR was open, main independently added the direct generator call in 54522d1. The real overlap was resolved by merging main without a rebase or force-push; this PR completes batch ownership, preparation exemptions, artifact lifetime, and copied-fixture dependencies. Direct typed lint now invokes that generator under artifact ownership; the shard owner generates once before launching skip-prepare children. Metadata commands, focused syntax-only guards, and explicit caller-owned preparation retain their existing behavior. No database callers, casts, or suppressions were changed.

Evidence

  • A separate worker-generation prerequisite was independently landed on main by @jalehman in commit 5a1c18b (PR162508) at 07:57 UTC. We verified the merge and retained that fixture byte-for-byte when resolving the real overlap, rather than shipping a competing implementation. The final PR diff remains the five lint-owner/fixture files.
  • Bounded observations established the worker failure was an incorrect immediate-PPID oracle: ordinary tooling runs in threads, while tooling-isolated adds a forked worker under its Vitest CLI. Both first-group invocations still had one group planner and shared one generation; there was no third CI group. The canonical fixture records planner identity before either pool inherits it. Its full six-case file passed after integration under CI=true and the reported bun-compatible outer policy (51.752 seconds tests, 53.51 seconds Vitest / 54.42 seconds runner). Existing real compiler/IPC/lifecycle coverage accounts for this cost; no process or test was added.
  • The previous accepted auto request was retired through native recovery before head replacement. Historical failed/cancelled CI remains recorded as such; replacement landing still requires completed exact-head gates with no rerun, dispatch, or admin exception.
  • Cold direct core lint over src/state: four database error-as-any diagnostics before the repair; 494 files passed afterward.
  • Cold core stripe 4/5, narrowed to src/state/openclaw-state-read.types.ts: the same four diagnostics before the repair; passed afterward. Generator verification passed after both cold runs.
  • New real-oxlint direct/striped regression cases failed on the original implementation and passed after the repair. Skip-prepare, metadata, and syntax-only behavior are covered.
  • 102 focused lint/generator/artifact-lifetime/report-memory tests passed.
  • Final pnpm test test/scripts/run-oxlint-kysely.test.ts --maxWorkers=1: 3 passed; 9.563 seconds command wall, 5.973 seconds test time. The fixture exercises the real process entrypoints and native linter. CI timing is not yet available.
  • Scoped check-changed passed, including script/root-test types, lint, formatting, ratchets, and dead-export scans.
  • Follow-up closes the copied-runner fixture dependency gap exposed by CI: both lint-status and changed-lint fixtures now copy the existing generator. A selected lint-status case reproduced the missing-module failure before this two-line repair; all 59 tests then passed (lint-status 40, changed-lint 16, Kysely 3), with 39.48 seconds Vitest / 42.66 seconds command wall. Typed lint, formatting, and whitespace checks passed. No assertions, timeouts, or configurations changed. Other copied-runner fixtures were audited.
  • After integrating the actual main conflict, all 59 focused tests passed again (40.82 seconds Vitest / 42.40 seconds runner wall); typed lint reported zero warnings/errors, and formatting/whitespace checks passed. All task files and the generator stayed byte-identical through conflict resolution, retaining the earlier cold proof.
  • Initial independent review through P2 was clean after correcting the Windows fixture link to use a junction. Conflict-resolution review suggested honoring the leaf skip-preparation variable in the batch owner; this was not applied because existing batches deliberately prepare before setting that variable on their children. The existing source contract was checked; no other findings were reported. Windows execution itself was not run locally.

Worked on by

Work sessions


View the OpenClaw team session

roboclaw-bot and others added 2 commits October 1, 2026 06:48
Generate Kysely declarations through the existing owner before direct typed lint and before striped children skip preparation. Keep core lint independent of plugin declaration builds and preserve metadata, focused syntax-only, and caller-owned preparation paths.

Co-authored-by: steipete <[email protected]>
Worked on by:
- @steipete

Co-authored-by: steipete <[email protected]>
OpenClaw-Publication: 1845cf04-95a0-4fb5-8975-0c309cc08106
@clawsweeper

clawsweeper Bot commented Oct 1, 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 scripts Repository scripts size: S labels Oct 1, 2026
@roboclaw-bot
roboclaw-bot marked this pull request as ready for review October 1, 2026 06:54
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. 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 Oct 1, 2026
@clawsweeper

clawsweeper Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed October 1, 2026, 4:14 AM ET / 08:14 UTC (Revision 6).

ClawSweeper review

What this changes

The PR prepares generated database types under shared lint ownership, preserves preparation exemptions, and completes copied-runner fixtures with real-linter regression coverage.

Merge readiness

✅ Ready for maintainer review

Keep open: current main does not cover the complete repair, and the previous integration blocker is resolved. No actionable correctness or security findings remain.

Likely related people: steipete and vincentkoc (medium-confidence routing candidates).

Priority: P2
Reviewed head: 0a70f81a6dc215cc9100ab6a47317e02d3d3a596

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused repair with relevant real-entrypoint observations, meaningful regression coverage, and no remaining actionable findings.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (terminal): The captured body records before/after cold direct and striped runs through the changed lint owners using the native linter, plus reproduced copied-runner failure and passing integration results. The retained lint patch is unchanged from the prior reviewed head. Generated source declarations change preparation timing, not a stored database contract.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (terminal): The captured body records before/after cold direct and striped runs through the changed lint owners using the native linter, plus reproduced copied-runner failure and passing integration results. The retained lint patch is unchanged from the prior reviewed head. Generated source declarations change preparation timing, not a stored database contract.
Evidence reviewed 9 items Pinned introduction: The verified merge-base-to-head delta contains the lint runners and their fixtures. It changes preparation and artifact lifetime without changing database schemas, runtime callers, dependency resolution, or execution permissions.
Preparation and ownership contract: The direct runner generates types inside shared artifact ownership and honors caller-owned preparation. The batch prepares once before spawning children that set OPENCLAW_OXLINT_SKIP_PREPARE=1; the existing ownership launcher lets those children reuse the batch lock. Focused guards and informational commands bypass generation.
Current-main overlap remains partial: Comparison against fetched main retains the preparation exemptions, batch generation, broader artifact ownership, copied-fixture repairs, and regression cases. Main’s direct generator call therefore does not make this PR obsolete.
Findings None None.
Security None None.

How this fits together

OpenClaw’s lint runners feed source files and generated database declarations into the native TypeScript-aware linter. The batch runner prepares shared artifacts before launching lint children and collects their results.

flowchart TD
  A[Developer or CI lint request] --> B[Direct or batch runner]
  B --> C{Typed lint needed?}
  C -->|Yes| D[Shared artifact ownership]
  D --> E[Generate database declarations]
  E --> F[Native linter]
  C -->|No| F
  F --> G[Diagnostics and exit status]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests +132, Other +18. Total +150 across 5 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 3 132 0 +132
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 2 29 11 +18
Total 5 161 11 +150

Review metrics

Metric Value Why it matters
New regression cost 3 cases; 5.973 s test time / 9.563 s command wall The measured native-linter coverage protects preparation behavior through both supported entrypoints.

Technical review

Best possible solution:

Keep generated-type preparation with the existing generator and shared artifact owner, preserving lightweight commands and core lint’s independence from plugin declaration builds.

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

Yes, by source inspection: current-main copied fixtures omit the generator imported by their copied lint runners. The PR records the corresponding missing-module failure and cold-lint failures; this read-only review did not execute them.

Is this the best way to solve the issue?

Yes. The patch extends the existing generator and artifact owner, repairs the affected fixture closures, and preserves supported preparation exemptions without modifying database consumers or suppressing diagnostics.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against af80e86b3a2a.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: This repairs developer and CI lint preparation with a bounded tooling blast radius and no product runtime 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 captured body records before/after cold direct and striped runs through the changed lint owners using the native linter, plus reproduced copied-runner failure and passing integration results. The retained lint patch is unchanged from the prior reviewed head. Generated source declarations change preparation timing, not a stored database contract.
  • proof: sufficient: Contributor real behavior proof is sufficient. The captured body records before/after cold direct and striped runs through the changed lint owners using the native linter, plus reproduced copied-runner failure and passing integration results. The retained lint patch is unchanged from the prior reviewed head. Generated source declarations change preparation timing, not a stored database contract.

Evidence

What I checked:

  • Pinned introduction: The verified merge-base-to-head delta contains the lint runners and their fixtures. It changes preparation and artifact lifetime without changing database schemas, runtime callers, dependency resolution, or execution permissions. (scripts/run-oxlint.mts:670, 0a70f81a6dc2)
  • Preparation and ownership contract: The direct runner generates types inside shared artifact ownership and honors caller-owned preparation. The batch prepares once before spawning children that set OPENCLAW_OXLINT_SKIP_PREPARE=1; the existing ownership launcher lets those children reuse the batch lock. Focused guards and informational commands bypass generation. (scripts/run-oxlint-shards.mts:355, 0a70f81a6dc2)
  • Current-main overlap remains partial: Comparison against fetched main retains the preparation exemptions, batch generation, broader artifact ownership, copied-fixture repairs, and regression cases. Main’s direct generator call therefore does not make this PR obsolete. (scripts/run-oxlint.mts:427, af80e86b3a2a)
  • Real behavior observations: The captured PR body reports four error-as-any diagnostics before the repair, followed by a passing cold direct run over 494 files and a passing narrowed cold core stripe. Generator verification passed after both runs. It also records the copied-runner missing-module failure before correction and 59 passing focused cases afterward. These observations exercise the changed lint entrypoints; this reviewer did not execute artifact-producing commands. (0a70f81a6dc2)
  • Regression value and cost: The new fixture executes the real direct and striped runners with the native linter, verifies cold declarations and absence of plugin declaration builds, and checks skip-preparation, metadata, and focused behavior. The body records original-code failures and three passing cases at 5.973 seconds test time and 9.563 seconds command wall time. (test/scripts/run-oxlint-kysely.test.ts:100, 0a70f81a6dc2)
  • Previous integration concern resolved: The current head is open and mergeable according to GitHub. Its retained lint files have the same blob identities as the previous reviewed head. The worker fixture matches fetched main exactly, retaining the merged repair at fix(test): keep worker generation checks valid with fork isolation #162508 rather than introducing a competing implementation. The supplied test merge is stale and was not used to infer merged-tree behavior. (test/scripts/vitest-worker-artifacts.ci.test.ts, 0a70f81a6dc2)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • vincentkoc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; 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.

History

Review history (5 earlier review cycles)
  • reviewed 2026-10-01T06:59:47.995Z sha 55b8093 :: needs maintainer review before merge. :: none
  • reviewed 2026-10-01T07:26:07.805Z sha 36362b8 :: needs changes before merge. :: none
  • reviewed 2026-10-01T07:33:29.882Z sha 1ec4e2f :: needs maintainer review before merge. :: none
  • reviewed 2026-10-01T07:43:43.731Z sha 1ec4e2f :: needs maintainer review before merge. :: none
  • reviewed 2026-10-01T08:07:16.993Z sha 92c2ec9 :: needs changes before merge. :: none

roboclaw-bot and others added 4 commits October 1, 2026 07:17
Keep copied lint-status and changed-lint fixtures complete after typed runners gained their Kysely prerequisite. Preserve all process-lifetime, signal, timeout, and semantic-lint assertions.

Co-authored-by: steipete <[email protected]>
Worked on by:
- @steipete

Co-authored-by: steipete <[email protected]>
OpenClaw-Publication: 6962f022-9a87-4b9e-98b9-c48b9f678a13
Resolve the actual run-oxlint conflict with main commit 54522d1 by retaining the reviewed direct and batch preparation owners. Task files remain byte-identical to the tested candidate; 59 focused tests, typed lint and formatting pass after integration.

Review disposition: the shard-parent skip-preparation suggestion is not applied. Existing batch preparation deliberately runs before child processes and installs OPENCLAW_OXLINT_SKIP_PREPARE=1 only for those children; the direct runner owns that leaf handoff. Preserve that established parent/child contract rather than adding a new batch-level bypass.

Co-authored-by: steipete <[email protected]>
Worked on by:
- @steipete

Co-authored-by: steipete <[email protected]>
OpenClaw-Publication: f87db3b2-5303-4e82-abd2-215b0ad81c97
@roboclaw-bot roboclaw-bot changed the title fix(lint): cold core checks fail on missing database types fix(lint): copied runner checks fail after schema preparation Oct 1, 2026
@roboclaw-bot
roboclaw-bot enabled auto-merge (squash) October 1, 2026 07:32
@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Oct 1, 2026
@roboclaw-bot
roboclaw-bot disabled auto-merge October 1, 2026 07:48
roboclaw-bot and others added 2 commits October 1, 2026 07:57
Mixed threads and forks add different immediate OS parent hops. Record each real Vitest CLI PID and PPID in the existing fixture, bind every borrower to its launcher, and continue requiring exactly two CI group owners. Preserve three borrowers, generation/input equality, compiler counts and disposal guarantees; strengthen per-group and launcher cleanup checks.

The original first-case failure was reproduced with bounded ancestry observations before its assertion. Full original-order CI fixture plus batch/shutdown siblings: 81 passed. The failing case also passes with the reported bun-compatible runtime policy. Scoped changed checks passed; independent P2 review is clean. No production owner, scheduling, timeout, retry, or pool configuration changes.

Co-authored-by: steipete <[email protected]>
Worked on by:
- @steipete

Co-authored-by: steipete <[email protected]>
OpenClaw-Publication: 898d5732-9c30-4a0e-a6ae-83e81453a9a3
@roboclaw-bot roboclaw-bot changed the title fix(lint): copied runner checks fail after schema preparation fix(ci): repair cold lint fixtures and mixed-pool worker checks Oct 1, 2026
roboclaw-bot and others added 2 commits October 1, 2026 08:06
Resolve the actual conflict with newly landed main repair 5a1c18b by retaining its worker fixture byte-for-byte rather than shipping a competing observer. The canonical fix records the real group planner before threads or forks inherit its identity; all six original-order cases pass under the reported bun-compatible CI policy (53.51s Vitest, 54.42s runner wall).

The remaining five-file Kysely and copied-lint-fixture patch is unchanged and retains its previous proof. The independently reviewed/tested alternative 632bd60 remains in history for attribution, but is superseded by the canonical main implementation.

Co-authored-by: steipete <[email protected]>
Worked on by:
- @steipete

Co-authored-by: steipete <[email protected]>
OpenClaw-Publication: 411d1e40-6d79-485c-b42e-63843f69fd68
@roboclaw-bot roboclaw-bot changed the title fix(ci): repair cold lint fixtures and mixed-pool worker checks fix(lint): copied runner checks fail after schema preparation Oct 1, 2026
@roboclaw-bot
roboclaw-bot merged commit 4f34af8 into main Oct 1, 2026
108 of 110 checks passed
@roboclaw-bot
roboclaw-bot deleted the openclaw/prepare-kysely-before-core-lint branch October 1, 2026 08:34
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 2, 2026
…aw#162489)

* fix(lint): prepare schema types before cold core checks

Generate Kysely declarations through the existing owner before direct typed lint and before striped children skip preparation. Keep core lint independent of plugin declaration builds and preserve metadata, focused syntax-only, and caller-owned preparation paths.

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

* fix(lint): cold core checks fail on missing database types

Worked on by:
- @steipete

Co-authored-by: steipete <[email protected]>
OpenClaw-Publication: 1845cf04-95a0-4fb5-8975-0c309cc08106

* test(lint): include generated-type owner in runner fixtures

Keep copied lint-status and changed-lint fixtures complete after typed runners gained their Kysely prerequisite. Preserve all process-lifetime, signal, timeout, and semantic-lint assertions.

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

* fix(lint): cold core checks fail on missing database types

Worked on by:
- @steipete

Co-authored-by: steipete <[email protected]>
OpenClaw-Publication: 6962f022-9a87-4b9e-98b9-c48b9f678a13

* fix(lint): copied runner checks fail after schema preparation

Worked on by:
- @steipete

Co-authored-by: steipete <[email protected]>
OpenClaw-Publication: f87db3b2-5303-4e82-abd2-215b0ad81c97

* fix(test): measure CI group ownership at the Vitest launcher

Mixed threads and forks add different immediate OS parent hops. Record each real Vitest CLI PID and PPID in the existing fixture, bind every borrower to its launcher, and continue requiring exactly two CI group owners. Preserve three borrowers, generation/input equality, compiler counts and disposal guarantees; strengthen per-group and launcher cleanup checks.

The original first-case failure was reproduced with bounded ancestry observations before its assertion. Full original-order CI fixture plus batch/shutdown siblings: 81 passed. The failing case also passes with the reported bun-compatible runtime policy. Scoped changed checks passed; independent P2 review is clean. No production owner, scheduling, timeout, retry, or pool configuration changes.

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

* fix(ci): repair cold lint fixtures and mixed-pool worker checks

Worked on by:
- @steipete

Co-authored-by: steipete <[email protected]>
OpenClaw-Publication: 898d5732-9c30-4a0e-a6ae-83e81453a9a3

* fix(lint): copied runner checks fail after schema preparation

Worked on by:
- @steipete

Co-authored-by: steipete <[email protected]>
OpenClaw-Publication: 411d1e40-6d79-485c-b42e-63843f69fd68

---------

Co-authored-by: steipete <[email protected]>
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. scripts Repository scripts size: S 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