[V2:08] Resolve Workspace Execution Policy#22
Open
ritorhymes wants to merge 5 commits into
Open
Conversation
This was referenced May 5, 2026
3fa57de to
2fa1ee4
Compare
2fa1ee4 to
c63d888
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.
Resolve build, check, and serve source policy around local active sources, clean mode, remote siblings, build roots, and base URL precedence. Keep `--clean` and `--remote-siblings` as source controls and limit `--only` to supported local dirty modes. Route runtime commands through one resolved execution policy.
c63d888 to
99db568
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 the execution-policy layer that centralizes how runtime commands resolve the active repository, source materialization, sibling sources, build roots, and base URLs.
Default
build,serve, andcheckruns use the tracked active local working tree with editable local workspace sources.--cleanswitches only the active repository to clean materialization.--remote-siblingsswitches sibling repositories to their configured remote sources while retaining the active local source.--build-rootselects the prepared output root, and--base-urlprovides a build/serve rendering override.It does not add the prepared runtime pipeline, static preview serving, or targeted rendering. Review should focus on default-local policy, clean active-source handling, remote-sibling selection, build-root/base-URL resolution, and command/flag applicability.
execution.rswithResolvedExecution,ExecutionSettings, and runtime source-selection policy.Build.tomlconfiguration.--cleanto materialize a clean active source without changing local-theme or sibling-source policy.--remote-siblingsto use configured remote sibling sources without forcing clean active-repository materialization.--build-rootand--base-urlresolution for runtime callers.print,init, anddoctor.Review Notes
This PR is the policy layer between workspace setup and the runtime pipeline. Later runtime PRs consume
ResolvedExecutioninstead of independently deciding where sources, output, and rendering settings come from.The default runtime contract is local-first: the active proposal repository comes from the tracked local working tree, and workspace-local sources remain editable for normal development. A valid active-repository
Build.tomlis required.--cleanchanges active-source materialization only. It validates and materializes a clean active source while preserving the local development workspace model, including the editable local theme.--remote-siblingschanges sibling-source selection only. It uses the active repository locally while obtaining declared sibling repositories from their configured remote URLs. It does not imply--clean.Build-root resolution is centralized so later build, serve, and preview callers use the same prepared output location. An explicit
--build-rootoverrides the workspace default.Base-URL resolution is centralized for rendering callers. An explicit
--base-urlwins over the configured default where the command supports it.Targeted selection remains intentionally out of scope. V2:15 adds targeted build rendering, and V2:16 extends that behavior to serve.
Verification
src/execution.rsfor active-repository configuration, local-first source selection, clean active-source materialization, remote-sibling selection, build-root resolution, base-URL resolution, and command applicability.src/cli.rsfor runtime-only execution flags and rejected non-runtime command forms.src/main.rsfor runtime dispatch throughresolve_execution.src/changed.rsfor changed-file listing using the resolved source policy.--clean,--remote-siblings, build-root/base-URL handling, invalid command forms, and missing or invalid active-repository configuration.