WIP: B1 stopgap — satisfy herolib_derive one-input/no-dot enforcement #133

Closed
mahmoud wants to merge 6 commits from stopgap/openrpc-enforcement-b1 into development
Owner

⚠️ Not mergeable yet — opened for review + CI visibility

Makes hero_proc comply with the new herolib_derive one-input/no-dot enforcement (hero_lib 96611dd1). CI will be red: the full --workspace build cannot pass until hero_lib migrates its own flat hero_proc_sdk consumers. Full analysis + the 3 paths forward + the hero_lib hand-off are in DEVELOPMENT_BLOCKER.md in this PR.

What's in here

  • Rule A — de-dot 102 wire method names (service.getservice_get); SSE event names (log.line/log.done) stay dotted as the rule allows.
  • Rule B — wrap 47 multi-param methods into a single input: <Method>Args struct.
  • 399 native-typed caller sites updated flat → nested (SDK, CLI, TUI, examples, admin, tests); method-name strings de-dotted in the WASM app + admin JS.
  • Server dispatch: de-dotted match arms + input unwrap for the 47 (handlers unchanged).
  • Deps pinned to hero_lib 96611dd1; local [patch] dropped; git self-dep patched.

Honest blast radius

Protocol-breaking: 102 wire renames + 47 input-shape changes. Native callers of the 47 go flat → nested (ServiceKillInput { input: ServiceKillArgs { … } }). Every downstream consumer (browser, slides, router, WASM app, admin JS) must update.

Why CI is red (the blocker)

hero_proc_admin → hero_admin_lib → hero_lifecycle[webserver-heroproc] → hero_lib/src/webserver/heroproc.rs (plus tools/, ai/) still call the flat SDK — 8 sites across 3 hero_lib crates. One SDK can't be both flat and nested. Builds green with --exclude hero_proc_admin. Fix = the hero_lib hand-off (DEVELOPMENT_BLOCKER.md §6), or pick path B2 / A (§4).

Reviewers

@kristof @casper — please weigh in on B1 vs B2 vs A (DEVELOPMENT_BLOCKER.md §4). Recommendation there is A, given hero_lib needs a 3-crate change either way. Do not merge — red CI is expected until hero_lib lands the matching change.

## ⚠️ Not mergeable yet — opened for review + CI visibility Makes hero_proc comply with the new `herolib_derive` one-input/no-dot enforcement (hero_lib `96611dd1`). **CI will be red**: the full `--workspace` build cannot pass until hero_lib migrates its own flat `hero_proc_sdk` consumers. Full analysis + the 3 paths forward + the hero_lib hand-off are in **`DEVELOPMENT_BLOCKER.md`** in this PR. ### What's in here - **Rule A** — de-dot 102 wire method names (`service.get` → `service_get`); SSE event names (`log.line`/`log.done`) stay dotted as the rule allows. - **Rule B** — wrap 47 multi-param methods into a single `input: <Method>Args` struct. - **399 native-typed caller sites** updated flat → nested (SDK, CLI, TUI, examples, admin, tests); method-name strings de-dotted in the WASM app + admin JS. - Server dispatch: de-dotted match arms + `input` unwrap for the 47 (handlers unchanged). - Deps pinned to hero_lib `96611dd1`; local `[patch]` dropped; git self-dep patched. ### Honest blast radius **Protocol-breaking**: 102 wire renames + 47 input-shape changes. Native callers of the 47 go **flat → nested** (`ServiceKillInput { input: ServiceKillArgs { … } }`). Every downstream consumer (browser, slides, router, WASM app, admin JS) must update. ### Why CI is red (the blocker) `hero_proc_admin → hero_admin_lib → hero_lifecycle[webserver-heroproc] → hero_lib/src/webserver/heroproc.rs` (plus `tools/`, `ai/`) still call the **flat** SDK — 8 sites across 3 hero_lib crates. One SDK can't be both flat and nested. Builds green with `--exclude hero_proc_admin`. Fix = the hero_lib hand-off (`DEVELOPMENT_BLOCKER.md` §6), or pick path **B2** / **A** (§4). ### Reviewers @kristof @casper — please weigh in on **B1 vs B2 vs A** (`DEVELOPMENT_BLOCKER.md` §4). Recommendation there is **A**, given hero_lib needs a 3-crate change either way. **Do not merge** — red CI is expected until hero_lib lands the matching change.
Pin herolib_core/derive/openrpc + hero_lifecycle to git rev 96611dd1 (the
rev that introduced the one-input + no-dot enforcement). Drop the TEMPORARY
local herolib_core [patch]. Add a [patch] redirecting the git hero_proc_sdk
(pulled transitively by hero_lifecycle) to this workspace's local copy so
the tree builds against itself.

B1 stopgap, blocked on hero_lib heroproc.rs migration — see DEVELOPMENT_BLOCKER.md.
herolib_derive now enforces at macro-expansion time: (A) wire method names
must not contain dots, and (B) each method takes <=1 input. De-dot all 102
dotted method names (service.get -> service_get); SSE event names
(log.line/log.done) stay dotted as the rule allows. Wrap each of the 47
multi-param methods into a single 'input' param referencing a new
<Method>Args component schema.

B1 stopgap, blocked on hero_lib heroproc.rs migration — see DEVELOPMENT_BLOCKER.md.
Update the live dispatch (rpc/mod.rs) and legacy db/rpc.rs match arms to the
underscored wire names. For the 47 wrapped methods, unwrap the single 'input'
object at dispatch so existing handlers read their fields directly (no
per-handler changes).

B1 stopgap, blocked on hero_lib heroproc.rs migration — see DEVELOPMENT_BLOCKER.md.
The 47 wrapped methods now take <Method>Input { input: <Method>Args }. Update
every native-typed construction across the SDK (factory/builders/demo/
lifecycle), CLI, TUI, examples, admin, and the test crate to the nested shape,
and de-dot method-name string literals in the WASM app and admin JS.
Regenerate the inspection copy of the SDK client.

B1 stopgap, blocked on hero_lib heroproc.rs migration — see DEVELOPMENT_BLOCKER.md.
docs: development blocker brief for B1/B2/A decision
Some checks failed
Build and Test / build (pull_request) Failing after 2m9s
e6362568c9
Records the herolib enforcement blocker, the cross-crate hero_lib scope (8
flat-API sites in 3 crates), the macro nesting proof, and three honest paths
forward (B1/B2/A) for Kristof + Casper.

B1 stopgap, blocked on hero_lib heroproc.rs migration — see DEVELOPMENT_BLOCKER.md.
mahmoud closed this pull request 2026-06-07 17:15:19 +00:00
Some checks failed
Build and Test / build (pull_request) Failing after 2m9s

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lhumina_code/hero_proc!133
No description provided.