Skip to content

Add binary server event journal - #315

Merged
pcarrier merged 6 commits into
mainfrom
pc/event-journal
Aug 21, 2026
Merged

Add binary server event journal#315
pcarrier merged 6 commits into
mainfrom
pc/event-journal

Conversation

@pcarrier

@pcarrier pcarrier commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add a process-wide variable-length binary event ring with atomic fine-grained activation and low-throughput defaults
  • instrument server, connection, protocol, extension, PTY, compositor, transfer, and error paths through conditional logging macros
  • add the blit.events.v1 protocol and CLI for configuration, snapshots, foreground client tails, and detached server recordings
  • make configuration updates revisioned and optionally conditional with --if-revision so temporary captures can restore safely
  • allow live tails and detached recordings without arbitrary admission counts; batch queued live records up to 256 KiB
  • report recording initialization and delayed write/flush failures with state, record/byte/loss counters, and errors
  • encode headers on the stack, copy header plus payload directly into the byte ring, and allocate live records only when a receiver exists
  • expose the event family to extension endpoints through the same stream machinery, matching their existing filesystem and process authority
  • emit correlated CREATE2 request, session-lock, spawn, registration/refusal, and physical-reply-write stages
  • support startup configuration and recording through BLIT_EVENTS_SIZE, BLIT_EVENTS, BLIT_EVENTS_FILE, BLIT_EVENTS_FILE_HISTORY, and BLIT_EVENTS_FILE_APPEND
  • document the wire format, timestamps, lifecycle, failure behavior, access model, and CLI workflow

Verification

  • ./bin/lint --check
  • cargo test -p blit-remote --lib (329 passed)
  • cargo test -p blit-cli --bin blit (153 passed)
  • cargo test -p blit-server --lib (730 passed, 3 ignored)
  • cargo test -p blit-server --lib events
  • cargo clippy -p blit-remote -p blit-server -p blit-cli --all-targets -- -D warnings
  • git diff --check

@indent

indent Bot commented Aug 21, 2026

Copy link
Copy Markdown

Issues

Review closed.

CI Checks

2 CI checks failed on 7d9e5c0.

Failing e2e
  • e2e finished with failure.
Failing lint
  • lint finished with failure.

@github-actions

github-actions Bot commented Aug 21, 2026

Copy link
Copy Markdown

Coverage

Crate Lines Functions Regions
alacritty-driver 75.7% (934/1234) 78.7% (74/94) 79.0% (1521/1926)
browser 0.0% (0/825) 0.0% (0/69) 0.0% (0/1404)
cli 40.0% (6227/15563) 46.0% (619/1346) 40.9% (9702/23715)
compositor 35.1% (6045/17209) 49.8% (502/1009) 34.9% (8309/23786)
desktop 78.7% (4409/5605) 71.9% (388/540) 75.4% (6119/8120)
fonts 85.3% (756/886) 89.9% (71/79) 86.4% (1485/1719)
fssync 92.5% (5515/5961) 94.4% (501/531) 92.7% (10180/10981)
gateway 35.1% (698/1990) 40.6% (69/170) 32.1% (1059/3303)
git 87.7% (4646/5295) 90.5% (379/419) 87.6% (7414/8463)
guest 82.8% (2347/2836) 80.5% (265/329) 81.4% (3911/4805)
lsp 77.2% (2688/3483) 79.4% (262/330) 74.9% (4210/5619)
proxy 19.2% (172/898) 20.5% (26/127) 21.0% (293/1392)
remote 91.7% (18064/19694) 94.7% (1270/1341) 89.4% (29290/32748)
sd-notify 73.9% (68/92) 100.0% (6/6) 83.2% (109/131)
server 58.7% (35520/60536) 65.7% (3053/4647) 60.1% (54269/90237)
ssh 32.2% (165/512) 48.2% (27/56) 31.4% (261/830)
upsidedown 31.4% (391/1247) 27.8% (55/198) 34.8% (797/2287)
webrtc-forwarder 8.5% (238/2805) 10.7% (22/205) 6.3% (289/4595)
webserver 65.1% (1288/1978) 67.6% (177/262) 67.2% (2159/3214)
Total 60.7% (90171/148649) 66.0% (7766/11758) 61.7% (141377/229275)

Comment thread crates/server/src/events.rs
@blacksmith-sh

blacksmith-sh Bot commented Aug 21, 2026

Copy link
Copy Markdown

Found 16 test failures on Blacksmith runners:

Failures

Test View Logs
[chromium] › tests/
mobile-keyboard.spec.ts:200:5 › a tap while the keyboard failed to rise retries instead
of hiding
View Logs
[chromium] › tests/
mobile-keyboard.spec.ts:256:5 › the switcher stays in view when the keyboard pans the v
isual viewport
View Logs
[chromium] › tests/
mobile-keyboard.spec.ts:293:5 › key-line taps cancel the touch so the keyboard stays up
View Logs
[chromium] › tests/
mobile-keyboard.spec.ts:362:5 › the icon's keyboard survives focus landing on a surface
canvas
View Logs
[chromium] › tests/
mobile-keyboard.spec.ts:455:5 › iOS hops focus through a host when the target already h
olds it
View Logs
[chromium] › tests/
mobile-keyboard.spec.ts:61:5 › keyboard rises only from the toggle and the key line tra
cks it
View Logs
[chromium] › tests/
pane-solo.spec.ts:117:7 › Pane solo › a single-pane layout offers no solo ──
View Logs
[chromium] › tests/
panel-subscriptions.spec.ts:96:7 › side panel subscriptions › a parked terminal is unsu
bscribed while the preview panel is closed
View Logs
[chromium] › tests/
terminal.spec.ts:94:7 › Terminal › Switcher offers a Search action that opens the searc
h panel
View Logs
[chromium] › tests/
touch-draggables.spec.ts:178:7 › Touch drag on list rows › holding a dock card drags it
into the main view
View Logs

...and 6 more test failures. View all on Blacksmith

Fix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

Comment thread docs/design/events.md Outdated
@pcarrier
pcarrier merged commit e546a85 into main Aug 21, 2026
9 checks passed
@pcarrier
pcarrier deleted the pc/event-journal branch August 21, 2026 22:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants