Skip to content

feat(api): connect material diagnostics and qualified AI pressure sessions - #53

Closed
MrScripty wants to merge 8 commits into
feat/public-simulation-apifrom
feat/material-simulation-api
Closed

MrScripty wants to merge 8 commits into
feat/public-simulation-apifrom
feat/material-simulation-api

Conversation

@MrScripty

@MrScripty MrScripty commented Oct 13, 2026 •

Copy link
Copy Markdown
Owner

Embedded consumers can now submit real SPH emitter controls and inspect accepted particles with the canonical quantitative diagnostics, or select a real pressure provider and inspect its qualified output, fallback decision, provenance and timings. Both session owners preserve their last published result on rejection/cancellation/deadline and enforce explicit quotas and array budgets.

This PR is stacked on #48, which remains unchanged. It contains full dependency merges of #47 at 1923d5b and #49 at b8ca87c, preserving their history. API implementation commits are 177e800 (material) and ec9d960 (pressure). Only their additive src/lib.rs merge region needed resolution. Main was not merged or deployed.

  • MaterialSession reuses ParticleDiagnostic, separates accepted position time from post-emission/pre-integration diagnostic time, and retains the actual accepted emitter controls/source identity. It exposes raw borrowed slices for CAD/live consumers; no competing VTK exporter or capture type.
  • PressureSession reuses PressureProvider and ProviderReport, supports explicit numerical or preferred-provider-with-reference-fallback selection, and retains immutable qualified pressure after workspace failures. It exposes qualified pressure-stage data, not accepted full-step velocities or an SPH EOS replacement.
  • Includes practical material game-loop/inspection and optional real-model headless examples. Contracts and future full-step/Godot boundaries are documented in docs/api/; the persistent plan and exact evidence are in docs/plans/public-simulation-api/.

Validation on Linux CPU/Rust 1.92.0, using the real SHA256-verified frozen checkpoint:

  • Optimized full core-only: 347 passed, 0 failed, 0 ignored.
  • Optimized full default: 354 passed, 0 failed, 0 ignored.
  • Optimized focused parallel: 41 passed, 0 failed, 0 ignored.
  • These are overlapping configuration counts, not additive unique tests. Both artifact-dependent Rust tests were explicitly enabled.
  • Strict default/core Clippy, formatting and examples passed. Material example produced 64 inspected particles; pressure example selected the actual model with residual L2 6.10e-12.
  • Existing native provider comparison: 36 invocations, independent NumPy checkpoint replay passed; all five artifact/receipt Python tests passed without skips.
  • Independent reviewer: 24 targeted tests passed including the actual model, no blocking findings.

One authored high-frequency request failed the model quality gate and exhausted the unchanged 3000-iteration numerical fallback budget. It remains a negative regression proving typed failure and unchanged prior publication; no tolerances were relaxed. The smooth-mode success is not a universal accuracy claim.

Godot binding/runtime, GPU, desktop native graphics/clipboard, ARM/WebAssembly, full trajectories using the new AI provider and target-device timing remain unqualified. Provider-stage timing excludes session publication and other documented host work; no real-time or general speedup promise. CAD #50 retains VTK/rendering ownership; Tuldok v1/v2 dataset completion remains with its existing exporter.

Follow-up at 99bd039: reviewed moving-plate PR #52 at fd281eb and recorded a separate M5 library/session integration milestone, including ownership, interval units/signs, immutable publication and platform limits. Moving-plate support is not advertised by this PR. Independent documentation review found no blockers.

Hosted CI: research-book run 38383894838 at ec9d960 passed fresh aligned-strain qualification, then refused the educational packet because its historical Cargo.lock pin differs from current main. This branch's Cargo.lock exactly matches starting main 2209012; the observed mismatch is independently reproduced. The packet additionally restricts crate-root exports, so it requires a separate source-qualification update; no gate has been weakened. Final-head checks at 99bd039 are all terminal; details below.

Final hosted evidence at 99bd03905a5e4f670328abf12f2fae3a0ee3ab20:

  • Rust matrix and executable run 38385087480: strict Clippy and cargo test --locked for core-only (--no-default-features), default, and desktop (--features desktop) all passed; respectively 345 / 352 / 383 passed, zero failed, two artifact-dependent tests ignored per configuration. These overlap and must not be added together. core-and-executable and executable lifecycle/Python contracts passed.
  • Native AI run 38385087457, native/rational run 38385087478, and dense3D runs 38385087410 / 38385080705 passed. Local real-artifact tests above explicitly cover both generic Rust skips.
  • Research-book run 38385087554: failed with the same independently reproduced changed qualified native source Cargo.lock refusal, after fresh native qualification passed. Historical publication-source qualification needs a separate update; this does not imply the later pinned crate-root check would accept new API exports. Deploy was skipped.
  • CodeRabbit reported a draft-review skip, not a substantive review. Independent review described above is separate.

Working tree clean after push. Main and PR #48 remain unchanged. Hosted desktop tests do not establish native-window/clipboard, GPU, Godot, ARM/WASM or real-time performance support.

@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.

Copy link
Copy Markdown
Owner Author

Included with preserved Git history in PR67 and PR70, now on main 8baf459. This exact PR head was verified as an ancestor before closure. Closing the superseded review; no branch deletion or squash. Final ordinary CI and approved exact-source visual qualification are recorded in PR70. The main Pages workflow is still being monitored, so closure does not claim completed live publication.

@MrScripty MrScripty closed this Oct 14, 2026
@MrScripty
MrScripty deleted the feat/material-simulation-api branch October 16, 2026 20:13
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