Repository navigation
feat(rust): consolidate workspace provisioning, configuration and diagnostics - #271
Merged
zkochan merged 3 commits intoOct 17, 2026
Merged
Conversation
9 tasks done
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.
Adds native
init,configanddoctorso 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 targetsrust-workspace-materializationand 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-configcrate 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 underdocs/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 inscripts/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.