Return to the lab

Build notes

The interface is deliberately quiet. Underneath it is a functioning, persistent telemetry pipeline with explicit rules and idempotent handoffs.

What actually runs

A Python HTTP service generates deterministic request events for Relay, a fictional inference API. SQLite stores the events, anonymous runs, activity log, and CRM records. A pure rule engine aggregates two complete seven-day windows. The browser presents the results, evidence, and sandbox actions.

This is a portfolio experiment, not a production inference service. There is no real model inference, LLM brief generation, real customer data, or external CRM connection. Briefs are deterministic templates, grounded in metrics produced by the rule engine.

The three rules

  1. Sustained token growth. At least 2× successfully consumed tokens on all seven paired days, with at least 100,000 baseline tokens and 250,000 current tokens. Ask whether the new workload justifies a volume commitment.
  2. Capacity pressure. At least 100 current requests, at least 5% rate-limited responses, and nearest-rank p95 latency of at least 1,500 ms. Investigate workload and capacity before suggesting an upgrade.
  3. Team expansion. At least three production teams with 20 successful requests each across at least three days, including at least two teams that did not qualify in the baseline. Validate shared governance needs with customer success.

These are illustrative demo thresholds, not production recommendations. A real deployment needs cost and pricing context, workload-specific baselines, and validation against known outcomes. The small fixture makes the pipeline easy to replay. The quiet account is an intentional negative control. A signal is a qualification cue, never proof of budget, buying intent, or forecast revenue.

Reproduce the result

  1. Run the full portfolio. It creates 1,120 request events and three signals across four accounts.
  2. Inspect any signal. Expand its evidence and open the source telemetry. Representative event IDs are labeled as samples; exported JSON includes the complete run.
  3. Route a signal. A persistent CRM record receives a fictional owner, action, evidence, and window.
  4. Replay. The same event IDs produce zero new events and the same signals. CRM uniqueness is enforced by run and signal.
  5. Reload. The browser reconnects to the same anonymous run. Choose a different scenario to start a clean sandbox, or use New sandbox to start again.

Engineering decisions

Deterministic input
Event IDs are derived from the run, account, day, and request index. Running a subset and then the full scenario cannot duplicate the same logical event.
Transactional writes
SQLite foreign keys, WAL mode, a busy timeout, and transactions preserve event and routing uniqueness during repeated or concurrent requests.
Traceable evaluation
Rules operate on consumed tokens and UTC windows. Rate-limited requests consume zero tokens. Thresholds, aggregate metrics, and representative event IDs travel with the signal.
Constrained exposure
A host-loopback listener sits behind an HTTPS reverse proxy. Socket activation passes that listener into a transient unprivileged service with its own loopback-only network namespace. Deployment also hides the personal home and unrelated app/config trees, mounts code read-only, and keeps state private. Startup checks must confirm filesystem isolation and failed outbound TCP-connect and UDP-send probes before the installer accepts inbound HTTP health. Body limits, input validation, same-origin checks, per-IP rate limits, bounded threads and session capacity limit the public demo surface.
Anonymous state
There is no login or personal-data collection form. The browser keeps a random run reference. Anyone with a run URL can access its synthetic data; do not treat a run as private storage. Runs become inaccessible after 24 hours and are removed opportunistically after a one-hour cleanup grace period.

What the tests cover

Rule positives and negatives, exact thresholds, low-volume false positives, already-adopted teams, failed-request token accounting, event and CRM deduplication, concurrent ingestion, expiration, invalid requests, cross-origin rejection, rate limiting, thread bounds, static-file traversal protection, newest-first event ordering, installer rollback and retry after injected failures, and fail-closed sandbox checks.

Browser checks cover full scenario execution, evidence inspection, routing, replay, reload persistence, scenario changes, a quiet control, keyboard tab navigation, and mobile layout. This does not replace an independent security audit or production load testing.

Design restraint

The first layer explains the product and gives one action. The second layer explains why an account qualified. The third exposes implementation and failure modes. Typography and hairline divisions establish hierarchy; status colors carry meaning. There are no decorative animations, fabricated scores, or unsupported revenue claims.

Deliberate limits

The dataset is small and synthetic, briefs are templates, and the CRM lives only inside this app. The Python standard-library server is a bounded demonstration service, not a production application platform. Anonymous runs are capped at 100, creation is limited to eight new runs per IP in ten minutes, and requests are limited to 120 per IP per minute.

A next iteration could add a separately instrumented inference client, user-defined thresholds, rule precision/recall evaluation, and an explicitly authorized external CRM sandbox. None is implied by this release.