Skip to content

Fix elif syntax error and duplicate permissions block in building-custom-agents guide #524

Description

@guyoron1

What happened

PR #2568 modified docs/guides/user/building-custom-agents.md to add a BYOI section and improve the example agent. The author removed Jira-related code from the pre-script example but left elif without converting it to if, creating an invalid bash script. Separately, the author added issues: write permission as a second top-level permissions: block rather than merging it into the existing one. The fullsend review agent identified both bugs on its third review run (Jun 26, commit d09a978): the elif as a High-severity logic-error and the duplicate permissions: as a Medium-severity internal-inconsistency. Neither was fixed. The PR was merged on Jul 7 by the author after receiving human approval from ifireball (who focused on a design concern about CEL triggers, not the code bugs). Both bugs are confirmed present on main as of Jul 7.

What could go better

The review agent correctly identified both bugs but they were never addressed. Two factors contributed: (1) The findings were posted only as a sticky issue comment, not as a formal GitHub review with CHANGES_REQUESTED, so they had no blocking effect on the merge. (2) There was an 11-day gap between the findings (Jun 26) and the merge (Jul 7), during which the conversation shifted to design concerns about CEL triggers. The author and approving reviewer may not have revisited the review agent's findings before merging. Confidence is high that these are real bugs — the elif is a guaranteed bash syntax error, and the duplicate YAML key silently drops id-token: write.

Proposed change

Fix the two documentation example bugs in docs/guides/user/building-custom-agents.md: (1) Change elif [[ "${ISSUE_SOURCE}" == "github" ]] to if [[ "${ISSUE_SOURCE}" == "github" ]] in the pre-script code block (around line 271). (2) Consolidate the two top-level permissions: blocks (lines 355 and 372) into one containing all three permissions: contents: read, id-token: write, and issues: write. Optionally also remove the now-pointless issue_source workflow input since Jira support was removed from the pre-script.

Validation criteria

After the fix: (1) the pre-script example passes bash -n syntax checking (no elif without preceding if), (2) the workflow YAML example has exactly one top-level permissions: block containing contents: read, id-token: write, and issues: write, (3) a user following the guide end-to-end gets a working agent without hitting syntax or permission errors.


Generated by retro agent from fullsend-ai#2568

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions