hero_rpc#122 Phase 2: regen template against current hero_rpc + bench schema #7
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "issue-122-template-revalidation"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Closes hero_rpc#122 Phase 2 (Phases 1, 3, 4 land in
lhumina_code/hero_rpc#125).
Migrates the canonical "clone-me" Hero service template onto the
post-#114 / #117 / #119 scaffolder layout and adds the four
benchmark rootobjects (
IndexedNone,IndexedSingle,IndexedMulti,IndexedNonStr) that motivate the index-integration follow-up(hero_rpc#123).
Layout change
crates/hero_service_sdk/sdk/rust/(workspace member)sdk/treecrates/hero_service_rhai/sdk/rhai/(workspace member)sdk/python/,sdk/js/crates/hero_service_web/tests/(workspace-root E2E)crates/hero_service_examples/_examplesplaceholderCodegen
types_wasm.rsremoved (hero_rpc#114 dropped the wasm twin).build.rsuses the simplified config (no.with_wasm()).lib.rsexposespub mod generated; pub use generated::*;.New
benchdomainschemas/bench/bench.oschemadefines four rootobjects withdeliberately matched field shapes so indexed-vs-full-scan comparisons
stay apples-to-apples:
Each rootobject's generated
OsisObject::indexed_field_names()verified after codegen.
Server lifecycle
main.rsregenerated to register both domains(
#[cfg(feature = "catalog")]+#[cfg(feature = "bench")]blocks).
crates/hero_service_server/src/catalog/rpc.rspreservedexactly — contains the mocked
bootstrap/refactor/check/verifyhandlers that survive the regen unchanged.tests/src/lib.rs::spin_up_serviceregisters both domains on thesame
RpcModule, mirroringmain.rs. The duplication betweenthe two is documented in
hero_rpc#124's
follow-up.
Acceptance criteria
From hero_rpc#122 Phase 1 + Phase 2 + Phase 4:
hero_rpc_generator --name hero_service.cargo build --workspaceclean, zero warnings (verified locally).cargo test --workspace— 5 e2e tests pass(indexed_multi / indexed_non_str / indexed_none / indexed_single /
service_definition full_lifecycle), plus all unit tests across
every crate.
indexed_field_names()after regen.feedback_commit_attribution.md).Acceptance items not in scope of this PR (documented as follow-ups):
lab service hero_service --install --startlifecycle — workslocally; CI can't drive it from cargo. Verified manually.
Rust + Rhai SDKs are exercised by the e2e tests; full
Python/JS round-trip is a separate verification task.
Decisions taken without confirmation
tests/src/lib.rshand-rolls the multi-domain registration ladder. The scaffolder template only knows the single-domain shape; rather than block this PR on extracting aMultiDomainBuilder, the hand-rolled lib.rs ships now and the cleanup is scoped to hero_rpc#124.schemas/catalog/catalog.oschemawas unchanged from the prior commit (theServiceDefinitionrootobject withname @index). New rootobjects live underschemas/bench/, separate from the catalog meta-service.IndexedMulti/ etc. rootobjects expose only the auto-generated CRUD shape; no_trigger_save_prehooks were customised.Depends on
hero_rpc#125 must merge first so this PR's
Cargo.tomlgit deps (branch = "development") resolve the codegen fixes. CI build of this PR is expected to fail until hero_rpc#125 is merged — re-running CI after that point should turn green.Follow-ups not done here
find_*throughhero_indexerwith typed<RootObject>FindParams. Drives the ~90× gap the benchmark surfaced.spin_up_serviceduplication into aMultiDomainBuilderand ship Layer-2/3 nushell scripts pertests_pyramid.Test plan
PATH_ROOT=… cargo build --workspaceclean.PATH_ROOT=… cargo test --workspaceclean (5 e2e + all unit).hero_rpc_generator --name hero_serviceover the existingschemas/reproduces the committed layout.🤖 Generated with Claude Code