Repository navigation
chore: scripts audit - #34
Merged
Merged
Conversation
- Merge verify-contrast.sh into verify-design.sh as its contrast phase, sharing one token and color parser, and check that every expected ratio also appears in design/colors.md's Contrast section. - Merge verify-share-sim.sh into verify-app-sim.sh: one build and install, two scenarios. - lib.sh: add logged, used for every xcodebuild step, so a failed build names its log instead of exiting silently under set -e. - verify-app-mac.sh: a FAIL line for every failure, and an EXIT trap that restores the pasteboard and removes everything the run wrote outside its temp dir. - Pass --disable-clipboard to every croc CLI send, which otherwise copies its code over the user's pasteboard. - verify-interop.sh: wait for croctest's EVENT code before a CLI receiver joins, instead of a fixed sleep; default CROC_V10 to $(go env GOPATH)/bin. - Wait for the simulator to finish booting before installing. - CI: a shellcheck job; scripts/screenshots joins the swift-format source set. - Add scripts/AGENTS.md, and update the docs that described the old scripts.
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.
An audit of
scripts/: fewer scripts, less duplicated code, failures that say what went wrong, harnesses that clean up after themselves, and shellcheck in CI.Changes
verify-contrast.shmerged intoverify-design.shas its contrast phase. One token and color parser now serves both checks; the second copy of the awk is gone. A new check: every expected ratio must also appear in the Contrast section ofdesign/colors.md, so the doc and the script's table cannot drift apart unnoticed.verify-share-sim.shmerged intoverify-app-sim.sh: one build and install, then two scenarios (SIM-INTEROP-OK,SHARE-SIM-OK), the same shape asverify-app-mac.sh.lib.shgainslogged LOG CMD.... Everyxcodebuildstep uses it (9 call sites across 5 scripts). Before, a failed build in theverify-*harnesses exited underset -ewithout a message. The build scripts callxcodebuild -project app/CrocApp.xcodeprojinstead ofcd app.verify-app-mac.sh:FAIL:line. This fixes the known issue about a CLI receive failing silently.~/Downloads/CrocAppfile and every file the run leaves in the app's Documents, on failure too.--disable-clipboard. croc copies each code to the pasteboard, so the harnesses overwrote the user's pasteboard. That also made the step-10 save inverify-app-mac.shsave a croc code instead of the user's content.verify-interop.sh:EVENT codeline plus 3 s. Before, it was a fixed 3 s from process start. This fixes the known receiver-first race.CROC_V10defaults to$(go env GOPATH)/bin/croc.simctl bootstatus -b) before installing.shellcheckjob. It runs shellcheck 0.11, preinstalled onubuntu-26.04, overscripts/*.sh, and is wired intochangesandci pass.scripts/screenshots/*.swiftjoins the swift-format source set.scripts/AGENTS.mdwith the conventions every script now follows.known-issues.md.Verification (local, macOS)
shellcheck -x scripts/*.sh: clean.scripts/format-swift.sh --lint: PASS.scripts/verify-design.sh: OK, and--quietprints nothing.diff.colors.mdproduces the new finding.RELAY=127.0.0.1:9309 scripts/verify-interop.shagainst a local relay, as CI runs it: ALL INTEROP CHECKS PASSED (41 PASS lines).scripts/verify-app-sim.sh:SIM-INTEROP-OKandSHARE-SIM-OK.scripts/verify-app-mac.sh: all 12MAC-*-OKmarkers, exit 0, the pasteboard hash unchanged across the run, and no files left in Documents.build-appstore.shandbuild-devid.sh(they sign, upload and notarize),capture-screenshots.sh(it takes over the display). Their only change is thelogged/-projectform, which the harness builds above exercise.design checksjob runsverify-design.shunder mawk on Ubuntu.