Skip to content

Experiment 257: reject native autocommit envelope - #275

Merged
danReynolds merged 3 commits into
mainfrom
exp-257-native-autocommit-envelope
Jul 29, 2026
Merged

Experiment 257: reject native autocommit envelope#275
danReynolds merged 3 commits into
mainfrom
exp-257-native-autocommit-envelope

Conversation

@danReynolds

Copy link
Copy Markdown
Owner

Hypothesis

A homogeneous coalesced MultiExecuteRequest can preserve every member as an
independent SQLite autocommit while replacing per-member Dart/native execution
orchestration with one private native interpreter call. Acceptance required at
least a 10% public insert-burst improvement in both process orders, with
sequential and mixed-SQL controls neutral.

Approach

The archived prototype packed a homogeneous parameter matrix once, reused one
cached statement and writer mutex in C, stopped on the first error, snapshotted
that error in Dart, and resumed the suffix through the scalar path. It added no
public API. The exact implementation and focused harness are preserved at
archive/exp-257 (d502717); the final PR reverts all runtime changes and
retains only the experiment sources, transferable lesson, and one coalescing
correctness guard.

Results

Lower is better; delta is candidate relative to baseline.

Process order Lane Baseline p50 Candidate p50 Delta
candidate → baseline homogeneous insert 75.502 ms 62.132 ms -17.7%
baseline → candidate homogeneous insert 57.564 ms 55.503 ms -3.6%
candidate → baseline integer-only no-op 15.286 ms 17.994 ms +17.7%
baseline → candidate integer-only no-op 15.091 ms 17.186 ms +13.9%

The primary insert gate missed the predeclared 10% bar in the reverse order.
The no-payload diagnostic regressed consistently: whole-group parameter/result
materialization costs more than the removed call boundaries while N independent
SQLite commits remain. Sequential (-1.7%) and mixed-SQL (+4.1%) controls stayed
in the small host-noise band.

Safety review also found reopen blockers around sqlite3_reset() commit errors,
dirty-union delivery timing, packed large-BLOB peak memory, SQLITE_STATIC
binding lifetime, ABI layout, and main-isolate diagnostic blocking.

Outcome

Rejected. Keep exp 180's scalar per-member worker loop. Reopen only with a
bounded native-ready transport that avoids group repacking, reproduces at least
10% on public 100/200-member bursts in both orders, holds small bursts neutral,
and carries BLOB RSS plus diagnostic-latency guards. The final diff is
publication/test-only and contains no runtime behavior change.

Test plan

  • Archived prototype focused Dart analysis: no issues
  • Archived test/write_coalescing_test.dart: 6/6
  • Two order-flipped cross-worktree insert and no-op comparisons
  • Final retained coalescing suite: 4/4
  • dart run build_runner build --delete-conflicting-outputs
  • dart analyze --fatal-infos
  • dart test -j 1: 355/355
  • dart run benchmark/finalize_experiment.dart --experiment=experiments/257-native-autocommit-envelope.md
  • dart run benchmark/check_experiment_dispositions.dart
  • git diff --check

@danReynolds danReynolds added type: moonshot Frontier experiment challenging an architecture assumption rejected Experiment failed: below the decision bar, regressed, or abandoned codex codex-automation labels Jul 29, 2026
@danReynolds
danReynolds merged commit 2882505 into main Jul 29, 2026
7 checks passed
@danReynolds
danReynolds deleted the exp-257-native-autocommit-envelope branch July 29, 2026 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

codex codex-automation rejected Experiment failed: below the decision bar, regressed, or abandoned type: moonshot Frontier experiment challenging an architecture assumption

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant