Skip to content

refactor: keep cache, reporting and SQLite history native - #1275

Merged
kvlonge merged 9 commits into
mainfrom
refactor/native-cache-boundaries
Oct 30, 2026
Merged

kvlonge merged 9 commits into
mainfrom
refactor/native-cache-boundaries

Conversation

@kvlonge

@kvlonge kvlonge commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Why

Remove avoidable Python dependencies from caching, compile reuse and runtime bookkeeping while preserving supported Python execution and APIs.

Changes

  • Move version-5 SQL-test snapshots into the cache crate, preserving exact bytes and malformed-cache misses.
  • Assemble identity payloads, CTE arrays and sorted pairs as Rust JSON.
  • Keep compile-reuse checks, launch records, prepared SQL-test plans and managed paths native; preserve public Python rows and path semantics.
  • Convert SQL-test, audit and scenario results once for summaries, failures and JSON, including history-projection metadata; preserve opaque SQL cells and callback artifacts.
  • Use the existing bundled SQLite library for history connections and an interruptible native lock. Preserve connection/subclass hooks, recovery, literal filenames and Ctrl+C.
  • Delete replaced helpers and lower boundary budgets without new exceptions or warehouse-state changes.

Verification

  • 45 cache and 9 binding Rust tests; 53 cache/result, 65 reuse/launcher, 147 artifact-planning, 110 identity, 12 audit/report, 34 scenario/report and 162 history tests passed.
  • make test: 12,185 passed after artifact-plan and identity migrations.
  • Exact make check-ci, bounded independent reviews and private hygiene scans passed.
  • Cold/warm launcher, exact cache/identity/artifact parity and unchanged warm mtimes verified.
  • Scenario strings match baseline bytes; direct/local/replay reports match after timing/path normalization.
  • SQLite works without Python connect. Three paired runs over 8,000 events/2,000 runs match exactly; peak RSS rises about 9 MiB. Literal-path and SIGINT regressions covered.
  • No external real project was available; no speedup claim. Windows source-reviewed, not run locally; SIGINT subprocess probe is POSIX-only.
  • No DuckShop addition: behavior-preserving boundary refactor, not a project-shape change.

Preserve existing cache snapshots and Python APIs while moving cache persistence and completed-test result consumers to native ownership.

Amp-Thread-ID: https://ampcode.com/threads/T-01a18715-4e00-708e-a87d-6bd109748d66
@kvlonge
kvlonge enabled auto-merge (squash) October 29, 2026 23:41
Construct reuse checks and compile records directly in Rust instead of round-tripping through Python containers. Reuse the cache artifact model while preserving Python-facing rows and launch-record strings.

Validated with 65 focused unit and integration tests, cold/warm native launcher replay, and make check-ci. Existing launcher coverage caught and now guards the path serialization conversion.

Amp-Thread-ID: https://ampcode.com/threads/T-01a18715-4e00-708e-a87d-6bd109748d66
@kvlonge kvlonge changed the title refactor: keep SQL-test cache and result processing native refactor: keep cache processing and compile reuse native Oct 29, 2026
Keep SQL-test plans, cached paths and managed paths native through preparation and publication. Preserve Python plan projection at the public API and platform path equality at target matching.

Amp-Thread-ID: https://ampcode.com/threads/T-01a18715-4e00-708e-a87d-6bd109748d66
Keep cache payload objects, CTE arrays and sorted pairs as Rust JSON values. Convert record and adapter leaf values at the existing JSON boundary, preserving the version-5 digest format and scalar checks.

Amp-Thread-ID: https://ampcode.com/threads/T-01a18715-4e00-708e-a87d-6bd109748d66
Convert executor audit results once, share projection metadata with build reporting, and remove the completed JSON parse/rewrite step. Preserve public formatting and warehouse history behavior.

Amp-Thread-ID: https://ampcode.com/threads/T-01a18715-4e00-708e-a87d-6bd109748d66
Read scenario outcomes, comparisons, assertions and nested resource results at the executor edge. Retain typed data through summary, failure and JSON reporting while preserving public projections, sample values and runtime artifact publication.

Amp-Thread-ID: https://ampcode.com/threads/T-01a18715-4e00-708e-a87d-6bd109748d66
@kvlonge kvlonge changed the title refactor: keep cache processing and compile reuse native refactor: keep cache and command result processing native Oct 30, 2026
Preserve reentrant callbacks and check Python signals during contended native waits. Retain connection hooks and transaction recovery, with a real SQLite cancellation regression.

Amp-Thread-ID: https://ampcode.com/threads/T-01a18715-4e00-708e-a87d-6bd109748d66
@kvlonge kvlonge changed the title refactor: keep cache and command result processing native refactor: keep cache, reporting and history locking native Oct 30, 2026
Keep local history connections and query rows native while preserving the public storage API, connection overrides, transaction recovery and interruptible locking.

Preserve literal filename semantics even when bundled SQLite enables URI interpretation globally. Cover persistence without Python connect and exact relative filenames through the public API.

Amp-Thread-ID: T-01a18715-4e00-708e-a87d-6bd109748d66
@kvlonge kvlonge changed the title refactor: keep cache, reporting and history locking native refactor: keep cache, reporting and SQLite history native Oct 30, 2026
@kvlonge
kvlonge merged commit 476fc85 into main Oct 30, 2026
45 checks passed
@kvlonge
kvlonge deleted the refactor/native-cache-boundaries branch October 30, 2026 02:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant