Repository navigation
Conversation
mbreiser
added a commit
that referenced
this pull request
Sep 29, 2026
…oller: block, rig defaults, run header (Studio v0.88)
Contributor
Author
Held from candidate 2026-09-29: fix list from the adversarial reviewThe course-rig path works: on the 2×10 bench, rc1/rc2 asserted 1. Make the checks actually hold (blocking)
2. Close the bypasses (significant)
3. Small fixes and docs
Testing before it re-enters a candidate
Rough size: ~5–6 h of work plus the bench check. 🤖 Generated with Claude Code |
…troller: block, rig defaults, run header (v0.88) Design: docs/development/controller-settings-strategy.md (Codex-reviewed). Wiring lives in the rig YAML, experiment semantics in the protocol, and every sticky setting a run depends on is asserted (GET → SET → GET) before the run, refused on mismatch, and recorded in the run header. No restore-at-end. - js/controller-settings.js (new): pure planner — normalizeControllerBlock, planAssertions (rig identity, panel mode + capability, refresh derived from pattern grayscale + rig cap, panel firmware footer + fleet verify), formatSnapshot. tests/test-controller-settings.js (42 checks). - js/plugin-registry.js: parseRigIo → defaults.panel_mode, limits.max_refresh_hz, requires.panel_firmware, strict, name. - js/protocol-yaml-v3.js: top-level controller: block (extractControllerBlock; malformed values are blocking errors; missing requires token warns); WEB_RUNNER_CAPABILITIES = [controller_block]. - arena_studio.html: rig defaults.panel_mode applied at connect; Studio.assertControllerSettings runs in runOnce for Run AND Test, blocks with a banner; readControllerSnapshot → run header meta.controller + transcript line; run gate shows the planned verdict; Settings → Controller card with live snapshot and Verify panels (fleet 0xC9); batch flasher stores its verify result. - validate-protocol.mjs: prints the block, cross-checks the rig file (cap, policy, firmware). - configs/rigs: bergamo_g6_2x10_2p.yaml (triggered, 300 Hz cap, firmware 2p, strict) + index; course rigs gain defaults.panel_mode: persistent. - protocols: both 2P protocols point at the Bergamo rig and carry the controller block. - docs: controller-settings.md (user), strategy (implemented), SKILL.md section, rig checklist, release notes v0.88; pixi test list. Tests: full pixi run test green (one legacy assertion updated for the new capability token); every inline Studio script parses. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ader no longer lists manual steps The 2P color LED-intensity sweep (first run on the Bergamo 2026-10-16, on PR #254's branch) now points at configs/rigs/bergamo_g6_2x10_2p.yaml, declares `requires: [controller_block]` and the `controller:` block (triggered, line_sync_safe, panel firmware "2p"), and its header says that the Studio asserts the four Console steps it used to ask the operator to do by hand (panel mode 2, DIO 1 role, 300 Hz, panel firmware). What remains manual: pick the Bergamo session rig, Verify panels once per session, telemetry on. This file also exists on #254 (candidate 2026-10-20) with the old header and the cshl rig; when that lands on main, resolve the add/add conflict in favor of this copy. The pattern folder and the protocols/index.json entry stay with #254. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
3 of 4 tasks
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
mbreiser
force-pushed
the
claude/controller-settings-block
branch
from
October 18, 2026 17:19
b6af8e7 to
cb90952
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The panel display mode (and refresh rate, panel firmware variant) is a sticky controller setting that was set by hand and never recorded with the data. On the 2P rig a wrong mode silently ruins imaging (22 Sept). The Bergamo color sweep (2026-10-16) still needed four manual Console steps before each run (see the old header of
protocols/g6_2p_color_led_sweep.yaml). Design and adversarial review:docs/development/controller-settings-strategy.md. Linear: LAB-230.What
defaults.panel_mode(asserted at connect and every run),limits.max_refresh_hz,requires.panel_firmware,strict. New rigbergamo_g6_2x10_2p(triggered, 300 Hz cap, firmware "2p", strict). Course rigs gaindefaults.panel_mode: persistent, so a bench left in triggered mode is put back before the next run.controller:block (panel_mode,refresh_policy: line_sync_safe|refresh_hz,panel_firmware) +requires: [controller_block]so a runner without the feature refuses instead of ignoring it. Malformed values are blocking errors.meta.controllerand one transcript line. Run gate shows the planned verdict.g6_2x10_2p_diagnostics,g6_2x10_2p_duty_sweep, and nowg6_2p_color_led_sweep, whose header no longer lists the manual steps (panel mode 2, DIO 1 role, 300 Hz, panel firmware) — it says the Studio asserts them, and what remains yours (pick the Bergamo session rig, Verify panels once per session, telemetry on). Docs:docs/development/controller-settings.md, the protocol-yaml skill (.agents/skills/protocol-yaml/), the rig checklist.Rebase 2026-10-18
Rebased onto
mainat 6af0140 (Studio v0.94; was 33 commits behind and conflicting). Resolutions:pixi.tomlkeeps main's by-name test discovery (tests/test-controller-settings.jsis picked up automatically); the v0.88 release-notes entry is dropped from the notes file (it lives below, the candidate folds it); the skill edits live in.agents/skills/protocol-yaml/(main's.claude/skills/files are wrappers); the footer stays at main's v0.94. The Studio hunks merged cleanly over v0.89–v0.94 (replay, runtime variables, themes, Protocol ▾ / ⚙ Settings), so the Settings → Controller card and the run gate need one bench pass on the new base. Prettier run over the branch's JS.Overlap with #254 (candidate 2026-10-20):
protocols/g6_2p_color_led_sweep.yamlalso exists there (old header,rig: cshl_g6_2x10). When #254 lands onmain, this PR gets an add/add conflict on that file — take this PR's copy. Its_patterns/folder andprotocols/index.jsonentry stay with #254.Not in this PR (phases 2–3)
Per-trial
panel_modeand a boot-time per-panel firmware report (arena firmware, reiserlab/LED-Display_G6_Firmware_Arena#60); MATLAB runner support forcontroller:/requires:.Tier
next candidate (after 2026-10-20), together with #260 (throttle-proof host-timed waits, LAB-303). No footer/version bump — the release commit does it (the candidate after 2026-10-20 becomes Studio v0.98).
Release notes
Studio
defaults.panel_mode), a refresh-rate limit and the panel firmware it needs. A protocol that depends on a mode declares it in acontroller:block. Before each Run or Test the Studio reads the controller, sets whatever differs, reads it back, and refuses to run if it can't get the arena into the required state: wrong rig, unreadable setting, wrong panel firmware, or failed panel verification. The before/after settings go into the run log.bergamo_g6_2x10_2pfor the two-photon setup (triggered mode, 300 Hz limit, "2p" panel firmware, strict). Its three protocols (diagnostics, duty sweep, color LED-intensity sweep) use the new block, so the four manual Console steps before a Bergamo run are gone.Test plan
pixi run testgreen on the rebased branch (61/61 files;tests/test-controller-settings.js, round-trip suite 39)pixi run studio-smoke0 failures, 0 warnings on the rebased branchpixi run format-checkflags only two files untouched here)panel mode: … (rig default); open a 2P protocol on a course rig → run refused (rig mismatch); on the Bergamo → mode asserted, header carries the snapshot; Verify panels → 20/20; Settings → Controller card renders on the v0.94+ shell🤖 Generated with Claude Code