Skip to content

fix: restore SQLite test collection - #152137

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

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

Conversation

@steipete

@steipete steipete commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Three SQLite test modules declare promisify twice inside the same child-process mock factory. Parsing stops with SyntaxError: Identifier 'promisify' has already been declared, preventing test collection and blocking checks on other changes, including #152127 and #152128.

User Impact

Restores collection of the affected SQLite tests. No production behavior changes.

Why This Change Was Made

Remove only the redundant second declaration in each factory. The existing import, custom promisified spawn behavior, test assertions, and timeouts remain unchanged.

Evidence

  • Syntax-only RED/GREEN proof on all three complete modules: originals fail with the duplicate-declaration error; repaired modules parse successfully after TypeScript stripping. Modules were neither linked nor evaluated.
  • git diff --check passed. The patch contains exactly three deletions.
  • Fresh canonical P2 review: scoped-clean, no findings, final source verification complete.
  • Exact-head hosted checks-node-changed passed all three complete affected files: location cancellation 15/15, worker 63/63, and snapshot staging cancellation 3/3 (81 tests; every shard exited 0). The remaining CI jobs are still running.
  • Application tests and dependency installation were not run in the isolated Windows publication checkout; the execution proof above comes from hosted CI.

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

@clawsweeper

clawsweeper Bot commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 18, 2026, 4:34 PM ET / 20:34 UTC (Revision 2).

ClawSweeper review

What this changes

Removes duplicate declarations from SQLite test mock factories so the affected modules can parse without changing their assertions.

Merge readiness

✅ Ready for maintainer review

The repair remains necessary on fetched main and has no actionable correctness findings. The previous external-contributor proof blocker does not apply to this verified maintainer-authored PR.

Priority: P2
Reviewed head: 98f46ffb7d88dcb2e4692ab0c34446af12f5da41

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A narrow, source-supported repair preserves existing coverage and has no blocking review findings.
Proof confidence 🌊 off-meta tidepool Not applicable: The verified maintainer author is exempt from external-contributor runtime proof, and no authority boundary changes. The captured syntax RED/GREEN report addresses these test factories’ parsing defect but does not establish Vitest execution; the previous proof blocker is therefore not retained.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The verified maintainer author is exempt from external-contributor runtime proof, and no authority boundary changes. The captured syntax RED/GREEN report addresses these test factories’ parsing defect but does not establish Vitest execution; the previous proof blocker is therefore not retained.
Evidence reviewed 7 items Verified introduced change: The pinned merge-base comparison removes only the second same-scope promisify declaration in each of the three test factories; custom promisification, assertions, and production code remain unchanged.
Repair still needed on main: Fetched main retains both declarations in the same factory. The corresponding factories in both cancellation modules were also inspected and retain the same syntax defect.
Existing regression coverage preserved: The complete worker test retains its resettable-execFile check and expected stdout/stderr result, together with reader, snapshot, timeout, and cleanup coverage. Both complete cancellation modules were also read.
Findings None None.
Security None None.

How this fits together

OpenClaw’s SQLite tests exercise isolated database readers, snapshot creation, and cancellation cleanup. Vitest must parse their mock factories before collecting and running those checks.

flowchart LR
  A[SQLite test modules] --> B[Parse mock factories]
  B --> C[Collect test cases]
  C --> D[Exercise readers and snapshots]
  D --> E[Check results and cleanup]
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.

Technical review

Best possible solution:

Retain the minimal syntax repair and existing behavioral coverage without adding production changes or duplicate tests.

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

Yes, from source: fetched main declares the same const twice within each affected mock factory, which prevents parsing. This read-only review did not execute Vitest.

Is this the best way to solve the issue?

Yes. Removing the redundant declaration preserves the existing import and custom promisification contract while directly eliminating the syntax error.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P2: Repairs a concrete test-collection defect with a bounded test-only change and no demonstrated user-facing runtime outage.
  • 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 verified maintainer author is exempt from external-contributor runtime proof, and no authority boundary changes. The captured syntax RED/GREEN report addresses these test factories’ parsing defect but does not establish Vitest execution; the previous proof blocker is therefore not retained.

Label justifications:

  • P2: Repairs a concrete test-collection defect with a bounded test-only change and no demonstrated user-facing runtime outage.
  • 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 verified maintainer author is exempt from external-contributor runtime proof, and no authority boundary changes. The captured syntax RED/GREEN report addresses these test factories’ parsing defect but does not establish Vitest execution; the previous proof blocker is therefore not retained.

Evidence

What I checked:

  • Verified introduced change: The pinned merge-base comparison removes only the second same-scope promisify declaration in each of the three test factories; custom promisification, assertions, and production code remain unchanged. (src/infra/sqlite-readonly-worker.test.ts:48, 98f46ffb7d88)
  • Repair still needed on main: Fetched main retains both declarations in the same factory. The corresponding factories in both cancellation modules were also inspected and retain the same syntax defect. (src/infra/sqlite-readonly-worker.test.ts:51, 554db19854ef)
  • Existing regression coverage preserved: The complete worker test retains its resettable-execFile check and expected stdout/stderr result, together with reader, snapshot, timeout, and cleanup coverage. Both complete cancellation modules were also read. (src/infra/sqlite-readonly-worker.test.ts:77, 98f46ffb7d88)
  • Proof exemption and review continuity: GitHub verifies steipete has repository admin permission; supplied repository state also identifies MEMBER association. The captured PR body reports syntax-only RED/GREEN results and explicitly does not claim Vitest execution. The previous review retained no findings or published rank-up moves; its external-proof blocker is inapplicable under the current maintainer exemption. (98f46ffb7d88)
  • Prior area history: Current-main history identifies Peter Steinberger across prior SQLite mock, asynchronous-reader, compile-cache, and staging-cleanup changes. Exact line-introduction attribution was not established because required historical objects were unavailable. (src/infra/sqlite-readonly-worker.test.ts, 35bc869cf5c9)
  • Release inspection limitation: The latest-release source inspection could not complete because the required historical object could not be retrieved. No shipped-fix claim is made; fetched main demonstrably still needs this repair. (src/infra/sqlite-readonly-worker.test.ts, 3a9d69db306c)

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.

History

Review history (1 earlier review cycle)
  • reviewed 2026-09-18T20:20:04.191Z sha 98f46ff :: needs real behavior proof before merge. :: none

@steipete
steipete marked this pull request as ready for review September 18, 2026 20:30
@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 Sep 18, 2026
@vincentkoc

Copy link
Copy Markdown
Member

Closing as strictly superseded by #152028, merged as 3fceb86048c49eebc244ed68205baf7d3daa4fe5.

Head 98f46ffb7d88dcb2e4692ab0c34446af12f5da41 applies the identical three-line deletion and produces the same corrected blobs in all three SQLite test files. Verified on current main f953dbdf470000549755eaaa8007dee803609c7b.

@vincentkoc vincentkoc closed this Sep 18, 2026
@RomneyDa
RomneyDa deleted the codex/fix-sqlite-mock-promisify-7006 branch October 22, 2026 00:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

2 participants