Skip to content

[V2:18] Add Final Preprocessor Integration#32

Open
ritorhymes wants to merge 16 commits into
eips-wg:masterfrom
ritovision:v2/18-preprocessor-final-integration
Open

[V2:18] Add Final Preprocessor Integration#32
ritorhymes wants to merge 16 commits into
eips-wg:masterfrom
ritovision:v2/18-preprocessor-final-integration

Conversation

@ritorhymes

@ritorhymes ritorhymes commented May 5, 2026

Copy link
Copy Markdown
Contributor

Part of V2: Multi-repo local build system.

Summary

This PR completes the final integration, documentation, regression coverage, and cleanup work for V2.

It adds a generated system architecture overview, internal module documentation, and cross-domain regression tests for behavior that spans command parsing, workspace resolution, source materialization, rendering, and editorial validation. It also tightens several shared helpers and updates the generated workspace guide to reflect the completed command surface.

  • Add ARCHITECTURE.md describing the system model, repository responsibilities, source and generated-state boundaries, execution policy, materialization, and failure boundaries.
  • Add src/README.md documenting module ownership, dependency direction, test ownership, and visibility guidance.
  • Add src/tests.rs for integration and regression coverage that spans multiple modules.
  • Add regression coverage for command routing, downstream CI command forms, active-repository configuration, workspace discovery, build-root resolution, sibling-source resolution, targeted rendering, editorial commands, and restoration after targeted build or serve runs.
  • Reuse the shared proposal-path classifier in src/changed.rs.
  • Support root discovery for checkout layouts that use a .git file.
  • Update the generated workspace guide around the completed command surface.
  • Apply focused cleanup to command help, error context, orchestration details, and test organization.
  • Pin Cargo.lock to the V2 dependency snapshot.

Review Notes

The main new code surface is src/tests.rs. These tests cover behavior that crosses module boundaries, including command parsing with execution resolution, active-repository configuration with workspace discovery, source materialization with targeted rendering, and editorial command behavior.

ARCHITECTURE.md documents the system-level model and boundaries. src/README.md documents implementation ownership and testing guidance for contributors working within the Rust codebase.

The workspace guide now covers workspace setup and diagnostics, build and serve workflows, static preview, local settings, targeted rendering, editorial validation, source options, and output locations.

The changed-file cleanup reuses the shared proposal-path classifier so changed-file filtering follows the same proposal-path rules used elsewhere in the application.

This PR adds regression coverage and integration documentation. It does not introduce new command surfaces or change the behavior owned by the earlier feature PRs.

Verification

  • Review ARCHITECTURE.md for system layers, repository responsibilities, source and generated-state boundaries, execution policy, materialization, invariants, and failure boundaries.
  • Review src/README.md for module ownership, dependency direction, test ownership, and visibility guidance.
  • Review src/tests.rs for cross-domain coverage of command routing, active-repository configuration, workspace discovery, sibling-source resolution, build-root resolution, targeted rendering, editorial commands, and restoration after targeted runs.
  • Review src/changed.rs for use of the shared proposal-path classifier.
  • Review src/find_root.rs for .git file support in root detection.
  • Review src/workspace_doc.md for the completed workspace command reference.
  • Review cleanup in configuration, command help, orchestration, and test organization.
  • Review Cargo.lock for the V2 dependency snapshot.
  • Run the full Rust test gate.

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.
Add server binding resolution and serve-only host/port flags for local Zola serve commands.

Run Zola serve with the resolved server binding, optional base URL override, fast/force serve flags, and generated output directory.

Add dirty serve watching for dirty active-repo paths and local theme changes. Clean mode disables active-repo sync but keeps theme sync.
Add build-eips preview for serving the existing resolved output directory without rebuilding or starting dirty sync.

Reuse server binding resolution and preview-only host/port flags, and report missing output before binding the local server.

Add a tiny_http static file server with safe path resolution, index-file fallback, basic content types, and preview path tests.
Add proposal number parsing, proposal path classification, and content-path helpers for flat and directory proposal layouts.

Introduce the proposal-selection data needed by later editorial and targeted-rendering commands while leaving user-facing render selection, render-plan construction, and targeted rendering behavior to their owning later branches.
Add `build-eips editorial lint` and `build-eips editorial check` as the first user-facing proposal-selection commands.

Keep eipw options scoped to editorial lint/check. Normal build, check, and serve prepare runtime sources, preprocess markdown, and run Zola without carrying eipw source-selection flags.

Run editorial-selected eipw lint against the prepared merged source tree so cross-repo EIP/ERC references resolve through the same content layout used by local builds.

Prepare runtime sources from the local active checkout, merge sibling repositories, and keep active-upstream fetches in changed-file comparison and editorial `--against-upstream` target selection.
Add targeted build rendering. Resolve `--only` and `[render].only` for local dirty builds, create an `OnlyRenderPlan`, rewrite links for omitted proposal content, and prune unselected content before Zola. Keep targeted mode restrictions enforced by execution policy.
Resolve cross-proposal asset links before Zola sees prepared markdown.

Add proposal asset path resolution, rendered URL builders, and an OnlyRenderPlan asset inventory so links can be validated before targeted pruning removes omitted proposal content.

Rewrite static asset links to rendered relative URLs when targets are available locally, and to public EIP/ERC asset URLs when targeted rendering omits the target proposal. Keep selected asset markdown links on the existing Zola @/... path, while omitted asset markdown links use public page URLs.

Preserve query strings and fragments, leave fragment-only and raw HTML links untouched, and skip already-generated Zola markdown so repeated preprocessing remains idempotent.
Extend targeted rendering to local dirty serve by accepting --only on serve and applying workspace [render].only to local serve runs.

Pass OnlyRenderPlan into dirty serve sync and filter active-repo dirty paths to selected proposal content. Avoid reintroducing omitted proposal markdown or assets into the materialized repo.

Add incremental targeted markdown preprocessing for dirty serve updates, including selected asset markdown, retained non-proposal pages, selected deletions, and filesystem timestamp fallback for new dirty files.
Add --platform-dev workspace initialization for cloning optional preprocessor and eipw repos alongside proposal repos and theme.

Add POSIX and PowerShell dev-setup scripts that build the local build-eips binary, ensure a supported Zola is available, and install 0.22.1 when needed while reusing existing 0.22.1-or-newer installs.

Add setup documentation, release archive checksum sidecars, doctor helper checks, and focused setup tests for contributor workspace setup.
Add final preprocessor integration. Document the active `Build.toml` contract, workspace-local configuration, source policy, prepared runtime pipeline, and supported commands. Keep contributor docs and command help aligned with the supported workspace model, with final cross-domain coverage.
@ritorhymes ritorhymes force-pushed the v2/18-preprocessor-final-integration branch from 7b09725 to 275dfbb 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