Skip to content

Add simantic demo: account-free packaged scenarios (ble-pair) - #19

Merged
ShahriarAhnaf merged 5 commits into
mainfrom
worktree-pippy-demo-blepair
Sep 19, 2026
Merged

ShahriarAhnaf merged 5 commits into
mainfrom
worktree-pippy-demo-blepair

Conversation

@ShahriarAhnaf

Copy link
Copy Markdown
Contributor

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-IDF bleprph + blecent pairing 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 demo lists scenarios; simantic demo ble-pair runs one.
  • Nothing in the path reads ~/.sim_id or calls get-mcu-details. A test asserts this rather than trusting it.
  • Assets are fetched from the public releases bucket (verified account-free: releases/pyrite/latest.json returns 200 unauthenticated) and sha256-verified through the existing install.download.
  • Running is delegated to 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.
  • Fixes the PyPI Source/Issues links, which pointed at the nonexistent simantic-dev/simantic-py and 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:

  1. The sim binary is not published. releases/pyrite/latest.json currently carries only engine-rust-linux-x64 and engine-rust-osx-arm64. Tracked in simantic-dev/pyrite#302.
  2. The demo assets are not uploaded. This expects releases/demos/manifest.json plus demos/ble-pair/{esp32c3.repl,bleprph-flash.bin,blecent-flash.bin}. The source images exist but crates/rn-engine/examples/esp32c3_ble_two_node.rs hardcodes 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-x64 or linux-arm64 engine 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 since sim resolves 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.

ShahriarAhnaf and others added 5 commits September 19, 2026 06:45
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>
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>
@ShahriarAhnaf
ShahriarAhnaf marked this pull request as ready for review September 19, 2026 20:56
@ShahriarAhnaf
ShahriarAhnaf merged commit 86a6d0b into main Sep 19, 2026
11 checks passed
@ShahriarAhnaf
ShahriarAhnaf deleted the worktree-pippy-demo-blepair branch September 19, 2026 20:56
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.

PyPI Source and Issues links 404 (simantic-py does not exist; repo is pippy)

1 participant