CaltechExperimentalGravity / CaltechExperimentalGravity/system_ident

Stage E: an out-of-band STOP path must be mandatory on the hardware backend

Open
#19 1 comment 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
0
Forks
1
PR merge metrics
No merged PRs in 30d

Description

**Stage E (spec §5).**

[`src/system_ident/cli.py:118`](https://github.com/CaltechExperimentalGravity/system_ident/blob/feat/cds-hardware-backend/src/system_ident/cli.py#L118) is the **only** place `watchdog.abort("operator STOP")` is wired from
outside the loop — and it lives in the dashboard. So "the dashboard is optional" is true for the twin and
**false for hardware**: running headless on hardware means there is no STOP button, and per the lifecycle
issue Ctrl-C does not currently stop the excitation either. That combination is not acceptable on a real
suspension.

### Do NOT force `--no-dashboard`

[`src/system_ident/cli.py:108`](https://github.com/CaltechExperimentalGravity/system_ident/blob/feat/cds-hardware-backend/src/system_ident/cli.py#L108) already degrades gracefully when the extra is missing (`find_spec`
check → prints a note → runs headless), which is the right behaviour. And the extra is installable on the
deployment machine: `fastapi` / `uvicorn` / `websockets` are pure-Python, work under py3.9, and are already
declared at [`pyproject.toml:31`](https://github.com/CaltechExperimentalGravity/system_ident/blob/feat/cds-hardware-backend/pyproject.toml#L31). `pydantic` being absent from the deployment lock is irrelevant — it
is never imported directly.

### Fix

Require *a* stop path when the CDS backend is selected — either:

- the dashboard is running, **or**
- the SIGINT handler from the lifecycle issue is installed **and** its use is printed prominently at
startup (e.g. "no dashboard: press Ctrl-C once to ramp down and hand off").

Refuse to start a hardware run with neither.

---
**Campaign:** CDS hardware backend · branch [`feat/cds-hardware-backend`](https://github.com/CaltechExperimentalGravity/system_ident/tree/feat/cds-hardware-backend)
· [spec](https://github.com/CaltechExperimentalGravity/system_ident/blob/feat/cds-hardware-backend/docs/superpowers/specs/2026-08-03-cds-hardware-backend-design.md) · [plan](https://github.com/CaltechExperimentalGravity/system_ident/blob/feat/cds-hardware-backend/docs/superpowers/plans/2026-08-03-cds-hardware-backend.md) · [handoff](https://github.com/CaltechExperimentalGravity/system_ident/blob/feat/cds-hardware-backend/notes/cds-hardware-bringup-2026-08.md)
*Code is deferred until the plan and issues have been reviewed.*

Contributor guide

No contributing guide indexed for this repository

Research direction

Read src/system_ident/cli.py around lines 108-118 and trace the lifecycle SIGINT handler referenced by the issue. Run the CDS hardware CLI in dashboard and headless modes; done means headless startup clearly advertises Ctrl-C and a hardware run refuses to start when neither the dashboard nor the SIGINT stop path is available.

Written by the indexing model from the issue text.

Assessment

Tech stack
fastapi, python
Domain
backend, cli, embedded-iot
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.