Skip to content

refactor: move the execution history store into sqlbuild-python-front - #1543

Merged
kvlonge merged 2 commits into
mainfrom
refactor/python-execution-history
Nov 17, 2026
Merged

kvlonge merged 2 commits into
mainfrom
refactor/python-execution-history

Conversation

@kvlonge

@kvlonge kvlonge commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Why

sqlbuild-python is still over the crate size limit. The execution history store and the resource costs table belong to the front layer, and the cost report can only follow them out once they have moved.

Changes

  • The execution history store (SQLite and PostgreSQL backends, appends, statements, conversions and its Python functions) moves into sqlbuild-python-front as execution_history. The resource costs table moves there as resource_costs. Callers use the new paths; there are no re-exports.
  • Staying in sqlbuild-python: the execution history registration. The review command changes only four use lines. The cost report, record behaviours and CLI registration change only their paths.
  • main/ entries hold the bodies they used to forward to.
  • fensu: the sqlbuild-python cap drops from 54,943 to 52,134 code lines. The resource costs table stays an XSB072/XSB073 edge, as it was under native_host. XSB072/XSB073 budgets are re-keyed with unchanged totals. [dupes] entries cover clusters main already had whose members moved.

Code lines across the sqlbuild-python* crates: +207 in total (use +122, main/ entries +46, mod +15, other item code +24).

No DuckShop case: this is a behaviour-neutral Rust move with no new project shape, value or lifecycle.

Verification

  • The _native surface is identical to main's build.
  • A dense 3,000-model compile gives identical JSON and identical files (11,175) to main.
  • Dense timing vs main, 7 alternating runs, same machine, load 2.9 on 8 cores: cold 9.01→9.04 s wall, 25.82→25.63 s CPU; warm 0.57→0.57 s; one-model edit 1.68→1.67 s.
  • Rebuild after a one-line edit in sqlbuild-python (cargo build --profile fast, warm, 3 alternating runs, medians): 22.02→21.92 s wall, 42.0→40.8 s CPU, unchanged.
  • make check-ci passed. make test: 12,312 passed; the 4 failures are publication tests that need Docker, as on main.

The execution history store (its SQLite and PostgreSQL backends, appends,
statements, conversions and Python functions) and the resource costs
table move from sqlbuild-python into sqlbuild-python-front, the layer
fensu already assigns them. Nothing in a lower crate imports them, so
the cost report can follow later without reaching back into
sqlbuild-python.

Old paths are deleted and callers updated; there are no re-exports. The
review command changes only its imports. main/ entries hold the bodies
they used to forward to. The resource costs table stays an XSB072/XSB073
edge as it was under native_host. The sqlbuild-python cap drops to its
new size, and the moved files' budgets are re-keyed with unchanged
totals.
@kvlonge
kvlonge disabled auto-merge November 17, 2026 08:59
…tion-history

# Conflicts:
#	crates/sqlbuild-python/src/bindings/_helpers/record_behaviours/constants.rs
#	fensu.toml
@kvlonge
kvlonge enabled auto-merge November 17, 2026 09:45
@kvlonge
kvlonge added this pull request to the merge queue Nov 17, 2026
@kvlonge
kvlonge removed this pull request from the merge queue due to a manual request Nov 17, 2026
@kvlonge
kvlonge added this pull request to the merge queue Nov 17, 2026
Merged via the queue into main with commit 7b79e4b Nov 17, 2026
33 checks passed
@kvlonge
kvlonge deleted the refactor/python-execution-history branch November 17, 2026 11:57
kvlonge added a commit that referenced this pull request Nov 17, 2026
…ject tree

Moves the execution history store and the resource cost state from the
bindings crate into sqlbuild-python-front, as the slice did. The tree
never changed the execution history files, so the slice's versions
carry over whole; the tree's one resource-cost-state change was an
import that the move already covers.

Validation: cargo check --workspace --all-targets passes with no
warnings and the layout matches the slice. Nothing is built or tested
yet. fensu reports 349 faults, unchanged from the previous slice.
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