Skip to content

ci: ratchet discarded call results (_ = f()) in non-test Go - #745

Merged
hanthor merged 1 commit into
mainfrom
ci/count-ratchet
Nov 20, 2026
Merged

hanthor merged 1 commit into
mainfrom
ci/count-ratchet

Conversation

@hanthor

@hanthor hanthor commented Nov 20, 2026

Copy link
Copy Markdown
Member

Adds a Ratchet workflow using the shared count-ratchet action (tuna-os/.github#389), pinned to 8ecf20e. Budgets live in .ratchet.toml, seeded at today's counts on main.

Metric Definition Budget
discarded-errors non-test Go lines _ = f(...) / _, _ = f(...) 174

Only a call on the right-hand side counts; _ = unusedVar does not (that is how 181 became 174). Excludes *_test.go, testdata/, e2e/, vendor/.

Rules: count > budget fails; count < budget fails with the exact new budget to write (so improvements lock in); a PR that raises a budget or removes a metric needs the ratchet-raise label. A job-summary table shows count/budget/delta. actions.lock regenerated with gh actions-lock.

🤖 Generated with Claude Code

Freezes non-test Go statements that discard a call's results at
today's count with the shared count-ratchet action. Complements the
diff-only errcheck gate in ci.yml.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: James Reilly <jreilly1821@gmail.com>
@tuna-reef-hive

Copy link
Copy Markdown
Contributor
73aef38

ℹ️ Sentinel notice — informational; author is trusted (owner), merge is not blocked

Hive flagged this PR (author @hanthor, head 73aef3862aa4) because it matches behaviors that can override security controls, escalate privileges or damage the codebase. This is a heuristic, not an accusation — a maintainer should confirm the change is intended before it merges.

  • sensitive_path — changes 2 sensitive path(s) (Touches a sensitive path (OWNERS, workflows, policies, hive config, security docs, …))
    • .github/workflows/actions.lock
    • .github/workflows/ratchet.yml

Hive did not add the sentinel-alert label because this author is trusted. The finding remains recorded for audit and the dashboard Security tab; set sentinel.trusted_authors_block: true to require the blocking label for trusted authors too.

@hanthor
hanthor merged commit 37662fe into main Nov 20, 2026
15 checks passed
@hanthor
hanthor deleted the ci/count-ratchet branch November 20, 2026 03:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant