[V2:16] Add Targeted Serve Rendering#30
Open
ritorhymes wants to merge 14 commits into
Open
Conversation
This was referenced May 5, 2026
12e59e7 to
37f0814
Compare
37f0814 to
478ff84
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.
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.
478ff84 to
a756497
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 completes the targeted rendering path by extending V2:15's build-only proposal selection to local dirty
serve.serve --only <NUMBER>...and workspace[render].onlynow resolve through the sameOnlyRenderPlanand CLI-over-config rules as build while remaining unavailable forcheck,--clean, and--remote-siblings; the prepared pipeline passes that plan into dirty serve sync so omitted proposal markdown/assets are filtered out, selected deletions are preserved through previous/current dirty-path unions, and affected selected proposal markdown, selected asset markdown, and retained non-proposal markdown are incrementally preprocessed with missing-path tolerance. Theme sync remains independent of targeted proposal selection, so review should focus on serve applicability and rejection rules, dirty-path filtering, deletion propagation, incremental preprocessing across the three retained categories, and preventing omitted content from being reintroduced while Zola is running.serve.build-eips serve --only <NUMBER>...and reuse the existing strict proposal-number parser.[render].onlydefaults to local dirtyserveas well as local dirtybuild.check,--clean, and--remote-siblings.OnlyRenderPlanfrom the prepared runtime pipeline into dirty serve synchronization.Review Notes
This PR completes the targeted rendering path started in V2:15. V2:15 made targeted build work after preparing the full materialized content tree. This PR adds the serve-specific piece: keeping the already-running dirty serve watcher aligned with the same selected proposal set.
--onlyis accepted on default local dirtybuildandserve.checkdoes not accept it. Execution policy rejects--onlywith--cleanand--remote-siblings.Workspace
[render].onlyis now a default for applicable local dirty build and serve runs. CLI--onlystill overrides config values, and missing or empty config values still mean full rendering.The prepared pipeline already builds
OnlyRenderPlanbefore Zola starts. This PR passes that plan intoserve_sync_config, so dirty active-repo sync can use the same selected/unselected policy while Zola serve is running.Dirty serve sync filters active-repo paths before computing the affected path union. That keeps dirty changes under omitted proposal markdown or omitted proposal asset directories from being copied into the materialized repo. Selected proposal assets still sync normally.
The affected path set is the union of the previous filtered dirty paths and the current filtered dirty paths. That preserves deletion handling for selected proposal files that were dirty in the previous scan but are now gone.
markdown::preprocess_pathsis added for incremental serve updates. It preprocesses only affected selected proposal markdown, selected proposal asset markdown, and retained non-proposal markdown such as_index.md, while still usingOnlyRenderPlanto rewrite links andrequiresentries to omitted proposals.Dirty serve preprocessing tolerates missing paths because a filesystem event may represent a deletion. Full build preprocessing still treats missing paths as errors.
The markdown timestamp fallback handles dirty files that do not yet have a Git commit timestamp. When
git logreturns no timestamp for the current path, preprocessing falls back to the filesystem modified time.This PR does not change theme sync behavior. Local theme sync remains independent from targeted proposal selection.
Verification
src/cli.rsforserve --onlyparsing, invalid selector rejection, and continued rejection on non-targeted commands.src/execution.rsfor build/serve targeted selection applicability, CLI-over-config precedence, and rejection of unsupported local/remote/clean modes.src/pipeline.rsfor passingOnlyRenderPlanintoserve_sync_config.src/serve.rsfor dirty-path filtering, affected-path union behavior, selected deletion handling, selected asset sync, and prevention of omitted proposal reintroduction.src/markdown.rsforpreprocess_paths, missing-path tolerance, incremental targeted preprocessing, retained non-proposal markdown handling, lexical link normalization before public URL lookup, and filesystem timestamp fallback.src/workspace_doc.mdfor targeted build/serve user guidance.