Repository navigation
id: extract id-web crate (split step 6c, #4409) - #9298
Conversation
Move src/web into crates/id-web (lib.rs = the former web/mod.rs). The facade keeps the historical path: pub use id_web as web under the web feature, and its web feature now forwards to dep:id-web (keeping dep:axum for commands::serve). Web-only deps (tower, tower-http, rust-embed, mime_guess, futures, comrak, urlencoding, aes-gcm, hkdf, qrcode) move to id-web; the facade world feature drops the vestigial dep:subtle/hmac/scrypt/rmp-serde entries whose code moved to id-directory with seitan in 6b. Prep widenings (the step-5 fallout that left suite B unbuildable on main): id-sync fileops claim_archive_name and snapshot_provenance_tags are pub; id-worlds world_session encode_hex and MAX_RECORDS_PAGE_BYTES are pub; WorldHandle:: host_view is pub; world_hub::testing is gated on any(test, feature = test-utils) with a new id-worlds test-utils feature, and its MemoryOpener is pub within it; WorldService::world() (already public) replaces a private field access; truncate_on_char_boundary moves to id-core::text with a re-export at its historical commands::tag path; tests/web_router_security.rs moves to id-web/tests (it exercises only id-web and lower crates). Suite B (cargo test -p id --features web,ssh) compiles and runs for the first time since step 5: 1692 passed, 1 failed (serve_tests::test_world_module_shared_over_iroh_and_web_ presentations - proven pre-existing by A/B on pristine main plus these visibility fixes in the original layout; Nix skips serve_tests by design). id-web: 649 passed, 1 failed (test_load_asset_urls_from_manifest needs the built web/dist, empty outside the Nix/bun build; identical in the old layout). Facade default suite unchanged at 1668 passed / 0 failed. FUEL_BUDGETS byte-identical.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 39 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Nix parity record for the
So the extraction takes the Nix web package from not-compiling to compiling-and-testing, with the only check failure a named pre-existing one (#8354). |
Step 6c of the pkgs/id crate split (#4409): the web layer leaves the facade and becomes the
id-webcrate. Steps 6a (WorldScopes/hex seams) and 6b (id-directory, PR #9181) already landed; with 6c, step 6 is complete.What moved
src/web/**→crates/id-web/src/(git mv; the formerweb/mod.rsis the crate rootlib.rs). Embedded assets now resolve../../web/distfrom the crate directory — the samepkgs/id/web/distthe facade embedded.tests/web_router_security.rs→crates/id-web/tests/(it exercises only id-web and lower crates: id-events, id-store).pub use id_web as web;under thewebfeature — the historicalid::webpath is unchanged for consumers (commands::serve, the crash tests). The facadewebfeature is now["world", "dep:axum", "dep:id-web", "id-core/web"](dep:axumstays forcommands::serve's listener). Web-only dependencies (tower, tower-http, rust-embed, mime_guess, futures, comrak, urlencoding, aes-gcm, hkdf, qrcode) moved to id-web's manifest.worldfeature drops the vestigialdep:subtle/dep:hmac/dep:scrypt/dep:rmp-serde— that code followed seitan into id-directory in 6b and nothing in the facade uses those crates anymore.Prep fixes (why suite B compiles again)
Suite B —
cargo test -p id --features web,ssh— has not compiled on main since step 5 (#4408) left the web seam half-widened. The extraction required, and this PR includes, the mechanical widenings:id_sync::fileops::{claim_archive_name, snapshot_provenance_tags},id_worlds::world_session::{encode_hex, MAX_RECORDS_PAGE_BYTES}, andWorldHandle::host_viewarepub;world_hub::testingis gated#[cfg(any(test, feature = "test-utils"))]behind a new id-worldstest-utilsfeature (itsMemoryOpenerispubinside that test-only module); one call site uses the already-publicWorldService::world()accessor;truncate_on_char_boundarymoved toid_core::textwith a re-export at its historicalid::commands::tagpath (its only non-web caller is the tag command; web was the cross-cutting consumer).Verification (base a0f3a52; branch tree for pkgs/id identical pre/post rebase)
frames::tests::byte_refusal_does_not_spend_a_frame_token_or_increment_counters(id: frames byte-refusal test fails on main (RequestTooLarge vs BudgetExhausted) — blocks id build + nixos-integration check #8354) andtests::test_load_asset_urls_from_manifest(needs the builtweb/distmanifest; the directory is empty outside the Nix/bun build — identical in the old layout).--features web,ssh): compiles and runs for the first time since step 5 — 1,692 passed / 1 failed / 35 ignored. The failure,serve_tests::test_world_module_shared_over_iroh_and_web_presentations, is pre-existing, proven by A/B: pristine main at the 6b merge plus only the visibility widenings above, web layer in its original layout, fails identically. Filed as serve_tests web/iroh world test: forged join not refused with "join denied" (pre-existing, hidden by suite-B compile break) #9274. (Nix package checks skipserve_testsby design — they need networking the sandbox lacks.)FUEL_BUDGETS: byte-identical (cmpclean against the pre-split snapshot).Nix
nix build .#id-web(the web binary package): compiles the full workspace including id-web and reaches the check phase; the check stops at the same pre-existing #8354 failure in id-core's lib tests (398 passed / 1 failed there). A parity build of pristine main is recorded in a follow-up comment.Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.