hero_rpc#124: re-scaffold against the new generator (subprocess + lab --test) #8
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "issue-124-template-revalidate"
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?
PR 3/3 for hero_rpc#124 (lifecycle alignment). Must squash-merge AFTER both upstream PRs land:
lab --ephemeral/--json/--pid/--test. lhumina_code/hero_skills#285This PR is the re-scaffold output. The generator binary used to produce it lives on the hero_rpc PR #126 feature branch; running it against
lhumina_code/hero_service(with the current.oschemaset +--name hero_service) produces exactly the diff in this PR. Reviewers can verify by checking out hero_rpc PR #126, building the generator, and re-running it.Headline diff stats
crates/hero_service_server/src/main.rstests/src/lib.rstests/Cargo.tomlhero_rpc_osis,jsonrpsee,hero_service_server)The tests/src/lib.rs line count change isn't the headline. The headline is drift-free: the file no longer references the server crate's domain handlers,
hero_rpc_osis::rpc::bootstrap::*, orMultiDomainBuilder. It shells out tolab service hero_service --start --ephemeral --json, parses the JSON envelope, and letsServiceHandle::Dropcalllab --stop --pid <N>on teardown. Adding an.oschematoschemas/now requires zero edits to this file.What re-scaffolding produced
crates/hero_service_server/src/main.rs—MultiDomainBuilder::production()chain. One.with_domain::<OsisXxx>("xxx")line per domain, each still#[cfg(feature = "xxx")]-gated so slim-feature builds work.tests/src/lib.rs— subprocess driver.spin_up_service()forkslab --start --ephemeral --json, parses the envelope, connects ahero_rpc2::Client.ServiceHandle::Dropforkslab --stop --pid <N>.tests/Cargo.toml— slimmed to the subprocess shape's actual deps (hero_rpc2,hero_service_sdk,serde_json,anyhow,tokio).tests/smoke.nu/tests/api_integration.nu/tests/e2e_indexed_multi.nu— Layer 2-4 nushell skeletons. Each takes--socket <path>(orHERO_TEST_SOCKETenv), usescurl --unix-socketfor the UDS HTTP path.docs/testing.md— five-layer pyramid walkthrough, service-scoped.README.md— points contributors at one verb (lab service hero_service --test). Cargo + nushell are layers underneath the verb, never invoked directly.Acceptance (per the issue body)
tests/src/lib.rsis the subprocess-driver shape — nohero_rpc_osis, noMultiDomainBuilder, noregister_methodsladder.crates/hero_service_server/src/main.rsusesMultiDomainBuilder::production()..oschemadomain requires zero edits totests/src/lib.rs. main.rs only picks up a new.with_domain::<…>(…)line after re-scaffolding (the codegen produces the diff above as a pure function of the currentschemas/set).lab service hero_service --testruns all 5 layers green — verifies once both upstream PRs land. CI on this branch currently goes red againsthero_rpc.git@developmentfor main.rs (noMultiDomainBuilderyet). Will flip green after PR #126 merges.lab service hero_service --test layer1(cargo) green on its own — same dependency.lab service hero_service --test layer2(smoke) green on its own — needs hero_skills PR #285.lab --ephemeral).pgrep -f 'hero_service_server'empty after a fulllab --testrun — verifies post-merge.lab_fixturereference anywhere in the tree.The four unchecked items all collapse into a single follow-up: a single end-to-end
lab service hero_service --testrun after the two upstream PRs land. I'll post evidence as a follow-up comment on this PR once both upstreams merge todevelopment.Decisions taken without confirmation
tests/Cargo.tomlregenerated, not preserved. The scaffolder'swrite_preservedpath leaves an existing tests/Cargo.toml in place; for this re-validation Irm'd it and let the scaffolder emit the new shape. Required to drophero_rpc_osis+jsonrpseefrom the dep set.README.mdregenerated, not preserved — same reasoning. The new README points contributors at one verb; preserving the curl-based smoke-test section would leave stale guidance.branch = "development", not the feature branches. PR3 review CI will fail until PR #126 and #285 merge to their respective development branches. Pinning to feature branches would give green CI now but require a pre-merge dep-bump commit. Reviewers can either accept the red CI or check out the feature branches manually.Follow-ups not done here
lab --testend-to-end run, posted as a follow-up comment on this PR once both upstream PRs merge.testcases/doesn't ship with hero_service today, so--test layer5is a no-op skip. Sibling work in hero_skills will define the browser-suite shape.Test plan
git diff --statagainstorigin/developmentshows the expected 4 modified files (README.md, main.rs, tests/Cargo.toml, tests/src/lib.rs) + 4 new files (docs/testing.md + 3 nu scripts).write_managed, preserved files weren't touched).