NthLayer Bench — Tier 3 operator TUI for case management and situation awareness
Project description
nthlayer-bench
Tier 3 of the NthLayer ecosystem. Operator TUI for case management, situation awareness, and incident response. Textual-based terminal interface that communicates with nthlayer-core (Tier 1) exclusively via HTTP API — never touches the SQLite store directly.
pip install nthlayer-bench
nthlayer-bench --core-url http://localhost:8000
What it is
The operator's window into the NthLayer runtime. SREs use it to triage cases, follow situation snapshots, approve or reject remediation actions, and capture reasoning during incidents. Bench is read-mostly against core — every write goes through the core HTTP API and is subject to the same RBAC + change-freeze rules as worker writes.
- Stateless beyond local UI state. All durable state lives in core.
- Read-mostly. Lists are polled with staleness thresholds (case list 10 s, situation board 120 s, heartbeats 60 s).
- Apache 2.0 licensed.
CLI
nthlayer-bench --core-url http://localhost:8000 # launch TUI
nthlayer-bench -V # print version
What's in v1.5
The first cut establishes the connection model and the shell:
BenchApp— Textual app; Header / Footer / status bar / main container.ConnectionStatuswidget — pollsGET /healthevery 5 s.- CONNECTED — core returned 200.
- DEGRADED — core returned a non-200 (still reachable, but unhealthy).
- DISCONNECTED —
httpx.RequestError/OSError(network-level failure).
- Initial check fires immediately on mount via
call_laterso operators don't see a "checking..." flash.
Subsequent v1.5 work (Phase 4 of the v1.5 epic plan) adds:
- Situation board — live correlation_snapshot rollup with staleness highlighting.
- Case bench — case list with lease ownership, priority, and team filtering (with toggle to show all teams).
- Case detail — verdict chain walk, reasoning capture, approve / reject buttons that POST to core.
- Notification escalation — staleness-driven warnings when core or workers stop heartbeating.
The SRE CLI commands previously stranded in nthlayer-respond (brief, post-incident, suppress, shift-report, oncall, delegate) will land here in priority order — brief and post-incident first, since they map directly onto case-detail and retrospective views. Inventory: respond SRE CLI inventory spec.
How it talks to core
Bench is a pure HTTP consumer of core. No direct SQLite access — that boundary is structural, not just convention. The contract is:
| Direction | Endpoint(s) |
|---|---|
| Read state | GET /cases, GET /verdicts/{id}, GET /verdicts/{id}/ancestors, GET /assessments, GET /heartbeats |
| Operator write | PUT /cases/{id}/lease, DELETE /cases/{id}/lease, PUT /cases/{id}/resolve, POST /verdicts/{id}/outcome |
| Approval flow | POST /verdicts (operator-note + approval verdicts) |
Write operations queued during disconnection are replayed on reconnect; conflicts return 409 and surface in the UI.
Why a separate Tier 3 process
Operator UX has different cadence and risk than worker computation. Pulling bench into its own process means:
- Deploy independently. A bench rebuild doesn't affect the runtime; a worker rebuild doesn't drop the operator's session.
- Run multiple instances. Several SREs can attach simultaneously; each instance is a stateless client.
- Future-proof for SaaS delivery. v2 introduces
textual-serveso bench can be served over the network without changing the underlying app.
NthLayer ecosystem
| Repo | Tier | Role |
|---|---|---|
opensrm |
— | The OpenSRM specification |
nthlayer-common |
— | Shared library |
nthlayer-generate |
— | Build-time compiler |
nthlayer-core |
1 | HTTP API + state |
nthlayer-workers |
2 | Five worker modules |
nthlayer-bench |
3 | This repo — operator TUI |
nthlayer |
— | Project front door + meta-package |
Licence
Apache 2.0
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nthlayer_bench-1.6.0.tar.gz.
File metadata
- Download URL: nthlayer_bench-1.6.0.tar.gz
- Upload date:
- Size: 77.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a1069f5c956add6d979f34abb029f76a09a4094f2649940ec8b38f536b5c8989
|
|
| MD5 |
fe345fdfe82ac4c9494dabbe862ca004
|
|
| BLAKE2b-256 |
e603821cbeb25f8e3079de2a1890af01bbc6ac0dba0654fb58bc391dd27a6e2a
|
Provenance
The following attestation bundles were made for nthlayer_bench-1.6.0.tar.gz:
Publisher:
release.yml on rsionnach/nthlayer-bench
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nthlayer_bench-1.6.0.tar.gz -
Subject digest:
a1069f5c956add6d979f34abb029f76a09a4094f2649940ec8b38f536b5c8989 - Sigstore transparency entry: 1492825024
- Sigstore integration time:
-
Permalink:
rsionnach/nthlayer-bench@dbf2d3974f63a6494632723a6b74e8a7f6e0cd5c -
Branch / Tag:
refs/heads/main - Owner: https://github.com/rsionnach
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@dbf2d3974f63a6494632723a6b74e8a7f6e0cd5c -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file nthlayer_bench-1.6.0-py3-none-any.whl.
File metadata
- Download URL: nthlayer_bench-1.6.0-py3-none-any.whl
- Upload date:
- Size: 53.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1146de775de10cf8e8cf7048159e0b5fb48be85d31a803e30c2879c2f9866034
|
|
| MD5 |
cbea7fc2dfb2b5889c220f90030d57ee
|
|
| BLAKE2b-256 |
47c3eef4f791c6bdb0fba412090bf338711390001b782c48541eb721639a4da6
|
Provenance
The following attestation bundles were made for nthlayer_bench-1.6.0-py3-none-any.whl:
Publisher:
release.yml on rsionnach/nthlayer-bench
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nthlayer_bench-1.6.0-py3-none-any.whl -
Subject digest:
1146de775de10cf8e8cf7048159e0b5fb48be85d31a803e30c2879c2f9866034 - Sigstore transparency entry: 1492825095
- Sigstore integration time:
-
Permalink:
rsionnach/nthlayer-bench@dbf2d3974f63a6494632723a6b74e8a7f6e0cd5c -
Branch / Tag:
refs/heads/main - Owner: https://github.com/rsionnach
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@dbf2d3974f63a6494632723a6b74e8a7f6e0cd5c -
Trigger Event:
workflow_dispatch
-
Statement type: