tod gate cannot fail: an 'if' block severs the '&&' chain in scripts/test.sh - #1803
Merged
alanvardy merged 2 commits intoSep 19, 2026
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
alanvardy
marked this pull request as ready for review
September 19, 2026 13:34
alanvardy
force-pushed
the
alanvardy-var-1039-tod-gate-cannot-fail-an-if-block-severs-the-chain-in
branch
from
September 19, 2026 13:34
64d4df6 to
27015f6
Compare
alanvardy
deleted the
alanvardy-var-1039-tod-gate-cannot-fail-an-if-block-severs-the-chain-in
branch
September 19, 2026 13:36
Contributor
There was a problem hiding this comment.
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
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; fiblock with a! rg … &&-style chain-preserving check inscripts/test.sh. - Added a
linear-project.mdfile (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.
| 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 |
| @@ -0,0 +1 @@ | |||
| Tod | |||
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.


No description provided.