Skip to content

feat(decider): compile deciders to WASM/WIT components#384

Open
yordis wants to merge 38 commits into
mainfrom
yordis/decider-wasm-wit-support
Open

feat(decider): compile deciders to WASM/WIT components#384
yordis wants to merge 38 commits into
mainfrom
yordis/decider-wasm-wit-support

Conversation

@yordis

@yordis yordis commented Jun 22, 2026

Copy link
Copy Markdown
Member
  • Decider purity is currently convention, not a guarantee — nothing prevents side effects such as reading the clock or generating ids, so a decider's logic cannot be fully trusted or safely replayed.
  • Compiling deciders to zero-import WASM/WIT components makes purity enforceable by capability denial rather than by code review.
  • The same compiled module can then run in any sandbox (server, browser, AI agent), and the platform — not each author — can own the event-store and infrastructure wiring.

@cursor

cursor Bot commented Jun 22, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
New WASM/CI surface and a second wasmtime pin in the lockfile, but behavior is gated by conformance tests and zero-import checks; scheduler domain logic is reused rather than rewritten for v1.

Overview
Adds a WASM component pipeline so Trogon deciders can ship as zero-import WIT modules: export_decider! and guest SDK bridge Decider to the contract, trogon-schedules-decider is the first guest, and scheduler wire protos gain explicit create/pause/resume/remove commands.

Testing and CI: trogon-decider-sim (wasmtime) runs given/when/then scenarios; decider-test runs YAML suites against a built .wasm. A dedicated wasm-decider job builds the component, asserts no WIT imports, validates with wasm-tools, and runs sim, macro compile-fail, and conformance tests. Coverage builds the WASM artifact for fixtures; llvm-cov ignores guest/WASM/harness paths.

Tooling: mise adds cargo-component, wasm-tools, and tasks to build descriptor sets and dist/decider/ artifacts. Setup installs wasm32-unknown-unknown serially to avoid rustup races; CARGO_NET_RETRY is raised for CI installs.

Event codec traits move from trogon-decider-runtime to trogon-decider so guests and hosts share one surface. WASM_TODO.md documents post-v1 deferred work.

Reviewed by Cursor Bugbot for commit c017fde. Bugbot is set up for automated code reviews on this repo. Configure here.

@coderabbitai

coderabbitai Bot commented Jun 22, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 828667e8-8d2e-460e-a848-ad17570590ad

📥 Commits

Reviewing files that changed from the base of the PR and between d5da8e9 and c017fde.

⛔ Files ignored due to path filters (1)
  • rsworkspace/Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (9)
  • rsworkspace/.cargo/config.toml
  • rsworkspace/cli/trogon-decider-test/src/main.rs
  • rsworkspace/cli/trogon-decider-test/src/tests.rs
  • rsworkspace/crates/trogon-decider-guest-sdk/src/snapshot.rs
  • rsworkspace/crates/trogon-decider-guest-sdk/src/snapshot/tests.rs
  • rsworkspace/crates/trogon-decider-sim/Cargo.toml
  • rsworkspace/crates/trogon-decider-sim/src/import_check.rs
  • rsworkspace/crates/trogon-decider-sim/src/import_check/tests.rs
  • rsworkspace/crates/trogon-decider-sim/tests/schedules.rs
✅ Files skipped from review due to trivial changes (2)
  • rsworkspace/crates/trogon-decider-guest-sdk/src/snapshot/tests.rs
  • rsworkspace/crates/trogon-decider-sim/src/import_check/tests.rs
🚧 Files skipped from review as they are similar to previous changes (5)
  • rsworkspace/crates/trogon-decider-sim/Cargo.toml
  • rsworkspace/.cargo/config.toml
  • rsworkspace/cli/trogon-decider-test/src/main.rs
  • rsworkspace/crates/trogon-decider-sim/src/import_check.rs
  • rsworkspace/crates/trogon-decider-guest-sdk/src/snapshot.rs

Walkthrough

Adds the WASM decider contract, guest and host bindings, scheduler domain extraction, simulator, CLI conformance runner, WASM component, and CI/build updates.

Changes

WASM decider pipeline

Layer / File(s) Summary
Build tooling and planning
.github/actions/setup-rust/action.yml, .github/workflows/ci-rust.yml, .mise.toml, rsworkspace/.cargo/config.toml, rsworkspace/Cargo.toml, WASM_TODO.md, wasm-goals.qa.md
Adds wasm target installation and CI retry settings, a new WASM-decider CI job, build tasks and tools, wasm-target rustflags, workspace membership updates, and the planning/design documents.
WIT contract and trogon-decider core extensions
rsworkspace/crates/trogon-decider-wit/wit/world.wit, rsworkspace/crates/trogon-decider/src/lib.rs, rsworkspace/crates/trogon-decider/src/event/..., rsworkspace/crates/trogon-decider-runtime/src/..., rsworkspace/crates/trogonai-proto/...
Defines the decider WIT world and session resource, adds Decider::decide_error_code, adds the event module and codec re-exports, splits trogonai-proto features for runtime host/snapshot support, and adds decode_event_to_json error handling.
Scheduler domain, wire codec, and state machine
rsworkspace/crates/trogon-scheduler-domain/..., rsworkspace/crates/trogon-scheduler/src/..., proto/trogonai/scheduler/schedules/v1/*.proto
Adds the scheduler command proto schemas, subject validation, proto wire conversions, state evolution, shared snapshot policy, and the scheduler crate re-exports that delegate to the extracted domain crate.
Guest SDK bridge, snapshot codec, and export macro
rsworkspace/crates/trogon-decider-guest-macros/..., rsworkspace/crates/trogon-decider-guest-sdk/...
Adds export_decider!, the guest bridge, the snapshot frame codec, and the compile-fail UI coverage for macro validation.
Simulator, CLI runner, and schedules WASM component
rsworkspace/crates/trogon-decider-sim/..., rsworkspace/cli/trogon-decider-test/..., rsworkspace/wasm-components/trogon-schedules-decider/...
Adds the Wasmtime simulator, the YAML-driven decider-test CLI, the schedules test suite, and the trogon-schedules-decider component wiring for the four scheduler commands.

Sequence Diagram(s)

sequenceDiagram
  participant deciderTest as decider-test CLI
  participant simHost as SimHost
  participant simScenario as SimScenario
  participant guestWasm as Schedules WASM
  deciderTest->>simHost: load(bytes)
  deciderTest->>simHost: instantiate(host_state)
  deciderTest->>simScenario: run(instance)
  simScenario->>guestWasm: evolve(given events)
  simScenario->>guestWasm: decide(when command)
  guestWasm-->>simScenario: events / rejection / fault
  simScenario-->>deciderTest: ScenarioError or success
Loading

Estimated code review effort

🎯 5 (Critical) | ⏱️ ~120 minutes

Possibly related PRs

Suggested labels

rust:coverage-baseline-reset

🐇 I hopped through WIT and WASM,
Four schedule commands marched with calm.
No imports snuck in, no shadows cast,
The simulator ran the suite and passed.
A rabbit grin, a YAML cheer,
The decider path is now quite clear.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 65.08% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: compiling deciders into WASM/WIT components.
Description check ✅ Passed The description is directly aligned with the changes and motivation of enforcing decider purity via zero-import WASM/WIT components.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch yordis/decider-wasm-wit-support

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Comment thread rsworkspace/crates/trogon-decider-sim/src/import_check.rs Outdated
Comment thread .mise.toml Outdated
@yordis yordis force-pushed the yordis/decider-wasm-wit-support branch from 114a0bf to cef7f41 Compare June 25, 2026 09:40
Comment thread rsworkspace/crates/trogon-decider-sim/src/import_check.rs
@yordis yordis force-pushed the yordis/decider-wasm-wit-support branch from cef7f41 to 858d556 Compare June 25, 2026 18:03
Comment thread rsworkspace/cli/trogon-decider-test/src/main.rs
@yordis yordis force-pushed the yordis/decider-wasm-wit-support branch from 858d556 to 7a9f840 Compare June 25, 2026 20:40
Decider purity is currently convention, not a guarantee: nothing stops a decider from performing side effects such as reading the clock or generating ids, so its logic cannot be fully trusted or replayed safely, cannot run in arbitrary sandboxes, and forces every author to own infrastructure. Compiling deciders to zero-import WASM components makes purity enforceable by capability denial, lets the same module run anywhere (server, browser, AI), and moves toward a platform that owns the event-store wiring.

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
@yordis yordis force-pushed the yordis/decider-wasm-wit-support branch from 7a9f840 to b552b13 Compare June 27, 2026 01:15
Comment thread .github/workflows/ci-rust.yml
…it-support

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>

# Conflicts:
#	rsworkspace/Cargo.lock
#	rsworkspace/crates/trogon-scheduler/Cargo.toml
Comment thread rsworkspace/cli/trogon-decider-test/src/main.rs Outdated
yordis added 4 commits June 27, 2026 01:54
… networks

- The wasm32/native feature-build guards spawn nested `cargo check`; under
  `cargo llvm-cov` the injected RUSTC_WRAPPER applied `-C instrument-coverage`
  to the nested build, which fails for `wasm32-unknown-unknown` (no
  `profiler_builtins`) and no longer reflects real target behavior. Strip the
  coverage wrapper env so the guards exercise the actual build.
- Raise `CARGO_NET_RETRY` so source-built mise tools (dylint-link, ...) tolerate
  transient crates.io network errors during install.

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
The wasm-tools import scan only inspected lines inside a `world root {` block,
so imports listed under a differently named world (the contract defines `world
decider`) or outside that block slipped through, diverging from the CI guard's
full-file import grep and letting a non-zero-import component pass.

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Scenarios asserting a command is accepted (`rejected: false`) were routed
through `then_rejected()`, so the runner demanded a business rejection and the
boolean was effectively ignored. Add `SimScenario::then_accepted` and map the
flag to it so an accepted outcome is asserted.

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
The compile-fail case for bundling commands with mismatched `Event` types only
recorded the relative-WIT-path read failure trybuild hits in its copied crate
tree; that fatal error masked the shared-event bound, so the guard asserted
nothing. Provision the contract WIT where trybuild resolves it and add a
WIT-independent shared-state/event assertion in the macro, so the mismatch is
surfaced and asserted regardless of the WIT bindings.

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Comment thread rsworkspace/cli/trogon-decider-test/src/main.rs Outdated
…it-support

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>

# Conflicts:
#	rsworkspace/Cargo.toml
#	rsworkspace/crates/trogon-scheduler/Cargo.toml
Comment thread rsworkspace/crates/trogon-decider-guest-sdk/src/snapshot.rs
@github-actions

github-actions Bot commented Jun 27, 2026

Copy link
Copy Markdown

badge

Code Coverage Summary

Details
Filename                                                                                  Stmts    Miss  Cover    Missing
--------------------------------------------------------------------------------------  -------  ------  -------  -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
crates/a2a-gateway/src/runtime/env.rs                                                        55       0  100.00%
crates/a2a-gateway/src/runtime/policy_stack.rs                                               78      31  60.26%   84, 91, 103-112, 119-120, 135-145, 154-170, 175
crates/a2a-gateway/src/runtime/reply.rs                                                       5       0  100.00%
crates/a2a-gateway/src/runtime/streaming.rs                                                  35       0  100.00%
crates/a2a-gateway/src/runtime/audit_publish.rs                                              16       0  100.00%
crates/a2a-gateway/src/runtime/tier1.rs                                                      30       0  100.00%
crates/a2a-gateway/src/runtime/tier1_denial.rs                                               34       1  97.06%   60
crates/acp-nats/src/jetstream/streams.rs                                                     18       0  100.00%
crates/acp-nats/src/jetstream/ext_policy.rs                                                   3       0  100.00%
crates/acp-nats/src/jetstream/provision.rs                                                   13       0  100.00%
crates/acp-nats/src/jetstream/consumers.rs                                                   41       0  100.00%
crates/jsonrpc-nats/src/transport.rs                                                         92       1  98.91%   106
crates/jsonrpc-nats/src/message.rs                                                           11       3  72.73%   37-39
crates/jsonrpc-nats/src/id.rs                                                                62      20  67.74%   44-61, 81-82, 84-85, 91-92, 98-99, 112
crates/a2a-nats/src/client/streaming.rs                                                      73       0  100.00%
crates/a2a-nats/src/client/unary.rs                                                          39       1  97.44%   57
crates/a2a-nats/src/client/resubscribe.rs                                                    28       0  100.00%
crates/a2a-nats/src/client/gateway_headers.rs                                                19       0  100.00%
crates/a2a-nats/src/client/event_stream.rs                                                   76       0  100.00%
crates/a2a-nats/src/client/wire.rs                                                           13       0  100.00%
crates/a2a-nats/src/client/error.rs                                                          14       0  100.00%
crates/a2a-nats/src/client/handle.rs                                                        218       0  100.00%
crates/trogon-gateway/src/source/linear/server.rs                                            83       0  100.00%
crates/trogon-gateway/src/source/linear/config.rs                                             9       0  100.00%
crates/trogon-gateway/src/source/linear/signature.rs                                          8       1  87.50%   16
crates/a2a-nats/src/nats/subjects/agents/tasks/list.rs                                       15       0  100.00%
crates/a2a-nats/src/nats/subjects/agents/tasks/resubscribe.rs                                15       0  100.00%
crates/a2a-nats/src/nats/subjects/agents/tasks/get.rs                                        15       0  100.00%
crates/a2a-nats/src/nats/subjects/agents/tasks/cancel.rs                                     15       0  100.00%
crates/trogon-gateway/src/source/twitter/signature.rs                                        16       0  100.00%
crates/trogon-gateway/src/source/twitter/config.rs                                            9       0  100.00%
crates/trogon-gateway/src/source/twitter/server.rs                                          144       0  100.00%
crates/trogon-gateway/src/source/standard_webhooks.rs                                       138       0  100.00%
crates/a2a-nats/src/nats/subjects/subscriptions/task_one_events.rs                           12       0  100.00%
crates/a2a-nats/src/nats/subjects/subscriptions/agent_all.rs                                 12       0  100.00%
crates/a2a-nats/src/nats/subjects/subscriptions/task_all_events.rs                            9       0  100.00%
crates/trogon-service-config/src/lib.rs                                                      38       0  100.00%
crates/trogon-gateway/src/source/microsoft_graph/server.rs                                   73       0  100.00%
crates/trogon-gateway/src/source/microsoft_graph/client_state.rs                             14       0  100.00%
crates/a2a-nats/src/catalog/import_gate/principal.rs                                          9       0  100.00%
crates/a2a-nats/src/catalog/import_gate/allow_all.rs                                          2       0  100.00%
crates/trogon-telemetry/src/trace.rs                                                         15       1  93.33%   24
crates/trogon-telemetry/src/lib.rs                                                          135      23  82.96%   119, 124, 129, 139-140, 146-164, 200, 203, 206, 212
crates/trogon-telemetry/src/metric.rs                                                        18       1  94.44%   30
crates/trogon-telemetry/src/resource_attribute.rs                                            13       0  100.00%
crates/trogon-telemetry/src/log.rs                                                           36       0  100.00%
crates/trogon-telemetry/src/service_name.rs                                                  17       0  100.00%
crates/trogon-decider-runtime/src/execution.rs                                              379       0  100.00%
crates/trogon-scheduler/src/processor/execution/checkpoints/codec/twin.rs                    96       0  100.00%
crates/acp-nats/src/nats/subjects/responses/ext_ready.rs                                     12       0  100.00%
crates/acp-nats/src/nats/subjects/responses/response.rs                                      20       0  100.00%
crates/acp-nats/src/nats/subjects/responses/update.rs                                        20       0  100.00%
crates/acp-nats/src/nats/subjects/responses/prompt_response.rs                               20       0  100.00%
crates/acp-nats/src/nats/subjects/responses/cancelled.rs                                     15       0  100.00%
crates/trogon-gateway/src/source/sentry/sentry_client_secret.rs                               9       0  100.00%
crates/trogon-gateway/src/source/sentry/signature.rs                                          6       0  100.00%
crates/trogon-gateway/src/source/sentry/server.rs                                            69       0  100.00%
crates/acp-nats-agent/src/connection.rs                                                     468       1  99.79%   704
crates/trogon-decider-runtime/src/stream/append_stream.rs                                     5       0  100.00%
crates/trogon-decider-runtime/src/stream/stream_position.rs                                  26       0  100.00%
crates/trogon-decider-runtime/src/stream/read_stream.rs                                       7       0  100.00%
crates/trogon-decider-runtime/src/event/event_id.rs                                          32       0  100.00%
crates/trogon-decider-runtime/src/event/event_identity.rs                                     3       0  100.00%
crates/trogon-decider-runtime/src/event/stream_event.rs                                       8       0  100.00%
crates/a2a-redaction/src/bin/sign-bundle.rs                                                   1       1  0.00%    163
crates/acp-nats/src/nats/mod.rs                                                              61      13  78.69%   22-33, 75
crates/acp-nats/src/nats/jsonrpc.rs                                                          51      11  78.43%   46, 54-55, 57-63, 81-83
crates/acp-nats/src/nats/parsing.rs                                                         113      15  86.73%   138-152, 192
crates/acp-nats/src/nats/extensions.rs                                                        3       0  100.00%
crates/trogon-std/src/time/mock.rs                                                           32       0  100.00%
crates/trogon-std/src/time/system.rs                                                          9       0  100.00%
crates/a2a-gateway/src/policy/tier3_redaction/mod.rs                                         33       2  93.94%   54, 58
crates/a2a-gateway/src/policy/tier3_redaction/json_path.rs                                   84       5  94.05%   37, 49, 85, 104, 115
crates/a2a-gateway/src/policy/tier3_redaction/context.rs                                     40       0  100.00%
crates/a2a-gateway/src/policy/tier3_redaction/decision.rs                                    22       0  100.00%
crates/a2a-gateway/src/policy/tier3_redaction/real_gate.rs                                  138      33  76.09%   18-26, 42-44, 67, 76-80, 119, 148-152, 155-159, 170-174, 192, 265
crates/a2a-gateway/src/policy/tier3_redaction/manifest.rs                                    69       3  95.65%   112, 121, 132
crates/a2a-gateway/src/policy/tier3_redaction/gate.rs                                         3       0  100.00%
crates/a2a-gateway/src/policy/tier3_redaction/rewrite.rs                                     49       0  100.00%
crates/trogon-scheduler/src/projections/schedules/twin.rs                                    53       0  100.00%
crates/trogon-scheduler/src/projections/schedules/mod.rs                                    175       3  98.29%   708-710
crates/trogon-scheduler/src/projections/schedules/storage.rs                                  3       0  100.00%
crates/mcp-nats/src/nats/mod.rs                                                              23       0  100.00%
crates/mcp-nats/src/nats/parsing.rs                                                          98       0  100.00%
crates/a2a-nats/src/jetstream/provision.rs                                                   16       0  100.00%
crates/a2a-nats/src/jetstream/streams.rs                                                      9       0  100.00%
crates/a2a-nats/src/jetstream/consumers.rs                                                   50       0  100.00%
crates/a2a-nats/src/jetstream/stream_options.rs                                              50       0  100.00%
crates/acp-nats/src/agent/ext_method.rs                                                      12       0  100.00%
crates/acp-nats/src/agent/fork_session.rs                                                    16       0  100.00%
crates/acp-nats/src/agent/new_session.rs                                                      5       0  100.00%
crates/acp-nats/src/agent/load_session.rs                                                    16       0  100.00%
crates/acp-nats/src/agent/bridge.rs                                                         124       4  96.77%   108-111
crates/acp-nats/src/agent/cancel.rs                                                          12       0  100.00%
crates/acp-nats/src/agent/list_sessions.rs                                                    5       0  100.00%
crates/acp-nats/src/agent/resume_session.rs                                                  16       0  100.00%
crates/acp-nats/src/agent/rpc_call.rs                                                        23       0  100.00%
crates/acp-nats/src/agent/js_request.rs                                                      73       6  91.78%   84-89
crates/acp-nats/src/agent/close_session.rs                                                   16       0  100.00%
crates/acp-nats/src/agent/set_session_mode.rs                                                16       0  100.00%
crates/acp-nats/src/agent/set_session_config_option.rs                                       16       0  100.00%
crates/acp-nats/src/agent/ext_notification.rs                                                12       0  100.00%
crates/acp-nats/src/agent/initialize.rs                                                       6       0  100.00%
crates/acp-nats/src/agent/set_session_model.rs                                               16       0  100.00%
crates/acp-nats/src/agent/logout.rs                                                           5       0  100.00%
crates/acp-nats/src/agent/authenticate.rs                                                     5       0  100.00%
crates/acp-nats/src/agent/prompt.rs                                                         156       7  95.51%   201-207
crates/acp-nats/src/agent/test_support.rs                                                   194       0  100.00%
crates/a2a-gateway/src/policy/tier2/mod.rs                                                   46       0  100.00%
crates/a2a-gateway/src/policy/tier2/rule_name.rs                                             19       0  100.00%
crates/trogon-decider-nats/src/snapshot_store.rs                                            446      27  93.95%   208-210, 248-250, 361-367, 449, 585, 590, 686-688, 694-696, 730-731, 741-742, 761, 789-790
crates/trogon-decider-nats/src/stream_store.rs                                              267      18  93.26%   70-72, 245, 273-274, 277, 293-297, 464-465, 506, 519-523
crates/trogon-decider-nats/src/store.rs                                                      73      45  38.36%   50-54, 101-167
crates/a2a-auth-callout/src/wire/xkey_public.rs                                              23       0  100.00%
crates/a2a-auth-callout/src/wire/server_auth_request_claims.rs                              100       4  96.00%   24-26, 127
crates/a2a-auth-callout/src/wire/test_encode.rs                                              59       0  100.00%
crates/a2a-auth-callout/src/wire/nkey_seed.rs                                                20       0  100.00%
crates/a2a-auth-callout/src/wire/callout_auth_response_claims.rs                             54       3  94.44%   70-72
crates/a2a-auth-callout/src/wire/server_auth_request_envelope.rs                             68       1  98.53%   64
crates/a2a-auth-callout/src/wire/nkey_public.rs                                              83       3  96.39%   102, 118-119
crates/a2a-auth-callout/src/wire/wire_codec.rs                                               58       0  100.00%
crates/a2a-auth-callout/src/wire/bridge_adapter.rs                                           73       0  100.00%
crates/acp-nats/src/client/rpc_reply.rs                                                     107      43  59.81%   45-47, 61-63, 80-120
crates/acp-nats/src/client/terminal_kill.rs                                                  41       0  100.00%
crates/acp-nats/src/client/ext_session_prompt_response.rs                                    22       0  100.00%
crates/acp-nats/src/client/terminal_output.rs                                                29       0  100.00%
crates/acp-nats/src/client/test_support.rs                                                   17       0  100.00%
crates/acp-nats/src/client/fs_read_text_file.rs                                              27       0  100.00%
crates/acp-nats/src/client/fs_write_text_file.rs                                             43       0  100.00%
crates/acp-nats/src/client/terminal_wait_for_exit.rs                                         55       0  100.00%
crates/acp-nats/src/client/mod.rs                                                           101       1  99.01%   56
crates/acp-nats/src/client/terminal_create.rs                                                41       0  100.00%
crates/acp-nats/src/client/request_permission.rs                                             40       0  100.00%
crates/acp-nats/src/client/session_update.rs                                                  2       0  100.00%
crates/acp-nats/src/client/terminal_release.rs                                               35       0  100.00%
crates/acp-nats/src/client/ext.rs                                                            57       0  100.00%
crates/trogon-gateway/src/main.rs                                                            26       0  100.00%
crates/trogon-gateway/src/http.rs                                                            13       0  100.00%
crates/trogon-gateway/src/source_integration_id.rs                                           28       2  92.86%   58, 60
crates/trogon-gateway/src/source_plugin.rs                                                  268       3  98.88%   82, 139-140
crates/trogon-gateway/src/source_status.rs                                                   12       0  100.00%
crates/trogon-gateway/src/streams.rs                                                          7       0  100.00%
crates/trogon-gateway/src/config.rs                                                        1087      42  96.14%   80, 665, 668, 831, 889, 975, 978, 981, 986, 1072-1079, 1157, 1160, 1163, 1168, 1227, 1230, 1233, 1313, 1316, 1319, 1324, 1389, 1392, 1395, 1464, 1467, 1470, 1475, 1551, 1554, 1557, 1567, 1626, 1629, 1632, 1847-1849
crates/trogon-std/src/env/enumerate_env.rs                                                    6       0  100.00%
crates/trogon-std/src/env/system.rs                                                          12       0  100.00%
crates/trogon-std/src/env/read_env.rs                                                         3       0  100.00%
crates/trogon-std/src/env/in_memory.rs                                                       30       0  100.00%
crates/ard-registry/src/list_agents_request.rs                                               21       0  100.00%
crates/ard-registry/src/facet_field.rs                                                       13       0  100.00%
crates/ard-registry/src/explore_request.rs                                                   30       0  100.00%
crates/ard-registry/src/registry.rs                                                         134       3  97.76%   78, 174, 183
crates/ard-registry/src/registry_config.rs                                                   16       0  100.00%
crates/ard-registry/src/search_filters.rs                                                    28       0  100.00%
crates/ard-registry/src/router.rs                                                            33       0  100.00%
crates/ard-registry/src/source_url.rs                                                        26       1  96.15%   30
crates/ard-registry/src/search_request.rs                                                    32       1  96.88%   43
crates/ard-registry/src/extract.rs                                                           12       0  100.00%
crates/ard-registry/src/filters.rs                                                           31       0  100.00%
crates/ard-registry/src/http_error.rs                                                        17       0  100.00%
crates/ard-registry/src/page_token.rs                                                        14       0  100.00%
crates/ard-registry/src/lexical_rank.rs                                                      55       2  96.36%   15, 64
crates/acp-nats/src/nats/subjects/stream.rs                                                  56       0  100.00%
crates/trogon-scheduler/src/processor/execution/execution_schedules/mod.rs                   82       0  100.00%
crates/a2a-nats/src/catalog/store.rs                                                        117       0  100.00%
crates/a2a-nats/src/catalog/watch.rs                                                         18       0  100.00%
crates/a2a-nats/src/catalog/registrar.rs                                                     56       0  100.00%
crates/a2a-nats/src/catalog/agent_view.rs                                                    47       0  100.00%
crates/a2a-nats/src/catalog/nats_kv.rs                                                        8       0  100.00%
crates/a2a-nats/src/catalog/spicedb_permission.rs                                           178      17  90.45%   151-156, 175, 340-344, 373-374, 385-387, 394-396
crates/trogon-scheduler/src/queries/decode.rs                                                95       0  100.00%
crates/trogon-scheduler/src/queries/schedule_id.rs                                           28       0  100.00%
crates/trogon-scheduler/src/queries/get.rs                                                    3       0  100.00%
crates/mcp-nats/src/nats/subjects/subscriptions/one_client.rs                                 9       0  100.00%
crates/mcp-nats/src/nats/subjects/subscriptions/all_server.rs                                 6       0  100.00%
crates/mcp-nats/src/nats/subjects/subscriptions/all_client.rs                                 6       0  100.00%
crates/mcp-nats/src/nats/subjects/subscriptions/one_server.rs                                 9       0  100.00%
crates/a2a-pack/src/agent_card_read.rs                                                       23       0  100.00%
crates/a2a-pack/src/agent_card_schema.rs                                                     40       0  100.00%
crates/a2a-pack/src/resource_tuples.rs                                                      152       0  100.00%
crates/trogon-scheduler/src/commands/domain/schedule_occurrence_sequence.rs                  16       0  100.00%
crates/trogon-scheduler/src/commands/domain/recurrence.rs                                    78       1  98.72%   99
crates/a2a-nats-http/src/handlers/mod.rs                                                    185      12  93.51%   68, 88-91, 121, 155, 169-172, 185
crates/trogon-identity-types/src/act_chain.rs                                                13       0  100.00%
crates/trogon-decider-guest-macros/src/lib.rs                                               121      16  86.78%   14-19, 95-98, 413-422, 426
crates/trogon-gateway/src/source/github/signature.rs                                          9       0  100.00%
crates/trogon-gateway/src/source/github/config.rs                                             9       0  100.00%
crates/trogon-gateway/src/source/github/server.rs                                            50       0  100.00%
crates/acp-nats-stdio/src/config.rs                                                          15       0  100.00%
crates/acp-nats-stdio/src/main.rs                                                            58      11  81.03%   67, 110-117, 123-125, 142
crates/acp-nats/src/nats/subjects/global/ext_notify.rs                                        9       0  100.00%
crates/acp-nats/src/nats/subjects/global/ext.rs                                               9       0  100.00%
crates/acp-nats/src/nats/subjects/global/authenticate.rs                                      6       0  100.00%
crates/acp-nats/src/nats/subjects/global/initialize.rs                                        6       0  100.00%
crates/acp-nats/src/nats/subjects/global/logout.rs                                            6       0  100.00%
crates/acp-nats/src/nats/subjects/global/session_list.rs                                      6       0  100.00%
crates/acp-nats/src/nats/subjects/global/session_new.rs                                       6       0  100.00%
crates/acp-nats/src/config.rs                                                                84       0  100.00%
crates/acp-nats/src/pending_prompt_waiters.rs                                                68       0  100.00%
crates/acp-nats/src/wire.rs                                                                  80      14  82.50%   38, 46-60, 103
crates/acp-nats/src/acp_prefix.rs                                                            13       0  100.00%
crates/acp-nats/src/error.rs                                                                 31       0  100.00%
crates/acp-nats/src/ext_method_name.rs                                                       18       0  100.00%
crates/acp-nats/src/req_id.rs                                                                21       0  100.00%
crates/acp-nats/src/session_id.rs                                                            21       0  100.00%
crates/acp-nats/src/client_proxy.rs                                                          63       1  98.41%   55
crates/acp-nats/src/lib.rs                                                                   11       0  100.00%
crates/acp-nats/src/in_flight_slot_guard.rs                                                   7       0  100.00%
crates/a2a-identity-types/src/jwt.rs                                                         71       0  100.00%
crates/a2a-identity-types/src/principal.rs                                                   16       0  100.00%
crates/a2a-identity-types/src/caller.rs                                                      24       0  100.00%
crates/a2a-redaction/src/wasm/mod.rs                                                        110       9  91.82%   132-134, 147-149, 162-164
crates/a2a-redaction/src/wasm/engine.rs                                                      62      11  82.26%   46-48, 80-81, 93-95, 99-101
crates/a2a-nats/src/nats/subjects/agents/card.rs                                             12       0  100.00%
crates/a2a-nats/src/nats/subjects/agents/message_send.rs                                     15       0  100.00%
crates/a2a-nats/src/nats/subjects/agents/message_stream.rs                                   15       0  100.00%
crates/trogon-decider-runtime/src/snapshot/codec/snapshot_encode_error.rs                    16       0  100.00%
crates/trogon-decider-runtime/src/snapshot/codec/snapshot_decode_error.rs                    19       0  100.00%
crates/trogon-decider-runtime/src/snapshot/codec/snapshot_envelope_decode_error.rs            6       0  100.00%
crates/trogon-decider-runtime/src/snapshot/codec/encoded_snapshot.rs                         44       0  100.00%
crates/trogon-decider-runtime/src/snapshot/codec/snapshot_envelope_encode_error.rs            3       0  100.00%
crates/trogon-decider-runtime/src/snapshot/codec/snapshot_payload_decode.rs                   3       0  100.00%
crates/trogon-scheduler-domain/src/commands/domain/schedule_event_delivery.rs                14       0  100.00%
crates/trogon-scheduler-domain/src/commands/domain/message.rs                               139       0  100.00%
crates/trogon-scheduler-domain/src/commands/domain/schedule.rs                              383       5  98.69%   326, 334, 349-351
crates/trogon-scheduler-domain/src/commands/domain/schedule_event_status.rs                   6       0  100.00%
crates/trogon-scheduler-domain/src/commands/domain/schedule_event_schedule.rs                35       0  100.00%
crates/trogon-scheduler-domain/src/commands/domain/schedule_id.rs                            37       0  100.00%
crates/trogon-scheduler-domain/src/commands/domain/schedule_event_sampling_source.rs         11       0  100.00%
crates/trogon-scheduler/src/telemetry/trace.rs                                               20       0  100.00%
crates/trogon-scheduler/src/telemetry/metrics.rs                                             27       0  100.00%
crates/trogon-gateway/src/source/incidentio/incidentio_signing_secret.rs                     22       0  100.00%
crates/trogon-gateway/src/source/incidentio/signature.rs                                      8       0  100.00%
crates/trogon-gateway/src/source/incidentio/server.rs                                        72       0  100.00%
crates/trogon-gateway/src/source/incidentio/incidentio_event_type.rs                         20       0  100.00%
crates/a2a-gateway/src/policy/spicedb_tier1.rs                                              157      13  91.72%   226-228, 381, 448, 450-458
crates/a2a-gateway/src/policy/wasmtime_substrate.rs                                          31       0  100.00%
crates/a2a-gateway/src/policy/per_skill.rs                                                   87       0  100.00%
crates/a2a-gateway/src/policy/error.rs                                                       16       0  100.00%
crates/a2a-nats/src/nats/subjects/stream.rs                                                  50       0  100.00%
crates/a2a-redaction/src/skill_manifest.rs                                                  310      14  95.48%   139, 169-171, 177, 184-188, 358-360, 452
crates/a2a-redaction/src/tier3_sentinel.rs                                                   12       0  100.00%
crates/a2a-redaction/src/redactor.rs                                                         32       0  100.00%
crates/a2a-redaction/src/wasm_bundle_path.rs                                                 18       0  100.00%
crates/a2a-redaction/src/skill_id.rs                                                         26       0  100.00%
crates/a2a-redaction/src/a2a_method.rs                                                       41       0  100.00%
crates/trogon-scheduler/src/processor/execution/reconciliation/reconcile.rs                 303      13  95.71%   251-260, 325-327
crates/trogon-scheduler/src/processor/execution/reconciliation/request.rs                   230       2  99.13%   285, 290
crates/trogon-scheduler/src/processor/execution/reconciliation/schedule_key.rs               27       0  100.00%
crates/trogon-scheduler/src/processor/execution/reconciliation/schedule_subject.rs           31       0  100.00%
crates/trogon-scheduler/src/processor/execution/reconciliation/rrule_wakeup_payload.rs       35       0  100.00%
crates/trogon-scheduler/src/processor/execution/reconciliation/go_duration.rs                40       0  100.00%
crates/trogon-scheduler/src/processor/execution/reconciliation/recorded_events.rs           241      12  95.02%   200-205, 242, 250, 271, 291, 297, 303, 336, 346, 364, 448
crates/a2a-redaction/src/signed_bundle/signature.rs                                          30       3  90.00%   37-39
crates/a2a-redaction/src/signed_bundle/digest.rs                                             26       0  100.00%
crates/a2a-redaction/src/signed_bundle/public_key.rs                                         36       2  94.44%   44-45
crates/a2a-redaction/src/signed_bundle/manifest.rs                                           56       1  98.21%   83
crates/a2a-redaction/src/signed_bundle/verify.rs                                             64       2  96.88%   90-91
crates/acp-nats/src/telemetry/metrics.rs                                                     22       0  100.00%
crates/trogon-nats/src/lease/renew.rs                                                        82      19  76.83%   23-29, 48-59
crates/trogon-nats/src/lease/ttl.rs                                                          27       0  100.00%
crates/trogon-nats/src/lease/mod.rs                                                         107      13  87.85%   113-126
crates/trogon-nats/src/lease/renew_interval.rs                                               25       0  100.00%
crates/trogon-nats/src/lease/nats_kv_lease_config.rs                                         26       0  100.00%
crates/trogon-nats/src/lease/lease_key.rs                                                    19       0  100.00%
crates/trogon-nats/src/lease/lease_bucket.rs                                                 19       0  100.00%
crates/trogon-nats/src/lease/lease_timing.rs                                                 15       0  100.00%
crates/trogon-nats/src/lease/provision.rs                                                    83      10  87.95%   82-92
crates/trogon-nats/src/lease/acquire.rs                                                       5       5  0.00%    9-14
crates/trogon-nats/src/lease/release.rs                                                       5       5  0.00%    8-12
crates/mcp-nats/src/mcp_peer_id.rs                                                           15       0  100.00%
crates/mcp-nats/src/server.rs                                                                12       0  100.00%
crates/mcp-nats/src/mcp_prefix.rs                                                            15       0  100.00%
crates/mcp-nats/src/config.rs                                                                59       0  100.00%
crates/mcp-nats/src/jsonrpc.rs                                                                5       0  100.00%
crates/mcp-nats/src/transport.rs                                                            263      10  96.20%   244, 256-258, 376-379, 388-389
crates/mcp-nats/src/wire.rs                                                                  18       0  100.00%
crates/mcp-nats/src/client.rs                                                                12       0  100.00%
crates/trogon-decider-sim/src/session.rs                                                     15       3  80.00%   23-25
crates/trogon-decider-sim/src/host.rs                                                        35       0  100.00%
crates/trogon-decider-sim/src/fixture.rs                                                     18       2  88.89%   30-32
crates/trogon-decider-sim/src/import_check.rs                                                52       4  92.31%   68-70, 90
crates/trogon-decider-sim/src/scenario.rs                                                   142       4  97.18%   152-154, 258
crates/trogon-nats/src/telemetry/messaging.rs                                                37       0  100.00%
crates/mcp-nats/src/telemetry/transport.rs                                                    6       0  100.00%
crates/a2a-bridge/src/auth.rs                                                                47      15  68.09%   78-99, 148
crates/a2a-bridge/src/main.rs                                                                 1       1  0.00%    199
crates/a2a-bridge/src/outbound.rs                                                            70       7  90.00%   126, 197-209
crates/a2a-bridge/src/inbound.rs                                                            326      91  72.09%   115-119, 142-144, 191-231, 292-417, 469-471, 482, 580, 631-646, 687-692
crates/a2a-bridge/src/nats_transport_harness.rs                                              42       0  100.00%
crates/a2a-bridge/src/identity.rs                                                            63       0  100.00%
crates/ard-catalog/src/catalog_entry.rs                                                     107       0  100.00%
crates/ard-catalog/src/catalog_manifest_wire.rs                                               3       0  100.00%
crates/ard-catalog/src/catalog_host.rs                                                       26       0  100.00%
crates/ard-catalog/src/ard_identifier.rs                                                     54       0  100.00%
crates/ard-catalog/src/catalog_manifest_schema.rs                                            65       4  93.85%   109-110, 112-113
crates/ard-catalog/src/catalog_entry_wire.rs                                                  3       0  100.00%
crates/ard-catalog/src/ard_storage_key.rs                                                    10       0  100.00%
crates/ard-catalog/src/display_name.rs                                                       13       0  100.00%
crates/ard-catalog/src/representative_queries.rs                                             18       0  100.00%
crates/ard-catalog/src/url_or_data.rs                                                        20       0  100.00%
crates/ard-catalog/src/federation_mode.rs                                                     3       0  100.00%
crates/ard-catalog/src/trust_manifest.rs                                                     45       1  97.78%   35
crates/ard-catalog/src/registry_error_wire.rs                                                 8       0  100.00%
crates/ard-catalog/src/media_type.rs                                                         20       0  100.00%
crates/ard-catalog/src/catalog_manifest.rs                                                   44       0  100.00%
crates/ard-catalog/src/catalog_host_wire.rs                                                   6       0  100.00%
crates/ard-catalog/src/metadata.rs                                                           14       0  100.00%
crates/trogon-scheduler/src/processor/execution/checkpoints/record.rs                         6       0  100.00%
crates/trogon-scheduler/src/processor/execution/checkpoints/codec.rs                        318      17  94.65%   340-341, 361-362, 373-377, 405-406, 412-413, 442-443, 480, 485-487
crates/trogon-scheduler/src/processor/execution/checkpoints/failure.rs                       27       0  100.00%
crates/trogon-scheduler/src/processor/execution/checkpoints/store.rs                        145      16  88.97%   103, 121, 125, 132, 224-230, 279-283
crates/trogon-decider/src/act.rs                                                             62       0  100.00%
crates/trogon-decider/src/events.rs                                                          49       0  100.00%
crates/trogon-decider/src/decision.rs                                                        27       0  100.00%
crates/trogon-decider/src/testing.rs                                                        274       0  100.00%
crates/trogon-decider/src/lib.rs                                                              4       0  100.00%
crates/trogon-gateway/src/source/telegram/server.rs                                          53       0  100.00%
crates/trogon-gateway/src/source/telegram/config.rs                                          42       0  100.00%
crates/trogon-gateway/src/source/telegram/registration.rs                                    82       0  100.00%
crates/trogon-gateway/src/source/telegram/signature.rs                                        7       0  100.00%
crates/trogon-nats/src/auth.rs                                                               45       0  100.00%
crates/trogon-nats/src/client.rs                                                             22      22  0.00%    50-86
crates/trogon-nats/src/token.rs                                                               6       0  100.00%
crates/trogon-nats/src/nats_token.rs                                                         56       0  100.00%
crates/trogon-nats/src/mocks.rs                                                             224       0  100.00%
crates/trogon-nats/src/connect.rs                                                            26       6  76.92%   42-47
crates/trogon-nats/src/server_info.rs                                                        21       3  85.71%   19-21
crates/trogon-nats/src/messaging.rs                                                         168       2  98.81%   146, 156
crates/trogon-scheduler/src/processor/execution/wakeup.rs                                    91       1  98.90%   127
crates/trogon-decider/src/event/codec/event_decode.rs                                        13       0  100.00%
crates/trogon-decider/src/event/codec/event_payload_error.rs                                  5       0  100.00%
crates/a2a-auth-callout/src/credentials/api_key.rs                                           46       1  97.83%   33
crates/a2a-auth-callout/src/credentials/mtls.rs                                             153      13  91.50%   71-72, 168-169, 209-213, 216-219
crates/a2a-auth-callout/src/credentials/oidc.rs                                             188       4  97.87%   212-215
crates/a2a-nats/src/catalog/import_gate/spicedb/cache.rs                                     36       0  100.00%
crates/a2a-nats/src/catalog/import_gate/spicedb/config.rs                                    70       0  100.00%
crates/a2a-nats/src/catalog/import_gate/spicedb/mod.rs                                      108       0  100.00%
crates/a2a-nats/src/catalog/import_gate/spicedb/client.rs                                    29      15  48.28%   43-69, 97-99, 108-117
crates/trogon-decider-wit/src/lib.rs                                                         53       9  83.02%   4, 25, 75-81
crates/trogon-gateway/src/source/discord/config.rs                                           45       0  100.00%
crates/trogon-gateway/src/source/discord/gateway.rs                                         116       1  99.14%   137
crates/trogon-std/src/dirs/fixed.rs                                                          32       0  100.00%
crates/trogon-std/src/dirs/system.rs                                                         39       0  100.00%
crates/jsonrpc-nats/src/codec/encode.rs                                                      31       0  100.00%
crates/jsonrpc-nats/src/codec/decode.rs                                                      57       0  100.00%
crates/jsonrpc-nats/src/codec/reconstruct.rs                                                 90       5  94.44%   56-59, 91
crates/acp-nats/src/nats/subjects/commands/load.rs                                           15       0  100.00%
crates/acp-nats/src/nats/subjects/commands/prompt.rs                                         15       0  100.00%
crates/acp-nats/src/nats/subjects/commands/set_mode.rs                                       15       0  100.00%
crates/acp-nats/src/nats/subjects/commands/cancel.rs                                         15       0  100.00%
crates/acp-nats/src/nats/subjects/commands/set_model.rs                                      15       0  100.00%
crates/acp-nats/src/nats/subjects/commands/resume.rs                                         15       0  100.00%
crates/acp-nats/src/nats/subjects/commands/set_config_option.rs                              15       0  100.00%
crates/acp-nats/src/nats/subjects/commands/fork.rs                                           15       0  100.00%
crates/acp-nats/src/nats/subjects/commands/close.rs                                          15       0  100.00%
crates/trogon-decider-runtime/src/headers/header_name.rs                                     28       0  100.00%
crates/trogon-decider-runtime/src/headers/header_map.rs                                      54       0  100.00%
crates/trogon-decider-runtime/src/headers/header_value.rs                                    34       0  100.00%
crates/mcp-nats-stdio/src/config.rs                                                          26       0  100.00%
crates/mcp-nats-stdio/src/main.rs                                                            36       0  100.00%
crates/mcp-nats-server/src/runtime.rs                                                       266      90  66.17%   146-164, 200-202, 220-221, 232, 265-269, 273-282, 304-317, 322-357, 383-394
crates/mcp-nats-server/src/config.rs                                                         58       0  100.00%
crates/mcp-nats-server/src/main.rs                                                            1       1  0.00%    67
crates/mcp-nats-server/src/allowed_host.rs                                                   52       0  100.00%
crates/a2a-nats/src/audit/envelope.rs                                                        57       0  100.00%
crates/a2a-nats/src/audit/task_lifecycle.rs                                                  17       0  100.00%
crates/a2a-nats/src/audit/emitter.rs                                                         58       0  100.00%
crates/a2a-nats-stdio/src/runtime.rs                                                         21       0  100.00%
crates/a2a-nats-stdio/src/main.rs                                                             1       0  100.00%
crates/a2a-nats-stdio/src/io_loop.rs                                                         49       0  100.00%
crates/a2a-nats-stdio/src/wire.rs                                                            22       0  100.00%
crates/a2a-nats-stdio/src/dispatch.rs                                                       207       8  96.14%   116, 119-121, 229, 232-234
crates/a2a-gateway/src/policy/tier2_cel/compiler.rs                                          25       3  88.00%   61-63
crates/a2a-gateway/src/policy/tier2_cel/bundle.rs                                           120      26  78.33%   70-72, 74-76, 86, 92, 111-113, 123-127, 158, 162-164, 166-168, 171, 178, 181
crates/a2a-gateway/src/policy/tier2_cel/evaluator.rs                                        138       0  100.00%
crates/a2a-nats/src/a2a_prefix.rs                                                            16       0  100.00%
crates/a2a-nats/src/agent_id.rs                                                              21       0  100.00%
crates/a2a-nats/src/config.rs                                                               114       0  100.00%
crates/a2a-nats/src/task_id.rs                                                               22       0  100.00%
crates/a2a-nats/src/jsonrpc.rs                                                               27       0  100.00%
crates/a2a-nats/src/context_id.rs                                                            22       0  100.00%
crates/a2a-nats/src/wire.rs                                                                  59       2  96.61%   85, 98
crates/a2a-nats/src/req_id.rs                                                                21       0  100.00%
crates/a2a-nats/src/gateway_ingress.rs                                                      146      21  85.62%   165-168, 172, 186, 194-200, 233, 238-244
crates/trogon-decider-runtime/src/snapshot/snapshot_type.rs                                  42       0  100.00%
crates/trogon-decider-runtime/src/snapshot/mod.rs                                             3       0  100.00%
crates/trogon-decider-runtime/src/snapshot/read_snapshot.rs                                   3       0  100.00%
crates/trogon-scheduler/src/nats.rs                                                          11       0  100.00%
crates/trogon-scheduler/src/config.rs                                                        27       0  100.00%
crates/trogon-scheduler/src/mocks.rs                                                        401      51  87.28%   79, 119-122, 271, 288-291, 333-335, 349-353, 362, 406-410, 462-463, 467, 485-489, 506-509, 552-572
crates/trogon-scheduler/src/error.rs                                                         83      12  85.54%   131-133, 152-154, 159-161, 176-180
crates/trogon-scheduler/src/queries/read_model/schedule.rs                                   15       0  100.00%
crates/trogon-scheduler/src/queries/read_model/message.rs                                    77       0  100.00%
crates/acp-nats/src/nats/subjects/client_ops/fs_read_text_file.rs                            12       0  100.00%
crates/acp-nats/src/nats/subjects/client_ops/terminal_release.rs                             12       0  100.00%
crates/acp-nats/src/nats/subjects/client_ops/fs_write_text_file.rs                           12       0  100.00%
crates/acp-nats/src/nats/subjects/client_ops/terminal_wait_for_exit.rs                       12       0  100.00%
crates/acp-nats/src/nats/subjects/client_ops/session_update.rs                               12       0  100.00%
crates/acp-nats/src/nats/subjects/client_ops/terminal_kill.rs                                12       0  100.00%
crates/acp-nats/src/nats/subjects/client_ops/session_request_permission.rs                   12       0  100.00%
crates/acp-nats/src/nats/subjects/client_ops/terminal_create.rs                              12       0  100.00%
crates/acp-nats/src/nats/subjects/client_ops/terminal_output.rs                              12       0  100.00%
crates/trogon-std/src/fs/mem.rs                                                              85       0  100.00%
crates/trogon-std/src/fs/system.rs                                                           15       0  100.00%
crates/trogon-std/src/duration.rs                                                            15       0  100.00%
crates/trogon-std/src/signal.rs                                                              22      12  45.45%   6-11, 18-25, 34
crates/trogon-std/src/http.rs                                                                 8       0  100.00%
crates/trogon-std/src/json.rs                                                                23       0  100.00%
crates/trogon-std/src/args.rs                                                                12       9  25.00%   11-28
crates/trogon-std/src/secret_string.rs                                                       13       0  100.00%
crates/trogon-std/src/uuid.rs                                                                 3       0  100.00%
crates/a2a-nats/src/push/dispatch_error.rs                                                   24       0  100.00%
crates/a2a-nats/src/push/status_transition_id.rs                                             15       0  100.00%
crates/a2a-nats/src/push/push_idempotency_key.rs                                             43       0  100.00%
crates/a2a-nats/src/push/terminal_push_task_state.rs                                         17       0  100.00%
crates/a2a-nats/src/push/push_notification_config_id.rs                                      17       0  100.00%
crates/a2a-nats/src/push/push_payload.rs                                                     18       0  100.00%
crates/a2a-nats/src/push/idempotency_key_header.rs                                           16       0  100.00%
crates/a2a-nats/src/push/target.rs                                                           19       0  100.00%
crates/a2a-nats/src/push/push_notification_target.rs                                         32       0  100.00%
crates/a2a-nats/src/push/caller_id.rs                                                        41       0  100.00%
crates/a2a-nats/src/push/nats_push_subject.rs                                                12       0  100.00%
crates/a2a-nats/src/push/authentication_header.rs                                            31       0  100.00%
crates/a2a-nats/src/push/delivery_semantics.rs                                               98       0  100.00%
crates/a2a-nats/src/push/push_delivery_semantics_registry.rs                                 17       0  100.00%
crates/a2a-nats/src/push/dlq.rs                                                              56       0  100.00%
crates/a2a-nats/src/push/push_notification_config.rs                                          6       0  100.00%
crates/a2a-nats/src/push/dlq_dedup.rs                                                        51       1  98.04%   79
crates/trogon-gateway/src/source/notion/verification_token.rs                                46       0  100.00%
crates/trogon-gateway/src/source/notion/server.rs                                           120       4  96.67%   116-117, 136-137
crates/trogon-gateway/src/source/notion/notion_event_type.rs                                 20       0  100.00%
crates/trogon-gateway/src/source/notion/notion_verification_token.rs                          9       0  100.00%
crates/trogon-gateway/src/source/notion/signature.rs                                          9       0  100.00%
crates/a2a-nats/src/nats/subjects/agents/push/list.rs                                        15       0  100.00%
crates/a2a-nats/src/nats/subjects/agents/push/set.rs                                         12       0  100.00%
crates/a2a-nats/src/nats/subjects/agents/push/get.rs                                         12       0  100.00%
crates/a2a-nats/src/nats/subjects/agents/push/delete.rs                                      15       0  100.00%
crates/a2a-nats-server/src/noop_handler.rs                                                   22       0  100.00%
crates/a2a-nats-server/src/runtime.rs                                                        17       0  100.00%
crates/a2a-nats-server/src/main.rs                                                            1       0  100.00%
crates/a2a-bridge/src/auth/callout_mint.rs                                                   49       1  97.96%   94
crates/a2a-nats/src/nats/subjects/tasks/events.rs                                            17       0  100.00%
crates/a2a-gateway/src/policy/tier1_declarative/bundle.rs                                    57       0  100.00%
crates/a2a-gateway/src/policy/tier1_declarative/evaluator.rs                                158      13  91.77%   24-26, 147, 196-198, 268-272, 295
crates/a2a-gateway/src/policy/tier1_declarative/time_predicate.rs                           118       2  98.31%   103, 125
crates/a2a-gateway/src/policy/tier1_declarative/loader.rs                                    85       9  89.41%   95-97, 99-101, 126-128
crates/trogon-scheduler-domain/src/subject.rs                                                26       0  100.00%
crates/trogon-gateway/src/source/slack/socket_mode.rs                                       139       0  100.00%
crates/trogon-gateway/src/source/slack/config.rs                                             32       0  100.00%
crates/trogon-gateway/src/source/slack/signature.rs                                          17       0  100.00%
crates/trogon-gateway/src/source/slack/server.rs                                            272       0  100.00%
crates/trogon-aauth-verify/src/challenge.rs                                                  45       0  100.00%
crates/trogon-aauth-verify/src/jwks.rs                                                       15       0  100.00%
crates/trogon-aauth-verify/src/time_source.rs                                                10       0  100.00%
crates/trogon-aauth-verify/src/nats_pop.rs                                                  125       2  98.40%   269, 332
crates/trogon-aauth-verify/src/token.rs                                                     148       1  99.32%   100
crates/trogon-aauth-verify/src/jkt.rs                                                        33       0  100.00%
crates/trogon-aauth-verify/src/jwks_cache.rs                                                 39       0  100.00%
crates/trogon-aauth-verify/src/test_support.rs                                               86       0  100.00%
crates/trogon-aauth-verify/src/replay.rs                                                     26       0  100.00%
crates/trogon-gateway/src/source/gitlab/gitlab_signing_token.rs                              30       0  100.00%
crates/trogon-gateway/src/source/gitlab/server.rs                                            78       0  100.00%
crates/trogon-gateway/src/source/gitlab/signature.rs                                         13       0  100.00%
crates/trogon-nats/src/jetstream/create_conflicts.rs                                         14       0  100.00%
crates/trogon-nats/src/jetstream/publish.rs                                                  30       0  100.00%
crates/trogon-nats/src/jetstream/mocks.rs                                                   941       1  99.89%   507
crates/trogon-nats/src/jetstream/claim_check.rs                                             104       3  97.12%   46-48
crates/trogon-nats/src/jetstream/stream_max_age.rs                                            8       0  100.00%
crates/trogon-nats/src/jetstream/traits.rs                                                   46      40  13.04%   181-251
crates/trogon-scheduler-domain/src/commands/proto_wire.rs                                   138       1  99.28%   231
crates/trogon-scheduler-domain/src/commands/pause_schedule.rs                                31       0  100.00%
crates/trogon-scheduler-domain/src/commands/remove_schedule.rs                               30       0  100.00%
crates/trogon-scheduler-domain/src/commands/resume_schedule.rs                               34       0  100.00%
crates/trogon-scheduler-domain/src/commands/state.rs                                         82       0  100.00%
crates/trogon-scheduler-domain/src/commands/create_schedule.rs                               32       0  100.00%
crates/a2a-nats/src/server/dispatch.rs                                                       33       0  100.00%
crates/a2a-nats/src/server/bridge.rs                                                         65       0  100.00%
crates/a2a-nats/src/server/tasks_cancel.rs                                                   12       0  100.00%
crates/a2a-nats/src/server/test_support.rs                                                   81      25  69.14%   134-159
crates/a2a-nats/src/server/message_stream.rs                                                 56       6  89.29%   155-157, 165-167
crates/a2a-nats/src/server/push_delete.rs                                                    12       0  100.00%
crates/a2a-nats/src/server/push_set.rs                                                       12       0  100.00%
crates/a2a-nats/src/server/tasks_resubscribe.rs                                              12       0  100.00%
crates/a2a-nats/src/server/wire.rs                                                           34       4  88.24%   21-23, 30
crates/a2a-nats/src/server/tasks_list.rs                                                     12       0  100.00%
crates/a2a-nats/src/server/push_get.rs                                                       12       0  100.00%
crates/a2a-nats/src/server/agent_card.rs                                                     16       0  100.00%
crates/a2a-nats/src/server/handler.rs                                                        39       0  100.00%
crates/a2a-nats/src/server/message_send.rs                                                   15       0  100.00%
crates/a2a-nats/src/server/push_list.rs                                                      12       0  100.00%
crates/a2a-nats/src/server/tasks_get.rs                                                      12       0  100.00%
crates/mcp-nats/src/nats/subjects/server/progress.rs                                         12       0  100.00%
crates/mcp-nats/src/nats/subjects/server/tool_list_changed.rs                                12       0  100.00%
crates/mcp-nats/src/nats/subjects/server/call_tool.rs                                        12       0  100.00%
crates/mcp-nats/src/nats/subjects/server/list_resource_templates.rs                          12       0  100.00%
crates/mcp-nats/src/nats/subjects/server/resource_updated.rs                                 12       0  100.00%
crates/mcp-nats/src/nats/subjects/server/list_tasks.rs                                       12       0  100.00%
crates/mcp-nats/src/nats/subjects/server/list_tools.rs                                       12       0  100.00%
crates/mcp-nats/src/nats/subjects/server/initialize.rs                                       12       0  100.00%
crates/mcp-nats/src/nats/subjects/server/list_prompts.rs                                     12       0  100.00%
crates/mcp-nats/src/nats/subjects/server/read_resource.rs                                    12       0  100.00%
crates/mcp-nats/src/nats/subjects/server/resource_list_changed.rs                            12       0  100.00%
crates/mcp-nats/src/nats/subjects/server/set_logging_level.rs                                12       0  100.00%
crates/mcp-nats/src/nats/subjects/server/ping.rs                                              9       0  100.00%
crates/mcp-nats/src/nats/subjects/server/subscribe_resource.rs                               12       0  100.00%
crates/mcp-nats/src/nats/subjects/server/unsubscribe_resource.rs                             12       0  100.00%
crates/mcp-nats/src/nats/subjects/server/elicitation_completed.rs                            12       0  100.00%
crates/mcp-nats/src/nats/subjects/server/cancelled.rs                                        12       0  100.00%
crates/mcp-nats/src/nats/subjects/server/prompt_list_changed.rs                              12       0  100.00%
crates/mcp-nats/src/nats/subjects/server/get_task.rs                                         12       0  100.00%
crates/mcp-nats/src/nats/subjects/server/get_prompt.rs                                       12       0  100.00%
crates/mcp-nats/src/nats/subjects/server/logging_message.rs                                  12       0  100.00%
crates/mcp-nats/src/nats/subjects/server/get_task_result.rs                                  12       0  100.00%
crates/mcp-nats/src/nats/subjects/server/complete.rs                                         12       0  100.00%
crates/mcp-nats/src/nats/subjects/server/list_resources.rs                                   12       0  100.00%
crates/mcp-nats/src/nats/subjects/server/cancel_task.rs                                      12       0  100.00%
crates/a2a-gateway/src/jwt_caller_identity.rs                                               151       4  97.35%   165-169, 182-186
crates/a2a-gateway/src/push_dlq_mirror.rs                                                   133      16  87.97%   162-166, 218, 223-226, 236, 261, 382-389
crates/a2a-gateway/src/main.rs                                                                1       0  100.00%
crates/a2a-gateway/src/audit_ingress.rs                                                     110       0  100.00%
crates/a2a-gateway/src/gw_ingress_stream.rs                                                 144       4  97.22%   319-321, 536
crates/a2a-gateway/src/runtime.rs                                                            11       0  100.00%
crates/a2a-gateway/src/config.rs                                                             57       0  100.00%
crates/a2a-gateway/src/gw_pull_backpressure.rs                                              209       3  98.56%   504, 704, 717
crates/a2a-gateway/src/aauth.rs                                                             199       5  97.49%   253-256, 277
crates/a2a-gateway/src/agent_card_surface.rs                                                  3       0  100.00%
crates/a2a-gateway/src/lib.rs                                                                 3       0  100.00%
crates/trogon-scheduler/src/processor/execution/worker/dispatcher.rs                        280       1  99.64%   200
crates/trogon-scheduler/src/processor/execution/worker/testkit.rs                           311       4  98.71%   458, 489-490, 495
crates/trogon-scheduler/src/processor/execution/worker/consumer.rs                           77       0  100.00%
crates/trogon-scheduler/src/processor/execution/worker/processor.rs                         303      12  96.04%   279, 339, 437-438, 444, 499-501, 533-536
crates/trogon-scheduler/src/commands/record_schedule_occurrence.rs                          113       1  99.12%   182
crates/trogon-scheduler/src/commands/schedule_next_occurrence.rs                             74       0  100.00%
crates/trogon-std/src/telemetry/http.rs                                                      58       0  100.00%
crates/acp-nats/src/nats/subjects/subscriptions/one_session.rs                               12       0  100.00%
crates/acp-nats/src/nats/subjects/subscriptions/one_client.rs                                15       0  100.00%
crates/acp-nats/src/nats/subjects/subscriptions/all_agent.rs                                  9       0  100.00%
crates/acp-nats/src/nats/subjects/subscriptions/one_agent.rs                                 15       0  100.00%
crates/acp-nats/src/nats/subjects/subscriptions/all_session.rs                                9       0  100.00%
crates/acp-nats/src/nats/subjects/subscriptions/global_all.rs                                 9       0  100.00%
crates/acp-nats/src/nats/subjects/subscriptions/all_client.rs                                 9       0  100.00%
crates/acp-nats/src/nats/subjects/subscriptions/prompt_wildcard.rs                            9       0  100.00%
crates/acp-nats/src/nats/subjects/subscriptions/all_agent_ext.rs                              9       0  100.00%
crates/a2a-auth-callout/src/signing_key_source/minting_material.rs                           18       0  100.00%
crates/a2a-auth-callout/src/signing_key_source/signing_key_handle.rs                         15       0  100.00%
crates/a2a-auth-callout/src/signing_key_source/static_source.rs                              25       0  100.00%
crates/a2a-auth-callout/src/signing_key_source/vault.rs                                       3       0  100.00%
crates/a2a-auth-callout/src/signing_key_source/env.rs                                        40       0  100.00%
crates/a2a-auth-callout/src/signing_key_source/loader.rs                                     23       0  100.00%
crates/a2a-auth-callout/src/signing_key_source/file.rs                                       38       6  84.21%   40-42, 61-63
crates/a2a-auth-callout/src/signing_key_source/key_version.rs                                16       0  100.00%
crates/ard-registry/src/bin/ard-registry-demo/main.rs                                        64      20  68.75%   13-35
crates/a2a-nats/src/push/dispatcher/composite.rs                                             15       0  100.00%
crates/a2a-nats/src/push/dispatcher/http.rs                                                  19       0  100.00%
crates/a2a-nats/src/push/dispatcher/mod.rs                                                   16       0  100.00%
crates/a2a-nats/src/push/dispatcher/nats.rs                                                  37       0  100.00%
crates/a2a-nats/src/push/dispatcher/jetstream.rs                                             45       0  100.00%
crates/acp-nats-server/src/config.rs                                                         39       0  100.00%
crates/acp-nats-server/src/connection.rs                                                    114      35  69.30%   90-97, 102-117, 133, 135-136, 141, 150-151, 156, 160, 164, 167, 175, 179, 182, 185-189
crates/acp-nats-server/src/transport.rs                                                    1020     107  89.51%   242, 290-292, 527, 545, 572, 626, 631, 651, 670, 713-726, 815, 838-840, 892, 909-912, 1008-1011, 1086, 1089, 1092, 1101, 1105, 1108, 1111-1114, 1132, 1165-1168, 1176-1181, 1193-1197, 1201-1210, 1222-1223, 1241-1242, 1252, 1268-1272, 1300-1306, 1326-1328, 1333-1337, 1340-1345, 1362, 1364-1365, 1447-1448, 1460-1461, 1481-1482
crates/acp-nats-server/src/acp_connection_id.rs                                              14       0  100.00%
crates/acp-nats-server/src/main.rs                                                           68       1  98.53%   109
crates/mcp-nats/src/nats/subjects/client/create_message.rs                                   12       0  100.00%
crates/mcp-nats/src/nats/subjects/client/initialized.rs                                      12       0  100.00%
crates/mcp-nats/src/nats/subjects/client/list_roots.rs                                       12       0  100.00%
crates/mcp-nats/src/nats/subjects/client/cancelled.rs                                        12       0  100.00%
crates/mcp-nats/src/nats/subjects/client/roots_list_changed.rs                               12       0  100.00%
crates/mcp-nats/src/nats/subjects/client/create_elicitation.rs                               12       0  100.00%
crates/mcp-nats/src/nats/subjects/client/ping.rs                                              9       0  100.00%
crates/mcp-nats/src/nats/subjects/client/progress.rs                                         12       0  100.00%
crates/a2a-auth-callout/src/main.rs                                                           1       1  0.00%    226
crates/a2a-auth-callout/src/dispatcher.rs                                                    34      13  61.76%   83-112
crates/a2a-auth-callout/src/denial_claims.rs                                                 68       0  100.00%
crates/a2a-auth-callout/src/error.rs                                                          3       0  100.00%
crates/a2a-auth-callout/src/caller_jwt_header.rs                                             20       0  100.00%
crates/a2a-auth-callout/src/permissions.rs                                                   85       0  100.00%
crates/a2a-auth-callout/src/account_resolver.rs                                              31       0  100.00%
crates/a2a-auth-callout/src/denial_category.rs                                               29       0  100.00%
crates/a2a-auth-callout/src/subscriber.rs                                                    96      96  0.00%    27-178
crates/a2a-auth-callout/src/denial_reason.rs                                                 15       0  100.00%
crates/a2a-auth-callout/src/test_support.rs                                                  20      20  0.00%    16-36
crates/trogonai-proto/src/scheduler/schedules/codec.rs                                       57       0  100.00%
crates/trogon-identity-types/src/aauth/mod.rs                                                60       4  93.33%   107-109, 154
crates/ard-nats/src/catalog_subject.rs                                                       14       3  78.57%   19-21
crates/ard-nats/src/memory_catalog_store.rs                                                  32       0  100.00%
crates/ard-nats/src/catalog_index.rs                                                         82       2  97.56%   37, 104
crates/ard-nats/src/catalog_event.rs                                                         71       0  100.00%
crates/ard-nats/src/store.rs                                                                  3       0  100.00%
crates/a2a-auth-callout/src/jwt/mod.rs                                                      232       0  100.00%
crates/a2a-auth-callout/src/jwt/nats_permission_claims.rs                                    10       0  100.00%
crates/a2a-auth-callout/src/jwt/user_jwt_subject.rs                                          12       0  100.00%
crates/a2a-auth-callout/src/jwt/nats_user_jwt.rs                                            187       1  99.47%   131
crates/trogonai-proto/src/codec.rs                                                           16       0  100.00%
crates/trogonai-proto/src/convert.rs                                                         53       0  100.00%
crates/trogonai-proto/src/lib.rs                                                             18       0  100.00%
crates/a2a-nats-http/src/main.rs                                                              1       0  100.00%
crates/a2a-nats-http/src/headers.rs                                                         129       1  99.22%   159
crates/a2a-nats-http/src/rest.rs                                                            316       8  97.47%   123-126, 282-285
crates/a2a-nats-http/src/router.rs                                                           55      13  76.36%   60-63, 69-79
crates/a2a-nats-http/src/runtime.rs                                                           8       8  0.00%    60-130
crates/a2a-nats-http/src/sse.rs                                                              44      27  38.64%   15-51, 61-62, 65-68
TOTAL                                                                                     32328    1618  95.00%

Diff against main

Filename                                                                                Stmts    Miss  Cover
------------------------------------------------------------------------------------  -------  ------  --------
crates/trogon-decider-guest-macros/src/lib.rs                                            +121     +16  +86.78%
crates/trogon-scheduler-domain/src/commands/domain/schedule_event_delivery.rs             +14       0  +100.00%
crates/trogon-scheduler-domain/src/commands/domain/message.rs                            +139       0  +100.00%
crates/trogon-scheduler-domain/src/commands/domain/schedule.rs                           +383      +5  +98.69%
crates/trogon-scheduler-domain/src/commands/domain/schedule_event_status.rs                +6       0  +100.00%
crates/trogon-scheduler-domain/src/commands/domain/schedule_event_schedule.rs             +35       0  +100.00%
crates/trogon-scheduler-domain/src/commands/domain/schedule_id.rs                         +37       0  +100.00%
crates/trogon-scheduler-domain/src/commands/domain/schedule_event_sampling_source.rs      +11       0  +100.00%
crates/trogon-decider-sim/src/session.rs                                                  +15      +3  +80.00%
crates/trogon-decider-sim/src/host.rs                                                     +35       0  +100.00%
crates/trogon-decider-sim/src/fixture.rs                                                  +18      +2  +88.89%
crates/trogon-decider-sim/src/import_check.rs                                             +52      +4  +92.31%
crates/trogon-decider-sim/src/scenario.rs                                                +142      +4  +97.18%
crates/trogon-decider/src/lib.rs                                                           +4       0  +100.00%
crates/trogon-decider/src/event/codec/event_decode.rs                                     +13       0  +100.00%
crates/trogon-decider/src/event/codec/event_payload_error.rs                               +5       0  +100.00%
crates/trogon-decider-wit/src/lib.rs                                                      +53      +9  +83.02%
crates/trogon-scheduler-domain/src/subject.rs                                             +26       0  +100.00%
crates/trogon-scheduler-domain/src/commands/proto_wire.rs                                +138      +1  +99.28%
crates/trogon-scheduler-domain/src/commands/pause_schedule.rs                             +31       0  +100.00%
crates/trogon-scheduler-domain/src/commands/remove_schedule.rs                            +30       0  +100.00%
crates/trogon-scheduler-domain/src/commands/resume_schedule.rs                            +34       0  +100.00%
crates/trogon-scheduler-domain/src/commands/state.rs                                      +82       0  +100.00%
crates/trogon-scheduler-domain/src/commands/create_schedule.rs                            +32       0  +100.00%
crates/trogonai-proto/src/lib.rs                                                          +18       0  +100.00%
TOTAL                                                                                   +1474     +44  -0.04%

Results for commit: c017fde

Minimum allowed coverage is 95%

♻️ This comment has been updated with latest results

yordis added 2 commits June 27, 2026 15:57
…tions

- A corrupt or schema-mismatched snapshot frame was treated like "no snapshot"
  and silently initialized empty state; the WIT session constructor has no error
  channel, so a host applying only a post-snapshot event suffix would `decide`
  on incomplete state believing the snapshot loaded. Trap on a failed load so the
  host observes the failure instead.
- The YAML conformance runner ignored `then.error`, always asserting a generic
  rejection, so suites could not validate specific fault/rejection outcomes. Add
  `SimScenario::then_error` and compare the expected value against the outcome's
  code or message.

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
… gate

The guest SDK, `export_decider!` output, decider cdylib crates, the light proto
example, and the conformance CLI execute inside the wasm32 component and are
verified by the dedicated `wasm-decider` job (zero-import assertion plus sim and
YAML conformance suites). Host llvm-cov cannot instrument code that runs in the
guest, so exclude it from the host coverage gate, mirroring how generated proto
is already ignored.

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
@yordis yordis added the rust:coverage-baseline-reset Relax Rust coverage gate to establish a new baseline label Jun 27, 2026
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Comment thread rsworkspace/crates/trogon-decider-guest-sdk/src/bridge.rs
yordis added 2 commits June 27, 2026 18:45
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
@yordis yordis marked this pull request as ready for review June 28, 2026 01:44
…host gate

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
yordis added 2 commits June 27, 2026 22:48
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
…it-support

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>

# Conflicts:
#	rsworkspace/Cargo.lock
Comment thread rsworkspace/crates/trogon-decider-guest-macros/src/lib.rs
yordis added 5 commits June 27, 2026 23:10
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Comment thread rsworkspace/cli/trogon-decider-test/src/main.rs
yordis added 5 commits June 28, 2026 00:38
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
v1 has shipped; completed design and implementation history now lives in
git, so the working notes stay focused on what is left to do.

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Declaring the target in rust-toolchain.toml made every concurrent cargo
install during mise install lazily fetch the wasm32 rust-std component;
the parallel rustup downloads corrupted each other and failed setup for
every CI job.

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 18

🧹 Nitpick comments (7)
.github/actions/setup-rust/action.yml (1)

21-29: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick win

Make the wasm target install opt-in.

This composite action is also used by the non-WASM build job, so every run now pays an extra rustup target add network hop and failure mode even when no wasm build follows. A boolean input would keep the serial-install workaround while limiting it to the test and wasm-decider jobs.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/actions/setup-rust/action.yml around lines 21 - 29, Make the wasm32
target installation optional in the setup-rust composite action so the non-WASM
build path does not always incur the extra rustup network call. Add a boolean
input to the action and gate the existing Install wasm32 target step in
action.yml on that input, while keeping the serial rustup target add workaround
for the jobs that actually need it. Update the callers for the test and
wasm-decider jobs to enable it, and leave the build job disabled.
rsworkspace/crates/trogon-decider-wit/tests/feature_build.rs (1)

53-67: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Assert the expected wasm32 failure reason.

assert!(!output.status.success()) also passes on unrelated breakages. Match stderr against the intentional unsupported-target diagnostic so this test only guards the host/wasm32 contract.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@rsworkspace/crates/trogon-decider-wit/tests/feature_build.rs` around lines 53
- 67, The host_feature_fails_on_wasm32 test only checks that cargo check fails,
which can pass for unrelated errors; tighten it by asserting the stderr from
cargo_check().output() contains the expected unsupported-target diagnostic for
the host feature on wasm32. Update the existing host_feature_fails_on_wasm32
test to match the intentional failure reason so it specifically verifies the
host/wasm32 contract instead of any build breakage.
rsworkspace/crates/trogon-decider-sim/src/import_check.rs (1)

33-42: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Preserve source errors instead of flattening them to String.

These map_err(|err| ... err.to_string()) conversions discard the original io::Error / parser error chain, which makes failures harder to diagnose and violates the repo’s typed-error rule. Keep the source errors in dedicated variants and attach them with #[source] instead of collapsing them into text. As per coding guidelines, "Never discard error context by converting a typed error into a string; wrap the source error as a field or variant instead."

Also applies to: 45-47, 70-74

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@rsworkspace/crates/trogon-decider-sim/src/import_check.rs` around lines 33 -
42, The error handling in ImportCheckError is flattening source failures into
String, so update the error enum and the affected paths in import_check.rs to
preserve typed sources instead of calling err.to_string(). Add dedicated
variants with #[source] for the parser and io/command failures, then adjust the
map_err calls around temp.write_all, Command::new(...).output(), and the other
referenced sites to wrap the original errors directly while keeping
ImportCheckError as the public wrapper.

Source: Coding guidelines

rsworkspace/crates/trogon-decider-sim/src/import_check/tests.rs (1)

3-15: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add a regression for the component path too.

This only exercises the raw-module fallback. The bug-prone branch here is the component flow behind wasm-tools component wit, so a test that forces WASM_TOOLS to an invalid executable against a component fixture would better lock in the zero-import guarantee.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@rsworkspace/crates/trogon-decider-sim/src/import_check/tests.rs` around lines
3 - 15, The current test only covers the raw-module fallback in
`rejects_core_module_with_imports`, so add a regression that exercises the
component path used by `assert_zero_imports` when `WASM_TOOLS` is unavailable or
invalid. Create a component-based fixture and force `WASM_TOOLS` to point to a
bogus executable so the code path behind `wasm-tools component wit` is
exercised, then assert the zero-import check still fails for imports in the
component flow. Use the existing `assert_zero_imports` helper and the new
component test to lock in this behavior.
rsworkspace/crates/trogon-decider-sim/src/scenario/tests.rs (1)

10-25: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add one test for the known-event semantic comparison path.

These cases only cover type mismatch and the raw-byte fallback. The new branch in events_match() is the decode_event_to_json(...) path for known event types, and that behavior is still untested here.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@rsworkspace/crates/trogon-decider-sim/src/scenario/tests.rs` around lines 10
- 25, Add a test that exercises the known-event semantic comparison branch in
events_match(). The current tests only cover type mismatch and the raw-byte
fallback; create a case using a recognized event type so events_match() goes
through decode_event_to_json(...) and compares semantic JSON rather than bytes.
Use a test name that clearly reflects known-event semantic matching and keep it
alongside the existing tests in this scenario module.
rsworkspace/crates/trogon-decider-guest-macros/src/lib.rs (1)

115-128: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Remove the redundant GuestSession bundle bounds.

bundle_assert already gives you the direct bundle-mismatch failure. Keeping the same equality constraints on the generated impl GuestSession for Session is what produces the long wit_bindgen-driven error cascade in tests/ui/bundle_mismatched_event.stderr, which makes the UI snapshots much more brittle than necessary.

Also applies to: 310-310

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@rsworkspace/crates/trogon-decider-guest-macros/src/lib.rs` around lines 115 -
128, Remove the redundant bundle equality constraints from the generated
GuestSession impl in trogon-decider-guest-macros::lib.rs by updating the
bundle_bounds logic used for the `impl GuestSession for Session` generation.
Keep `bundle_assert` as the place that enforces bundle compatibility, and stop
emitting the extra `where` bounds tying each command to the canonical decider
State/Event types so the `wit_bindgen` error cascade no longer appears.
rsworkspace/crates/trogon-decider-guest-macros/tests/ui/not_a_decider.stderr (1)

1-488: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Collapse this UI failure to one macro diagnostic.

This snapshot now bakes in a long cascade of secondary E0277s from the generated wit_bindgen layer. That is noisy for users and brittle for trybuild whenever rustc or the generated bindings shift. Emitting an early trait assertion or compile_error! for non-Decider inputs would make both the macro UX and this snapshot much more stable.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@rsworkspace/crates/trogon-decider-guest-macros/tests/ui/not_a_decider.stderr`
around lines 1 - 488, The `export_decider` UI snapshot is too noisy because it
captures a cascade of secondary `E0277` errors from `wit_bindgen` instead of one
clear macro failure. Update the macro path around `export_decider` and the
generated `Session`/cabi helpers to perform an early trait check for the input
type (`NotADecider` / `Decider`) and emit a single `compile_error!` or dedicated
diagnostic before any `wit_bindgen::generate` expansion. Then refresh the
`not_a_decider.stderr` expectation to match only that one primary diagnostic.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@rsworkspace/cli/trogon-decider-test/src/codec.rs`:
- Around line 187-224: The codec helpers parse only the subject and content
fields and currently drop delivery ttl/source and message headers, so update
parse_delivery and parse_message to preserve those wire fields or reject inputs
that include them. In parse_delivery and parse_message, use the existing
schedules_v1::Delivery, schedules_v1::Message, MessageField, and
content_v1alpha1::Content types to either map ttl/source/headers through from
the serde_json value or return an error when unsupported fields are present,
instead of silently defaulting them away.
- Around line 166-177: The `codec.rs` duration parsing in the `every` schedule
branch currently casts `nanos` with `as i32`, which can silently wrap invalid
YAML values; update the `every`/`Duration` construction to validate the parsed
nanos range first and return an error for protobuf-invalid values instead of
truncating them. Use the existing `context("every schedule missing seconds")`
flow as a guide and keep the fix localized to the `value.get("every")` handling
that builds `schedules_v1::Schedule` and
`buffa_types::google::protobuf::Duration`.

In `@rsworkspace/cli/trogon-decider-test/src/main.rs`:
- Around line 78-92: The scenario loop is reusing a single SimInstance across
the whole suite, so guest-global state can leak between runs. Move the
host.instantiate(()) call inside the for scenario loop (or otherwise create a
fresh component per scenario) in the test flow around run_scenario(), so each
scenario starts from a clean instance while keeping the existing
descriptor/exercised checks intact.

In `@rsworkspace/crates/trogon-decider-guest-macros/tests/compile_fail.rs`:
- Around line 20-27: The trybuild WIT staging path in provision_trybuild_wit is
hard-coded to the default target tree and will break when CARGO_TARGET_DIR is
customized. Update the path construction to derive the trybuild destination from
Cargo’s actual target directory instead of joining a fixed "../../target/..."
path, while keeping the existing manifest-based source lookup and
fs::create_dir_all/fs::copy flow.

In `@rsworkspace/crates/trogon-decider-guest-sdk/src/bridge.rs`:
- Around line 13-16: The bridge error contract is stringly-typed and loses the
original error source chain; update DomainErrorParts and the related conversion
paths in bridge.rs to use a typed bridge error enum/struct that implements
Display and std::error::Error, with variants carrying the source error instead
of flattening it into strings. Refactor the repeated source.to_string()
conversions in the affected bridge helpers to preserve typed errors internally,
and only serialize into wire-facing fields at the final WIT boundary.

In `@rsworkspace/crates/trogon-decider-guest-sdk/src/snapshot.rs`:
- Around line 43-57: `decode_snapshot` and `snapshot_fault` are converting
snapshot failures into `DomainErrorParts` too early and stringify the underlying
decode error, which drops typed context. Introduce a local `SnapshotDecodeError`
enum in the snapshot layer, return that from
`decode_snapshot`/`decode_snapshot_frame` paths, and keep the source decode
error as a typed field or variant instead of `source.to_string()`. Then perform
the single conversion to `DomainErrorParts` only at the WIT bridge/export
boundary where the guest SDK crosses out of the typed layer.
- Around line 72-90: Reject malformed snapshot fields in decode_snapshot_frame
by validating that tags 1 and 2 have the expected length-delimited wire type
before calling read_length_delimited, and return a snapshot_fault on mismatch
instead of continuing. Also harden skip_field so its fixed32/fixed64 branches
verify enough bytes remain before advancing offset, failing closed on truncated
input. Keep the existing frame parsing flow in snapshot.rs consistent with
load_or_initial’s trap-on-bad-snapshot behavior.

In `@rsworkspace/crates/trogon-decider-sim/src/host.rs`:
- Around line 8-15: Keep Wasmtime failures typed in SimError and separate
compile from instantiate errors. In host.rs, change the Engine variant so it
stores the original typed Wasmtime/engine error instead of a String, and update
the call site that currently stringifies the failure to pass the error through
directly. Add a distinct variant for instantiation failures in SimError, and
update the code around the compile/instantiate flow so compile-time errors map
to the existing Compile path while post-compilation instantiation errors use the
new variant rather than being reported as Compile.

In `@rsworkspace/crates/trogon-decider-sim/src/import_check.rs`:
- Around line 22-27: The import validation in assert_zero_imports should not
fall back to assert_zero_imports_via_wasmparser after a wasm-tools failure for
component inputs, because that can incorrectly return Ok(()) and bypass the
zero-import check. Update assert_zero_imports to distinguish component binaries
from core wasm modules and, when the wasm-tools path fails on a component,
return the failure instead of silently retrying with the raw-module parser. Keep
the existing success path and ensure SimHost::load still enforces the
zero-import contract at load time.

In `@rsworkspace/crates/trogon-decider-sim/src/scenario.rs`:
- Around line 74-142: The `Scenario::run` API is flattening Wasmtime, domain,
and assertion failures into `String`, which loses structured context. Introduce
a typed scenario error enum/struct for `run` and replace the `Result<(),
String>` plus `map_err(|err| err.to_string())`/`format!()` paths with variants
that wrap the source errors from `open_session`, `evolve`, `decide`, and the
scenario expectation checks. Keep `Scenario::run`, `SimInstance::open_session`,
and the `events_match`/expectation branches as the main touchpoints, and
preserve original error context as fields or source errors instead of converting
to text.

In `@rsworkspace/crates/trogon-scheduler-domain/src/commands/domain/schedule.rs`:
- Around line 423-430: TzdbVersion::current() is minting an invalid sentinel
value when schedule-validation is disabled, which makes timezone.version vary by
build feature and bypasses the type’s validation. Update the current() factory
in TzdbVersion so it only returns a real, validated tzdb version (or otherwise
removes the fallback from the domain type), and keep any unknown guest/version
uncertainty outside of TzdbVersion. Ensure the constructor/factory path used by
current() preserves the type’s invariant and does not serialize "wasm-guest"
into persisted state.
- Around line 381-384: The TimeZone factory in with_tzdb_version currently only
validates the token shape, which allows nonexistent zones to be constructed when
schedule-validation is disabled. Make the constructor always enforce semantic
timezone validity by ensuring the chrono_tz::Tz parse (or equivalent lookup)
runs unconditionally, and keep returning TimeZoneError::Invalid for unknown
zones so invalid TimeZone values remain unrepresentable.
- Around line 340-347: The domain factory in schedule.rs must always validate
RRuleExpression, but the current #[cfg(feature = "schedule-validation")] guard
lets malformed RRULEs bypass parsing when the feature is off. Update the
RRuleExpression construction path to guarantee validation in all builds, using a
wasm-safe validator or a separate boundary/input type if rrule::RRuleSet cannot
run on the guest path, and keep the validation logic centered around the same
factory/conversion flow so invalid instances remain unrepresentable.

In
`@rsworkspace/crates/trogon-scheduler-domain/src/commands/domain/schedule/tests.rs`:
- Around line 238-244: The fallback in the schedule timezone tests is treating
TzdbVersion::current() and the wasm “wasm-guest” value as interchangeable, which
bypasses the validation enforced by TzdbVersion::new and leaves an invalid
domain value representable. Update the conversion path used by the schedule
validation logic and the related assertions in the
schedule_timezone/rrule_timezone tests so the fallback goes through the same
validated constructor, or change the domain model to represent the wasm sentinel
explicitly instead of storing it in TzdbVersion.

In `@rsworkspace/crates/trogon-scheduler-domain/src/commands/proto_wire.rs`:
- Around line 219-243: The proto-to-domain conversion in
message_from_proto/message_content_from_proto is lossy-decoding Content.data
with String::from_utf8_lossy, which can silently alter payload bytes before they
enter ScheduleMessage. Update message_content_from_proto to either preserve the
original bytes in MessageContent or validate UTF-8 and return a typed
CommandWireError on invalid data, using the existing message_from_proto and
ScheduleMessage conversion path to enforce domain validity.

In `@rsworkspace/crates/trogon-scheduler-domain/src/commands/state.rs`:
- Around line 54-71: The ScheduleCreated handling in state.rs currently promotes
malformed create events to a present state; update the match arm for
ScheduleEventCase::ScheduleCreated in the state transition logic to validate the
inner payload before mutating state. Reject or return an error when
inner.schedule is missing or inner.status.kind cannot be determined, rather than
falling through to STATE_VALUE_PRESENT_ENABLED, and keep the same validation
pattern used by the occurrence branches so only validated domain data is
persisted in runtime state.

In `@rsworkspace/crates/trogonai-proto/src/lib.rs`:
- Around line 57-58: The decode path in the registry lookup currently conflates
a missing registration with a failed payload decode because `json_any_by_url`
and `to_json(payload)` both collapse to `None`. Update the logic around
`json_any_by_url` and the `to_json` call so that an unregistered type still
returns `None`, but a known type whose payload cannot be decoded returns a typed
error instead of being swallowed. Keep the existing symbols
`registry.json_any_by_url`, `entry.to_json`, and the surrounding helper that
returns the optional JSON string as the place to separate these two outcomes.

In `@wasm-goals.qa.md`:
- Around line 119-123: The guest responsibilities list in the
`trogon:decider@0.1.0` documentation still mentions a guest-side `stream-id`
call, but that symbol is not part of the exposed `session` contract. Update the
description around the host/guest split to remove `stream-id` from the guest
duties and keep the guest boundary limited to `constructor`, `evolve`, `decide`,
and `snapshot`, so the documented responsibilities match the actual interface.

---

Nitpick comments:
In @.github/actions/setup-rust/action.yml:
- Around line 21-29: Make the wasm32 target installation optional in the
setup-rust composite action so the non-WASM build path does not always incur the
extra rustup network call. Add a boolean input to the action and gate the
existing Install wasm32 target step in action.yml on that input, while keeping
the serial rustup target add workaround for the jobs that actually need it.
Update the callers for the test and wasm-decider jobs to enable it, and leave
the build job disabled.

In `@rsworkspace/crates/trogon-decider-guest-macros/src/lib.rs`:
- Around line 115-128: Remove the redundant bundle equality constraints from the
generated GuestSession impl in trogon-decider-guest-macros::lib.rs by updating
the bundle_bounds logic used for the `impl GuestSession for Session` generation.
Keep `bundle_assert` as the place that enforces bundle compatibility, and stop
emitting the extra `where` bounds tying each command to the canonical decider
State/Event types so the `wit_bindgen` error cascade no longer appears.

In
`@rsworkspace/crates/trogon-decider-guest-macros/tests/ui/not_a_decider.stderr`:
- Around line 1-488: The `export_decider` UI snapshot is too noisy because it
captures a cascade of secondary `E0277` errors from `wit_bindgen` instead of one
clear macro failure. Update the macro path around `export_decider` and the
generated `Session`/cabi helpers to perform an early trait check for the input
type (`NotADecider` / `Decider`) and emit a single `compile_error!` or dedicated
diagnostic before any `wit_bindgen::generate` expansion. Then refresh the
`not_a_decider.stderr` expectation to match only that one primary diagnostic.

In `@rsworkspace/crates/trogon-decider-sim/src/import_check.rs`:
- Around line 33-42: The error handling in ImportCheckError is flattening source
failures into String, so update the error enum and the affected paths in
import_check.rs to preserve typed sources instead of calling err.to_string().
Add dedicated variants with #[source] for the parser and io/command failures,
then adjust the map_err calls around temp.write_all, Command::new(...).output(),
and the other referenced sites to wrap the original errors directly while
keeping ImportCheckError as the public wrapper.

In `@rsworkspace/crates/trogon-decider-sim/src/import_check/tests.rs`:
- Around line 3-15: The current test only covers the raw-module fallback in
`rejects_core_module_with_imports`, so add a regression that exercises the
component path used by `assert_zero_imports` when `WASM_TOOLS` is unavailable or
invalid. Create a component-based fixture and force `WASM_TOOLS` to point to a
bogus executable so the code path behind `wasm-tools component wit` is
exercised, then assert the zero-import check still fails for imports in the
component flow. Use the existing `assert_zero_imports` helper and the new
component test to lock in this behavior.

In `@rsworkspace/crates/trogon-decider-sim/src/scenario/tests.rs`:
- Around line 10-25: Add a test that exercises the known-event semantic
comparison branch in events_match(). The current tests only cover type mismatch
and the raw-byte fallback; create a case using a recognized event type so
events_match() goes through decode_event_to_json(...) and compares semantic JSON
rather than bytes. Use a test name that clearly reflects known-event semantic
matching and keep it alongside the existing tests in this scenario module.

In `@rsworkspace/crates/trogon-decider-wit/tests/feature_build.rs`:
- Around line 53-67: The host_feature_fails_on_wasm32 test only checks that
cargo check fails, which can pass for unrelated errors; tighten it by asserting
the stderr from cargo_check().output() contains the expected unsupported-target
diagnostic for the host feature on wasm32. Update the existing
host_feature_fails_on_wasm32 test to match the intentional failure reason so it
specifically verifies the host/wasm32 contract instead of any build breakage.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 9bc2ee35-2b8d-4106-b449-f361bc87525d

📥 Commits

Reviewing files that changed from the base of the PR and between dfda6a1 and 64f4f3b.

⛔ Files ignored due to path filters (10)
  • rsworkspace/Cargo.lock is excluded by !**/*.lock
  • rsworkspace/crates/trogonai-proto/src/gen/trogonai.scheduler.schedules.v1.create_schedule.__view.rs is excluded by !**/gen/**
  • rsworkspace/crates/trogonai-proto/src/gen/trogonai.scheduler.schedules.v1.create_schedule.rs is excluded by !**/gen/**
  • rsworkspace/crates/trogonai-proto/src/gen/trogonai.scheduler.schedules.v1.mod.rs is excluded by !**/gen/**
  • rsworkspace/crates/trogonai-proto/src/gen/trogonai.scheduler.schedules.v1.pause_schedule.__view.rs is excluded by !**/gen/**
  • rsworkspace/crates/trogonai-proto/src/gen/trogonai.scheduler.schedules.v1.pause_schedule.rs is excluded by !**/gen/**
  • rsworkspace/crates/trogonai-proto/src/gen/trogonai.scheduler.schedules.v1.remove_schedule.__view.rs is excluded by !**/gen/**
  • rsworkspace/crates/trogonai-proto/src/gen/trogonai.scheduler.schedules.v1.remove_schedule.rs is excluded by !**/gen/**
  • rsworkspace/crates/trogonai-proto/src/gen/trogonai.scheduler.schedules.v1.resume_schedule.__view.rs is excluded by !**/gen/**
  • rsworkspace/crates/trogonai-proto/src/gen/trogonai.scheduler.schedules.v1.resume_schedule.rs is excluded by !**/gen/**
📒 Files selected for processing (109)
  • .github/actions/setup-rust/action.yml
  • .github/workflows/ci-rust.yml
  • .mise.toml
  • WASM_TODO.md
  • proto/trogonai/scheduler/schedules/v1/create_schedule.proto
  • proto/trogonai/scheduler/schedules/v1/pause_schedule.proto
  • proto/trogonai/scheduler/schedules/v1/remove_schedule.proto
  • proto/trogonai/scheduler/schedules/v1/resume_schedule.proto
  • rsworkspace/.cargo/config.toml
  • rsworkspace/Cargo.toml
  • rsworkspace/cli/trogon-decider-test/Cargo.toml
  • rsworkspace/cli/trogon-decider-test/schedules.yaml
  • rsworkspace/cli/trogon-decider-test/src/codec.rs
  • rsworkspace/cli/trogon-decider-test/src/codec/tests.rs
  • rsworkspace/cli/trogon-decider-test/src/main.rs
  • rsworkspace/crates/trogon-decider-guest-macros/Cargo.toml
  • rsworkspace/crates/trogon-decider-guest-macros/src/lib.rs
  • rsworkspace/crates/trogon-decider-guest-macros/tests/compile_fail.rs
  • rsworkspace/crates/trogon-decider-guest-macros/tests/ui/bundle_mismatched_event.rs
  • rsworkspace/crates/trogon-decider-guest-macros/tests/ui/bundle_mismatched_event.stderr
  • rsworkspace/crates/trogon-decider-guest-macros/tests/ui/bundle_mismatched_module.rs
  • rsworkspace/crates/trogon-decider-guest-macros/tests/ui/bundle_mismatched_module.stderr
  • rsworkspace/crates/trogon-decider-guest-macros/tests/ui/bundle_mismatched_schema.rs
  • rsworkspace/crates/trogon-decider-guest-macros/tests/ui/bundle_mismatched_schema.stderr
  • rsworkspace/crates/trogon-decider-guest-macros/tests/ui/bundle_mismatched_version.rs
  • rsworkspace/crates/trogon-decider-guest-macros/tests/ui/bundle_mismatched_version.stderr
  • rsworkspace/crates/trogon-decider-guest-macros/tests/ui/not_a_decider.rs
  • rsworkspace/crates/trogon-decider-guest-macros/tests/ui/not_a_decider.stderr
  • rsworkspace/crates/trogon-decider-guest-sdk/Cargo.toml
  • rsworkspace/crates/trogon-decider-guest-sdk/src/bridge.rs
  • rsworkspace/crates/trogon-decider-guest-sdk/src/lib.rs
  • rsworkspace/crates/trogon-decider-guest-sdk/src/snapshot.rs
  • rsworkspace/crates/trogon-decider-runtime/src/event/mod.rs
  • rsworkspace/crates/trogon-decider-runtime/src/lib.rs
  • rsworkspace/crates/trogon-decider-sim/Cargo.toml
  • rsworkspace/crates/trogon-decider-sim/src/fixture.rs
  • rsworkspace/crates/trogon-decider-sim/src/host.rs
  • rsworkspace/crates/trogon-decider-sim/src/import_check.rs
  • rsworkspace/crates/trogon-decider-sim/src/import_check/tests.rs
  • rsworkspace/crates/trogon-decider-sim/src/lib.rs
  • rsworkspace/crates/trogon-decider-sim/src/scenario.rs
  • rsworkspace/crates/trogon-decider-sim/src/scenario/tests.rs
  • rsworkspace/crates/trogon-decider-sim/src/session.rs
  • rsworkspace/crates/trogon-decider-sim/tests/schedules.rs
  • rsworkspace/crates/trogon-decider-wit/Cargo.toml
  • rsworkspace/crates/trogon-decider-wit/src/lib.rs
  • rsworkspace/crates/trogon-decider-wit/tests/feature_build.rs
  • rsworkspace/crates/trogon-decider-wit/wit/world.wit
  • rsworkspace/crates/trogon-decider/src/event/codec/event_decode.rs
  • rsworkspace/crates/trogon-decider/src/event/codec/event_decode/tests.rs
  • rsworkspace/crates/trogon-decider/src/event/codec/event_encode.rs
  • rsworkspace/crates/trogon-decider/src/event/codec/event_payload_error.rs
  • rsworkspace/crates/trogon-decider/src/event/codec/event_payload_error/tests.rs
  • rsworkspace/crates/trogon-decider/src/event/codec/event_type.rs
  • rsworkspace/crates/trogon-decider/src/event/codec/mod.rs
  • rsworkspace/crates/trogon-decider/src/event/mod.rs
  • rsworkspace/crates/trogon-decider/src/lib.rs
  • rsworkspace/crates/trogon-decider/src/tests.rs
  • rsworkspace/crates/trogon-scheduler-domain/Cargo.toml
  • rsworkspace/crates/trogon-scheduler-domain/src/commands/create_schedule.rs
  • rsworkspace/crates/trogon-scheduler-domain/src/commands/create_schedule/tests.rs
  • rsworkspace/crates/trogon-scheduler-domain/src/commands/domain/message.rs
  • rsworkspace/crates/trogon-scheduler-domain/src/commands/domain/message/tests.rs
  • rsworkspace/crates/trogon-scheduler-domain/src/commands/domain/message/tests/prop_tests.rs
  • rsworkspace/crates/trogon-scheduler-domain/src/commands/domain/mod.rs
  • rsworkspace/crates/trogon-scheduler-domain/src/commands/domain/schedule.rs
  • rsworkspace/crates/trogon-scheduler-domain/src/commands/domain/schedule/tests.rs
  • rsworkspace/crates/trogon-scheduler-domain/src/commands/domain/schedule/tests/prop_tests.rs
  • rsworkspace/crates/trogon-scheduler-domain/src/commands/domain/schedule_event_delivery.rs
  • rsworkspace/crates/trogon-scheduler-domain/src/commands/domain/schedule_event_delivery/tests.rs
  • rsworkspace/crates/trogon-scheduler-domain/src/commands/domain/schedule_event_sampling_source.rs
  • rsworkspace/crates/trogon-scheduler-domain/src/commands/domain/schedule_event_sampling_source/tests.rs
  • rsworkspace/crates/trogon-scheduler-domain/src/commands/domain/schedule_event_schedule.rs
  • rsworkspace/crates/trogon-scheduler-domain/src/commands/domain/schedule_event_schedule/tests.rs
  • rsworkspace/crates/trogon-scheduler-domain/src/commands/domain/schedule_event_status.rs
  • rsworkspace/crates/trogon-scheduler-domain/src/commands/domain/schedule_event_status/tests.rs
  • rsworkspace/crates/trogon-scheduler-domain/src/commands/domain/schedule_id.rs
  • rsworkspace/crates/trogon-scheduler-domain/src/commands/domain/schedule_id/tests.rs
  • rsworkspace/crates/trogon-scheduler-domain/src/commands/domain/schedule_id/tests/prop_tests.rs
  • rsworkspace/crates/trogon-scheduler-domain/src/commands/mod.rs
  • rsworkspace/crates/trogon-scheduler-domain/src/commands/pause_schedule.rs
  • rsworkspace/crates/trogon-scheduler-domain/src/commands/pause_schedule/tests.rs
  • rsworkspace/crates/trogon-scheduler-domain/src/commands/proto_wire.rs
  • rsworkspace/crates/trogon-scheduler-domain/src/commands/proto_wire/tests.rs
  • rsworkspace/crates/trogon-scheduler-domain/src/commands/remove_schedule.rs
  • rsworkspace/crates/trogon-scheduler-domain/src/commands/remove_schedule/tests.rs
  • rsworkspace/crates/trogon-scheduler-domain/src/commands/resume_schedule.rs
  • rsworkspace/crates/trogon-scheduler-domain/src/commands/resume_schedule/tests.rs
  • rsworkspace/crates/trogon-scheduler-domain/src/commands/state.rs
  • rsworkspace/crates/trogon-scheduler-domain/src/commands/state/tests.rs
  • rsworkspace/crates/trogon-scheduler-domain/src/lib.rs
  • rsworkspace/crates/trogon-scheduler-domain/src/snapshot_policy.rs
  • rsworkspace/crates/trogon-scheduler-domain/src/snapshot_policy/tests.rs
  • rsworkspace/crates/trogon-scheduler-domain/src/subject.rs
  • rsworkspace/crates/trogon-scheduler-domain/src/subject/tests.rs
  • rsworkspace/crates/trogon-scheduler/Cargo.toml
  • rsworkspace/crates/trogon-scheduler/src/commands/domain/mod.rs
  • rsworkspace/crates/trogon-scheduler/src/commands/mod.rs
  • rsworkspace/crates/trogon-scheduler/src/commands/state.rs
  • rsworkspace/crates/trogonai-proto/Cargo.toml
  • rsworkspace/crates/trogonai-proto/src/codec.rs
  • rsworkspace/crates/trogonai-proto/src/lib.rs
  • rsworkspace/crates/trogonai-proto/src/scheduler/schedules/codec.rs
  • rsworkspace/crates/trogonai-proto/src/scheduler/schedules/codec/tests.rs
  • rsworkspace/crates/trogonai-proto/src/scheduler/schedules/mod.rs
  • rsworkspace/crates/trogonai-proto/src/tests.rs
  • rsworkspace/wasm-components/trogon-schedules-decider/Cargo.toml
  • rsworkspace/wasm-components/trogon-schedules-decider/src/lib.rs
  • wasm-goals.qa.md
💤 Files with no reviewable changes (3)
  • rsworkspace/crates/trogon-scheduler-domain/src/commands/resume_schedule/tests.rs
  • rsworkspace/crates/trogon-scheduler-domain/src/commands/remove_schedule/tests.rs
  • rsworkspace/crates/trogon-scheduler-domain/src/commands/pause_schedule/tests.rs

Comment thread rsworkspace/cli/trogon-decider-test/src/codec.rs
Comment thread rsworkspace/cli/trogon-decider-test/src/codec.rs
Comment thread rsworkspace/cli/trogon-decider-test/src/main.rs
Comment thread rsworkspace/crates/trogon-decider-guest-sdk/src/bridge.rs
Comment on lines +238 to +244
assert_eq!(
schedule_timezone.tzdb_version().as_str(),
TzdbVersion::current().as_str()
);
assert_eq!(schedule_timezone.into_string(), "UTC");
assert_eq!(rrule_timezone.as_str(), "UTC");
assert_eq!(rrule_timezone.tzdb_version().as_str(), chrono_tz::IANA_TZDB_VERSION);
assert_eq!(rrule_timezone.tzdb_version().as_str(), TzdbVersion::current().as_str());

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift

Don’t make TzdbVersion::current() a backdoor around validation.

Line 238 now accepts whatever TzdbVersion::current() returns, but the no-schedule-validation path constructs "wasm-guest" directly while TzdbVersion::new(...) rejects non-version-shaped values. That makes an invalid value object representable and likely persistable from wasm-domain state. Prefer making the fallback pass the same constructor/validation, or model the wasm sentinel as an explicit enum variant instead of a raw TzdbVersion.

As per coding guidelines, “After conversion from boundary types to domain types, domain values must be valid forever.”

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@rsworkspace/crates/trogon-scheduler-domain/src/commands/domain/schedule/tests.rs`
around lines 238 - 244, The fallback in the schedule timezone tests is treating
TzdbVersion::current() and the wasm “wasm-guest” value as interchangeable, which
bypasses the validation enforced by TzdbVersion::new and leaves an invalid
domain value representable. Update the conversion path used by the schedule
validation logic and the related assertions in the
schedule_timezone/rrule_timezone tests so the fallback goes through the same
validated constructor, or change the domain model to represent the wasm sentinel
explicitly instead of storing it in TzdbVersion.

Source: Coding guidelines

Comment thread rsworkspace/crates/trogon-scheduler-domain/src/commands/state.rs
Comment thread rsworkspace/crates/trogonai-proto/src/lib.rs Outdated
Comment thread wasm-goals.qa.md
Comment on lines +119 to +123
**Host, entirely.** The guest is passive — it only answers calls. Host does: receive
command → load snapshot bytes → read event batches → drive `session.evolve` → call
`session.decide` → append with OCC (+ retries) → optionally request + store a snapshot.
Guest does: answer `stream-id`, decode its own snapshot, fold events, decide, serialize
state on request.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Drop stream-id from the guest responsibilities list.

The current trogon:decider@0.1.0 contract only exposes constructor, evolve, decide, and snapshot on session, so documenting a guest-side stream-id call here sends implementers toward a non-existent boundary.

Suggested edit
-Guest does: answer `stream-id`, decode its own snapshot, fold events, decide, serialize
+Guest does: decode its own snapshot, fold events, decide, serialize
 state on request.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
**Host, entirely.** The guest is passive — it only answers calls. Host does: receive
command → load snapshot bytes → read event batches → drive `session.evolve` → call
`session.decide` → append with OCC (+ retries) → optionally request + store a snapshot.
Guest does: answer `stream-id`, decode its own snapshot, fold events, decide, serialize
state on request.
**Host, entirely.** The guest is passive — it only answers calls. Host does: receive
command → load snapshot bytes → read event batches → drive `session.evolve` → call
`session.decide` → append with OCC (+ retries) → optionally request + store a snapshot.
Guest does: decode its own snapshot, fold events, decide, serialize state on request.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@wasm-goals.qa.md` around lines 119 - 123, The guest responsibilities list in
the `trogon:decider@0.1.0` documentation still mentions a guest-side `stream-id`
call, but that symbol is not part of the exposed `session` contract. Update the
description around the host/guest split to remove `stream-id` from the guest
duties and keep the guest boundary limited to `constructor`, `evolve`, `decide`,
and `snapshot`, so the documented responsibilities match the actual interface.

yordis added 2 commits June 29, 2026 19:15
Untyped fields in a suite (structured error, out-of-range nanos, delivery
ttl/source, message headers) were silently dropped or rejected at load,
letting a suite exercise different commands/events than it declared and
hiding regressions. Fresh component per scenario stops guest-global state
from leaking between runs and making results order-dependent.

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
The guest bridge flattened every failure into code/message strings at the
point of failure, discarding the source error and its causal chain before
reaching the boundary that actually needs the wire fields. Typed bridge and
snapshot errors carry the source until projection happens once at the edge.

Also resolve the trybuild WIT staging path from Cargo's real target
directory so a custom CARGO_TARGET_DIR does not fail the UI test spuriously.

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Comment thread rsworkspace/Cargo.toml
yordis added 4 commits June 29, 2026 19:38
The sim host and scenario runner flattened Wasmtime, domain, and assertion
failures into strings (and reported instantiation faults as compile errors),
so callers lost the source chain and diagnostics were misleading. Snapshot
frame parsing and the import check could also pass malformed or component
input through unchecked, weakening the trap-on-bad-snapshot and zero-import
guarantees. Typed errors and wire-type/bounds validation restore both.

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
The schedule-validation gate let the wasm guest construct invalid TimeZone,
RRuleExpression, and TzdbVersion values — including persisting a fake
"wasm-guest" tzdb version into events — because chrono-tz and rrule were
both gated off for purity. chrono-tz is import-clean, so timezone validation
and the real tzdb version now run in every build. rrule must stay gated (it
pulls wasm-bindgen and would break the zero-import contract), so RRULE FREQ
is now validated wasm-safely to fail closed on malformed rules in the guest.

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
…dary

Three boundary paths admitted invalid data into domain/runtime state: message
content was lossy-decoded so non-UTF-8 bytes were silently rewritten, a
ScheduleCreated event missing its schedule or status was promoted to a present
state, and the event-to-json decoder collapsed a malformed known payload into
the same None as an unregistered type so semantic matching silently fell back
to raw bytes. Each now fails closed with a typed error.

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
…it-support

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>

# Conflicts:
#	rsworkspace/Cargo.lock
Comment thread rsworkspace/crates/trogon-decider-guest-sdk/src/bridge.rs Outdated
…ative replay

The guest bridge returned an unknown-event error when EventDecode skipped an
envelope, but the native runtime replay treats a skipped envelope as a no-op and
keeps folding. That divergence let a shared/migrated stream replay to a different
state (or fail outright) under WASM than under the host, breaking the run-anywhere
identical-logic guarantee.

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (1)
rsworkspace/crates/trogon-scheduler-domain/src/commands/domain/schedule.rs (1)

312-352: 🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift

Guest builds can still mint invalid RRuleExpression values.

With schedule-validation disabled, this validator only checks a small subset of RRULE semantics. Inputs like FREQ=DAILY;COUNT=abc or FREQ=DAILY;BYMONTH=foo still reach Ok(()) because the full rrule parse is compiled out and these parts are ignored here. That means malformed wire input can still cross into the domain as a supposedly-valid value object.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@rsworkspace/crates/trogon-scheduler-domain/src/commands/domain/schedule.rs`
around lines 312 - 352, The RRULE validator in the schedule domain is too
permissive when schedule-validation is disabled, so malformed guest-build inputs
can still be accepted by validate_rrule. Tighten the manual parsing in the RRULE
validation path by checking the syntax and values of all relevant parts, not
just FREQ/COUNT/UNTIL, and reject invalid tokens like non-numeric COUNT or
malformed BYMONTH before returning Ok. Use the existing validate_rrule,
is_supported_frequency, and invalid_rrule helpers to keep the guest-safe
validation aligned with the full RRuleSet::from_str behavior.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@rsworkspace/crates/trogon-decider-guest-sdk/src/snapshot.rs`:
- Around line 153-166: The read_varint helper in snapshot.rs can still accept a
10-byte varint whose final payload bits overflow u64, because the last chunk is
ORed into value before overflow is rejected. Update read_varint to detect the
overflow case when shift reaches 63 and the terminal byte carries bits above
0x01, and return SnapshotDecodeError::VarintOverflow instead of truncating; keep
the fix localized to read_varint and preserve the existing
UnexpectedEof/overflow behavior.

---

Duplicate comments:
In `@rsworkspace/crates/trogon-scheduler-domain/src/commands/domain/schedule.rs`:
- Around line 312-352: The RRULE validator in the schedule domain is too
permissive when schedule-validation is disabled, so malformed guest-build inputs
can still be accepted by validate_rrule. Tighten the manual parsing in the RRULE
validation path by checking the syntax and values of all relevant parts, not
just FREQ/COUNT/UNTIL, and reject invalid tokens like non-numeric COUNT or
malformed BYMONTH before returning Ok. Use the existing validate_rrule,
is_supported_frequency, and invalid_rrule helpers to keep the guest-safe
validation aligned with the full RRuleSet::from_str behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 79ad60f8-b7ff-4b95-904c-157cf0c947d2

📥 Commits

Reviewing files that changed from the base of the PR and between 935f288 and d5da8e9.

⛔ Files ignored due to path filters (1)
  • rsworkspace/Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (19)
  • rsworkspace/Cargo.toml
  • rsworkspace/cli/trogon-decider-test/src/main.rs
  • rsworkspace/crates/trogon-decider-guest-macros/tests/compile_fail.rs
  • rsworkspace/crates/trogon-decider-guest-sdk/src/bridge.rs
  • rsworkspace/crates/trogon-decider-guest-sdk/src/lib.rs
  • rsworkspace/crates/trogon-decider-guest-sdk/src/snapshot.rs
  • rsworkspace/crates/trogon-decider-sim/src/host.rs
  • rsworkspace/crates/trogon-decider-sim/src/import_check.rs
  • rsworkspace/crates/trogon-decider-sim/src/lib.rs
  • rsworkspace/crates/trogon-decider-sim/src/scenario.rs
  • rsworkspace/crates/trogon-decider-sim/tests/schedules.rs
  • rsworkspace/crates/trogon-scheduler-domain/Cargo.toml
  • rsworkspace/crates/trogon-scheduler-domain/src/commands/domain/schedule.rs
  • rsworkspace/crates/trogon-scheduler-domain/src/commands/proto_wire.rs
  • rsworkspace/crates/trogon-scheduler-domain/src/commands/state.rs
  • rsworkspace/crates/trogon-scheduler-domain/src/commands/state/tests.rs
  • rsworkspace/crates/trogon-scheduler/Cargo.toml
  • rsworkspace/crates/trogonai-proto/src/lib.rs
  • rsworkspace/crates/trogonai-proto/src/tests.rs
💤 Files with no reviewable changes (2)
  • rsworkspace/crates/trogonai-proto/src/tests.rs
  • rsworkspace/crates/trogonai-proto/src/lib.rs
🚧 Files skipped from review as they are similar to previous changes (11)
  • rsworkspace/crates/trogon-decider-guest-sdk/src/lib.rs
  • rsworkspace/crates/trogon-decider-sim/src/lib.rs
  • rsworkspace/Cargo.toml
  • rsworkspace/crates/trogon-scheduler/Cargo.toml
  • rsworkspace/crates/trogon-decider-guest-macros/tests/compile_fail.rs
  • rsworkspace/crates/trogon-decider-sim/tests/schedules.rs
  • rsworkspace/crates/trogon-scheduler-domain/src/commands/state.rs
  • rsworkspace/crates/trogon-decider-sim/src/host.rs
  • rsworkspace/cli/trogon-decider-test/src/main.rs
  • rsworkspace/crates/trogon-decider-sim/src/import_check.rs
  • rsworkspace/crates/trogon-scheduler-domain/src/commands/proto_wire.rs

Comment thread rsworkspace/crates/trogon-decider-guest-sdk/src/snapshot.rs
yordis added 4 commits June 29, 2026 21:46
The merged std_env_access dylint rule rejects reading WASM_TOOLS through
std::env directly, and the host coverage gate counted guest-only code that
host instrumentation can never reach. Reading via the trogon_std env
abstraction and excluding the WASM guest glue, the compiled component, and the
conformance CLI from the gate keep both checks measuring what host tests can
actually exercise.

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
The 10th varint byte contributes a single bit to a u64, so payload bits above
0x01 shifted out and silently truncated, letting a malformed snapshot length or
key decode as a different value instead of failing closed.

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
…e gate

The merged dylint rules reject comparing an error's display string and inline
test module bodies. Scenario assertions now match typed ScenarioError variants,
the decider-test and snapshot test modules move into their own files, and added
import-check host tests cover the previously-unexercised core-module paths so the
host coverage gate clears its threshold.

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit c017fde. Configure here.

pub const RESUME_SCHEDULE_TYPE_URL: &str = v1::ResumeSchedule::TYPE_URL;

/// Stable type URL for the [`state_v1::State`] snapshot schema version tag.
pub const SCHEDULES_STATE_SCHEMA_VERSION: &str = state_v1::State::TYPE_URL;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Snapshot schema tag mismatch

Medium Severity

WASM snapshot frames tag schema with SCHEDULES_STATE_SCHEMA_VERSION (State::TYPE_URL), while the native snapshot path resolves state via SnapshotType using State::FULL_NAME. A host that fills the guest snapshot frame with the runtime type name fails decode_snapshot and traps in load_or_initial instead of loading state.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit c017fde. Configure here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rust:coverage-baseline-reset Relax Rust coverage gate to establish a new baseline

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant