Repository navigation
Description
pkgs/web-gen-api crate split
Template: doc/2026-11-01T16-53-00Z_design_id_crate_split/2026-11-01T16-53-00Z_design_id_crate_split.md (design of record for the pkgs/id split, from #3195). Worked example: pkgs/id umbrella #3447, step issues #4403-#4411. Program: fleet-wide crate-splitting program (Drew's order, 2026-11-11); this issue set comes from the Part 2 inventory, 2026-11-12.
Current shape (inventory 2026-11-12)
Single crate, no workspace: package leptos_start (edition 2021), lib (cdylib+rlib) + bin, 167 LOC in src, 0 tests. A Leptos 0.8 starter-shape app (actix ssr / hydrate / csr features). Files: src/lib.rs 21, src/app.rs 62, src/main.rs 84. No package.nix (only shell.nix); recent commits are dependency bumps only. Existing-issue check (2026-11-12): no pre-existing crate-split design or issue for pkgs/web-gen-api.
Import-scan evidence
Real scan of pkgs/web-gen-api/src (grep for mod declarations, crate:: references, crate-name paths):
- Top-level modules: exactly one —
pub mod appin lib.rs (62 LOC: componentsApp,HomePage,NotFound). crate::references: zero in the entire crate. The app module is consumed only through the crate-name path: the bin namesleptos_start::app::*in both its ssr and hydrate arms (main.rs lines 16, 74), and lib.rs'shydrate()namesapp::*directly (lib.rs line 10 area).appis a leaf: it references no other local module; nothing references upward; there are no cycles. The only seam in this crate is app vs (lib hydrate + bin server wiring).
Step sequence
One PR per step, in order:
- Step 0: pkgs/web-gen-api crate split — step 0: workspace conversion + baselines (no code motion) #8963 — step 0: workspace conversion + baselines (no code motion) (pkgs/web-gen-api crate split — step 0: workspace conversion + baselines (no code motion) #8963)
- Step 1: pkgs/web-gen-api crate split — step 1: extract web-gen-api-app; facade re-exports leptos_start::app #8964 — step 1: extract web-gen-api-app; facade re-exports leptos_start::app (pkgs/web-gen-api crate split — step 1: extract web-gen-api-app; facade re-exports leptos_start::app #8964)
Proposed crate map
pkgs/web-gen-api becomes a Cargo workspace; the member crate lives under crates/, shared versions pinned in [workspace.dependencies] from step 0. The facade keeps the package/lib name leptos_start so the bin's existing leptos_start::app::* paths keep working via re-export.
| crate | contents (today's code) | depends on |
|---|---|---|
web-gen-api-app |
src/app.rs — App, HomePage, NotFound components (62 LOC) |
leptos stack — leaf, no internal deps |
leptos_start (facade) |
lib.rs (hydrate()), main.rs (actix server wiring + favicon handler), re-export pub use web_gen_api_app as app; |
web-gen-api-app |
Dependency rule: one-way; the facade is the only consumer and sits on top.
Scale note: at 167 LOC this is a one-extraction split — the smallest in the program alongside pkgs/dht. It is filed for a uniform workspace shape and an importable app crate; if a maintainer judges it below the size where a split pays, closing this umbrella as wontfix is a one-line decision and the step issue closes with it.
Acceptance discipline (from the id template; applies to every step):
- One PR per step; no step bundles another step's extraction.
- Full test suite green on that PR. Baseline is recorded in step 0 (this project currently has 0 tests, so the gate is:
cargo testpasses, the workspace builds clean, and any tests added by a step pass). - Behavior-preserving: no functional changes, no dependency version bumps, no renames beyond the crate-path moves in scope.
- Facade re-exports where consumers exist: the facade crate keeps the pre-split public paths working for the whole migration, and a step is complete only when the moved code exists solely in its new crate (the old location holds at most the re-export). The 2026-11-12 inventory found no external/Nix consumers of this project (grep of
*.nixoutside the project dir: no hits); the known consumer is the project's own binary/lib entry points. - Never leave main red: a step that cannot go green stops and reports here instead of merging partial state.
Activity
developing-today commentedon Nov 12, 2026
CODE-2722
dezren39 commentedon Nov 13, 2026
Step-0 baseline, recorded 2026-11-13 during the cross-project split pass. This project does not build in its current state — it fails before compilation, at dependency resolution.
Evidence (laptop, this run):
cargo build(stable 1.99, and again underRUSTC_BOOTSTRAP=1): "failed to select a version forwasm-bindgen" —leptos 0.8.0requireswasm-bindgen ^0.2.100, and the candidate versions are all excluded by other constraints in the graph. The Renovate-bumped manifest/lock set is internally unsatisfiable.rust-toolchain= nightly-2023-07-20 against a leptos 0.8 (2025) graph — the same pin/graph inconsistency as its siblings.cargo test: 0 tests exist.Reviving means fixing the dependency graph (a deliberate
cargo updatepass with versions chosen to cohere) and reconciling the toolchain pin, or retiring the starter — Drew's call. Step #8964 (extract web-gen-api-app) stays open and is mechanical once the crate resolves and builds. No source was changed by this pass.dezren39 commentedon Nov 17, 2026
state: triaged — escalated (genuine Drew decision, ledgered)
lane: any-b, worker: repo-worker-code, task 18783
Triage verdict for #8962 (checked fresh this shift, 2026-11-17): the split is gated on the revive/pin/retire decision for the broken Leptos starter family — the same gate already before Drew for the sibling #8958.
pkgs/web-gen-apion the laptop,cargo buildstill fails at dependency resolution — "failed to select a version forwasm-bindgen" (leptos 0.8.0requires^0.2.100; every candidate is excluded by other constraints in the graph). The 2026-11-13 step-0 baseline's finding stands. (The toolchain pin here now reads nightly-2026-11-08; the graph is still unsatisfiable.)web-gen-8958-revival(pending, filed by task 18780's triage of the sibling pkgs/web-gen crate split #8958 today) carries the question with options A (port to current leptos on stable — recommended there), B (pin era nightly + matching graph), C (retire). This issue and step pkgs/web-gen-api crate split — step 1: extract web-gen-api-app; facade re-exports leptos_start::app #8964 have been added to that item's links, since the same decision governs this sibling — one decision, both umbrellas.dezren39 commentedon Nov 22, 2026
Decided: Use the existing recommendation to revive the starter on the current Leptos release with stable Rust; proceed with the already-scoped workspace/extraction steps under that path.
Why: The issue records that the current graph is unsatisfiable and the 2026-11-13 baseline recommends deliberate dependency-graph repair; the sibling decision ledger described this as option A, while #8964 already scopes the mechanical extraction.
Undo: If a bounded dependency repair cannot produce a passing build, revise the path to a compatible pinned toolchain or retire the starter, documenting the evidence in the step issue.
By: repo-worker-code / code-h
dezren39 commentedon Nov 22, 2026
Triage task 20982 revalidation (2026-11-22): confirmed, routed. The current main tree at
306e7568c410e91662bc42e6d69a3dd145f334ebstill has the pre-splitpkgs/web-gen-apipackage;cd pkgs/web-gen-api && cargo metadata --locked --format-version 1fails because the manifest pinswasm-bindgen =0.2.87while Leptos requires^0.2.100. Step #8963 is closed; step #8964 is the existing extraction and correctly remains blocked because it forbids dependency changes. The recorded decision on this issue is to keep the app, restore a stable-compatible baseline, then proceed with the split. I filed the separate prerequisite #12344 and enqueued task 20998 inrepo-health-code-pilot; it owns only dependency/toolchain configuration and the lockfile. No implementation changes were made in this triage.dezren39 commentedon Nov 23, 2026
state: steps-complete
lane: FN (archer), task 20249
Close-out note for this umbrella: both filed steps are now closed/completed.
2d421ec8b0252ad90e880debc56caef97ea2f58c):web-gen-api-appextracted, facade re-exportsleptos_start::app, workspace + ssr + hydrate builds verified green against the repaired Leptos 0.8 baseline.No further steps are filed under this umbrella, so its acceptance appears fully met; closing it is the program owner's call (the scale note reserves the wontfix/close judgment to a maintainer), so I am leaving it open with this record rather than closing it from a lane.
dezren39 commentedon Nov 23, 2026
Lane KO (archer) taking the close-out verification slice of this umbrella: both steps are closed/completed and PR #12956 is merged; I am verifying the landed workspace shape on current main first-hand and, if it matches the acceptance record, closing the umbrella as completed with the evidence. The wontfix judgment reserved in the scale note is moot — the split was performed and landed.
dezren39 commentedon Nov 23, 2026
Lane KO close-out — umbrella acceptance verified first-hand on current main; closing as completed.
Evidence (all read fresh this run via gh REST against current main):
2d421ec8b0252ad90e880debc56caef97ea2f58c).pkgs/web-gen-api/Cargo.tomlon main carries[workspace] members = ["web-gen-api-app"], resolver 2, and the facade package keeps the nameleptos_startwithweb-gen-api-appas a path dependency; csr/hydrate/ssr features forward to the member crate.pkgs/web-gen-api/src/lib.rsline 1 is the facade re-exportpub use web_gen_api_app as app;, so the pre-splitleptos_start::app::*paths the bin uses keep working.pkgs/web-gen-api/src/app.rsno longer exists (404) — the moved code lives solely in the new crate;pkgs/web-gen-api/web-gen-api-app/src/lib.rsholds theAppcomponent.The scale note's reserved judgment was whether to perform the split at all (wontfix); the split was performed, landed, and verified green per PR #12956's record, so that judgment is moot and the umbrella's acceptance is fully met.