Skip to content

[V2:10] Add Prepared Runtime Build Pipeline#24

Open
ritorhymes wants to merge 7 commits into
eips-wg:masterfrom
ritovision:v2/10-prepared-runtime-pipeline
Open

[V2:10] Add Prepared Runtime Build Pipeline#24
ritorhymes wants to merge 7 commits into
eips-wg:masterfrom
ritovision:v2/10-prepared-runtime-pipeline

Conversation

@ritorhymes

@ritorhymes ritorhymes commented May 5, 2026

Copy link
Copy Markdown
Contributor

Part of V2: Multi-repo local build system.

Summary

This PR moves the prepared runtime build pipeline out of main.rs and into pipeline.rs, where it consumes ResolvedExecution from V2:08 and the workspace-local theme model from V2:09. Prepared::prepare now owns the full preparation sequence (disposable repo setup, source and sibling materialization, changed-file linting via eipw, markdown preprocessing, local theme materialization into repo/themes/eips-theme, and Zola build/check), while main.rs is reduced to dispatch and locking. The move preserves build/check behavior aside from two small targeted fixes (sibling-merge homepage preservation and force-refresh of prepared scratch refs), so review should focus on the new ownership boundary, theme materialization, and verifying those fixes.

  • Add pipeline.rs to own the Prepared runtime pipeline.
  • Move source preparation, eipw linting, markdown preprocessing, and Zola build/check calls out of main.rs.
  • Consume ResolvedExecution to prepare the disposable build repo from resolved source, theme, build-root, and base-URL policy.
  • Materialize the workspace-local theme into repo/themes/eips-theme before Zola runs.
  • Keep main.rs focused on command dispatch, build-root creation, locking, and runtime operation selection.
  • Add a pipeline test for materializing the workspace-local theme into the mounted Zola theme path.
  • Preserve the active repo homepage during sibling merges and force-refresh prepared git scratch refs so rebased local branches are not built from stale commits.

Review Notes

This PR is the prepared runtime ownership split. V2:08 resolves execution policy, V2:09 requires the workspace-local theme, and this PR centralizes the actual build/check preparation around those resolved inputs.

Prepared::prepare now owns the runtime preparation sequence: initialize the disposable build repo, clone/fetch the active source repo, collect changed proposal files for linting, merge sibling proposal sources, run eipw lint, preprocess markdown, and materialize the local theme for Zola.

The theme handling changes shape here. V2:09 made Zola use a workspace-local theme; this PR materializes that local theme into the prepared repo under repo/themes/eips-theme before calling Zola, so Zola sees the normal mounted theme layout.

This PR does not add new CLI surface. It preserves the existing build/check runtime behavior while moving the implementation out of main.rs.

The existing minimal Prepared::serve method moves with Prepared so the type remains coherent, but this PR does not add the dirty watcher, theme sync, server binding, or final serve behavior. Those land in V2:11.

Verification

  • Review src/pipeline.rs for Prepared::prepare, source materialization, changed-file lint selection, sibling merge, markdown preprocessing, theme materialization, and build/check calls.
  • Review src/main.rs for the reduced dispatch-only runtime flow.
  • Review src/find_root.rs for the direct crate::layout::CONTENT_DIR import now that main.rs no longer brings CONTENT_DIR into scope.
  • Review the pipeline test for materializing a workspace-local theme into repo/themes/eips-theme.
  • Confirm that serve watcher/sync behavior is not introduced here and remains scoped to V2:11.

@ritorhymes ritorhymes changed the title Add Prepared Runtime Build Pipeline [V2:10] Add Prepared Runtime Build Pipeline May 5, 2026
@ritorhymes ritorhymes force-pushed the v2/10-prepared-runtime-pipeline branch 2 times, most recently from 6321df9 to d023dd5 Compare May 7, 2026 05:18
@ritorhymes ritorhymes force-pushed the v2/10-prepared-runtime-pipeline branch 2 times, most recently from 8aa5594 to e2b0818 Compare May 9, 2026 20:10
@ritorhymes ritorhymes force-pushed the v2/10-prepared-runtime-pipeline branch from e2b0818 to 8c31bb8 Compare May 26, 2026 01:02
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.
Run Zola with the editable `workspace/theme` checkout. Materialize tracked local theme files into prepared `themes/eips-theme`, load Zola and eipw configuration from that local checkout, and keep runtime commands independent of manifest network access.
Add prepared runtime build pipeline. Materialize active and sibling sources according to resolved execution policy, preprocess merged proposal content, prepare the local theme mount, and invoke runtime checks and rendering from `pipeline.rs`. Keep serve watch and sync behavior in the serve runtime branch.
@ritorhymes ritorhymes force-pushed the v2/10-prepared-runtime-pipeline branch from 8c31bb8 to 4c2049d 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