Fix jq_lacks exit-4 bug; correct App-install README#219
Merged
Conversation
jq_lacks: jq -e exits 4 (not 1) when a filter yields no output, so the "main does not require linear history" assert (jq_lacks on a rule that correctly does not exist) failed on a correct ruleset. Treat exit 1 and 4 as "lacks"; propagate real errors (2/3/5). repo-config README: the App installation is *noted* (best-effort), not asserted - separate it from the secret-name assertion to match WORKFLOW.md and check_app. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a repository-audit edge case in repo-config/configure.sh where jq -e can exit with status 4 (no output) on a valid “absent rule” check, and it updates repo-config/README.md to clarify that GitHub App installation detection is best-effort rather than an asserted requirement.
Changes:
- Treat
jq -eexit codes1and4as “lacks” injq_lacks, while still propagating real jq errors. - Reword the repo-config README to separate required secret-name assertions from best-effort App-installation detection.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| repo-config/configure.sh | Fixes jq_lacks to handle jq -e exit code 4 correctly under set -euo pipefail. |
| repo-config/README.md | Clarifies that App installation is only noted (best-effort), not asserted by the script. |
Replace the ambiguous "that one does not fail the audit" with "the App-installation check does not fail the audit". Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This was referenced Jul 9, 2026
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.
Consolidation of two fixes surfaced during the Utilities review that also apply here:
jq -eexits 4 (not 1) when a filter yields no output, so the "main does not require linear history" assert (jq_lacks on a correctly-absent rule -> exit 4) failed on a correct ruleset. Treat exit 1 and 4 as "lacks"; propagate real jq errors (2/3/5). Verified underset -euo pipefail.check_apponly notes (best-effort) whether a GitHub App is installed; the README said the script "asserts" it. Separate the assert (secret names) from the note.