Summary
When a bot actor posts a slash command comment with attribution metadata appended after a newline (e.g. /command\n> Generated by ...), the compiled pre_activation job never activates — even if the bot is correctly listed under bots:.
Root Cause
The compiler generates the following activation condition for slash_command:
startsWith(github.event.comment.body, '/command ') # trailing space required
|| github.event.comment.body == '/command' # exact match only
Bot-authored comments routinely append attribution metadata after a newline:
/command
> Generated by [Workflow Name](...)
<!-- gh-aw-agentic-workflow: ... -->
The comment body is /command\n> Generated by.... This satisfies neither condition:
startsWith('/command ') → false (newline, not space, follows the command)
== '/command' → false (body has extra content)
The check_membership step passes (bot is in GH_AW_ALLOWED_BOTS), but check_command_position fails, so activated is never true. The workflow silently skips with no error.
Expected Behavior
A comment whose first line is exactly the slash command should trigger activation, regardless of what follows on subsequent lines. The command-matching logic should strip or ignore everything after the first newline before comparing.
Suggested Fix
In check_command_position.cjs, normalize the body before matching:
const firstLine = body.split('\n')[0].trim();
// then match against firstLine instead of body
Or in the generated if: expression:
startsWith(github.event.comment.body, '/command\n')
|| startsWith(github.event.comment.body, '/command ')
|| github.event.comment.body == '/command'
The cleanest fix is normalizing in check_command_position.cjs so the generated YAML expression doesn't need to enumerate all possible trailing characters.
Reproduction
Create a workflow with slash_command: "command" and bots: [my-bot]
Have my-bot post a comment: /command\n> attribution text
Observe: pre_activation job runs but activated output is false; downstream jobs are skipped
Summary
When a bot actor posts a slash command comment with attribution metadata appended after a newline (e.g. /command\n> Generated by ...), the compiled pre_activation job never activates — even if the bot is correctly listed under bots:.
Root Cause
The compiler generates the following activation condition for slash_command:
Bot-authored comments routinely append attribution metadata after a newline:
The comment body is /command\n> Generated by.... This satisfies neither condition:
The check_membership step passes (bot is in GH_AW_ALLOWED_BOTS), but check_command_position fails, so activated is never true. The workflow silently skips with no error.
Expected Behavior
A comment whose first line is exactly the slash command should trigger activation, regardless of what follows on subsequent lines. The command-matching logic should strip or ignore everything after the first newline before comparing.
Suggested Fix
In check_command_position.cjs, normalize the body before matching:
Or in the generated if: expression:
The cleanest fix is normalizing in check_command_position.cjs so the generated YAML expression doesn't need to enumerate all possible trailing characters.
Reproduction
Create a workflow with slash_command: "command" and bots: [my-bot]
Have my-bot post a comment: /command\n> attribution text
Observe: pre_activation job runs but activated output is false; downstream jobs are skipped