Conversation
2110595 to
9e52b13
Compare
Make the default forkpress binary production COW-only. Add the forkpress-dev target behind the dev-experiments feature, keep experimental BranchFS/CAS/ZFS surfaces out of the default binary, and profile the embedded PHP runtime bundle accordingly.
Make the bundled WordPress helper use ForkPress naming instead of BranchFS naming. Keep BranchFS compatibility hooks inside the plugin for forkpress-dev, but install it as forkpress-wp.php for production COW sites.
Relocate the CAS crates and embedded ZFS engine into explicit experiment directories. Keep package names stable for dev builds while making the repository layout reflect that these paths are outside the production ForkPress binary.
Build and test the production forkpress binary separately from forkpress-dev. Move CAS e2e coverage to the dev binary, keep releases production-only, and document the production COW cascade versus experimental storage paths.
Keep BranchFS SQL and experiment-only runtime inputs out of the production bundle and release trigger surface. Leave them in the dev runtime profile for forkpress-dev.
Replace the remaining BranchFS-era marker filename in the vendored SQLite integration snapshot with ForkPress naming. The marker is metadata only, but it should not appear in the production runtime bundle as an experiment reference.
Support Git commit header continuation lines so signed commits with gpgsig blocks can be parsed. This keeps COW push handling independent of the user's local commit signing configuration.
Production bundles still need the SQLite hot-copy helper for COW branch reset. Keep only backup.php and sqlite_retry.php alongside the COW Git adapter, and update the production e2e to initialize through the default forkpress command shape.
Give the experimental CAS router the same longer request budget used by the Git adapters so first-load branchfs/CAS WordPress requests are not killed by PHP's default 30 second limit.
Fail the production forkpress wrapper when dev-experiments is enabled so experimental commands cannot be accidentally shipped under the production binary name.
Keep BranchFS-only WordPress hooks in a dev-only mu-plugin and bundle only the common ForkPress integration plugin in production.
Keep the embedded ZFS research code under the top-level experiments directory and update the dev-only build references accordingly.
Keep the experimental BranchFS PHP extension source and local test build output under experiments/php-ext-branchfs, and update build, CI, script, and test references.
Keep the BranchFS/CAS-only mu-plugin under experiments/wp-plugin and update dev runtime bundle paths.
Move the BranchFS schema and PHP extension under experiments/branchfs and update dev build, scripts, tests, and documentation references.
Put the CLI package at crates/forkpress-cli and keep the installed binary names as forkpress and forkpress-dev. Move experimental CAS Rust crates under crates/experiments while leaving their runtime and test fixtures under experiments/.
Keep production and shared Rust packages under crates/. Move CAS experiment packages under experiments/cas/crates so all CAS-specific runtime, tests, and Rust code are grouped together.
Move layout, manifest parsing, storage strategy types, path normalization, and branch-name validation into forkpress-core. Keep CLI command parsing and behavior in forkpress-cli for the next split steps.
Move portable runtime extraction, WordPress archive unpacking, PHP command helpers, script execution, and filtered PHP output into forkpress-runtime. Keep the embedded runtime bytes supplied by forkpress-cli's build script.
Move production branch lifecycle, APFS sparsebundle handling, clonefile/FICLONE tree materialization, copy fallback, branch locks, and SQLite reset helpers into forkpress-storage. Keep branch lifecycle and file clone mechanics together as one storage layer.
Move child process guarding, server registry records, pid file handling, process signaling, and TCP readiness checks into forkpress-server. Keep CLI commands as orchestration over the server crate.
Move Git command execution, ref helpers, agent worktree creation, and server-normalized push sync into forkpress-git. Keep CLI argument parsing and high-level command routing in forkpress-cli.
Describe the production Rust crates, clarify where experiment-specific code lives, and expand CI unit-test coverage for the extracted workspace crates.
Gate test-only and dev-only helper imports so release builds stay warning-free after the crate split.
Contributor
Author
|
I did a couple of review rounds, and all seems OK, so I'll get it in now. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR separates the shippable
forkpressbinary from experimental storage work:forkpress-devbinary behind thedev-experimentsCargo feature for BranchFS, CAS, and ZFS experimentscrates/:forkpress-cli,forkpress-core,forkpress-storage,forkpress-runtime,forkpress-server, andforkpress-gitexperiments/cas/crates/{cas-store,cas-ffi}runtime/cow/,scripts/cow/,scripts/git/, andscripts/shared/experiments/branchfs/experiments/cas/experiments/zfs-engine/Stacking note: this work was developed on top of
codex/cow-database-sql-schema-snapshot-cleanand is now rebased onto latesttrunk.Binary size
Measured on macOS arm64 release builds with the embedded runtime bundle:
forkpressfrom the pre-split baseforkpressforkpress-devwith experimentsThe production PHP runtime itself drops from 25.78 MiB to 23.38 MiB (-2.40 MiB / -9.3%) because BranchFS/CAS are no longer built into production PHP. The dev PHP runtime remains at 25.78 MiB, matching the previous all-experiments shape. The end-to-end binary delta is modest because the embedded WordPress/PHP/runtime assets dominate the final binary size.
Validation
cargo test --workspace --exclude forkpress-clicargo test -p forkpress-core --features dev-experimentsFORKPRESS_RUNTIME_BUNDLE=/dev/null cargo test -p forkpress-cli --bin forkpressFORKPRESS_RUNTIME_BUNDLE=/dev/null cargo test -p forkpress-cli --features dev-experiments --bin forkpress-devcargo build --release -p forkpress-cli --bin forkpresscargo build --release -p forkpress-cli --features dev-experiments --bin forkpress-devcargo fmt --checkgit diff --checkbash -n scripts/build-dist.shbash -n scripts/release/try-single-binary-detach.shbash -n tests/cow/e2e.shbash -n experiments/cas/tests/e2e.shmake -n forkpress forkpress-dev test-allscripts/,runtime/cow/,experiments/branchfs/,experiments/cas/runtime/,tests/cow/, andexperiments/branchfs/tests/make test-cowmake test-branchfstarget/release/forkpress --helptarget/release/forkpress-dev --helpexperiments/**; dev contains BranchFS/CAS experiment runtime and scripts