Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions .agents/skills/g6-orientation/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ interface.
|---|---|
| **reiserlab/maDisplayTools** | **MATLAB** tools (G4+). Pattern math reference — **web output must match MATLAB exactly** (CI validates, tol 1e-4). Its protocol **runner is G4.1-only and frozen** (decision 2026-10-26); protocol authority = `webDisplayTools/docs/development/v3-spec.md` + conformance fixtures. (Its `docs/development/G4G6_ROADMAP.md` is largely historical now — use the umbrella docs for current G6.) |
| **reiserlab/LED-Display_pyDisplayTools** (pyDisplayTools) | **Python** tools for the displays (G4 pattern + experiment-folder tools). **Accepted destination** for the Python arena library and the **headless runner** (`arena-run`), a peer of the web runner (decision 2026-10-26). |
| **reiserlab/rig-nodes** | **Accepted destination, not yet created:** shared ROS 2 infrastructure for every lab rig (`rig_interfaces`, device nodes for FicTrac / Kinefly / BIAS / ScanImage / SiPM, MCAP recording and supervision primitives). Today that code lives in `webDisplayTools/rig/` on the 2026-10-20 release candidate. Record: `webDisplayTools/docs/development/rig-software-repos-and-runners.md`. |
| **reiserlab/rig-nodes** | **Current location (since 2026-10-26)** of the shared ROS 2 infrastructure for every lab rig: `rig_interfaces` (FicTracFrame, ArenaFrame, ConnectorReply), the device adapters + simulators (FicTrac, Kinefly, BIAS, ScanImage; SiPM and the ScanImage frames node follow when their PRs land), the MCAP recorder/indexer/CDR decoder/Foxglove rewriter, the supervision primitives and the Zenoh configs, as the `rig_nodes` + `rig_interfaces` packages (one package-set version, conda channel at a release tag). `CONTRACT.md` there is the graph contract (topics, QoS, envelope, invariants). webDisplayTools' `rig/` installs the set and keeps only the arena gateway, composition and visualization. Record: `webDisplayTools/docs/development/rig-software-repos-and-runners.md`. |

### G6 firmware (what the web connects to over USB)
| repo | role |
Expand Down Expand Up @@ -120,13 +120,15 @@ interface.
(`CE_DISPLAY_ACTIVE`); STOP also blanks the panels (they latch the last frame).
- **"Web is the runner"** (CSHL) — the browser **executes** the protocol, host-timed:
`js/arena-runner-g6.js`.
- **FicTrac closed loop** — `fictrac_sim.py` (or real FicTrac) → **`fictrac-bridge/bridge.py`**
- **FicTrac closed loop** — the FicTrac simulator (`rig_nodes.sims.fictrac_sim`, rig-nodes; or real FicTrac) → **`fictrac-bridge/bridge.py`**
(WebSocket `ws://localhost:8765` ← UDP `:60000`) → browser. `pixi run bridge` + `pixi run
sim` (start the bridge first). The web runner executes only the `fictrac` and `log` plugins;
`backlight`/`camera`/`temperature` are declared for MATLAB and **skipped on the web**.
- **ROS 2 graph (LAB-303, candidate 2026-10-20)** — `rig/` replaces the bridge with a graph
- **ROS 2 graph (LAB-303, released 2026-10-20/26)** — `rig/` replaces the bridge with a graph
(rmw_zenoh, MCAP record, BIAS + ScanImage connectors) behind the SAME WebSocket; the Studio is
unchanged. Where the pieces will live from here: `rig-software-repos-and-runners.md` (above).
unchanged. Since 2026-10-26 the device nodes, simulators and recording primitives come from the
installed `rig_nodes` package (reiserlab/rig-nodes); `rig/` keeps the gateway (`bridge_node.py`),
the composition (`rig.py`) and the arena visualization. Record: `rig-software-repos-and-runners.md`.

## Pointers (go here for depth)

Expand Down
140 changes: 0 additions & 140 deletions .github/workflows/rig-interfaces.yml

This file was deleted.

17 changes: 12 additions & 5 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,18 @@ When editing web tools, audit all buttons and controls in the modified code sect
- Dependencies via CDN or vendored under `js/vendor/` (e.g. `yaml`); no runtime npm
- Web outputs must match MATLAB outputs exactly

**Repository boundaries (decision 2026-10-26):** `docs/development/rig-software-repos-and-runners.md`
is the record. The browser tools and their rig-side gateway (`rig/nodes/bridge_node.py`) stay
here; the Python arena library + headless runner go to `LED-Display_pyDisplayTools`; shared ROS 2
infrastructure (interfaces, device nodes, recording, supervision) goes to `rig-nodes`, which does not
exist yet. Until the extraction session, every file is where the record's inventory says it is today.
**Repository boundaries (decision 2026-10-26; extraction done the same day):**
`docs/development/rig-software-repos-and-runners.md` is the record. The browser tools, their rig-side
gateway (`rig/nodes/bridge_node.py`), the arena composition (`rig/nodes/rig.py`, `rig/pixi.toml`) and the
arena visualization stay here; the Python arena library + headless runner go to
`LED-Display_pyDisplayTools` (LAB-337); shared ROS 2 infrastructure lives in **`reiserlab/rig-nodes`**
(`rig_interfaces`, the device adapters + simulators, `rig_nodes.recorder` / `mcap_index` / `cdr` /
`foxglove_json`, `rig_nodes.supervise`, the Zenoh configs; contract: its `CONTRACT.md`) and is INSTALLED
into `rig/` as the pinned `rig_nodes` + `rig_interfaces` packages from that repo's channel. A node fix
is tested here with `pixi install -e dev` (rig-nodes `main` built from source — git source dependencies,
NEVER path dependencies on a sibling checkout: pixi validates every environment's source paths before
installing any environment, which broke `pixi install` on rig PCs on 2026-10-27); a release of the set
re-pins `rig/pixi.toml`. Never re-add a device node or recorder copy under `rig/`.

### Dev environment (pixi — the only tool you install)

Expand Down
54 changes: 52 additions & 2 deletions docs/development/rig-software-repos-and-runners.md
Original file line number Diff line number Diff line change
Expand Up @@ -282,8 +282,11 @@ These items are the body of the rig-nodes ticket and apply to pyDisplayTools as
`pixi install`. One tested package-set release per repository until independent cadence is
demonstrated. Release gate: installed-package acceptance in a clean directory with the real JS
client (today's harness runs source-tree files and a Python emulator). Retain an installable release
bundle so a channel outage never blocks a rig rebuild. Keep a sibling-checkout developer path (pixi
path dependencies) so a node fix never needs a release to test.
bundle so a channel outage never blocks a rig rebuild. Keep a developer path that builds rig-nodes from source so a
node fix never needs a release to test: pixi **git** source dependencies on rig-nodes `main`,
pinned in the lock (a local checkout by an uncommitted manifest edit) — not path dependencies on
a sibling checkout, because pixi validates every environment's source paths before installing any
environment and a rig PC has no such checkout (found 2026-10-27, ww18).
7. **Lock files and skew.** A supported-combination table (Studio × gateway × package sets) rather than
"minimum tested version"; every package version written into `run_metadata`; the shared graph is
single-host initially (`bridge_node` compares adapter and gateway monotonic clocks; Zenoh is
Expand Down Expand Up @@ -375,6 +378,53 @@ The extraction session (LAB-338) starts from `rig/` on `main` with the §3.3 inv
list; the open satellites above are the only in-flight changes under `rig/`. Nothing in this cleanup
changed the inventory's destinations.

### Extraction done (2026-10-26) — what the runner planning session inherits

- **`reiserlab/rig-nodes` exists** with the §3.3 "rig-nodes" set moved from `rig/` **with history**
(`git filter-repo` on `main` a8ef775; the pre-rename `ros2-poc/` paths included) and restructured
as two pixi packages released together under one version (**0.2.1**): `src/rig_interfaces` (the
0.2.0 messages, host pinned to the RoboStack set the rigs run — `ros2-distro-mutex` 0.19 +
Python 3.12 on all three platforms; the 0.2.0 CI build had let two runners drift to 0.20 /
3.14) and `src/rig_nodes` (noarch Python: `_common`, the FicTrac / Kinefly / BIAS / ScanImage
adapters + command tools, the simulators incl. `fictrac_sim`, `recorder`, `mcap_index`, the CDR
decoder `cdr` (ex `mcap_convert`), the generic `foxglove_json` with an `enrich` hook, `graph_dump`,
`build_interfaces`, and three new modules: `supervise` (the process-group / port-preflight /
`Child` primitives extracted from `rig.py`), `fictrac` (THE FicTrac line grammar, ex
`_rows.parse_fictrac_line`) and `zenoh` (the loopback configs shipped inside the package +
`rig-router`)). `CONTRACT.md` there is checklist item 1(b); device-instance namespacing stayed
with LAB-340. CI (`package-set.yml`) builds both packages on win-64 / osx-arm64 / linux-64,
checks every package's pins, indexes the channel and installs it in a clean directory on each
platform to run the repository's tests (item 6's release gate). Tests: `tests/test_pure.py`
(29 checks) and `tests/test_device_nodes.py` (48 checks: sims → nodes → topics → loss
accounting + the recorder), the rig-nodes half of item 8.
- **webDisplayTools `rig/`** keeps the §3.3 "stays" set and installs the package set from the
rig-nodes channel (`rig/pixi.toml`: `rig_nodes ==0.2.1`; the `typed` environment adds
`rig_interfaces ==0.2.1` in the SAME solve group, which the 0.2.0 pins had made impossible; the
`dev` environment swaps both for git source dependencies on rig-nodes `main`, pinned to one commit
in the lock — item 6's developer path; the first version used path dependencies on a sibling
checkout, which made `pixi install` fail on every machine without one and was replaced on
2026-10-27). `rig.py` composes with `rig_nodes.supervise`; `bridge_node` imports
`rig_nodes._common` / `recorder` / `mcap_index` and writes the package-set versions into
`hello_ack` and the `/arena/session` record (item 7); `mcap_convert` and `_rows` import the
decoder and the FicTrac grammar; `foxglove_json` is the arena `enrich` wrapper. The harness
(`rig/tests/test_ros2_poc.py`) runs against the INSTALLED packages and is the cross-repository
smoke (item 8). `fictrac-bridge/fictrac_sim.py` moved too; the root `pixi run sim` delegates to
the `rig/` workspace.
- **Not moved, by the rule "anything doubtful stays":** `nodes/_rows.py` beyond the FicTrac parser
(behavior_v2 `kf` rows are arena format), the arena half of `foxglove_json.py`, every file the
inventory marks "stays"; `scanimage_frames_node` / SiPM / `bias_health` follow when #261, #266
and #269 land (each PR rebases onto this move: its new node goes to rig-nodes, its gateway edits
stay). `.github/workflows/rig-interfaces.yml` left with the package.
- **State at the end of the session:** rig-nodes CI green on the three platforms (run
[40427967719](https://github.com/reiserlab/rig-nodes/actions/runs/40427967719), builds + channel +
clean-directory acceptance), tag `v0.2.1` placed on the release commit `e69ac22` (payload removed
again in `75b9986`), `rig/pixi.lock` re-locked on the tagged channel, webDisplayTools PR
[#274](https://github.com/reiserlab/webDisplayTools/pull/274) open. Open: the `okey-cokey` PR
#269 rebases over the move (it edits `rig.py`, `foxglove_json.py`, `viz_node.py`, adds
`bias_health.py`, which goes to rig-nodes); a Windows rig verifies `pixi install --locked` + the
harness (the `%CONDA_PREFIX%` activation paths ran only in rig-nodes' CI acceptance, not in this
workspace); LAB-337's runner planning session starts from the installed package set.

## 10. Decided, hypotheses, commitments

- **Decided:** the three repositories and their downward dependencies; two peer runners with the web
Expand Down
4 changes: 3 additions & 1 deletion fictrac-bridge/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ direction the browser sends JSON log events back, which the bridge appends to a
└──────────▶ --log file (JSONL)
```

For development without a camera or a real FicTrac install, `fictrac_sim.py`
For development without a camera or a real FicTrac install, the FicTrac simulator (`rig_nodes.sims.fictrac_sim` in reiserlab/rig-nodes since 2026-10-26, installed by the `rig/` workspace; `pixi run sim` here delegates to it)
generates random-walk data in FicTrac's exact wire format.

## Why a bridge at all?
Expand Down Expand Up @@ -390,6 +390,8 @@ bias, the rejection index and the idx-consistency check.

## fictrac_sim.py options

> Since 2026-10-26 the simulator is `rig_nodes.sims.fictrac_sim` (reiserlab/rig-nodes); the options below are unchanged (`pixi run sim -- --help`).

| Option | Default | Meaning |
|---|---|---|
| `file` (positional) | — | FicTrac log (CSV) to replay; omit to generate random data. |
Expand Down
Loading
Loading