Skip to content

pkgs/web-gen-api crate split — step 1: extract web-gen-api-app; facade re-exports leptos_start::app #8964

Closed

Description

@dezren39

pkgs/web-gen-api crate split — step 1: extract web-gen-api-app; facade re-exports leptos_start::app

Umbrella: #8962 (#8962)

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.

Scope

Move src/app.rs (App, HomePage, NotFound) into member crate web-gen-api-app. The facade lib re-exports it as pub use web_gen_api_app as app; so leptos_start::app::* — used by the bin in both ssr and hydrate arms and by hydrate() in lib.rs — resolves unchanged. The app implementation must exist only in the new crate after this step; the facade holds only the re-export.

Acceptance

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. added
    task/small-fixQueue packet kind: bounded fix with reproduction and targeted tests
    priority/normalOrdinary priority (the default)
    effort/mMedium: expected under 1 day of work
    status/triagedTriaged and routed (see agent note)
    on Nov 17, 2026
  3. dezren39 commented on Nov 17, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · triaged

    Triage evidence (fresh, 2026-11-17)

    • Issue pkgs/web-gen-api crate split — step 1: extract web-gen-api-app; facade re-exports leptos_start::app #8964 is OPEN with no held / user/owned / do-not-merge / do-not-auto-edit labels; umbrella pkgs/web-gen-api crate split #8962 is OPEN.
    • The step is unlanded on current main: pkgs/web-gen-api is still the single crate leptos_start, src/app.rs (App, HomePage, NotFound) is in place, and there are no member crates.
    • Unlike sibling issue pkgs/dht crate split #8954 (pkgs/dht, whose subject turned out to be pseudo-code), this project's premise is intact — a real crate with a real module to extract — so the split step routes normally.
    • First concrete step for task 20249: create member crate web-gen-api-app holding src/app.rs, leave only pub use web_gen_api_app as app; in the facade, and prove leptos_start::app::* resolves unchanged for the bin's ssr/hydrate arms and hydrate(). Acceptance: the issue's own discipline (one PR, step 1 only; cargo test passes and the workspace builds clean against the 0-test baseline; behavior-preserving; a step that cannot go green stops and reports instead of merging partial state).
  4. dezren39 commented on Nov 17, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    state: picked_up
    task: 20249
    lane: any-o (OpenChamber scheduled lane, worker repo-worker-code)
    stage: claimed -> verified

    Claimed task 20249 and revalidated fresh GitHub state: #8964 is OPEN; no hard-stop labels (held, user/owned, do-not-merge, do-not-auto-edit); no active PR for this step found. The issue is assigned to Drew, but there is no Drew-owned/held PR to avoid, and the queue task explicitly routes this step.

    Next: inspect the current main tree and create/resume the dedicated fleet worktree at ~/git/fleet/20249 on branch queue/20249-8964-web-gen-api-app.

  5. dezren39 commented on Nov 17, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    transition: picked-up
    worker: repo-worker-code
    lane: any-n
    task: 20249
    summary: Claimed for step 1 extraction; issue is open and no matching open PR found. Resuming existing task branch/worktree after checking its state.

  6. dezren39 commented on Nov 17, 2026

    @dezren39
    MemberAuthor

    state: blocked — escalated (escalated-to-user)
    lane: any-n, worker: repo-worker-code, task 20249

    Step 1 is gated on the revive/pin/retire decision already before Drew — the crate cannot resolve on clean main, so the step cannot meet its own acceptance gate.

    Evidence, fresh this shift (2026-11-17, laptop, pkgs/web-gen-api):

    • In a pristine copy of pkgs/web-gen-api from current main (no task changes at all), cargo metadata / cargo tree fail at dependency resolution: "failed to select a version for wasm-bindgen" — leptos 0.8 requires ^0.2.100, while the manifest pins wasm-bindgen = "=0.2.87". Every candidate is excluded; the graph is unsatisfiable. Identical failure with --offline and with --locked.
    • The tracked Cargo.lock is also stale against the manifest: it locks leptos 0.4.5 while Cargo.toml requests leptos 0.8. So there is no consistent resolution state to build from.
    • A probe with leptos set to 0.4 resolves, but then fails to compile on the stable channel (E0554 in server_fn_macro: #![feature] not allowed) — the toolchain-pin half of the same gate the 2026-11-13 step-0 baseline recorded on the umbrella.

    This is exactly the gate triaged on the umbrella #8962 (task 18783, 2026-11-17): pending-decisions ledger item web-gen-8958-revival (options A: port to current leptos on stable — recommended there; B: pin era nightly + matching graph; C: retire the starter). I did not take a version bump or a toolchain change on my own initiative: this issue's acceptance discipline forbids dependency version bumps, and the choice is explicitly recorded as Drew's call.

    State of the work, so it is revivable at zero cost once the answer lands:

    • Branch queue/20249-8964-web-gen-api-app, worktree ~/git/fleet/20249 (laptop), commit 6287daa0f5 — the mechanical extraction, already complete and not pushed:
      • pkgs/web-gen-api/web-gen-api-app/ member crate, src/app.rs moved to its src/lib.rs content-identical (verified byte-identical against main's src/app.rs);
      • facade src/lib.rs reduced to pub use web_gen_api_app as app; plus the unchanged hydrate(), so leptos_start::app::* still resolves in main.rs lines 16 and 74;
      • facade Cargo.toml: [workspace] members = ["web-gen-api-app"], resolver = "2", path dependency, and feature forwarding (csr/hydrate/ssr → web-gen-api-app/*); [package.metadata.leptos] untouched;
      • no dependency version changes relative to main — the app crate mirrors the facade's existing leptos 0.8 manifest entries.
    • Nothing was opened as a PR and nothing was pushed: a step that cannot go green stops here rather than merging partial state or leaving main red.
    • Verification that remains once the graph resolves: cargo test --workspace (baseline 0 tests) plus a clean cargo build of the ssr and hydrate arms.

    Queue handling: task 20249 is blocked (reason-class escalated-to-user) naming ledger item web-gen-8958-revival, not dependency-blocked — no PR or task clears it, only the revive/pin/retire answer does.

  7. 5 remaining items

  8. removed their assignment
    on Nov 20, 2026
  9. dezren39 commented on Nov 22, 2026

    @dezren39
    MemberAuthor

    Picked up task 20249 again. The earlier owner-decision gate is cleared: umbrella #8962 now records the decision to revive on current Leptos with stable Rust and proceed with the already-scoped extraction (decision comment: #8962 (comment)). I found no hold label on #8964. I am porting the saved extraction onto current main and will run the package tests plus SSR/hydrate builds; this note replaces the stale “waiting for Drew” checkpoint.

  10. dezren39 commented on Nov 22, 2026

    @dezren39
    MemberAuthor

    Step 1 is checkpointed but cannot meet its build acceptance on the current baseline. The scoped extraction is committed and pushed on queue/20249-8964-web-gen-api-app-resume at 2096faa466923f6962860e5ce12ed3e32dab26d1; no dependency versions were changed.

    Verification: cargo metadata --manifest-path pkgs/web-gen-api/Cargo.toml --locked --format-version 1 --no-deps passes and sees both workspace members. cargo test --manifest-path pkgs/web-gen-api/Cargo.toml --workspace --locked fails during dependency resolution because leptos 0.8 requires wasm-bindgen ^0.2.100 while the facade pins wasm-bindgen =0.2.87. Fixing that graph is outside this step packet (which forbids dependency version bumps), so I am not opening a PR that cannot pass. The umbrella #8958 has now chosen to repair the build baseline before crate-split steps; this task resumes after that prerequisite is buildable.

  11. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    state: picked-up
    task: 20249
    lane: FN (archer, sandbox fix lane via fleet agent next)
    issue: #8964 (umbrella #8962)

    Claiming step 1 for this pass. Fresh premise check 2026-11-23T05:20Z:

    Plan: port the saved extraction's structure onto current main in a fresh worktree (current app.rs post-dates the branch), verify workspace test + ssr + hydrate builds, one PR for step 1 only.

  12. added a commit that references this issue on Nov 23, 2026
  13. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    state: done
    task: 20249
    lane: FN (archer, sandbox fix lane via fleet agent next)

    Step 1 landed: PR #12956 merged — merge commit 2d421ec8b0252ad90e880debc56caef97ea2f58c, head f253a9d1a7ac. This issue auto-closed as completed via the PR's closing keyword (verified by re-read).

    What landed (exactly the step's five paths, verified on main post-merge):

    • src/app.rs → web-gen-api-app/src/lib.rs (verbatim rename; App, HomePage, NotFound exist solely in the new member crate).
    • web-gen-api-app/Cargo.toml (new): mirrors the facade's Leptos 0.8 feature shape; actix-web / leptos_actix optional under its ssr feature for the ssr-gated block in NotFound.
    • Facade Cargo.toml: [workspace] (members = ["web-gen-api-app"], resolver 2), path dependency, csr/hydrate/ssr feature forwarding. Placement follows this step's routed packet and the checkpointed extraction (member at project root beside the facade, not under crates/).
    • Facade src/lib.rs: pub mod app; → pub use web_gen_api_app as app; — the facade holds only the re-export.
    • Cargo.lock: +12 lines only (new package entry + facade dep edge); no dependency version changes.

    Route taken: ported the checkpointed extraction from queue/20249-8964-web-gen-api-app-resume (2096faa) onto current main, adapted to the repaired baseline. The step's named blocker is gone: the baseline repair landed after the checkpoint (fix(web-gen-api): migrate to stable Leptos 0.8 2335140, restore SSR shell and hydration 57fc719, both 2026-11-22), and the lock now resolves wasm-bindgen 0.2.130 / leptos 0.8.23.

    Verification (laptop worktree off origin/main; the same commands were run green on the pre-change baseline first):

    • cargo test --manifest-path pkgs/web-gen-api/Cargo.toml --workspace --locked — ok, all targets (project baseline is 0 tests).
    • cargo check --workspace --features ssr — ok (bin ssr arm resolves leptos_start::app::* through the re-export).
    • cargo check -p leptos_start --features hydrate --target wasm32-unknown-unknown — ok (hydrate() path).
    • cargo metadata --no-deps sees both workspace members. rustfmt flags only pre-existing drift in untouched src/main.rs.

    Umbrella #8962: step 0 (#8963) and step 1 (this issue) are both closed/completed; a close-out note is on the umbrella.

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

    effort/mMedium: expected under 1 day of workepic/crate-splitsEpic: crate-splits - all issues of this effort carry itpriority/normalOrdinary priority (the default)queue/blockedQueue or user escalation statestatus/blockedQueue or user escalation statestatus/triagedTriaged and routed (see agent note)status:donetask/small-fixQueue packet kind: bounded fix with reproduction and targeted testswork/assignedQueue worker lifecycle state

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions