Skip to content

feat: committed particle diagnostics and numerical inspector - #47

Merged
MrScripty merged 2 commits into
mainfrom
feat/quantitative-inspection
Oct 14, 2026
Merged

MrScripty merged 2 commits into
mainfrom
feat/quantitative-inspection

Conversation

@MrScripty

Copy link
Copy Markdown
Owner

Particle pressure/force scratch can be overwritten by failed attempts, and voxel history cannot recover numerical particle state. This adds budgeted committed diagnostics and a separate latest-state numerical inspector while preserving the visual scrubber and CAD renderer.

  • Inspect binary64 position, velocity, mass, material and temperature by stable append-only run-local index; inspect density, pressure and acceleration with explicit post-emission/pre-integration time and wall-response exclusions.
  • Retain one latest owned numerical state plus a 256-sample selected-particle history. Copy round-trip CSV, including current values when selecting a particle after completion. Show raw mass/momentum/kinetic-energy totals and numerical buffer capacity separately from visual history.
  • API integration: ParticleDiagnostic and particle_diagnostics() -> Option<(f64, &[ParticleDiagnostic])> are narrow accessors for the API owner to wrap; no competing public snapshot schema. Shared edits are one lib re-export, a LiveHistory store, two capture calls and the inspector window/module declaration.

Validation:

  • cargo test --release --locked --no-default-features: 326 passed.
  • cargo test --locked --no-default-features --lib: 14 passed.
  • cargo test --locked --no-default-features --test particle_inspection_contract: passed.
  • cargo test --locked --features desktop --bin rheon-desktop inspector::: passed.
  • cargo test --locked --features desktop --bin rheon-desktop -- --test-threads=1: 21 passed after competing jobs finished.
  • cargo clippy --locked --features desktop --all-targets -- -D warnings; cargo fmt --all --check: passed.
  • Independent review found and prompted a fix for empty CSV after completed-run selection. Tests cover lifetime, bound, unavailable fields, emission alignment, cancellation/late arithmetic rollback, wall stage and pair-force consistency.

Earlier desktop runs hit the existing ten-second carrier lifecycle timeout under CPU contention; untouched main 2209012 reproduced it. Broad debug numerical testing was stopped in favor of the completed optimized suite. Native graphics, OS clipboard delivery, GPU/driver behavior and real-time performance remain untested. Carrier field snapshots remain with the API workstream; this PR owns particle numerical inspection only.

Runnable checkpoint: cargo run --locked --release --features desktop --bin rheon-desktop, start a material run, expand Numerical inspector. See docs/implementation/quantitative-inspection.md for milestone acceptance, memory accounting, stage contracts and boundaries. No merge or deployment.

@coderabbitai

coderabbitai Bot commented Oct 13, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

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