Skip to content

fix: unblock dependency checks by removing unused SQLite fence - #168240

Closed
steipete wants to merge 1 commit into
mainfrom
fix/sqlite-source-fence-spd9
Closed

steipete wants to merge 1 commit into
mainfrom
fix/sqlite-source-fence-spd9

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes the main dependency check reporting src/infra/sqlite-source-fence-admission.ts as an unused production file.

User Impact

No user-visible behavior, schema, stored-data, public SDK, or update changes. Existing publication, session-title, and worktree operations retain their native source and effect guards.

Why This Change Was Made

The factory introduced in #168018 never acquired a production caller. Its only backend implementation is the synthetic test backend; the introducing documentation explicitly says there was no bundled-caller cutover. No admission fence was accidentally removed by a later change.

Remove the unadopted primitive, its exclusive worker/transaction wiring, and its synthetic test facility together. Ordinary admission, commit receipts, settlement, and transaction behavior remain with their existing owners. Remove the corresponding wrapper-copy entries and native-SQL allowance, and document the retained native guards. No Knip ignore or configuration exemption is added.

Related: #168018

Evidence

Linux proof uses Node 24.19.0 and frozen pnpm 12.7.0 dependencies at base 7008414e344e plus the exact candidate patch.

  • Negative control: unchanged base fails the exact dependency gate with this one unused file (72.74 s); its original primitive suite passes all 15 cases (32.85 s).
  • Candidate: deadcode:dependencies, deadcode:unused-files, and deadcode:exports pass; production, full-tree, and script scans report zero entries (159.62 s / 90.50 s / 100.62 s).
  • Retained SQLite transaction, admission, attachment, and broker tests: 9 files / 139 tests pass (43.65 s command wall time).
  • Wrapper provisioning, source-closure, and eager-import consumers: 3 files / 36 tests pass; one existing macOS-only case is skipped on Linux (415.97 s).
  • Complete source-contract lane passes (283.55 s).
  • check-changed --base 7008414e344e passes (2966.56 s), including production types, all 27 core-test type graphs, script types, core/script lint, storage/security guards, and runtime import-cycle checks.
  • Explicit changed-file lint, boundary lint, formatting, and P2 review pass.

The broader infra run was stopped after about 74 minutes with 13,000 passing case lines, six failures, and 408 files reached; this is partial coverage, not a passing whole-config result. All five worktree failures reproduce on the unchanged base when /tmp has 7.6–7.7 GiB free against an 8 GiB setup requirement. Those same five cases pass on both base and candidate with disk-backed temporary storage (47.32 s / 47.49 s), without changing tests or capacity limits. The remaining failure in openclaw-agent-execution-incognito.memory.test.ts:408 reproduces identically in whole-file base/candidate runs: the status now includes two configuration lines absent from the expected text (10 pass, 1 fail on each).

The entire infra and tooling configs and the other consumer configs are not completed. The direct-import and policy-watch footprint spans 14 configs, so this is a ready PR for maintainer review, not a claim that the direct-push proof floor is complete. Testbox admission exhausted 15 minutes; Linux proof used the authorized Crabbox fallback. No CI dispatches or reruns were requested.

The source-fence admission factory introduced in #168018 never acquired a
production caller. Its only backend implementation is its synthetic test;
existing publication, session-title and worktree operations keep their
native source and effect guards.

Remove the unadopted primitive, its exclusive worker and transaction wiring,
and the tests that only exercise it. Keep ordinary admission, commit receipt,
settlement and SDK transaction contracts intact. Remove the corresponding
wrapper-copy entries and native-SQL allowance, and correct the documentation.

This clears the production Knip unused-file failure without an ignore or
configuration exemption. No schema, stored data or update behavior changes.
@clawsweeper

clawsweeper Bot commented Oct 10, 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 docs Improvements or additions to documentation scripts Repository scripts size: XL labels Oct 10, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

Closing as superseded by #168241.

#168018 introduced the SQLite source fence on purpose as a dormant foundation. Its PR body and the worker-access reference say later GitHub publication, session-title, and worktree operations will adopt it. Removing it to satisfy Knip would undo that foundation and its broker tests. #168241 instead records the Knip finding against #168018, with an explicit removal condition (drop the entry with the first caller), and also fixes the other dependency-check findings on main.

@steipete steipete closed this Oct 10, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 10, 2026
@clawsweeper

clawsweeper Bot commented Oct 10, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

Removes the unused SQLite cross-store source fence, its tests, and its worker, transaction, and tooling registrations.

Example: Run pnpm deadcode:dependencies on the recorded base and candidate.

  • Before: The recorded base run reports sqlite-source-fence-admission.ts as an unused production file.
  • After: The recorded candidate run passes without adding an ignore entry.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The source supports a correct, complete removal; supplied validation is focused and explicitly partial, with no independently inspected shipped-runtime trace.
Proof confidence 🦐 gold shrimp (3/6) The supplied repository state identifies a maintainer-authored internal cleanup outside the external-contributor proof gate; recorded dependency controls and native broker tests support it without claiming a completed whole-system run.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: The main dependency gate fails because an internal source-fence factory has no production caller.
Reason: The established feature contributor explains the intentional removal, and source inspection confirms that it restores the gate without disabling an adopted capability.

Merge readiness

✅ Ready for maintainer review

Keep open: this PR removes a demonstrably unused foundation and its exclusive wiring without changing production authorization or settlement behavior; no actionable patch defect was found.

Priority: P2
Reviewed head: e70cc6b5414b591f8c2fe515d9905aa78b3eb7c1

Before merge

None.

Findings

None.

Agent review details

How this fits together

The SQLite broker sends typed operations to worker backends, which obtain live admission, execute native transactions, and return commit receipts and settlement facts.

flowchart TD
 A[Domain caller] --> B[SQLite broker]
 B --> C[Worker backend]
 C --> D[Live operation admission]
 D --> E[Native SQLite transaction]
 E --> F[Commit receipt and settlement]
 F --> B
Loading

Technical review

Best possible solution:

Remove the unadopted fence completely while retaining existing domain authority guards and ordinary broker settlement.

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

Current-main references establish the unused production factory, and the PR records the exact dependency gate failing on the base and passing on the candidate; no target code was run during this review.

Is this the best way to solve the issue?

Complete removal is a coherent repair because the primitive has no production adopter, its exclusive tests and wiring are removed together, and existing admission and final-effect guards remain.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Cross-store fence, exclusive worker and transaction wiring, tests, documentation, and tooling registrations changes intended behavior with a stated reason (89c0368: Provide durable source exclusion as an internal foundation for later domain migrations, while leaving existing production paths and guards unchanged.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit e05265f adds src/infra/sqlite-worker-operation-admission.ts:489 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: e05265fc8126; files: src/infra/sqlite-worker-operation-admission.ts)
  • Vincent Koc: Raw commit c47c7fb adds src/infra/sqlite-worker-operation-admission.ts:301 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: c47c7fb6341c; files: src/infra/sqlite-worker-operation-admission.ts)

PR surface

Source -528, Tests -726, Docs -35, Other -4. Total -1293 across 12 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 7 7 535 -528
Tests 2 0 726 -726
Docs 1 5 40 -35
Config 0 0 0 0
Generated 0 0 0 0
Other 2 0 4 -4
Total 12 12 1305 -1293

Review metrics

Metric Value Why it matters
Production versus test reduction Production +7/−535 lines; tests and fixture support +0/−726 lines. The reduction removes an unused primitive together with its exclusive synthetic facility rather than preserving a test-only production path.

Labels

Label changes:

  • add P2: Repairs a concrete dependency-gate failure without changing an existing user workflow.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🦞 diamond lobster.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P2: Repairs a concrete dependency-gate failure without changing an existing user workflow.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only; repair and merge need explicit maintainer commands such as @clawsweeper autofix or @clawsweeper automerge.

Reviewed October 10, 2026, 1:44 AM ET / 05:44 UTC.

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

Labels

docs Improvements or additions to documentation P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. scripts Repository scripts size: XL 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