3d55f189c0
Iter 22. Cierra el set de hoy: future-me (o cualquier nuevo collab)
levanta el escenario completo con un comando.
crates/apps/brahman-demo/ con 3 binarios:
- brahman-demo-broker: Server::bind standalone con Broker. Reemplaza
a ente-zero para demos (ente-zero es PID 1 con kernel surface,
child subreaper, bus, brain, audit — overkill).
- brahman-demo-producer: Card con flow.output[demo-stream:json].
- brahman-demo-consumer: Card con flow.input[demo-feed:json] —
mismo type → matchea con producer.
Env vars en los 3: BRAHMAN_INIT_SOCKET, BRAHMAN_BROKER_CONTEXT,
BRAHMAN_DEMO_LABEL/FLOW/TYPE, RUST_LOG.
scripts/bootstrap-demo.sh:
- Modes: all (default) / broker / only.
- Cleanup-safe: trap mata todos los PIDs spawneados (SIGTERM grace
+ SIGKILL fallback) y borra el socket.
- Espera al socket antes de spawnear (evita ENOENT en handshake).
- Logs separados por proceso bajo $BRAHMAN_DEMO_LOG_DIR.
Smoke end-to-end (sin DISPLAY): consumer recibe MatchEvent
{ Available, demo-feed ← demo-stream, via: Exact, pinned: false }
automáticamente cuando entra el producer. Match fluye por el push
channel del broker.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
29 lines
911 B
TOML
29 lines
911 B
TOML
[package]
|
|
name = "brahman-demo"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
description = "Demo binaries de brahman: broker standalone + producer/consumer dummy. Pensados para que `scripts/bootstrap-demo.sh` arranque un escenario reproducible donde los 5 explorers ven sesiones, matches, y timeline."
|
|
|
|
[dependencies]
|
|
brahman-broker = { path = "../../core/brahman-broker" }
|
|
brahman-card = { path = "../../core/brahman-card" }
|
|
brahman-handshake = { path = "../../core/brahman-handshake" }
|
|
brahman-sidecar = { path = "../../shared/brahman-sidecar" }
|
|
tokio = { workspace = true }
|
|
tracing = { workspace = true }
|
|
tracing-subscriber = { workspace = true }
|
|
ulid = { workspace = true }
|
|
|
|
[[bin]]
|
|
name = "brahman-demo-broker"
|
|
path = "src/bin/broker.rs"
|
|
|
|
[[bin]]
|
|
name = "brahman-demo-producer"
|
|
path = "src/bin/producer.rs"
|
|
|
|
[[bin]]
|
|
name = "brahman-demo-consumer"
|
|
path = "src/bin/consumer.rs"
|