Skip to content

tod gate cannot fail: an 'if' block severs the '&&' chain in scripts/test.sh - #1803

Merged
alanvardy merged 2 commits into
mainfrom
alanvardy-var-1039-tod-gate-cannot-fail-an-if-block-severs-the-chain-in
Sep 19, 2026
Merged

alanvardy merged 2 commits into
mainfrom
alanvardy-var-1039-tod-gate-cannot-fail-an-if-block-severs-the-chain-in

Conversation

@alanvardy

Copy link
Copy Markdown
Member

No description provided.

@codecov

codecov Bot commented Sep 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@alanvardy
alanvardy marked this pull request as ready for review September 19, 2026 13:34
@alanvardy
alanvardy force-pushed the alanvardy-var-1039-tod-gate-cannot-fail-an-if-block-severs-the-chain-in branch from 64d4df6 to 27015f6 Compare September 19, 2026 13:34
Copilot AI lite review requested due to automatic review settings September 19, 2026 13:34
@alanvardy alanvardy added land and removed human labels Sep 19, 2026
@alanvardy
alanvardy merged commit e680b13 into main Sep 19, 2026
32 of 33 checks passed
@alanvardy
alanvardy deleted the alanvardy-var-1039-tod-gate-cannot-fail-an-if-block-severs-the-chain-in branch September 19, 2026 13:36

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The PR includes unrelated/unreferenced files and non-standard artifact placement, and the new ripgrep negation form can mask ripgrep failures (e.g., missing rg) as success.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 High severity · 3 Low severity

Open (4)
What changed in this PR

Fixes the scripts/test.sh CI/pre-commit gate so the script can correctly return a non-zero exit status when the forbidden-string scan finds matches, by keeping the scan inside the && command chain.

Changes:

  • Replaced the if rg …; then exit 1; fi block with a ! rg … &&-style chain-preserving check in scripts/test.sh.
  • Added a linear-project.md file (currently appears unrelated/unreferenced).
  • Added task/report markdown artifacts under .pi/orksorksorks/... describing the change.
File Description
scripts/​test.sh Keeps the forbidden-string scan within the && chain so the gate can fail as intended.
linear-project.md Adds a new root-level file with minimal content; appears unrelated to the gate fix.
.pi/​orksorksorks/​alanvardy-var-1039-tod-gate-cannot-fail-an-if-block-severs-the-chain-in/​small.md Adds a task write-up for the change (artifact location appears non-standard vs AGENTS.md guidance).
.pi/​orksorksorks/​alanvardy-var-1039-tod-gate-cannot-fail-an-if-block-severs-the-chain-in/​done.md Adds a completion report for the change (artifact location appears non-standard vs AGENTS.md guidance).

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread scripts/test.sh
if rg -i -s -g '*.rs' 'TODO:|todo:|FIXME|fixme|dbg!|DEBUG:|FIXTURE:|TODO\s|todo\s' .; then
exit 1
fi
! rg -i -s -g '*.rs' 'TODO:|todo:|FIXME|fixme|dbg!|DEBUG:|FIXTURE:|TODO\s|todo\s' . &&
Comment on lines +1 to +4
# Done

- **What was built**: Fixed `scripts/test.sh` so the CI gate can actually fail. Replaced the `if rg … then exit 1; fi` block (which severed the `&&` chain and forced exit status 0 via the trailing echo) with the `! rg … &&` form, keeping the chain intact so any failing step — including `cargo nextest run` — now makes the whole script exit non-zero.
- **Commit SHA(s)**: `64d4df6d0c6413cd44ba799f51ff2e1b07c2cd58` — `fix: make the gate in scripts/test.sh able to fail` (pushed to `origin/alanvardy-var-1039-tod-gate-cannot-fail-an-if-block-severs-the-chain-in`; PR #1803).
Comment on lines +1 to +4
# Task

Fix `tod/scripts/test.sh` so the CI gate can actually fail. The script is one long
`&&` chain, but the forgotten-TODOs check in the middle is an `if` block, which
Comment thread linear-project.md
@@ -0,0 +1 @@
Tod
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants