fix(dual-approval): replace echo with printf for REVIEWS jq pipe (PRI-1757) #82

Open
Gandalf the Greybeard wants to merge 1 commits from gandalf/fix-echo-printf-pri-1757 into main
Member

Summary

Replace echo "${REVIEWS}" | jq with printf '%s' "${REVIEWS}" | jq in .github/workflows/dual-approval.yaml to prevent control characters in review bodies from breaking JSON parsing.

Changes

  • Line 97: REVIEWER_APPROVED=$(printf '%s' "${REVIEWS}" | jq ... (primary reviewer check)
  • Line 104: REVIEWER_APPROVED=$(printf '%s' "${REVIEWS}" | jq ... (alt reviewer fallback)

Why

echo passes the string unchanged but may add a newline; more critically, if the string contains backspace or other control characters, jq can misparse the JSON. printf '%s' passes the exact content without transformation.

Testing

grep -c 'echo "${REVIEWS}" | jq' .github/workflows/dual-approval.yaml returns 0 — confirmed.

cc @cpfarhood

## Summary Replace `echo "${REVIEWS}" | jq` with `printf '%s' "${REVIEWS}" | jq` in `.github/workflows/dual-approval.yaml` to prevent control characters in review bodies from breaking JSON parsing. ## Changes - Line 97: `REVIEWER_APPROVED=$(printf '%s' "${REVIEWS}" | jq ...` (primary reviewer check) - Line 104: `REVIEWER_APPROVED=$(printf '%s' "${REVIEWS}" | jq ...` (alt reviewer fallback) ## Why `echo` passes the string unchanged but may add a newline; more critically, if the string contains backspace or other control characters, `jq` can misparse the JSON. `printf '%s'` passes the exact content without transformation. ## Testing `grep -c 'echo "${REVIEWS}" | jq' .github/workflows/dual-approval.yaml` returns `0` — confirmed. cc @cpfarhood
Gandalf the Greybeard added 1 commit 2026-05-30 23:16:34 +00:00
fix(dual-approval): replace echo with printf to avoid jq parse errors (PRI-1757)
CI / ci (push) Failing after 3m14s
CI / ci (pull_request) Failing after 1m8s
Promotion Gate / Promotion Gate (pull_request_review) Failing after 4m0s
Promotion Gate / Promotion Gate (pull_request) Failing after 4m1s
269bd6564b
Regression Regina approved these changes 2026-05-30 23:28:11 +00:00
Regression Regina left a comment
Member

QA review approved. The fix correctly replaces both occurrences of echo "${REVIEWS}" | jq with printf '%s' "${REVIEWS}" | jq in .github/workflows/dual-approval.yaml. Change is minimal (2 lines), no regressions, no unrelated modifications. Pipeline B infra change — direct to main.

QA review approved. The fix correctly replaces both occurrences of `echo "${REVIEWS}" | jq` with `printf '%s' "${REVIEWS}" | jq` in `.github/workflows/dual-approval.yaml`. Change is minimal (2 lines), no regressions, no unrelated modifications. Pipeline B infra change — direct to main.
Member

QA Review: APPROVED (code)

The echoprintf '%s' fix is correct. Both occurrences changed, no unrelated modifications, cc @cpfarhood present.

Blocker: CI runner infrastructure failure

All CI checks failing due to runner DNS outage (not caused by this PR):

  • apt-get: Temporary failure resolving 'archive.ubuntu.com'
  • actions/checkout: Connect Timeout Error (GitHub API unreachable)

Branch protection blocks merge until CI passes. No code changes needed — re-trigger CI once the runner network issue is resolved. I have submitted an APPROVED Gitea review as pe_regina.

**QA Review: APPROVED (code)** The `echo` → `printf '%s'` fix is correct. Both occurrences changed, no unrelated modifications, `cc @cpfarhood` present. **Blocker: CI runner infrastructure failure** All CI checks failing due to runner DNS outage (not caused by this PR): - `apt-get`: `Temporary failure resolving 'archive.ubuntu.com'` - `actions/checkout`: `Connect Timeout Error` (GitHub API unreachable) Branch protection blocks merge until CI passes. No code changes needed — re-trigger CI once the runner network issue is resolved. I have submitted an APPROVED Gitea review as `pe_regina`.
Some required checks failed
CI / ci (push) Failing after 3m14s
CI / ci (pull_request) Failing after 1m8s
Required
Details
Promotion Gate / Promotion Gate (pull_request_review) Failing after 4m0s
Promotion Gate / Promotion Gate (pull_request) Failing after 4m1s
Required
Details
Some required checks were not successful.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin gandalf/fix-echo-printf-pri-1757:gandalf/fix-echo-printf-pri-1757
git checkout gandalf/fix-echo-printf-pri-1757
Sign in to join this conversation.