[oschema/macros] pre-existing test failures on development: 4 base36 doctests (unresolved herolib_sid) + 7 openrpc_rhai_test (ErrorFunctionNotFound) #154

Open
opened 2026-06-14 20:53:15 +00:00 by sameh-farouk · 0 comments
Member

Pre-existing test failures on development (oschema doctests + macros rhai tests)

Running the test suites on hero_lib development (HEAD 6e3964b5) yields 11 failures across two crates that are unrelated to any current feature work. They obscure real regressions (e.g. while verifying #153 I had to filter them out by name). Filing so they're tracked and fixed.

1. herolib_oschema — 4 doctest failures

cargo test -p herolib_oschema --doc
test crates/oschema/src/types/base36.rs - types::base36::encode (line 43)          ... FAILED
test crates/oschema/src/types/base36.rs - types::base36::encode_padded (line 81)   ... FAILED
test crates/oschema/src/types/base36.rs - types::base36::decode (line 115)         ... FAILED
test crates/oschema/src/types/base36.rs - types::base36::required_length (line 162)... FAILED

error[E0433]: cannot find module or crate `herolib_sid` in this scope
  = help: if you wanted to use a crate named `herolib_sid`, use `cargo add herolib_sid`...

The four base36 doctests reference herolib_sid, which is not a (dev-)dependency available to the herolib_oschema doctest build, so they fail to compile. (lib + integration tests pass: 270/0 and 59/0.)

2. herolib_macros — 7 failures in openrpc_rhai_test

cargo test -p herolib_macros --test openrpc_rhai_test
test result: FAILED. 2 passed; 7 failed

Failing: array_of_structs_field_accepts_typed_values, array_of_structs_field_rejects_maps, dir_form_clients_call_through_to_the_backend, dir_form_emits_one_factory_per_spec_file, end_to_end_client_method_and_output_getters, enum_variant_constructors_are_client_methods_and_comparable, factory_makes_a_client_and_struct_is_typed.

All fail with the generated client method not being registered in the Rhai engine, e.g.:

panicked at crates/macros/tests/openrpc_rhai_test.rs:108:10:
script runs: ErrorFunctionNotFound("order_request (PetStoreClient)", 3:25)

(The other macros test binaries pass: openrpc_server_test, openrpc_from_oschema_test, etc.)

Attribution (verified, not assumed)

  • Not introduced by the recent serve_domains / patch commits. Both sets reproduce identically on 181a0832 (the commit before 2dff1cc9 cargo: comment out local [patch] overrides, i.e. with the local [patch] still active), and were also observed on the earlier HEAD 925b3df9. So this predates the recent control-plane/Model-A work — long-standing.
  • A first hypothesis that 2dff1cc9 (disabling the local [patch]) caused the herolib_sid doctest break was disproved by testing 181a0832.

Ask

  1. Confirm whether CI exercises these (doctests and the openrpc_rhai_test binary). If it does, development CI is red independent of any feature branch — worth knowing before more merges land.
  2. Fix or ignore-with-reason: the base36 doctests need herolib_sid wired as a (dev-)dependency (or the doctests rewritten to not depend on it); the openrpc_rhai_test client-method registration needs investigation.
## Pre-existing test failures on `development` (oschema doctests + macros rhai tests) Running the test suites on `hero_lib` `development` (HEAD `6e3964b5`) yields **11 failures across two crates** that are unrelated to any current feature work. They obscure real regressions (e.g. while verifying #153 I had to filter them out by name). Filing so they're tracked and fixed. ### 1. `herolib_oschema` — 4 doctest failures ``` cargo test -p herolib_oschema --doc ``` ``` test crates/oschema/src/types/base36.rs - types::base36::encode (line 43) ... FAILED test crates/oschema/src/types/base36.rs - types::base36::encode_padded (line 81) ... FAILED test crates/oschema/src/types/base36.rs - types::base36::decode (line 115) ... FAILED test crates/oschema/src/types/base36.rs - types::base36::required_length (line 162)... FAILED error[E0433]: cannot find module or crate `herolib_sid` in this scope = help: if you wanted to use a crate named `herolib_sid`, use `cargo add herolib_sid`... ``` The four `base36` doctests reference `herolib_sid`, which is not a (dev-)dependency available to the `herolib_oschema` doctest build, so they fail to compile. (lib + integration tests pass: 270/0 and 59/0.) ### 2. `herolib_macros` — 7 failures in `openrpc_rhai_test` ``` cargo test -p herolib_macros --test openrpc_rhai_test ``` ``` test result: FAILED. 2 passed; 7 failed ``` Failing: `array_of_structs_field_accepts_typed_values`, `array_of_structs_field_rejects_maps`, `dir_form_clients_call_through_to_the_backend`, `dir_form_emits_one_factory_per_spec_file`, `end_to_end_client_method_and_output_getters`, `enum_variant_constructors_are_client_methods_and_comparable`, `factory_makes_a_client_and_struct_is_typed`. All fail with the generated client method not being registered in the Rhai engine, e.g.: ``` panicked at crates/macros/tests/openrpc_rhai_test.rs:108:10: script runs: ErrorFunctionNotFound("order_request (PetStoreClient)", 3:25) ``` (The other macros test binaries pass: `openrpc_server_test`, `openrpc_from_oschema_test`, etc.) ### Attribution (verified, not assumed) - **Not introduced by the recent `serve_domains` / patch commits.** Both sets reproduce identically on `181a0832` (the commit *before* `2dff1cc9 cargo: comment out local [patch] overrides`, i.e. with the local `[patch]` still active), and were also observed on the earlier HEAD `925b3df9`. So this predates the recent control-plane/Model-A work — long-standing. - A first hypothesis that `2dff1cc9` (disabling the local `[patch]`) caused the `herolib_sid` doctest break was **disproved** by testing `181a0832`. ### Ask 1. Confirm whether CI exercises these (doctests and the `openrpc_rhai_test` binary). If it does, `development` CI is red independent of any feature branch — worth knowing before more merges land. 2. Fix or `ignore`-with-reason: the `base36` doctests need `herolib_sid` wired as a (dev-)dependency (or the doctests rewritten to not depend on it); the `openrpc_rhai_test` client-method registration needs investigation.
Sign in to join this conversation.
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_lib#154
No description provided.