Skip to content

refactor: move event exporting into sqlbuild-python-output - #1547

Merged
kvlonge merged 5 commits into
mainfrom
refactor/python-event-exporting
Nov 17, 2026
Merged

kvlonge merged 5 commits into
mainfrom
refactor/python-event-exporting

Conversation

@kvlonge

@kvlonge kvlonge commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

Why

sqlbuild-python is still over the crate size limit. Lifecycle-event export (the dispatcher, its workers, the export policy and the attribute getters) is output machinery and belongs in sqlbuild-python-output.

Changes

  • The event export dispatcher, workers, policy and getters move into sqlbuild-python-output as event_exporting. Callers use the new paths; there are no re-exports.
  • Staying in sqlbuild-python: the registration, which adds the same classes and registers the same interpreter-exit hook. The CLI observability and record behaviours modules change only their imports.
  • main/ entries hold the bodies they used to forward to.
  • fensu: the sqlbuild-python cap drops from 52,134 to 50,333 code lines. 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: +103 in total (use +68, item code +18, main/ entries +10, mod +7).

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.3 on 8 cores: cold 10.58→10.56 s wall, 29.94→29.99 s CPU; warm 0.69→0.68 s; one-model edit 1.92→1.97 s.
  • Rebuild after a one-line edit in sqlbuild-python (cargo build --profile fast, warm, 3 alternating runs, medians): 26.74→24.18 s wall, 50.9→47.1 s CPU.
  • make test (with main c14fca0 merged in): 12,323 passed. The 13 failures are Docker publication tests that need an image this machine lacks, and one Recall test that fails the same way on main here.
  • make check-ci passed on the final head.

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.
…tion-history

# Conflicts:
#	crates/sqlbuild-python/src/bindings/_helpers/record_behaviours/constants.rs
#	fensu.toml
The native lifecycle-event export dispatcher, its workers, export
policy and attribute getters move from the Python bindings crate into
sqlbuild-python-output. The bindings crate keeps only the registration,
which now imports the classes and the interpreter-exit hook from there.
…-exporting

# Conflicts:
#	crates/sqlbuild-python/src/bindings/_helpers/record_behaviours/constants.rs
#	fensu.toml
@kvlonge
kvlonge enabled auto-merge November 17, 2026 12:18
@kvlonge
kvlonge added this pull request to the merge queue Nov 17, 2026
Merged via the queue into main with commit 36fd3a5 Nov 17, 2026
32 checks passed
@kvlonge
kvlonge deleted the refactor/python-event-exporting branch November 17, 2026 13:12
kvlonge added a commit that referenced this pull request Nov 17, 2026
Moves event exporting from the bindings crate into
sqlbuild-python-output, as the slice did, keeping the large-project
tree's behaviour. The slice's base already carried main's
invocation-start delivery (#1539), which the tree does not have; that
change is left out here and arrives with the main merge.

Validation: cargo check --workspace --all-targets passes with no
warnings, the layout matches the slice, and every item of the tree's
event exporting is still present. 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