Skip to content

[V2:06] Add Workspace Init Baseline#20

Open
ritorhymes wants to merge 3 commits into
eips-wg:masterfrom
ritovision:v2/06-workspace-init-baseline
Open

[V2:06] Add Workspace Init Baseline#20
ritorhymes wants to merge 3 commits into
eips-wg:masterfrom
ritovision:v2/06-workspace-init-baseline

Conversation

@ritorhymes

@ritorhymes ritorhymes commented May 5, 2026

Copy link
Copy Markdown
Contributor

Part of V2: Multi-repo local build system.

Summary

This PR adds the baseline build-eips init <path> workspace bootstrap command. It initializes a local workspace around an already-checked-out active proposal repository with a valid Build.toml, using that active-repository configuration to obtain declared sibling repositories and the shared theme source.

init creates missing workspace directories, clones missing declared sibling repositories and theme/, optionally clones template/, creates .local-build/, writes a starter .build-eips.toml only when absent, and regenerates WORKSPACE.md.

It does not clone the active repository itself, add doctor diagnostics, add platform-development repositories, or define runtime execution policy. Review should focus on active-repository Build.toml validation, declared workspace-source setup, and idempotent initialization.

  • Add build-eips init <path> for bootstrapping a local multi-repo workspace.
  • Require a valid active-repository Build.toml as the workspace bootstrap contract.
  • Create the workspace root when missing.
  • Clone declared sibling repositories and the shared theme/ repository when missing.
  • Add --template to optionally clone the proposal template/ repository.
  • Create .local-build/, write starter .build-eips.toml only when missing, and regenerate WORKSPACE.md.
  • Add init command parsing and workspace initialization tests.

Review Notes

This is the first user-facing workspace lifecycle command. It establishes the local workspace shape that later doctor and runtime commands consume.

init operates around an existing active proposal checkout. It does not clone or infer the active repository through a fallback identity layer; the active repository must already be available and provide valid Build.toml configuration.

The active repository’s declared workspace configuration supplies the sibling and theme sources needed to complete the local workspace. Missing declared repositories are cloned into the workspace; existing checkouts are preserved.

Existing .build-eips.toml files remain untouched, while WORKSPACE.md is regenerated from the embedded workspace guide.

Doctor validates the initialized workspace in V2:07. V2:08 resolves the local-first runtime policy from that workspace. V2:17 later adds optional platform-development setup.

Verification

  • Review src/cli.rs and src/main.rs for the init command surface and dispatch.
  • Review src/workspace.rs for workspace-root creation, active Build.toml validation, declared sibling/theme cloning, optional template cloning, starter-config writing, and WORKSPACE.md generation.
  • Review active-repository configuration loading for manifest-based workspace source resolution.
  • Review src/workspace_doc.md for the generated base workspace guide.
  • Review init tests for command parsing, missing declared repository setup, optional template cloning, config preservation, build-root creation, generated docs, and invalid active-repository configuration.

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.
@ritorhymes ritorhymes force-pushed the v2/06-workspace-init-baseline branch from a71fe3a to b0cc9a0 Compare June 21, 2026 22:41
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