feat: pwm-tui ratatui demo proving the real checkpoint locally, no Docker#201
Merged
Conversation
…#200) A new unpublished pwm-tui crate runs the run-real.sh path natively, no Docker: sha256-pinned download + cache of the checkpoint and the real lerobot/pusht episode (--cache-dir > PWM_CACHE_DIR > platform default), uv-orchestrated network-free export with NDJSON progress, then the in-process prove/verify/tamper of the real weights, rendered live (stage rail, op histogram, commitments, verdicts) with --headless --json for CI and cache path|ls|clear management. A warm bundle cache skips Python entirely. The pwm prove-predictor computation moved into pwm_testkit::report so the CLI and the TUI render one computation; the exporter gained LEWM_JSON_EVENTS and LEWM_PUSHT_PARQUET/MP4 overrides (Docker path unchanged). deny.toml carries a documented ignore for the informational paste advisory (ratatui 0.29; 0.30 needs Rust 1.88 > MSRV 1.85).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #200.
What this adds
pwm-tui, an unpublished ratatui crate that runs the exact./demo/run-real.shpath natively, with no Docker, as a live terminal UI with seven stages (FETCH, EXPORT, LOAD, INFER, COMMIT, VERIFY, TAMPER), per-stage detail panels (download gauges, exporter substage progress, op histogram, commitment table, verdicts), a toggleable raw log pane, a metrics footer,NO_COLORsupport, and a panic hook that restores the terminal.Cache management
--cache-dir>PWM_CACHE_DIR> platform default (~/Library/Caches/ProvableWorldModelon macOS,~/.cache/provable-world-modelon Linux).curlgap in the existing demo path.curl(already the Docker path's downloader; keeps the Rust tree free of a TLS stack the license gate would reject) into atomic.partfiles with resume and a per-file lock.--offlinefails fast on a cold cache,--refreshre-downloads,--re-exportforces stage 1,cache clearonly deletes the cache's known subdirectories and requires--yes.Shared computation, no drift
build_predictor_reportandPredictorReportmoved frombin/pwm.rsintopwm_testkit::reportwith phase callbacks; thepwmCLI and the TUI now render the same single load -> prove -> verify -> tamper computation. The exporter gained anLEWM_JSON_EVENTSNDJSON event mode (pretty log moves to stderr; the Docker path is byte-identical without the variable) andLEWM_PUSHT_PARQUET/LEWM_PUSHT_MP4local-path overrides so stage 1 runs network-free.Parity with the Real E2E gate (verified locally)
Cold run on this branch, same conditions the CI gate enforces:
accepted: true,weights_root_source: "export-bundle"weights_root 3733fc82…,model 59cc509a…,quant a6fab519…,z_out_head [0, 7, -40, -11, -10, 3]: bit-identical to the Docker--profile realrunfloat_error 0.282924 <= float_tolerance 0.282925FreivaldsCheckFailed { op_id: 2 }--offlinerun: FETCH all cache HITs, EXPORT skipped (bundle cache), exit 0; corrupt-entry re-fetch and cold---offlinefail-fast both verifiedTests and gates
pwm-tui(cache hit/miss/corrupt, pinned fetch overfile://, offline fail-fast, rotated-pin fail-closed, event parsing, app state folds,TestBackendrender assertions), 2 inpwm_testkit::report, a new stdlib-only Python event-stream test wired intocheck-local.sh full.check-local.sh quickgreen;cargo deny checkgreen (documented ignore for the informational RUSTSEC-2024-0436pasteadvisory: demo-only via ratatui 0.29, since ratatui 0.30 requires Rust 1.88 above the pinned MSRV 1.85, withinstabilitypinned to 0.3.7 inCargo.lockfor the same reason); MSRV 1.85 workspace build green; rustdoc-D warningsgreen; release--ignoredsuite and mutation gate green.TUI Smokeworkflow (manual + weekly): cold headless run asserting the four parity conditions from the JSON summary, warm offline run asserting the bundle-cache skip, and the cache subcommands.Follow-ups (out of scope)
PredictorArtifacthas a decode path.