docs(#5422): add yq/jq pitfalls and fail-open gate severity guidance - #5423
Conversation
|
🤖 Finished Review · ✅ Success · Started 8:18 PM UTC · Completed 8:33 PM UTC |
Site previewPreview: https://8b248d2a-site.fullsend-ai.workers.dev Commit: |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
ReviewFindingsMedium
Previous runReviewFindingsMedium
Low
Labels: PR modifies AGENTS.md documentation with shell scripting guidance |
waynesun09
left a comment
There was a problem hiding this comment.
Automated multi-agent review (3 independent passes, cross-checked against actual yq/jq behavior rather than by inspection alone). One new medium-severity finding on the "yq/jq pitfalls" section, plus an update to an existing low-severity comment:
- The "silently fails / produces no output" framing for unrecognized yq functions doesn't match actual behavior (loud parse error, non-zero exit) - see inline comment.
- Updated the earlier low-severity comment on the
ltrimstr/rtrimstr/splitbullet to medium:ltrimstr/rtrimstrdon't exist in yq at all (the original claim has it backwards), which is a more significant inaccuracy than thesplitnote alone.
The fail-open guidance and its bash examples checked out against testing.
|
@waynesun09 how do we proceed here? I think it that for some reason is not happening. Also this has no assignee and the issue is a retro filed one with no assignee either. |
|
/fs-fix |
|
🤖 Finished Fix · ✅ Success · Started 6:58 PM UTC · Completed 7:03 PM UTC |
🔧 Fix agent — iteration 1 (human-triggered)Addressed all 3 review findings (2 inline comments covering 3 inaccuracies). Corrected the 'silently fails' framing to accurately describe yq's loud parse-error behavior, fixed the ascii_downcase bullet, and replaced the backwards ltrimstr/rtrimstr claim with accurate information. All changes are documentation-only in AGENTS.md. Fixed (3):
Tests: passed Updated by fullsend fix agent |
Fix three factual inaccuracies in the yq/jq pitfalls section: - Replace "silently fails" framing with accurate description: yq produces a visible parse error (non-zero exit, stderr) on unrecognized functions — silence requires error suppression - Fix ascii_downcase bullet: causes a parse error, not silent - Fix ltrimstr/rtrimstr bullet: they are jq-only (not "exist in both"), and clarify the actual split divergence (2-arg form) Addresses review feedback on #5423
|
/fs-review |
|
🤖 Finished Review · ✅ Success · Started 11:45 AM UTC · Completed 11:57 AM UTC |
71203ae to
85e0e85
Compare
85e0e85 to
a0a5969
Compare
Add two subsections to the AGENTS.md shell scripting section: 1. yq/jq pitfalls — documents common function name mismatches between yq and jq (e.g., downcase vs ascii_downcase, upcase vs ascii_upcase) and instructs reviewers to flag unrecognized yq function names at medium severity. 2. Fail-open error suppression — distinguishes gate/guard steps (where fail-open breaks correctness) from non-critical steps (where fail-open is acceptable). Includes code examples showing the dangerous pattern and a safer fail-closed alternative. Instructs reviewers to flag fail-open patterns in gate steps at medium severity or higher. These gaps were identified in PR #4049 where ascii_downcase (jq-only) was used in a yq expression, and the surrounding 2>/dev/null || echo "" pattern silently swallowed the error, making the entire agent-check gate non-functional. Note: pre-commit could not run due to sandbox network restrictions (HTTP 403 fetching git tags). The post-script runs pre-commit authoritatively on the runner. Closes #5422
a0a5969 to
0a74f6f
Compare
waynesun09
left a comment
There was a problem hiding this comment.
Final confirmation squad pass (3 agents: Claude, Claude, Gemini) after rebasing onto main (content moved from AGENTS.md to docs/contributing/shell-scripting.md during main's doc restructure) and applying the in-scope fixes from the prior review round (split() semantics claim corrected, SAFER-example nuance added, severity-rule caveat added).
All technical claims independently re-verified against real yq v4.47.2 / jq 1.7.1 binaries - no remaining inaccuracies. One self-contradiction the fix introduced (bolded "fail-closed" callout directly contradicted by the very next paragraph) was caught and corrected in a follow-up commit. CI is fully green, no conflicts.
The two pre-existing workflow bugs found in .github/workflows/reusable-dispatch.yml (fail-open gate steps predating this PR) remain out of scope per explicit direction - not fixed here, no follow-up issue filed.
|
🤖 Finished Retro · ✅ Success · Started 4:25 PM UTC · Completed 4:35 PM UTC |
Retro: PR #5423 — yq/jq pitfalls and fail-open gate severity guidanceWorkflow: Issue #5422 (retro-filed from PR #4049) → triage (12 min) → code agent → PR #5423 → review → fix → re-review → human approval → merged. Total: ~44 hours, with the automated pipeline (issue → PR) completing in ~12 minutes and the remaining time spent awaiting human review. What went well:
What required rework:
Evidence for existing issues (skipped as proposals):
1 proposal filed targeting the retro agent's causal attribution accuracy when filing issues. Proposals filed |
Summary
Adds two new subsections to the AGENTS.md shell scripting section to address guidance gaps identified in PR #4049, where a jq-only function (
ascii_downcase) was used in a yq expression and the surrounding2>/dev/null || echo ""pattern silently made the agent-check gate non-functional.Changes
downcasevsascii_downcase,upcasevsascii_upcase), instructs agents to verify functions against yq's built-in set, and sets reviewer severity at mediumTesting
make lint-md-linkspasses — no broken markdown links introducedChecklist
!for breaking changes)Closes #5422
Post-script verification
agent/5422-yq-failopen-guidance)129d28b4cf53342aaf871e45cc45845f6a1ab61d..HEAD)