Repository navigation
workflows: Add agent/working label via frontmatter jobs: - #31
Merged
Merged
Conversation
PR #29 implemented this by hand-editing the compiled .lock.yml output directly, which is a dead end: .lock.yml files are regenerated from the .md sources on every `gh aw compile`, so the next recompile of any of these three workflows would silently revert the hand-edit with no error. See #24. gh-aw supports this natively: a custom job in frontmatter that depends on pre_activation (rather than activation) gets automatically threaded into activation's own needs by the compiler, so agent - which already depends on activation - transitively waits for it without any extra wiring. add_working_label uses this to apply the label right after the membership/permission gate passes. remove_working_label depends directly on the same jobs conclusion itself depends on (activation, agent, detection, safe_outputs) with `if: always()`, since gh-aw's compiler unconditionally makes conclusion depend on every other job in the workflow - a custom job that itself needs conclusion would create a needs cycle. Both jobs use plain GitHub Actions steps with the same GitHub App token pattern as merge.yml, not safe-outputs: safe-outputs handlers only run when the agent job succeeds, which can't guarantee the label is removed on agent failure or timeout. Also make add_working_label best-effort (|| true), matching remove_working_label, so a transient labeling failure never blocks the actual agent run. Assisted-by: Claude Sonnet 5 <[email protected]>
This was referenced Jul 30, 2026
Closed
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds an
agent/workinglabel to the issue/PR for the duration of adrafter/fix/review run, applied and removed by dedicated jobs declared
directly in each workflow's frontmatter
jobs:block.This supersedes #29, which implemented the same behavior by hand-editing
the compiled
.lock.ymloutput directly. That's a dead end:.lock.ymlfiles are regenerated from the
.mdsources on everygh aw compile, sothe next recompile of any of these three workflows would have silently
reverted the hand-edit with no error. #29 has been closed in favor of this
PR.
See #24.
How it works
add_working_labeldepends onpre_activation. gh-aw's compilerautomatically threads any custom job with a
pre_activation(rather thanactivation) dependency intoactivation's ownneeds, soagent(which already needs
activation) transitively waits for the label tobe applied first, with no extra wiring needed.
remove_working_labeldepends on the same job setconclusionitselfdepends on (
activation,agent,detection,safe_outputs), withif: always(), so it runs even if the agent job fails or times out. Itcan't depend on
conclusiondirectly — gh-aw's compiler unconditionallymakes
conclusiondepend on every other job in the workflow, so thatwould create a needs cycle.
pattern as
merge.yml, not safe-outputs: safe-outputs handlers only runwhen the agent job succeeds, which can't guarantee the label gets removed
on failure.
Also creates the
agent/workinglabel on the repo and updates the setupchecklist / design-notes section of README.md.
Assisted-by: Claude Sonnet 5 [email protected]