Commit 1a48721e authored by Vacaliuc, Bogdan's avatar Vacaliuc, Bogdan
Browse files

CLAUDE.md: note new direct-archiver-query capability



setup/archiver-query (committed to main 2026-04-11) reads the SNS CSS
archiver Oracle database directly — no operator CSV export round-trip
needed. For any DANGLE/mDANGLE follow-up that wants archived RBV / VAL /
DMOV / AirPadStatus traces, the assistant can fetch them autonomously.

Documents the byte-for-byte verification against the operator-exported
DANGLE incident CSV, the is_marker / out_of_range flags that catch
Disconnected and 3390-deg-recovery-glitch anomalies, the AirPadStatus
"not actually an enum" gotcha, and the LINK_ALARM (status_id=39) seen
on recovery samples after Disconnected.

Co-Authored-By: default avatarClaude Opus 4.6 (1M context) <noreply@anthropic.com>
parent 1244261f
Loading
Loading
Loading
Loading
+44 −0
Original line number Diff line number Diff line
@@ -17,6 +17,50 @@ There are files that have been collected during the investigation of the fault.

* /SNS/users/6ov/BL4A/2026/04/09/

## Direct archiver query (use this instead of asking for CSV exports)

The `setup/archiver-query` tool on `main` (committed 2026-04-11) reads the
SNS CSS archiver Oracle database directly — no operator CSV export needed.
For any DANGLE/mDANGLE motion follow-up that wants archived RBV / VAL / DMOV
/ AirPadStatus traces, the assistant can fetch them autonomously:

```bash
# Reproduce the operator-exported DANGLE incident CSV byte-for-byte
./setup/archiver-query.sh \
    --pv 'BL4A:Mot:DANGLE.RBV,BL4A:Mot:DANGLE,BL4A:Mot:DANGLE.DMOV,BL4A:Mot:AirPadStatus' \
    --start '2026-04-08 13:35:00' --end '2026-04-08 13:37:00' \
    --format csv -o /tmp/dangle.csv

# Or get the same data as JSONL for direct programmatic consumption
./setup/archiver-query.sh \
    --pv 'BL4A:Mot:DANGLE.RBV' \
    --start '2026-04-08 13:35:00' --end '2026-04-08 13:37:00'
```

Verified end-to-end against `bl4a-DANGLE-operation-fault-2026-04-08_1335.csv`:
all 128 data rows for all 4 PVs match byte-for-byte. The tool also surfaces
**`is_marker=true`** for `Disconnected`/`Archive_Off`/`Write_Error` rows and
**`out_of_range=true`** for samples outside `num_metadata.[low_disp_rng,
high_disp_rng]` — both directly relevant for catching motion-failure context
that previously took manual log-archaeology to find.

The 3390-deg DANGLE recovery glitch from the 2026-03-16 Disconnected window
was found via this exact mechanism (`out_of_range=true` against the motor's
[-1000, 1000] display range). Use the same probe technique on any
multi-day DANGLE/mDANGLE failure recurrence — query a 30-day window and
filter by `is_marker || out_of_range` to find anomalies.

**Other useful verbs:**
- `--describe-channel BL4A:Mot:AirPadStatus` shows that AirPadStatus has
  *no* `enum_metadata` rows in the archiver — values render as raw 0/1, NOT
  as `"Off"`/`"On"`. Don't string-match; integer-compare.
- `--search 'BL4A:Mot:DANGLE*'` lists 24 channels related to DANGLE
- `--describe-schema` dumps the live severity/status integer maps. Recovery
  samples after `Disconnected` typically show `LINK_ALARM` (status_id=39).

Full docs: `setup/docs/sns-archiver-query.md` on `main`.
Plan: `plan/archiver-query-tool.md` on `main`.

## BL4A DANGLE/mDANGLE — established facts for future work

These are durable facts discovered during the 2026-04 investigation that closed with