Skip to content

fix: restore SQLite test compilation - #152133

Closed
steipete wants to merge 1 commit into
mainfrom
codex/fix-sqlite-test-promisify
Closed

steipete wants to merge 1 commit into
mainfrom
codex/fix-sqlite-test-promisify

Conversation

@steipete

@steipete steipete commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes SQLite test compilation failures in CI caused by duplicate declarations in three child-process mock factories.

Related: #152126, #151366, #152064.

User Impact

There is no user-visible or runtime behavior change. SQLite tests, type checks, and boundary lint can load these test files again.

Why This Change Was Made

Two merged changes introduced the same promisify binding into each factory. Remove only the second declaration, preserving the existing custom promisifier descriptor, Vitest reset ownership, and all assertions.

Evidence

  • Original CI run 35388936518 reports six TS2451 errors, three duplicate-identifier lint errors, and two suites that cannot transform because of these declarations.
  • The owning test/tsconfig/tsconfig.core.test.state-logging.json TypeScript graph passes.
  • The existing keeps execFile resettable while preserving promisified stdout and stderr regression passes; all three affected files were collected (1 test passed, 80 unrelated tests skipped).
  • Scoped formatting, boundary lint, and git diff --check pass.
  • Independent review of the three-line deletion found no actionable P0–P2 findings. Exact-head hosted CI 35390602082 and the canonical required-check rollup are green.

@clawsweeper

clawsweeper Bot commented Sep 18, 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 size: XS maintainer Maintainer-authored PR labels Sep 18, 2026
@jalehman
jalehman marked this pull request as ready for review September 18, 2026 20:17
steipete added a commit that referenced this pull request Sep 18, 2026
Merge the reviewed three-line repair from #152133 so cloud-startup presentation CI can load the existing SQLite test suites. Preserve the original repair commit and all test assertions.
@clawsweeper

clawsweeper Bot commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 18, 2026, 4:22 PM ET / 20:22 UTC.

ClawSweeper review

What this changes

Removes duplicate promisify declarations from three SQLite test mock factories so the files can compile and load again.

Merge readiness

✅ Ready for maintainer review

This remains a useful, narrowly scoped repair: fetched main still contains the duplicate declarations, and the patch removes them without weakening coverage. No actionable correctness or security findings.

Priority: P2
Reviewed head: 1bc3482c04a6ecba028af223929259b87ac73f61

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A minimal, correct repair with relevant reported validation and no actionable findings.
Proof confidence 🌊 off-meta tidepool Not applicable: The supplied repository state identifies a maintainer-authored, test-only repair with no changed production owner or authority boundary; the reported collection, typecheck, and reset/stdio regression are proportionate validation.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The supplied repository state identifies a maintainer-authored, test-only repair with no changed production owner or authority boundary; the reported collection, typecheck, and reset/stdio regression are proportionate validation.
Evidence reviewed 6 items Verified introduced change: The pinned merge-base-to-head diff removes only a second identical local declaration in each factory; custom promisifier descriptors, mock implementations, and assertions remain unchanged.
Repair remains necessary on fetched main: Comparing all three affected files against fetched main shows precisely the same duplicate-declaration removals. Main still contains the compilation defect.
Existing behavioral coverage preserved: The existing regression resets all mocks and invokes a real promisified child process, asserting both stdout and stderr. The PR body reports that regression passed and all affected files collected; those runs were not repeated during this read-only review.
Findings None None.
Security None None.

How this fits together

OpenClaw’s SQLite tests exercise snapshot workers, cancellation, and cleanup through child processes. Their mock factories preserve native process behavior while allowing tests to observe and reset calls.

flowchart LR
  A[SQLite test suites] --> B[Child-process mock factories]
  B --> C[Single local utility binding]
  C --> D[Native process behavior]
  D --> E[Snapshot and cancellation assertions]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests -3. Total -3 across 3 files.

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

Review metrics

None.

Root-cause cluster

Relationship: canonical
Canonical: #152133
Summary: This PR owns the focused compilation repair; a separate UI PR explicitly includes it as a dependency.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Technical review

Best possible solution:

Keep one factory-local utility binding while preserving the existing native promisifier descriptor and reset regression.

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

Yes, from source: fetched main declares the same const binding twice in each affected factory, preventing compilation. Tests were not executed during this read-only review.

Is this the best way to solve the issue?

Yes. Removing only the redundant declarations directly repairs compilation while retaining the intended mock behavior and all existing assertions.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P2: Repairs a source-proven test compilation defect with a bounded developer-facing impact 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.

Label justifications:

  • P2: Repairs a source-proven test compilation defect with a bounded developer-facing impact and no runtime behavior change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.

Evidence

What I checked:

Likely related people:

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

steipete added a commit that referenced this pull request Sep 18, 2026
Merge main 47c4fbc and the exact reviewed repair from #152133 to remove
shared-main duplicate promisify declarations blocking scheduler PR CI.
Keep both upstream ancestries. Scheduler source matches the independently
reviewed local build, including the current execution-owner cutover.
@vincentkoc vincentkoc self-assigned this Sep 18, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

Closing as already fixed on main by #152028, merged at 3fceb86. That commit includes the same three duplicate-declaration removals; comparison against this PR's reviewed head 1bc3482 is empty for all three affected files.

The resulting blobs match exactly:

  • sqlite-readonly-location.cancellation.test.ts: a3e084dbf44cae2e888eb0e90f0f5698b7dbce2a
  • sqlite-readonly-worker.test.ts: 14fe9e3a386b3d79af85ae5832d7069adf1a6aaf
  • sqlite-snapshot-staging.cancellation.test.ts: 03e9ab1d85445c0e914d7ddecf2b42b7843b57c2

This PR's exact-head CI, scoped state/logging type graph, existing execFile reset/promisify regression, and independent review all passed. The native merge gate correctly stopped before dispatch because the squash would produce no net change. This PR is closed as redundant, not merged.

@steipete steipete closed this Sep 18, 2026
@steipete
steipete deleted the codex/fix-sqlite-test-promisify branch September 18, 2026 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants