chore: clear house-rules findings - #426
Conversation
Fix every finding the shared org checker (tracebloc/.github scripts/house-rules.sh) reports at develop HEAD: missing curl timeouts/TLS floors, plus (cli) a missing pipefail. Waivers only where the finding is a documented false positive. Part of tracebloc/backend#1303. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
bugbot run |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit c9ab43b. Configure here.
…(review) --max-time 300 made the ~50MB binary fail under ~1.4 Mbps and the ~90MB cosign bootstrap under ~2.6 Mbps -- slow-but-alive links must be allowed to finish. dl() replaces the wall-clock cap with --speed-limit 1024 --speed-time 60 (abort only when under 1 KiB/s for 60s straight = dead connection), keeps the TLS 1.2 floor + --connect-timeout 30, and deduplicates the flag string across all six body fetches. The HEAD tag-resolve keeps its 30s cap (header-only, wall-clock is right there). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
I feel like 30s timeout is too less time. I will approve it anyways. |
|
@saadqbal on the 30s — worth being precise about what it bounds: That said, if you'd still rather have 60: it's now a one-line change in |
Summary
Clears all 9 house-rules findings in this repo, measured at
developHEAD with the shared checker (tracebloc/.githubscripts/house-rules.sh --all). Part of tracebloc/backend#1303.Findings → fixes
scripts/install.sh:179curl-timeout (cosign binary)--connect-timeout 30 --max-time 300— matches the client installer's identical cosign-bootstrap curlsscripts/install.sh:180curl-timeout (cosign checksums)--connect-timeout 30 --max-time 300scripts/install.sh:205curl-timeout (HEAD tag resolve)--connect-timeout 30 --max-time 30(tiny header-only request)scripts/install.sh:268curl-timeout (binary download)--connect-timeout 30 --max-time 300scripts/install.sh:274curl-timeout (SHA256SUMS)--connect-timeout 30 --max-time 300scripts/install.sh:348curl-timeout (.sig + .cert, both curls on the logical line)--connect-timeout 30 --max-time 300on eachscripts/sync-backend-fixtures.sh:137curl-timeout--connect-timeout 10 --max-time 60— tighter than the installer values on purpose: this runs 18× per CI check run, so a generous per-file ceiling would compoundscripts/sync-schema.sh:116curl-timeout--connect-timeout 10 --max-time 60(same rationale)scripts/tests/install-verify.sh:27pipefail (sha256sum | awk)set -u→set -uo pipefailNo waivers used — every finding fixed for real.
pipefail judgment call
install-verify.shdeliberately has noset -e(it counts pass/fail itself), so addingpipefailonly changes$?propagation. I eyeballed every pipeline in the file for legs expected to fail:sha256sum|awk,shasum|awk,uname|tr, andls|grep|grep|head(the tamper test, where the sandbox guarantees a match) — none has a leg that legitimately exits non-zero on the green path, and no pipeline's exit status feeds aset -eabort. A comment at the top documents why-estays off.Test plan
house-rules.sh --all→ 0 findings (was 9)sh -n/bash -non all four edited scriptsscripts/tests/install-verify.sh→ 12 passed, 0 failed (the harness's mock curl tolerates the new flags; full installer flow exercised end-to-end)🤖 Generated with Claude Code
Note
Low Risk
Installer and CI fetch behavior only; no auth or release verification logic changes beyond how long curl may run.
Overview
Addresses house-rules curl-timeout findings by centralizing release/cosign downloads in
install.shbehind a newdl()helper: TLS 1.2, 30s connect timeout, and stall detection (--speed-limit 1024/--speed-time 60) instead of a fixed wall-clock cap so large binaries can finish on slow links while hung connections still abort. Cosign bootstrap, CLI binary,SHA256SUMS, and.sig/.certfetches all usedl(); resolvinglatestvia HEAD keeps a short--max-time 30.sync-backend-fixtures.shandsync-schema.shadd--connect-timeout 10 --max-time 60on their GitHub fetches so CI cannot wedge on a stuck endpoint (tighter than the installer because many files run per job).install-verify.shswitches toset -uo pipefailso a failing stage in pipelines likesha256sum | awkis not masked, without enablingset -e.Reviewed by Cursor Bugbot for commit 5c22f8c. Bugbot is set up for automated code reviews on this repo. Configure here.