Add simantic demo: account-free packaged scenarios (ble-pair) - #19
Merged
Merged
Conversation
The first thing a reader does after `pip install simantic` — or after `uvx simantic demo`, which installs nothing permanent. Nothing in this path reads ~/.sim_id or calls get-mcu-details, so it runs before anyone has decided whether to sign up. The first demo is `ble-pair`: two ESP32-C3s on stock ESP-IDF bleprph and blecent, pairing over a shared BLE medium. A single chip printing to a UART shows nothing a reader cannot get elsewhere; two of them finding each other over a simulated radio does. Running is delegated to the `sim` binary's `--scenario`, which already wires N machines onto one medium and one virtual timeline, rather than reimplemented against the single-machine `simantic_rust.Session`. Assets come from the public releases bucket, keyed by sha256 through the existing install.download path. Also fixes the PyPI Source and Issues links, which both pointed at simantic-dev/simantic-py and 404'd. Closes #18 Refs #17 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
A demo is the one run we most need to see and the one we currently cannot: `report()` returns early when unauthenticated, so every launch-day run would spool locally and never upload. Sent immediately rather than spooled. A demo is usually a one-shot `uvx` process, so the reader never issues a second command and the hourly upload would never fire. Strictly less goes up than for an authenticated run: which demo, whether it worked, how long it took, and the existing environment fields. No identifier of any kind, so two runs cannot be linked — these are people who have not signed up to anything. A separate endpoint from `report-sdk-usage` so an anonymous, internet-facing route can be rate-limited on its own and can never reach the billing path. `status` now discloses this; claiming "enabled when authenticated" while reporting anonymously would have been a false promise. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This reverts commit b804495.
This reverts commit 0de67e8.
The credentials error is the first wall a new user hits, and it read like a stack frame: it named ~/.sim_id, which the reader did not ask about and cannot act on, and buried the one useful instruction at the end. It now names the model, says it needs an account, lists the two commands that resolve it, and points at `simantic demo` for anyone who would rather try something before signing up. Also splits 401/403 out of the HTTP path. "not a supported model" is wrong when the name is fine and the account simply lacks access; it sends people hunting for a typo that is not there. That becomes the common case once model access is enforced. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
The launch-day path from HN:
uvx simantic demo ble-pair— installs nothing permanent, needs no account, and runs two ESP32-C3s on stock ESP-IDFbleprph+blecentpairing over a shared BLE medium.HN's own Launch HN instructions require this: "Make sure there's a way for HN readers to try out and poke around your product. Remove signup barriers, at least for launch day" and "If you're only collecting email signups or beta users, it's probably too early for your Launch HN."
What this does
simantic demolists scenarios;simantic demo ble-pairruns one.~/.sim_idor callsget-mcu-details. A test asserts this rather than trusting it.releases/pyrite/latest.jsonreturns 200 unauthenticated) and sha256-verified through the existinginstall.download.sim --scenario, which already wires N machines onto one medium and one virtual timeline. No new pyo3 bindings —simantic_rust.Session(repl_text, elf)is single-machine only, so building multi-node in Python would have meant new Rust surface for no gain.Source/Issueslinks, which pointed at the nonexistentsimantic-dev/simantic-pyand 404'd. Closes PyPI Source and Issues links 404 (simantic-py does not exist; repo is pippy) #18.Not done — this cannot run end to end yet
Two things have to land before the command works for a stranger, both outside this repo:
simbinary is not published.releases/pyrite/latest.jsoncurrently carries onlyengine-rust-linux-x64andengine-rust-osx-arm64. Tracked in simantic-dev/pyrite#302.releases/demos/manifest.jsonplusdemos/ble-pair/{esp32c3.repl,bleprph-flash.bin,blecent-flash.bin}. The source images exist butcrates/rn-engine/examples/esp32c3_ble_two_node.rshardcodes absolute paths under/Users/anoof.Until then the command fails with a clear message rather than a traceback. Kept as a draft for that reason.
Also note there are no
osx-x64orlinux-arm64engine builds, so those platforms cannot run the demo at all yet.Tests
tests/test_demo.py, 5 cases: the scenario is two machines on one BLE medium with both radios connected; the quantum resolves BLE T_IFS (150 us); repl/elf stay bare names sincesimresolves them relative to the scenario file; an unknown demo lists the known ones; and running a demo never loads credentials or hits the network when assets are cached.Full suite: 160 passed, 7 skipped.
Part of the Launch HN milestone — simantic-dev/simantic-core#420. Refs #17.