Skip to content

Fix jq_lacks exit-4 bug; correct App-install README#219

Merged
ptr727 merged 2 commits into
developfrom
fix/consolidation
Jun 29, 2026
Merged

Fix jq_lacks exit-4 bug; correct App-install README#219
ptr727 merged 2 commits into
developfrom
fix/consolidation

Conversation

@ptr727

@ptr727 ptr727 commented Jun 29, 2026

Copy link
Copy Markdown
Owner

Consolidation of two fixes surfaced during the Utilities review that also apply here:

  • jq_lacks exit-4 bug: 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 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 under set -euo pipefail.
  • App-install README wording: check_app only notes (best-effort) whether a GitHub App is installed; the README said the script "asserts" it. Separate the assert (secret names) from the note.

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>
Copilot AI review requested due to automatic review settings June 29, 2026 04:47

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.

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 -e exit codes 1 and 4 as “lacks” in jq_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.

Comment thread repo-config/README.md
Comment thread repo-config/configure.sh
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>

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.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

@ptr727 ptr727 merged commit 95b0617 into develop Jun 29, 2026
11 checks passed
@ptr727 ptr727 deleted the fix/consolidation branch June 29, 2026 04:57
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.

2 participants