Repository navigation
Pattern miner: Add job-discriminator concurrency tip for mixed schedule/dispatch archetypes - #328
Merged
pelikhan merged 1 commit intoOct 11, 2026
Conversation
…hetypes Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
pelikhan
marked this pull request as ready for review
October 11, 2026 19:39
pelikhan
deleted the
pattern-miner/job-discriminator-tip-efa0c1c1b4833660
branch
October 11, 2026 19:39
Contributor
Author
There was a problem hiding this comment.
Reviewer kind: ponytail (content/documentation perspective) — this PR only touches patterns/archetypes/*.json data files, with no TypeScript/JS or UI code changes, so the "matt-pocock" lens didn't apply.
Reviewed the two additive tips (job-discriminator guidance for repo-maintainer and responsive-docs-tester):
- Both are valid, well-cited JSON edits (correct trailing commas, no structural changes to other fields).
- The recommended
concurrency.job-discriminatorexpression and rationale are accurate and consistent with the archetypes' own recommended triggers (schedule + slash_command / workflow_dispatch). - Wording is clear and actionable for someone authoring a workflow from this archetype.
No blocking issues found — nothing to change here.
Generated by Specialist PR Review for #328 · copilot · auto · 14.4 AIC · ⌖ 4.26 AIC · ⊞ 7.9K
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.
What was mined
Upstream repos mined:
githubnext-agentics(workflows directory) andgithub-gh-aw(.github/aw/docs), perdata/import-sources.json.Recurring pattern:
concurrency.job-discriminator: ${{ github.event_name == 'schedule' && 'scheduled' || github.run_id }}— used on workflows that combine a recurringscheduletrigger with an on-demand trigger (manualworkflow_dispatchinputs orslash_command), so the two trigger paths don't cancel each other's in-flight runs via the compiler's default job-level concurrency group.Evidence (3 upstream workflow files use this exact expression):
/tmp/gh-aw/data/upstream/githubnext-agentics/files/workflows/repo-assist.md(line 42) —schedule+slash_command+workflow_dispatch/tmp/gh-aw/data/upstream/githubnext-agentics/files/workflows/multi-device-docs-tester.md(line 32) —schedule+workflow_dispatchwith typed inputs/tmp/gh-aw/data/upstream/githubnext-agentics/files/workflows/vex-generator.md(line 49) —workflow_dispatchonly, but the same discriminator is applied defensivelyThis is corroborated by explicit upstream documentation describing
job-discriminatoras a gh-aw extension specifically meant to prevent "fan-out cancellations when multiple workflow instances run concurrently with different inputs":/tmp/gh-aw/data/upstream/github-gh-aw/files/.github/aw/syntax-core.md(lines 122-145), which lists${{ github.event_name == 'schedule' && 'scheduled' || github.run_id }}under "Dispatched or scheduled fallback" as a common expression.Why the existing library didn't cover it
I checked
/tmp/gh-aw/data/current-library.jsonand greppedpatterns/forjob-discriminatorandconcurrency— neither term appears anywhere inpatterns/manifest.json,patterns/workflow-generation.json, or anypatterns/archetypes/*.jsonfile before this change. The closest existing tips (pre-activationMAX_OPEN_PRSgating,skip-if-match) address duplicate-output accumulation, not the separate problem of GitHub Actions' default concurrency group cancelling a manually-dispatched or slash-command run because it collides with a scheduled run (or vice versa).What changed
Two small, additive refinements (no new archetype, no structural changes):
patterns/archetypes/repo-maintainer.json: added a tip recommendingjob-discriminatorfor workflows combiningschedule+slash_command/dispatch triggers, matching this archetype's ownrecommended_triggers(reaction,slash_command,schedule) and its direct upstream matchrepo-assist.md.patterns/archetypes/responsive-docs-tester.json: added a tip recommendingjob-discriminatorfor this archetype's direct upstream matchmulti-device-docs-tester.md, which combinesschedulewithworkflow_dispatchinputs.No other fields (
metadata,anti_patterns,trigger_combos,research_findings,degraded_workflows,success_rate,count,top_repos) were touched, and no new archetype file or manifest entry was added.Validation
npm test— 329 tests passed across 19 test files (one harmlessENOENTwarning from the CI step-summary reporter trying to write outside this sandbox; unrelated to the change).npm run build— production build completed successfully (✓ built in 123ms), both modified archetype JSON files compiled intodist/patterns/archetypes/.Candidates deliberately left out
discussion-task-miner.md): only one upstream workflow demonstrates scanning Discussions to extract actionable issues from them, and I found no second corroborating upstream workflow or explicit "recommended pattern" documentation describing discussion-to-issue task extraction as a named pattern (upstream docs only describecreate-discussionas an output type, not scanning discussions as input for task mining). Per the mining process rule requiring at least two upstream examples or one plus explicit supporting documentation, this did not meet the bar for a new archetype.workflow-patterns.mdlines 88-133): already fully captured by the existingbacklog-driparchetype, whose tips match the documented shape (max:1, skip-if-match on stable marker, expires, learn-from-closed-output) almost verbatim.status-comment:boolean/object config: a real, documented feature, but it's a generic cross-cutting default (auto-true forslash_command/label_command) rather than a recurring distinguishing shape tied to any one archetype, so it didn't rank as the single highest-value refinement for this run.code-improvement,documentation-updater, andrepo-maintainer.