Skip to content

PC-0 turns a leading-newline dispatch value into a silent EMPTY_DISPATCH halt #1835

Closed

Description

@bradygaster

Follow-up nit from FIDO's pass-3 review of #1832 (merged). Filed rather than fixed in-PR because the review verdict was APPROVE/merge-as-is and the path is not reachable from either real producer.

Measured

workflows/squad.md, Step PC-0, normalizes the dispatched command with an awk program gated on NR==1:

printf '%s\n' "$SQUAD_DISPATCH_COMMAND" | awk 'NR==1{sub(/\r$/,""); sub(/^[[:space:]]+/,""); sub(/[[:space:]]+$/,""); if($0==""){print "EMPTY_DISPATCH"; exit} if($0 ~ /^\/squad([[:space:]]|$)/) print; else print "/squad " $0}'

Because the program only ever inspects record 1, a value whose first character is a newline puts an empty string on that record:

PC0($'\nimplement')  →  EMPTY_DISPATCH

EMPTY_DISPATCH routes to the activation guard, which halts with a ::warning:: and no comment — by design, so that empty activation probes stay side-effect free (PR #1777, junk issues #12/#14). So a structurally valid implement dispatch would halt silently rather than run.

Silent-halt-on-valid-input is the same defect class #1824 and #1832 exist to close.

Why this is a nit and not a defect

FIDO enumerated the producers that can reach PC-0:

  1. workflows/squad-implement-worker.md:259 — relays a literal single-token value ("command": "implement").
  2. The workflow_dispatch UI input — single-line by schema.

Neither can emit a leading newline. Reaching this requires a crafted actions: write API payload, and an actor holding actions: write has strictly larger capabilities available already. FIDO marked the mechanism real but unreachable, and untested.

Suggested fix

Scan the first non-empty line instead of record 1, so leading blank lines are skipped rather than treated as an empty command. Keep EMPTY_DISPATCH for genuinely empty/whitespace-only input.

Add a test alongside the existing PC-0 cases in test/gh-aw-command-parse.test.ts. Per the standing bar, the test must be mutation-proven capable of failing, and its failure message must name the offending input — a status-only assertion would pass a truncating parser.

Acceptance

  1. PC0($'\nimplement') yields /squad implement.
  2. PC0('') and PC0(' ') still yield EMPTY_DISPATCH.
  3. Reverting the fix turns the new test red, and the failure text names the input.
  4. Existing PC-0 cases (idempotent prefix, whitespace trim, empty dispatch) stay green, and the load-bearing PC-1 cases (indented, mid-sentence) are untouched.

Source: FIDO pass-3, probe A — https://github.com/bradygaster/squad/pull/1832#issuecomment-5383877533

Activity

  1. added
    bugSomething isn't working
    gh-awGitHub Agentic Workflows integration
    on Aug 23, 2026
  2. added a commit that references this issue on Aug 23, 2026
    3cb7dcb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggh-awGitHub Agentic Workflows integration

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions