Skip to content

feat(rust): consolidate workspace provisioning, configuration and diagnostics - #271

Merged
zkochan merged 3 commits into
rust-workspace-materializationfrom
rust-client-consolidation
Oct 17, 2026
Merged

zkochan merged 3 commits into
rust-workspace-materializationfrom
rust-client-consolidation

Conversation

@zkochan

@zkochan zkochan commented Oct 17, 2026 •

Copy link
Copy Markdown
Owner

Adds native init, config and doctor so workspace provisioning, configuration and diagnostics share the Rust client engine instead of booting Harmony for ordinary operations. This completes the provisioning/configuration/diagnostics chunk of #73; this PR targets rust-workspace-materialization and will flow into teambit#10813.

Init owns workspace/bare/Git provisioning, repairs and resets, scope indexes, package manifests, agent instructions and MCP files. Config owns all three stores, precedence, environment overrides, origin-specific edits and command history. Doctor owns the eight built-in checks, reports and diagnostic archives, and configured file/HTTP remote diagnostics; the fixed set of read-only checks runs concurrently with stable report order. The published BVM module supplies only the latest-version fact.

The new bit-workspace-config crate replaces duplicated JSONC readers, path/config layering and serializers across installation and VCS commands. Source bodies remain in the Rust repository reader. The Node CLI is unchanged, and no documentation was added under docs/rust.

Parity uses released Bit 2.2.94 on Node 22.22.0, fresh workspace copies and restored file remotes. It compares output/colors/status, files, directories, permissions, store/history bytes, archives and remote GraphQL bodies/semantic headers. Only random scope suffixes, timestamps/PIDs and independently proven Node scope-index component row ordering are normalized. New Windows provisioning CI repeats the native init/config/doctor cases.

Known pre-effect fallbacks include the initial Git interactive wizard, malformed/bootstrap-repair data, unsupported argument/store shapes, versioned config-store mutations, prototype mutations and the published colored unknown-diagnosis error stack. Stash and tracking/move/rename/deprecation still delegate whole client operations, and some existing command modes remain unsupported. Those remaining native paths, compatibility qualification and safe TypeScript retirement stay tracked by #73; this PR does not close the umbrella issue.

All seven mandatory gates passed: formatting, warnings-denied workspace Clippy/Dylint/rustdoc, 1,285 workspace tests (one existing ignored), 531 released-CLI e2e tests and port inventory. Focused export package/callback suites passed 17+5 cases; the warnings-denied release workspace build passed.

Release measurements verified all 165 pairs (120 new-command pairs and 45 status/checkout/export regressions), with five alternating fresh-copy pairs per workload/mode. Rust was faster in every measured mode: full doctor 1.8×, named Git doctor 2.4–2.5×, status 24–62×, checkout 14–30× and export 2.2–2.5×; small init/config/list commands mostly avoid Node startup. The controlled Linux new-command fixtures disable analytics and use log_level=fatal; these measurements do not establish a general or cross-platform speed guarantee. Raw samples, exact settings and source/helper/binary/fixture fingerprints are in scripts/rust/benchmarks/consolidation{,-regressions}.json, with reproduction helpers.

Windows CI exposed CRLF in the embedded doctor GraphQL query. The request now normalizes it to LF; all three strict remote-doctor cases also passed locally with a CRLF source file, and all local gates and 165 benchmark pairs were rerun on the fixed artifact.

The offline BVM fixture also sends its tiny CONNECT error response headers and JSON in one write: the published proxy agent stops buffering at the header terminator and otherwise loses a split body. A forced split/combined probe reproduced this difference with the actual published module. The eight-diagnosis and exact request-count assertions remain strict; all gates passed again, and the final release artifact remains byte-identical to the 165 measured pairs.

@zkochan zkochan mentioned this pull request Oct 17, 2026
9 tasks done
@zkochan
zkochan merged commit ad57c96 into rust-workspace-materialization Oct 17, 2026
15 checks passed
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