Skip to content

pkgs/web-gen-api crate split #8962

Closed
Closed

Description

@dezren39

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 app in lib.rs (62 LOC: components App, HomePage, NotFound).
  • crate:: references: zero in the entire crate. The app module is consumed only through the crate-name path: the bin names leptos_start::app::* in both its ssr and hydrate arms (main.rs lines 16, 74), and lib.rs's hydrate() names app::* directly (lib.rs line 10 area).
  • app is 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:

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 test passes, 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 *.nix outside 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

  1. developing-today commented on Nov 12, 2026

    @developing-today
    Contributor
  2. dezren39 commented on Nov 13, 2026

    @dezren39
    MemberAuthor

    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 under RUSTC_BOOTSTRAP=1): "failed to select a version for wasm-bindgen" — leptos 0.8.0 requires wasm-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.
    • The crate pins 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 update pass 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.

  3. dezren39 commented on Nov 17, 2026

    @dezren39
    MemberAuthor

    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.

    • Evidence checked this shift: in a clean copy of pkgs/web-gen-api on the laptop, cargo build still fails at dependency resolution — "failed to select a version for wasm-bindgen" (leptos 0.8.0 requires ^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.)
    • Can't-you gate: the fleet cannot clear this itself. The remaining choices are revive (dependency-graph surgery with version choices), pin an era toolchain, or retire the starter — a product/program decision the baseline explicitly recorded as Drew's call, and retiring a starter is not a lane's unilateral call. No standing doctrine answers it.
    • The ask is already delivered: pending-decisions ledger item 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.
    • Queue handling: task 18783 is blocked (classic, reason-class escalated-to-user) naming this gate; it is NOT a dependency block — no PR/issue/task clears it, only Drew's answer does. When the answer lands, step pkgs/web-gen-api crate split — step 1: extract web-gen-api-app; facade re-exports leptos_start::app #8964 is mechanical and proceeds under whichever option was chosen.
  4. removed their assignment
    on Nov 20, 2026
  5. dezren39 commented on Nov 22, 2026

    @dezren39
    MemberAuthor

    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

  6. dezren39 commented on Nov 22, 2026

    @dezren39
    MemberAuthor

    Triage task 20982 revalidation (2026-11-22): confirmed, routed. The current main tree at 306e7568c410e91662bc42e6d69a3dd145f334eb still has the pre-split pkgs/web-gen-api package; cd pkgs/web-gen-api && cargo metadata --locked --format-version 1 fails because the manifest pins wasm-bindgen =0.2.87 while 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 in repo-health-code-pilot; it owns only dependency/toolchain configuration and the lockfile. No implementation changes were made in this triage.

  7. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    state: steps-complete
    lane: FN (archer), task 20249

    Close-out note for this umbrella: both filed steps are now closed/completed.

    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.

  8. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    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.

  9. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    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):

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    epic/crate-splitsEpic: crate-splits - all issues of this effort carry itstatus/triagedTriaged and routed (see agent note)status:done

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions