Gate sc-tray on static analysis and a coverage ratchet #4

Merged
geusebio merged 3 commits from feature/static-analysis-and-coverage-gate into main 2026-08-15 13:04:34 +00:00
Owner

Companion to scclient #4, which explains the shape. Same three files.

17% is the honest number here, and it is the reason for a ratchet rather than a target. Most of this package is menu callbacks the OS drives and systray mutation that needs a display — a line-coverage goal would be met by testing the wrong things. The capture suite is what actually exercises those paths, and the ratchet stops the 17% rotting downwards while that suite grows to replace it (#627).

One finding, and a fair one: the notification path hands a deployment name to osascript. It was already quoted into an AppleScript literal for exactly that reason — the pragma now says so on the line.

Clean at hack/lint.sh; go test, go vet and all four static cross-compile targets still green.

Companion to [scclient #4](https://git.grey.ooo/Grey.ooo/someones.computer_scclient/pulls/4), which explains the shape. Same three files. **17% is the honest number here, and it is the reason for a ratchet rather than a target.** Most of this package is menu callbacks the OS drives and systray mutation that needs a display — a line-coverage goal would be met by testing the wrong things. [The capture suite](hack/screenshot) is what actually exercises those paths, and the ratchet stops the 17% rotting downwards while that suite grows to replace it ([#627](https://git.grey.ooo/Grey.ooo/Someones.Computer/issues/627)). One finding, and a fair one: the notification path hands a deployment name to `osascript`. It was already quoted into an AppleScript literal for exactly that reason — the pragma now says so on the line. Clean at `hack/lint.sh`; `go test`, `go vet` and all four static cross-compile targets still green.
Gate sc-tray on static analysis and a coverage ratchet
Some checks failed
CI / build (pull_request) Failing after 50s
2ba86c8b03
Matches scclient and sc: golangci-lint from a pinned image, and coverage as a
ratchet rather than a threshold.

The recorded floor is 17%, which is the honest number and the reason a
ratchet rather than a target. Most of this package is menu callbacks the OS
drives; a line-coverage goal would be met by testing the wrong things, and
the capture suite is what actually exercises them. The ratchet stops that 17%
rotting downwards while the capture suite grows to replace it.

One finding, and a fair one: the notification path hands a deployment name to
osascript. It was already quoted into an AppleScript literal for exactly that
reason, so the pragma says so on the line.
Run the linter from PATH in CI, where a bind mount reads nothing
All checks were successful
CI / build (pull_request) Successful in 5m27s
e5fbd72d81
A CI job step and the docker daemon are in different filesystem namespaces,
so a `-v "$PWD":/app` in a step mounts an empty directory and the linter
passes having checked nothing. Same fix as scclient: prefer a PATH binary at
exactly the pinned version, keep the image as the laptop path.
Note that coverage floors are Linux figures, since CI is what they gate
All checks were successful
CI / build (pull_request) Successful in 4m5s
7077d4960f
Sign in to join this conversation.
No reviewers
No labels
in-progress
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Grey.ooo/someones.computer_tray!4
No description provided.