Skip to content

Debug live displays - #23

Merged
mpound merged 49 commits into
mainfrom
debug_live_displays
Aug 5, 2026
Merged

Debug live displays#23
mpound merged 49 commits into
mainfrom
debug_live_displays

Conversation

@mpound

@mpound mpound commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

This is an initial pass at fixing up the JSON files to display monitor points on web displays.

  • Replaces DSM placeholders with actual redis variables.
  • For some points, Claude made some initial guesses, some of which were wrong, some were completely invented.
  • There are more files to do, so I will keep this branch open for when I work on other displays. But there is enough now that it should be merged.
  • Also minor changes to some python scripts related to investigating the monsys and tests thereof

mpound and others added 30 commits June 29, 2026 13:45
…cedence

With --merge alone, smax.json values win on conflicts (safe default that
preserves validated descriptions, units, and thresholds).

With --merge --overwrite, the freshly-queried Valkey values win instead,
by swapping the deep_merge(base, overlay) argument order. Useful when the
live database has updated type or size information.

2 new tests in TestDeepMerge covering overwrite-mode semantics.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Lines like "  smax.json canonical names : 4723" from valkeynotsmax.txt
contain a colon but are not valid SMAX paths. filter_input now validates
the first colon-separated segment against _VALID_SEGMENT regex
([A-Za-z0-9_.][A-Za-z0-9_.\-]*), rejecting any segment with spaces or
other non-SMAX characters.

2 new tests: test_skips_summary_stat_lines_with_spaces,
test_keeps_paths_with_dots_in_segment. Total: 248 tests passing.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…licts

Generated via smax_from_valkey.py --merge --overwrite, then repaired:

- Removed 9 spurious keys (summary stat lines + junk namespaces _test_,
  pytest_smax, scripts, summitlab leaked from valkeynotsmax.txt)
- Removed unfetchable antenna:..:c1dc:1:alarm entry (smax_type=?)
- Restored DSM roach2-* __each__ (valkey-wins had replaced it with acc1-9);
  acc1-acc9 added as explicit singleton nodes with 11 variables each
- Fixed antenna:...:if and correlator:swarm:segment __each__+explicit-1
  duplicate conflicts by merging explicit entries into __each__ templates
- Added DSM singletons from Valkey: colossus, corcon, hal9000, hcn, hcn2,
  m5, newdds, obscon, obscon1, obsconmk, oldhal, phasemon, tenzing,
  roach2-19 and acc1-acc9 computers
- Updated test_monitorsystem.py: relax RM count to >=8*19 (RM grew from
  19 to 642 vars/acc); fix DSM roach2 filter to roach2- prefix (+roach2-19)

248 tests passing. Also includes cleaned intermediate files
smax_updated.json and smax_updated-valkeywins.json for reference.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Cross-references all 146 dsm:placeholder:DSM_* occurrences across 19
display JSON files against the refreshed conf/smax.json, proposing a
real canonical name for each with a HIGH/MEDIUM/LOW/NO MATCH confidence
tag. 74 high-confidence, 33 medium, 12 low, 27 no match.

Review only — no display JSON files are modified. Marc reviews and
confirms/corrects mappings before they're applied.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Applies the 66 HIGH-confidence mappings from goals/dsm_placeholder_review.md
to 14 display config files, replacing dsm:placeholder:DSM_* stand-ins with
real smax.json canonical names (UPS, meteorology, GPS8, project info,
phasemon vault voltages, YIG/MRG lock+tune, roach2 temps).

{ant}/{roach} template variables are preserved. All replaced names verified
to resolve via MonitorSystem.get_monitor_point(). 72 MEDIUM/LOW/NO MATCH
placeholders are left untouched pending further review.

248 tests passing.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Marc confirmed all 74 HIGH-confidence mappings against the live SMAX
database at the observatory. Checked off in the review doc; the 72
MEDIUM/LOW/NO MATCH entries remain open for further review.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Updated confidence mapping notes in dsm_placeholder_review.md.
…monitor sanity bounds

Catalogs the WACKO_* bound constants and printInvalidFloat/printInvalidDouble
call sites in cursesmonitor/src, mapping each to a proposed err_low/err_high
pair for the corresponding RM_*/DSM:*/antenna:* field in smax.json. Also
documents wacko checks that aren't static hardcoded bounds (computed
thresholds, NaN/sign sanity, string corruption) and a schema mismatch found
between the H and L receiver polarization nodes while tracing the SIS-bias
fields. Proposals only; no changes to smax.json in this pass.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Two live_redis dumps 5 minutes apart (conf/dump1.out, conf/dump2.out) show
the earlier H/L asymmetry was a smax.json authoring problem, not a real
receiver hardware difference: L does have lo_plate:pll:* live, the pll
fields are actually named BPF/NF (not bandpass_power/notch_power), and H's
SIS-bias data is real but lives under sis_bias:mixer:{n}:* rather than the
shape currently in smax.json. Also surfaces two live-database irregularities
(lo-plate/lo_plate duplication on antenna 8, sis_bias/mixer nesting-order
duplication on antennas 1 and 7) that are instrument-side, not smax.json
issues.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…reads

Most "DSM ID (monitor C code)" entries in dsm_placeholder_review.csv/md were
never actually verified against the cursesmonitor source -- they were
placeholder names invented from display labels. Re-derived all 19 file-groups
against literal dsmRead/call_dsm_read/dsm_structure_get_element/rmRead call
sites, with an exact file:line citation on every row.

This surfaced several real mapping errors along the way, not just missing
citations:
- ~15 entries wrongly marked NO MATCH actually have live fields (RM_POLAR_DUT_SEC_D,
  DSM_AS_FILE_NAME_C80, coherence fringe amplitude/coherence fields, per-antenna
  DIPFIT tau fields, SWARM roach temp-age/DDS-delay/loading-factor, etc.)
- BDC 8-12/10-12 GHz "ATTEN" cells were pointing at the VGA field instead
- The entire yig/mrg group used a fabricated reference:mrg:1:* key namespace
  that doesn't exist in the live database at all; corrected to the real,
  live DSM:m5:MRG_CONTROL_X structure that mRG.c actually reads
- That fabricated namespace was already live-wired into mrg.json and
  misc_dsm.json, so those two display files are fixed here too (previously
  dead cells)

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Replaces dsm:placeholder:DSM_* strings across weather.json, misc_dsm.json,
gps.json, coherence.json, project.json, arraymonitor.json, bdc.json,
aCmonitor.json, seeing.json, and swarm.json with the real canonical names
derived in the previous cursesmonitor C-source audit.

Also fixed two pre-existing bugs found while doing this: project.json's
"Script PID" cell pointed at a malformed name that doesn't exist live
(DSM_AS_PROJECT_SCRIPT_FILENAME_C256_PID instead of the real
DSM_AS_PROJECT_SCRIPT_PID_L), and re-applied the mrg.json/misc_dsm.json
MRG/YIG/C1DC fixes from the prior commit that had been reverted mid-session.

Several of the "real" fields turned out to be multi-element smax.json arrays
(2 to 242 elements: mRG/YIG _V2_* fields, BDC _V8_* fields, coherence fringe
_V11_V11_V2_* fields) rather than scalars. DataBridge.fetch_cell() has no
per-index addressing, so these render as a stringified array rather than a
single number -- wired in anyway per Marc's call (real data over a dead
placeholder), documented in dsm_placeholder_review.md as a known limitation
pending a template/schema extension for array indexing.

Remaining placeholders are only cells with no live field at all (confirmed
NO MATCH) or croom_iflo.json's IF/LO fields, whose real canonical name needs
polarization+mixer indices the {ant}-only template can't express.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@mpound
mpound requested a review from teuben July 22, 2026 14:45
@teuben

teuben commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

clarification: after this merge, will you keep on working here, and merge that back into main with another PR from this branch?

@teuben

teuben commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

The file goals/dsm_placeholder_review.csv has not been written by a person. Should there not be some README reminding reader which files are edited (with or without claude help) and which are generated?

Comment thread slama/scripts/print_json_hierarchy.py
Comment thread slama/scripts/printmonsys.py
Comment thread slama/scripts/print_json_hierarchy.py
Comment thread slama/scripts/print_json_hierarchy.py
@mpound

mpound commented Jul 27, 2026

Copy link
Copy Markdown
Contributor Author

clarification: after this merge, will you keep on working here, and merge that back into main with another PR from this branch?

I would merge, continue on this branch, and then do another PR. I suppose I could also create a debug-live-displays-2 if that means less confusion.

@mpound
mpound requested a review from teuben August 4, 2026 22:16

@teuben teuben left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all looks good now. I'd recommend we start a new branch to follow up for next work. I'll also do a special simulation branch.

@mpound
mpound merged commit b16c725 into main Aug 5, 2026
6 checks passed
@mpound

mpound commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

I will delete this branch after merge. I have a new branch for the vectorized display work.

@mpound
mpound deleted the debug_live_displays branch August 5, 2026 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants