Skip to content

feat: complete bridge-free native corpus runtime - #18

Draft
garaekz wants to merge 19 commits into
developfrom
spike/native-runtime-phase-1
Draft

feat: complete bridge-free native corpus runtime#18
garaekz wants to merge 19 commits into
developfrom
spike/native-runtime-phase-1

Conversation

@garaekz

@garaekz garaekz commented Aug 3, 2026

Copy link
Copy Markdown

Outcome

Completes the bridge-free native corpus pass before any C1 product decision.

Supported Pest- and PHPUnit-shaped sources now lower into Drove-owned frontends, Scope IR, lifecycle, Laravel contexts, and the Drover scheduler without silently falling back to Pest, PHPUnit, or Testbench execution. Compatibility bridges remain explicit migration aids; unsupported behavior fails closed.

Per-test isolation is unchanged from C1 through C30: one executor fork per test, no batching, and no inline/shared C1 mode.

At 304735f1, Drover now allocates its 256 KiB fatal-error reserve once before forking so children inherit it copy-on-write. The failure path and one-fork-per-test topology are unchanged.

Exact proof

Hosted corpus evidence revision: a6dac07d77ebdbe38020c43ebdb48878e7c003ff

Corpus Exact native cohort Result Concurrency
Pest 6b2cd358 selected 686 cases: 683 passed, 3 skipped; 1,675 assertions C1/C2/C4/C8/C16/C30
InvoiceShelf 403a4d67 selected 202 passed; 328 assertions C1/C2/C4/C8/C16/C30
Livewire 9c145073 full 288 cases: 285 passed, 3 incomplete; 1,034 assertions explicit serial-resource C1
Livewire 9c145073 parallel 36 passed; 68 assertions C1/C2/C4/C8/C16/C30
Filament e9348b2e nonserial 677 passed; 1,016 assertions C1/C2/C4/C8/C16/C30
Filament e9348b2e serial 28 passed; 34 assertions explicit filesystem-sensitive C1

Filament ran last. Every parallel cohort preserved its semantic hash across C1-C30, every native case used one executor fork, the prepared Filament database remained byte-identical, and cleanup completed without residual snapshots or transient SQLite files.

The committed inventory covers 4 corpora, 249 source files, 1,992 cases, and 4,240 assertions (0b42899557f64a4ea51a5fabba16e5b746dcd06fd6f52d71e0ab3e5aa8a3c29a).

  • N1-N5 evidence SHA-256: e552b3ea690663de49d81d6a16af191034795b471a5223a95b0f2ea73e446a6a
  • Phase 5 fault/replay comparison SHA-256: ff0d57789dce0272fe5e4bd4db07a035ae7fccbca184377a8f513a9bab5e16db
  • N6 report SHA-256: 4df932007dcd9cff7f5ff9c2206227d530d06cb6ea0c08fac945d8578f77cfc0
  • Proof manifest SHA-256: 6e919872ea67244c504769080de6d1545d96a8e84233c12a8427f7da23e7065f

N6 benchmark

The controlled N6 measurements below remain historical evidence bound to 610899ebe186121a8d603d49abc9114afe43f93b. The current a6dac07d head intentionally changes the benchmarked scheduler allocation path, so the table is not mislabeled as current. The isolated local A/B below measures that one change; a new sealed N6 run is still required before replacing the historical table.

N6 contains 160/160 valid observations: 32 groups x 5 randomized repetitions, 26 baseline/native comparisons, seed 7331, C1/C2/C4/C8/C16/C30, 30 CPU cores, and a 16 GiB limit. Baselines run in separate pinned upstream environments. Times below are end-to-end medians in milliseconds.

Cohort Upstream C1 Native C1 Native C8 Best native
Pest selected 896.5 3,030.6 1,050.5 979.0 at C30
InvoiceShelf selected 15,007.6 13,629.3 2,365.1 1,391.3 at C30
Livewire parallel 366.2 283.1 203.1 203.1 at C8
Livewire full 2,369.6 6,283.2 n/a 6,283.2 at C1
Filament nonserial 20,348.6 4,080.6 1,557.0 1,557.0 at C8
Filament serial 1,127.4 899.4 n/a 899.4 at C1

C8 is the general knee: it is best for Livewire and Filament, within 7.3% of Pest's C30 minimum, and uses materially less memory than higher widths. InvoiceShelf is the explicit exception that continues scaling to C30.

There is no justified C1 preparation bypass. Pest preparation is 310.9 ms of 3,030.6 ms and Livewire-full preparation is 142.3 ms of 6,283.2 ms; removing it would leave both substantially slower than their upstream C1 baselines. Their next optimization target is per-case execution/lifecycle overhead, not prepared-state semantics.

At C8 the measured cgroup/PSS medians span 71.0/58.7 MiB through 230.0/223.0 MiB across the parallel Laravel cohorts, with Pest at 167.8/182.9 MiB and Filament at 143.5/115.9 MiB. Aggregate RSS is also recorded but double-counts shared fork pages, so cgroup and PSS are the decision metrics.

C1 optimization follow-up

A controlled local A/B mounted only the changed scheduler file into the same pinned Linux images. Every runnable case retained exactly one executor fork.

Workload Baseline Optimized scheduler Change
2,500 empty cases, C1 (7 reps) 631.242 μs/test 584.799 μs/test -7.4%
2,500 empty cases, C8 (7 reps) 528.381 μs/test 520.997 μs/test -1.4%
2,500 empty cases, C30 (7 reps) 533.817 μs/test 507.235 μs/test -5.0%
Pest selected C1 (5 reps) 2,581.228 ms 2,541.792 ms -1.5%
Livewire full C1 (5 reps) 5,848.303 ms 5,839.831 ms -0.15%, neutral

The Pest gain is intentionally modest because its dominant C1 cost is child work in Vite helpers, not scheduler handoff. Livewire-full remains dominated by its per-case filesystem cleanup. memory.peak was too noisy to claim an improvement: C1 was effectively unchanged and C30's median was 2.9% lower with overlapping ranges.

These are diagnostic A/B measurements, not a replacement for the sealed N6 artifact.

Verification

All 20 hosted checks pass on exact head a6dac07d77ebdbe38020c43ebdb48878e7c003ff, including External Corpus #30824774428, Compatibility Corpus #30824778782, topology/fault hardening, PCOV aggregation, native DSL/extensions/Laravel, PHP 8.4/8.5, macOS x86_64/arm64, static analysis, tests, and Composer archive verification.

  • Compatibility artifact: corpus-full-a6dac07d77ebdbe38020c43ebdb48878e7c003ff-attempt-1, GitHub digest sha256:fe77e83abfe5e77e5b09d63bd7adc029fca5723754df496d6db7456894641844.
  • Transaction-fault artifact: native-laravel-transaction-faults-a6dac07d77ebdbe38020c43ebdb48878e7c003ff, GitHub digest sha256:538f142cc49f970f476fb9a24d0584ed109715c1599f0943c22013726296b284.

Boundary

Drove remains experimental. Native claims are limited to the declared surface and pinned cohorts; unsupported behavior is rejected rather than emulated implicitly. External design-partner validation remains a separate release gate and is not claimed by this PR.

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