Repository navigation
chore: sync 3 org-standard workflow stub(s) from petry-projects/.github #517
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
c400236
chore: sync 3 org-standard workflow stub(s) from petry-projects/.github
don-petry 36e4105
chore: sync 3 org-standard workflow stub(s) from petry-projects/.github
don-petry a57a36b
fix(bot): suppress SonarCloud dynamic code execution warning on pinne…
don-petry feb7378
fix(bot): move S6290 NOSONAR marker to bash invocation line
don-petry 91a275f
fix(bot): move S6290 NOSONAR marker to separate line for proper backs…
don-petry c8e0896
fix(bot): correct NOSONAR marker format to standard syntax
don-petry a9ab686
fix(reviews): pass issue labels to rate-limit gate via --labels
don-petry 6e1e7c2
Merge branch 'main' into standards-sync/workflows-20261005
don-petry File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,66 @@ | ||
| # ───────────────────────────────────────────────────────────────────────────── | ||
| # SOURCE OF TRUTH: petry-projects/.github/standards/workflows/persona-mention.yml | ||
| # Standard: petry-projects/.github/standards/persona-standards.md (§4.1) | ||
| # Reusable: petry-projects/.github/.github/workflows/persona-mention-reusable.yml | ||
| # | ||
| # AGENTS — READ BEFORE EDITING: | ||
| # • This file is a THIN CALLER STUB. All routing logic lives in the reusable | ||
| # workflow above, and every per-persona decision lives in that persona's | ||
| # manifest — not here and not in the reusable. | ||
| # • You MUST NOT change: the `uses:` ref — it is pinned to the | ||
| # `persona-mention/v1-stable` channel, a moving tag advanced centrally. | ||
| # Never repoint it to `@main`, a SHA, or a frozen `@vX.Y.Z` (see | ||
| # ci-standards.md → Reusable workflow versioning). Also do not change the | ||
| # trigger events or the job-level `permissions:` block — reusable workflows | ||
| # can be granted no more permissions than the calling job, so removing the | ||
| # stanza breaks the reusable's gh API calls. | ||
| # • Do NOT add a per-persona stub. ONE router serves every persona (§4.1); | ||
| # a stub per agent is the drift the manifest exists to prevent. | ||
| # • If you need different behaviour, open a PR against the reusable in the | ||
| # central repo. A new release is rolled out by moving the channel tag | ||
| # centrally — never by editing callers, so no fanout PR is needed. | ||
| # ───────────────────────────────────────────────────────────────────────────── | ||
| # | ||
| # Persona Mention Router — thin caller for the org-level reusable. | ||
| # | ||
| # Adopting this file makes every persona that enables the `mention` surface | ||
| # addressable in this repo as `@petry-projects/<role>` — e.g. | ||
| # | ||
| # @petry-projects/qa-lead please assess test risk on this PR | ||
| # | ||
| # The handle is an org TEAM, never a user account: '@qa-lead' is a real GitHub | ||
| # account owned by an unrelated person (§4.1). | ||
| # | ||
| # To adopt: copy this file to .github/workflows/persona-mention.yml in your repo. | ||
| # Requires: GH_PAT_WORKFLOWS org secret (already present in petry-projects org). | ||
| name: Persona — Mention Router | ||
|
|
||
| on: | ||
| # issue_comment covers BOTH issues and PR conversation comments. | ||
| issue_comment: | ||
| types: [created] | ||
| pull_request_review_comment: | ||
| types: [created] | ||
| # Discussions cannot run an agent inline (#571) — but this router only parses | ||
| # and dispatches, and the agent itself runs on the resulting | ||
| # repository_dispatch, which is exactly the bridge the manifest declares. | ||
| discussion_comment: | ||
| types: [created] | ||
| # NOTE: reviewer assignment (pull_request/review_requested) is NOT subscribed | ||
| # here yet, even though §4 says "Reviewer-assignment counts here too". The | ||
| # router has no path for it, and a trigger that fires into a router which | ||
| # ignores it is a dead trigger that only burns runs. Tracked as finding 10 in | ||
| # petry-projects/.github#755; the trigger lands with the routing, not before. | ||
|
|
||
| permissions: {} | ||
|
|
||
| jobs: | ||
| persona-mention: | ||
| permissions: | ||
| contents: read # the reusable checks out its tooling repo — required, | ||
| # or the call fails at startup (a reusable is granted | ||
| # no more than the caller; persona-standards.md §5) | ||
| issues: read | ||
| pull-requests: read | ||
| uses: petry-projects/.github/.github/workflows/persona-mention-reusable.yml@persona-mention/v1-stable # NOSONAR(S7637) first-party channel ref | ||
| secrets: inherit # NOSONAR(S7635) org secrets are scoped to first-party reusables |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift
Count successful dispatches, not gate attempts.
When this workflow runs,
--workflow initiative-driver.ymlmakes the gate count prior runs of this caller. The gate counts those runs even when they ended indeferand never dispatched the central driver. Its 10-minute cooldown can therefore restart after each deferred run. Its 20-dispatch daily budget can also fill with attempts rather than dispatches. Under sustained issue activity, the gate can keep deferring work that remains below the intended dispatch limit. Record or query accepted dispatches separately from gate attempts; coordinate that contract with the pinned gate before deploying this caller. (raw.githubusercontent.com)🤖 Prompt for AI Agents
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Valid, but deferring — out of scope for this PR: fixing it requires changing the gate's accounting contract in petry-projects/.github (agent-rate-limit-gate.sh) and coordinating a new pinned SHA; the caller stub cannot change it alone. Tracked in #519.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@don-petryUnderstood. The upstream accounting change and coordinated SHA update are deferred to#519. No caller-only change is needed in this PR. The finding remains open because the fix is deferred.You are interacting with an AI system.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a valid concern about the gate's accounting model. The current design intentionally counts runs of this caller (per the code comment: "derives... counters from this stub'''s own run history"), but this causes the daily budget to fill with deferred attempts rather than successful dispatches.
Fixing this requires updating the gate script to track dispatches separately from attempts, which is outside this PR'''s scope — the gate is pinned and maintained in
petry-projects/.github.Deferred to #519 for escalation to the upstream gate maintainers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@don-petryThanks for clarifying. The fix is deferred to#519for the upstream gate maintainers. It requires a gate accounting change and a coordinated pinned SHA update, not a caller-only change in this PR. The finding remains open.✏️ Learnings added
You are interacting with an AI system.