Add structured server event recorder - #314
Conversation
|
Found 16 test failures on Blacksmith runners: Failures
...and 6 more test failures. View all on Blacksmith
|
Coverage
|
| } | ||
|
|
||
| fn selector_ids(selector: &str) -> Option<Vec<u8>> { | ||
| if let Ok(id) = selector.parse::<u8>() { |
There was a problem hiding this comment.
Functional · CLI activation parser panics on numeric event ids 128–255
This accepts any u8 (0–255), but the event-id space is only 0–127 (the activation mask is 128 bits / 16 bytes). For ids 128–255, parse_activation then calls activation.set(id, enabled), and Activation::set (crates/remote/src/events.rs:70) indexes self.0[id as usize / 8] on a [u8; 16] — index >= 16 — which panics at runtime. So blit events config set --active 200 (or e.g. --active pty,200) aborts the CLI with a panic instead of the graceful blit: ... error. Bound this branch to id < 128 so out-of-range ids fall through to the existing "unknown event selector" error. Existing tests only use ids <= 127, so this is uncaught.
![Fix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/fix-with-codesmith-light.png)
Summary
blit.events.v1binary protocol and fixed-size server event ringblit eventsconfig, dump, stream, and file commands plus startup env configurationThe default is a 1 MiB ring with only low-rate lifecycle and error events active. High-throughput request, writer, PTY I/O, process I/O, frame, and protocol families are opt-in through the 128-bit activation mask.
Verification
cargo test -p blit-remote -p blit-cli(494 tests)cargo test -p blit-server events(21 tests)cargo clippy -p blit-remote -p blit-server -p blit-cli -- -D warningsThe full
blit-serversuite was attempted but exceeded the 10-minute sandbox command limit; no matching test processes survived. The scoped server suite and strict compilation/clippy checks pass.Tag
@indentto continue the conversation here.