[V2:07] Add Workspace Doctor#21
Open
ritorhymes wants to merge 4 commits into
Open
Conversation
This was referenced May 5, 2026
01f3c32 to
b383fa6
Compare
b383fa6 to
3e4c507
Compare
Add workspace-local `.build-eips.toml` loading and starter configuration. Introduce `config::ActiveRepo` to load the selected checkout’s `Build.toml`, validate explicit `-C` roots, and expose active repository context to later commands. Keep source materialization, initialization, and diagnostics in their owning later branches.
Add clean and dirty source materialization for the active repository and sibling content. Use `config::RepositoryUse` throughout the runtime path, preserve tracked working-tree materialization and `index_path`, and reject dirty active manifests in clean modes. Build, check, and serve prepare sources without fetching the active upstream; `changed` retains upstream fetching for comparison.
Add workspace initialization from the selected active `Build.toml`. Clone missing sibling repositories from declared locations and initialize a missing theme checkout from the manifest repository and pin. Preserve existing usable checkouts and fail without deleting unusable paths. Write `.build-eips.toml` only when absent and generate `WORKSPACE.md` for the initialized workspace.
Add `build-eips doctor` for validating workspace configuration, active `Build.toml`, managed sibling repositories, the local theme checkout, and required tools. Report ok/warn/fail diagnostics; invalid active manifests and unusable theme configuration fail, while expected sibling and theme-pin conditions can warn. Keep diagnostics read-only and leave execution and runtime behavior to later branches.
3e4c507 to
05b0241
Compare
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 adds
build-eips doctor, the diagnostic companion tobuild-eips init. It validates the post-manifest local workspace contract: the configured active proposal repository must load throughconfig::ActiveRepowith a validBuild.toml; declared workspace sources, sibling repositories, and required local tools are then checked against that active configuration.Doctor reports diagnostics without changing build, check, or serve policy. It must validate the active proposal workspace without treating
theme/as an active proposal repository, so local theme development remains usable.build-eips doctorfor workspace diagnostics.config::ActiveRepo.Build.toml.PATH:build-eips,git, andzola.build-eips.exePATH hint as a warning.Review Notes
This is the diagnostic companion to V2:06. Init establishes a workspace around an existing active proposal checkout; doctor validates that workspace from the active repository's
Build.tomlcontract.The active repository is authoritative. Doctor loads it through
config::ActiveRepoand treats a missing or invalid activeBuild.tomlas a failure. It does not infer repository identity through a fallback identity layer or require the active checkout to occupy a hard-coded workspace path.Doctor validates declared sibling and theme sources in the local workspace. The theme checkout is a local development dependency, not a proposal repository, so doctor must not require it to carry active-repository configuration.
Doctor returns a nonzero result when it records a failure. Warnings, including the Windows PATH hint, do not fail the command.
This PR reports workspace state only. V2:08 consumes the validated local-first workspace model for runtime execution policy. Optional platform-development repositories remain scoped to V2:17.
Verification
src/cli.rsandsrc/main.rsfor thedoctorcommand surface and dispatch.config::ActiveRepo, including failure behavior for missing or invalid activeBuild.toml.src/workspace.rsfor diagnostic reporting, declared sibling and theme checks, workspace-state checks, tool checks, and exit behavior.Build.toml, sibling and theme workspace states, local-theme development behavior, tool warnings/failures, and nonzero failure exit behavior.