Repository navigation
Scripts: build-arch.sh and check-readback.sh do not pass shellcheck - #166
Merged
Merged
Conversation
Camera::answer read the device directly, so no test reached its arms. The poll is now poll_answer, which takes the selector-2 read as a closure and the gap as an argument; Camera::answer passes the device read and the same 50 ms gap, so what is sent and read on the camera is unchanged. Tests script the replies: a rejected answer returns Error::Rejected(command, code) at the first read, an empty answer returns an empty list, a stale answer runs through all 20 reads to NoAnswer, and failed reads are polled again until a value arrives. Fixes #151 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The test module already gets XU_SIZE through use super::*. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
full_status_with reads the device directly, so no test reached the arm that turns a rejected or unanswered tracking query (0x0104) into tracking: None. Tests now run it on a scripted Device (compiled in tests only, answering xu_get, xu_set, get_ctrl and ctrl_range from a table): a rejected tracking query returns Ok with tracking None and the other fields filled, an answered one fills tracking, and a failed write still fails the whole read. No status code and no byte sent to the camera changed. Fixes #152 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Do not claim how a camera treats an unknown query; the comment now says what the test double does (type 0x89, code -1) and why. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Camera::gimbal sent the tilt negated inline; no test covered it, so deleting the minus would have left every test green and made `gimbal --tilt 20` move the camera down. The negation (with the + 0.0 that keeps -0.0 off the wire) is now tilt_to_pitch, which gimbal calls. The bytes sent for any input are unchanged (byte guard and command-line guard pass unchanged). Tests: positive tilt up gives the negated value, 0 stays +0.0, None stays None, and the converted value builds the two pose frames of capture 18 byte for byte. Fixes #153 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Quote $pkg in build-arch.sh (SC2086) and $b in the try and chk calls of check-readback.sh (SC2086); name the unused retry counter `_` (SC2034). No change in behaviour. The groundwork gate now runs shellcheck over scripts/*.sh and scripts/groundwork/*.sh. Fixes #154 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Precondition P5 still said the gate checks only the new scripts and that an issue is filed on main. Issue #154 fixes the old findings on rebuild, and the gate line covers every script in scripts/. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
nofuturekid
force-pushed
the
fix/154-shellcheck-old-scripts
branch
from
November 13, 2026 12:29
0ee6347 to
56731ce
Compare
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.
Fixes #154
What changed
scripts/build-arch.sh:cp "$pkg" "$out"(SC2086). The glob inpkg=$(ls ...)matches the one packagemakepkgwrites into the fresh work directory.scripts/check-readback.sh:"$b"quoted in the seventry/chkcalls (SC2086); the retry loop usesfor _ in 1 2(SC2034).$vison/offand$bistrue/false, so the arguments are the same as before.docs/superpowers/plans/2026-11-13-obsbot4linux-groundwork.md): the shellcheck gate line now coversscripts/*.sh scripts/groundwork/*.sh, and the notes that left the old scripts alone are updated.ci.ymlhas no shellcheck step; this is the only place the gate is defined.No CHANGELOG line (no user-visible change).
Verification (no camera, no Rust change)
shellcheck scripts/*.sh scripts/groundwork/*.shprints nothing (before: 1 finding in build-arch.sh, 8 in check-readback.sh).bash -n scripts/check-readback.shandsh -n scripts/build-arch.shpass.check-readback.shagainst a stub binary (OBSBOT4LINUX=stub, fixed JSON output,sleepreplaced by a no-op). Both logged the same 129 invocations in the same order, and printed identical output (50 lines, same exit code). The stub does not open a device.build-arch.shneeds docker and an Arch image; it was checked by shellcheck and by reading only. The Arch package build runs as a dry run of the release workflow on this pull request (it triggers onscripts/**); botharchjobs (x86_64 and aarch64) passed.🤖 Generated with Claude Code