Repository navigation
refactor: remove SQLite CLI dependency from gitcrawl reads - #1126
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: found issues before merge. Reviewed August 11, 2026, 4:46 PM ET / 20:46 UTC. ClawSweeper reviewWhat this changesThis PR replaces five local gitcrawl SQLite CLI reads with Node’s read-only SQLite API, removes the cluster-intake CLI install, and adds compatibility proof and fixtures. Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readinessKeep this PR open: the Node 24 migration and real-store proof are strong, but the earlier documentation blocker remains and maintainers need to decide whether related-context reads may now block indefinitely. Priority: P2 Review scores
Verification
How this fits togetherRelated-context discovery and repair importers query local gitcrawl SQLite stores for review relationships and repair-job inputs. Their results feed review prompts and cluster/low-signal job preparation. flowchart LR
Store[Local gitcrawl store] --> Reader[Read-only SQLite reader]
Reader --> Context[Related-context discovery]
Reader --> Imports[Repair importers]
Context --> Reviews[Review prompts]
Imports --> Jobs[Repair job preparation]
Decision needed
Why: The migration intentionally removes an existing timeout while changing a best-effort review dependency; choosing the acceptable availability tradeoff requires maintainer ownership. Before merge
Findings
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the Node 24 read-only reader, update the operator documentation, and preserve a bounded best-effort failure path for related-context reads before merging. Do we have a high-confidence way to reproduce the issue? Not applicable as a report; the PR supplies current-head real SQLite fixture and container evidence for its claimed behavior. Is this the best way to solve the issue? Unclear: removing the CLI dependency fits the Node 24 runtime contract, but the direct synchronous replacement is not the safest solution until the timeout tradeoff is resolved. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 27d0dca68158. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (4 earlier review cycles)
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
What Problem This Solves
ClawSweeper's local gitcrawl readers still required a host-installed
sqlite3executable. Related-context discovery and both repair importers could fail because the binary was absent, not executable throughPATH, timed out, or exceeded a subprocess output buffer even when the database itself was healthy.Why This Change Was Made
The five scalar/JSON subprocess call sites now share a small Node 24
node:sqlitereader that opens each store withDatabaseSync(dbPath, { readOnly: true }), reads integers as BigInts, and explicitly normalizes JSON-row integers to the existing JavaScript-number contract. Related-context keeps its best-effort fallbacks; importer errors remain terminal. The cluster-intake workflow no longer installs the obsolete CLI.User Impact
Operators can run related-context discovery and gitcrawl repair imports anywhere the supported Node 24 runtime is present, including the normal Linux container, without separately provisioning
sqlite3. There is no change to generated job content or repair policy.OpenClaw Bay Impact
OpenClaw Bay is unaffected. This changes local read-only gitcrawl store access and workflow bootstrap only; it does not change lifecycle publication, queues, status telemetry, dashboard data, or Bay's observer-only boundary.
Documentation Lifecycle
docs/proof/node-sqlite-migration/is historical, commit-bound validation evidence rather than an active runbook. No active documentation lifecycle changes.Evidence
Real Behavior Proof
node:sqlitewithout changing scalar text, parsed JSON rows, empty-result behavior, or caller-level error outcomes.Number.MAX_SAFE_INTEGER; cluster-intake bootstrap.node:sqlite, including both gitcrawl cluster schemas and a portable database whose committed fixture rows remain in a live-walsidecar. Importer subprocess tests run with an emptyPATH.node docs/proof/node-sqlite-migration/run-proof.mjs;node --test test/repair/gitcrawl-sqlite.test.ts; the seven gates recorded below;pnpm run check.[]/falseor[]/nullin related-context and nonzero failure in both importers.9007199254740993remains exact scalar text and normalizes to JSON number9007199254740992, matching the old CLI path.docs/proof/node-sqlite-migration/equivalence.jsonbinds host proof to implementation commitc5b65dfa2daf24b7158939b5f7f10fb5803fbbb9; the harness extracts the three old source files fromorigin/mainand verifies all five old invocations before comparison.proof: sufficient. Host equivalence and the fresh-PR container receipt both apply to the pushed implementation; the final head adds only the committed receipt.
Local gates
pnpm run build:all: passed.pnpm run test:no-build: 3,333 tests; 3,324 passed, 9 skipped, 0 failed.pnpm run lint: passed.pnpm run format:check: 663 files passed.pnpm run check:static: passed.The composed
pnpm run checkgate also passed on committed head72d2947f7c, including 81.58% line, 74.05% branch, and 87.39% function coverage. Pre-commit and committed-branch structured Codex reviews reported no accepted/actionable findings.Fresh-PR container
Crabbox resolved
provider=awsand ran pushed head31386dccd6ee9f77fe480ab6c705253647f4aaf2from fresh PR checkoutopenclaw/clawsweeper#1126innode:24-bookworm:run_61e78be4ed53; leasecbx_3ddd8eadc1bb(amber-barnacle-28b5),c7a.8xlarge;jq-linux-amd64, SHA-256b1c22172dd303f3be49e935aa56aa48a8b7a46e0bc838b4997d3bb451495870f);sqlite3absent before and after the rsync-only dependency setup;pnpm run checkpassed: 3,333 tests, 3,325 passed, 8 skipped, 0 failed; 81.60% lines, 74.06% branches, 87.40% functions;28669d632e2d5387d901c76504611ab37a19bd23de0c29453767e2bf5efe5c76;Commit
bd8d595a36addscontainer-provenance.json,container-secret-scan.json, and the secret-scanned stdout receipt in the same push. The provenance also records three discarded harness attempts: temporary jq PATH loss, login-shell PATH reset, and the base image's missing rsync. None was treated as proof.Review disposition
No accepted or actionable source findings remain. The branch intentionally preserves the old lossy JSON-number contract because downstream issue/cluster fields are consumed as numbers; scalar callers continue to receive exact decimal text before their existing
Number()conversion.