Skip to content

Comments

Comprehensive safety, validation, testing, and DX improvements#2

Merged
AndrewAltimit merged 2 commits intomainfrom
improvements/comprehensive-plan
Feb 21, 2026
Merged

Comprehensive safety, validation, testing, and DX improvements#2
AndrewAltimit merged 2 commits intomainfrom
improvements/comprehensive-plan

Conversation

@AndrewAltimit
Copy link
Owner

Summary

  • Safety: Replace std::sync::Mutex/RwLock with parking_lot across IPC, daemon, and video player code to eliminate mutex poisoning panics; replace expect() in FFmpeg init with graceful error propagation
  • Validation: Add Validate trait enforcing NaN/Inf rejection, string length caps (256B), and data size limits (64KB) for all protocol message types; add video source URL allowlisting; add frame dimension bounds in shared memory
  • Testing: Add 48 new tests covering adversarial protocol inputs, itk-net (discovery, peer, sync manager), IPC integration, and itk-sync edge cases (drift correction thresholds, overflow, convergence)
  • DX: Add Justfile with common dev recipes, elevate clippy lints (dbg_macro, todo, unimplemented) to deny, add tracing to itk-protocol and itk-shmem, remove 4 disabled AI review jobs from CI
  • Dependencies: Migrate itk-protocol serialization from bincode to bitcode (bump protocol VERSION to 2), add seqlock writer-count runtime check, add daemon health-check ping/pong in launcher

Test plan

  • cargo fmt --all -- --check passes
  • cargo clippy --all-targets -- -D warnings passes (buildable crates)
  • cargo test -- 64 tests pass across 5 core crates
  • cargo deny check -- advisories, bans, licenses, sources all OK
  • Windows-only items (SPIR-V alignment, clipboard bounds, IPC buffer sizing, launcher health-check) need verification on a Windows build

Generated with Claude Code

AI Agent Bot and others added 2 commits February 21, 2026 06:42
- Replace std::sync::Mutex/RwLock with parking_lot across IPC, daemon, and
  video player code to eliminate mutex poisoning panics (Phase 1a)
- Replace expect() in FFmpeg init with OnceLock error propagation (Phase 1d)
- Add Validate trait with NaN/Inf, string length, and data size checks for
  all protocol message types (Phase 2a)
- Add video source URL validation in both daemons (Phase 2b)
- Add MAX_FRAME_DIMENSION bounds check in itk-shmem (Phase 2c)
- Add 48 new tests: adversarial protocol tests, itk-net coverage, IPC
  integration tests, and itk-sync edge cases (Phase 3)
- Add Justfile, elevate clippy lints to deny, add tracing to core crates,
  and clean up disabled CI workflows (Phase 4)
- Migrate itk-protocol from bincode to bitcode with VERSION bump (Phase 5a)
- Add seqlock writer-count runtime check (Phase 5c)
- Add daemon health-check ping/pong in launcher (Phase 5d)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Collapse nested if/if-let into let-chains (edition 2024) in
validate_video_source to satisfy clippy::collapsible_if.

Add .githooks/pre-commit that runs fmt, clippy, and tests on core
crates before each commit. Install with: git config core.hooksPath .githooks

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@AndrewAltimit AndrewAltimit merged commit b354d90 into main Feb 21, 2026
3 checks passed
@AndrewAltimit AndrewAltimit deleted the improvements/comprehensive-plan branch February 21, 2026 13:02
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.

1 participant