You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
lint:or-true correctly treats || true as a failure-swallowing smell, but the codebase-wide QA pilot found several recurring categories that deserve better diagnostics than a flat hit list.
We should keep catching real silent failures, while making intentional cases easier to classify and justify.
These look like real risk: key rotation should not silently continue if lock/unlock/commit failed.
ricon-family/den@0e7c312 has agent/welcome probes like:
AGENTS=$(mise run -q agent:list 2>/dev/null)||true
agents=$(cd "$DEN_DIR"&& mise run -q agent:list 2>/dev/null || true)
HUMAN_FILE=$(cd "$DEN_DIR"&& mise run -q human 2>/dev/null || true)
Some may be acceptable optional probes, but they should be explicit about degraded behavior. Den also does not currently enforce configured codebase lint in CI per #49's scan.
Common intentional/benign categories
Arithmetic increment workaround under set -e:
((modified++))||true((changes_new++))||true
These occurred in KnickKnackLabs/notes@319ab27. They are not the same risk as swallowing a command failure. The lint could suggest safer alternatives such as:
((modified +=1))
Best-effort cleanup/probes:
kill"$PID"2>/dev/null ||true
diff -u "$OUT_FILE"<(echo "$output")||true
count=$(printf '%s\n'"$output"| grep -cE '...'|| true)# grep -c exits 1 on zero matches
Some of these are legitimate, especially with an inline reason. Others should use explicit if ! ...; then handling.
Proposed improvement
Improve lint:or-true guidance/classification rather than just broadening the ban.
Possible behavior:
Continue failing on unannotated || true / || : in executable task/workflow code.
Emit a more specific message for recognized categories:
arithmetic increments: suggest ((n += 1)) or equivalent;
grep -c / zero-match counts: require or suggest an inline reason;
kill cleanup: allow only with explicit ignore reason;
destructive/auth/key/commit/validation commands: keep as high-risk findings.
Problem
lint:or-truecorrectly treats|| trueas a failure-swallowing smell, but the codebase-wide QA pilot found several recurring categories that deserve better diagnostics than a flat hit list.We should keep catching real silent failures, while making intentional cases easier to classify and justify.
Related:
Evidence from the corpus pilot
Corpus: 22 selected KKL/fold/den repos; included
mise.toml,.mise/tasks/**, and GitHub workflows.Mechanical scan artifact found 122
|| truehits across 10 repos. Agpt-5.4-minianalysis drone then categorized high-signal examples.High-risk / likely real findings
KnickKnackLabs/rudi@d01f16bhasrotate-keypaths that swallow key-rotation operations:These look like real risk: key rotation should not silently continue if lock/unlock/commit failed.
ricon-family/den@0e7c312has agent/welcome probes like:Some may be acceptable optional probes, but they should be explicit about degraded behavior. Den also does not currently enforce configured codebase lint in CI per #49's scan.
Common intentional/benign categories
Arithmetic increment workaround under
set -e:These occurred in
KnickKnackLabs/notes@319ab27. They are not the same risk as swallowing a command failure. The lint could suggest safer alternatives such as:((modified += 1))Best-effort cleanup/probes:
Some of these are legitimate, especially with an inline reason. Others should use explicit
if ! ...; thenhandling.Proposed improvement
Improve
lint:or-trueguidance/classification rather than just broadening the ban.Possible behavior:
Continue failing on unannotated
|| true/|| :in executable task/workflow code.Emit a more specific message for recognized categories:
((n += 1))or equivalent;grep -c/ zero-match counts: require or suggest an inline reason;killcleanup: allow only with explicit ignore reason;Require an explicit inline ignore for intentional cases, ideally compatible with Structured inline codebase:ignore + lint:ignore-justification meta-rule #20:
# codebase:ignore or-true — grep -c exits 1 on zero matchesAdd fixtures from the corpus categories above so future rule behavior is calibrated.
Acceptance criteria
|| trueis not automatically evil, but unclassified failure swallowing is not acceptable.