Repository navigation
Conversation
ssrl-current-amp gained a Zero Offsets routine (devices/autozero.py there): it sets each SR570's input offset to the smallest ladder step whose cscan box ADC reading clears +2 mV, with its own guards and a restore on any error or abort. Agents need to rerun it after gain changes, so it is now a spec-write tool rather than a button only staff can press. The server owns the algorithm; current_amp.py only POSTs start, polls GET /api/autozero to the end and aborts past wait_s (the server then restores every offset). It writes hardware outside SPEC, so the handler goes through audited_device_call: justification, safety switch, action-log row first. BTH_CURRENT_AMP_URL defaults to 192.168.41.6:8570 at BL4-1 and is unset elsewhere, where the tool refuses. MUTATING_COUNT 42 -> 43 and the tool counts in test_agent_surface.py move with it. test_mutates.py's AST scan only reads audited_call, so test_current_amp.py checks this handler's audited_device_call itself. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Adds
zero_amp_offsets(spec-write, mutating): an agent-callable wrapper around ssrl-current-amp's new Zero Offsets routine. That routine sets each SR570 input offset (I0/I1/I2/PIPS) to the smallest ladder step whose cscan box ADC reading is above +2 mV.current_amp.pyonly POSTs/api/autozero/start, pollsGET /api/autozerountil the run ends, and POSTs/api/autozero/abortoncewait_shas passed (default 360 s, just past the server's own 300 s limit). The server restores every offset on an error or abort.audited_device_call: a justification is required, the safety switch is checked, and an action-log row is written before the request is sent.BTH_CURRENT_AMP_URLdefaults tohttp://192.168.41.6:8570at BL4-1. It is unset at other stations, so the tool refuses there.MUTATING_COUNT42 -> 43, and the tool counts intest_agent_surface.py.test_mutates.py's AST scan only looks ataudited_call, sotests/test_current_amp.pychecks theaudited_device_callwiring for this handler.docs/tool_catalog.html. Added a CHANGELOG "Unreleased" entry (no version bump).Full suite: 1615 passed, 5 skipped; ruff clean. A live
GET /api/autozeroagainst the BL4-1 server works. The tool has not been run on hardware.🤖 Generated with Claude Code