Repository navigation
[ADR-0007] Collapse per-role Class-1 stubs into agent-ingress.yml (pilot) #506
Description
Implements ADR-0007 for this repo: collapse the 5 event-driven Class-1 agentic caller stubs into a single .github/workflows/agent-ingress.yml.
This repo is the decided pilot for the collapse (epic combsmith/.github-private#1723, story combsmith/.github-private#1729).
Collapse package — source of truth, already merged to main in .github-private:
docs/initiatives/agent-ingress-collapse-markets.md
It contains the exact agent-ingress.yml content (§3), the if: predicate provenance per job (§3a), the enumerated eligible set with justified carve-outs (§2), the old→new required-check name mapping and rollback for both half-landed states (§8), and the run-count baseline (§1).
⛔ Do not start yet — one prerequisite is open
The §4 job-level concurrency: ruling must be ACCEPTED first. The rendered ingress in §3 uses job-level concurrency: blocks, which ADR-0007's enumerated schema does not list. The Solution Architect ruled that the enumeration is exhaustive (an allowlist), so this requires its own ADR rather than an interpretation:
- ADR-0007 schema ruling: is job-level
concurrency:permitted in agent-ingress.yml? .github-private#2001 — the ruling - ADR-0010: permit job-level
concurrency:in agent-ingress.yml (bounded), and record that the enumerated schema is exhaustive .github-private#2002 — authors ADR-0010 (proposed; human acceptance is the gate)
Until ADR-0010 is accepted, §3's content may change. Starting now risks building against a schema reading that does not survive.
Do this (once ADR-0010 is accepted)
- ADD
.github/workflows/agent-ingress.ymlwith the exact content in §3 of the package. - DELETE the 5 per-role stubs:
dev-lead.yml,pr-auto-review.yml,pr-review.yml,pr-review-mention.yml,ci-failure-analyst.yml. - Both changes in ONE commit / ONE PR (§8b) — a half-landed state is the risk this story is shaped to avoid.
Before you merge (§8a gate)
- Re-read the branch ruleset and confirm none of the 5 roles is a required check. As of 2026-09-29 none is (§6). If one has become required, apply the atomic ruleset rename in §8d in the same PR.
- Run the
if:-as-event-filter linter ([Phase 2] Make caller_stub_freeze and validate-caller-inputs ingress-aware (job-scoped freeze + if:-as-event-filter check) .github-private#1725) overagent-ingress.yml— every jobif:must be a pure event filter (§3a). - Confirm ADR-0010 is accepted, and that §3's concurrency blocks satisfy its collision rule: each
groupcarries the role-name prefix and does not match any group declared by that role's pinned reusable.dev-leadcentralizes concurrency inside its reusable, so this is a live case, not hypothetical. - Keep the 6 carve-out stubs (§2b) and both required-gate stubs (§2c) untouched.
Evidence required before this issue may close
- One observed post-collapse run per collapsed role, linked here ([Phase 3] Collapse the first repo's Class-1 event-driven stubs into agent-ingress.yml and rename the required checks .github-private#1729 AC7). Static validator green proves the file parses and the pins resolve — it does not prove a role still fires, which is what the epic's success metric demands.
- A fleet-monitor run in which each collapsed role classifies
ALIGNEDby job block, notMISSING(#1729 AC11c). This depends on the canonicalagent-ingress.ymltemplate being published underpetry-projects/.githubstandards/workflows/and theSTUB_REGISTRYrows being activated — both prepared in §9a/§9b but not yet applied.
Known follow-ups — do NOT bundle into this PR (§5)
pr-review.ymlpins@pr-review/stable, a deprecated bare-tier channel (a pin-contract failure independent of staleness). Repoint topr-review/v<MAJOR>-stableonce published; do not pin the immutable release directly, which bypasses staged promotion.ci-failure-analyst.ymlpins a bare SHA and therefore receives no promotions. Repoint to a movingci-failure-analyst/v<MAJOR>-stablechannel.
Both are preserved as-is in §3 for behaviour parity in the pilot and flagged inline with # DEFECTIVE PIN.
Maintainer update (2026-10-07) — read before continuing on PR #513
Do exactly these, in this order. Everything else on the PR is settled.
- Resolve the merge conflict by MERGING main (
git merge origin/main, not a rebase; a depth-1 checkout cannot rebase this branch).mainchanged.github/workflows/ci-failure-analyst.yml(a Dependabot pin bump, e390f85) while this PR deletes it. Resolve by DELETING that stub. - Carry the Dependabot bump into the ingress. In
agent-ingress.yml, set theci-failure-analystjob'suses:to...ci-failure-analyst-reusable.yml@b58510275dd1cbbd13c0733c15265d51fd63b992(whatmainnow pins), keeping the# DEFECTIVE PIN — bare SHA, see §5note. Both pinned reusables declare no concurrency, so the ADR-0010 collision rule is unaffected. Make no other change to the ingress content. It is byte-identical to the ratified §3 in petry-projects/.github-private (merged in #2039), and the collapse must be behavior-equivalent to the deleted stubs. - Do NOT change any job
if:or concurrency block, including theci-failure-analystself-exclusion and the no-PR check-run handling. Verified: the analyst's check run is namedanalyze, so the original guard never matched; this is pre-existing, tracked in Follow-ups from #2004 / PR #2051 and the markets ingress pilot (verifier region check, phantom Fixed replies, dispatch cancellation, dry-run slot) .github-private#2068. Decline those review threads. - Accept these test/workflow fixes (they are valid): in
.github/scripts/tests/agent-ingress-workflow.batsreplace bare$(yq ...)assignments withrun yq ...plus$statusassertions (an empty result must not pass a negative-only assertion) andprintf '%s\n'; tighten thepr-review-mention-workflow.batsif:assertion so the&&linking the subscription group to the Bot-sender guard is actually checked; addagent-ingress.ymlto thepathslists inshell-tests.yml. Because these edit tests already on this branch, the commit MUST carry aTest-Change-Justification:trailer (the #2013 test-tamper guard refused to push the previous attempt, so the work was stranded locally). - PR body: replace the bare
Closes #506withRefs #506andRefs petry-projects/.github-private#1729, and add the §8a evidence: the ruleset read at PR time (requires exactly CodeQL, SonarCloud, agent-shield / AgentShield, dependency-audit / Detect ecosystems, none of the five collapsing roles); the six §2b carve-out files unchanged; and the real output ofscripts/validate-ingress-if.shandscripts/validate-caller-inputs.sh(fetch from petry-projects/.github-private main) run on this PR'sagent-ingress.yml. Do not claim they passed without running them. pr-review / reviewis the renamed, NON-required check (package §6); it is not a merge blocker unless it fails for a real reason in this PR.
Maintainer update 2 (2026-10-09 22:30Z) — REVERT commit e4544ef
Commit e4544ef ("restore per-run grouping for check_suite and workflow_run", made while handling CodeAnt's PR-risk summary) is wrong and must be reverted. It puts the pr-auto-review job's concurrency: back to its pre-ADR shape: a github.run_id fallback and an expression for cancel-in-progress. ADR-0010 (accepted, combsmith/.github-private#2036) FORBIDS both: no run_id, and cancel-in-progress must be a literal boolean. It also fails this PR's own bats (.github/scripts) and pr-auto-review / check-and-dispatch checks.
Do exactly this:
- Revert
e4544efsoagent-ingress.ymlis again identical to the ratified package §3 (petry-projects/.github-privatedocs/initiatives/agent-ingress-collapse-markets.md) except the singleci-failure-analystuses:SHA (@b58510275dd1cbbd13c0733c15265d51fd63b992). Thepr-auto-reviewgroup ispr-auto-review-ready-check-${{ ...pr-N or sha-<head_sha> }}with literalcancel-in-progress: true. Do not change anyconcurrency:block orif:again. - Disposition CodeAnt's PR-risk summary comment (
IC_kwDORntvTc8AAAABZizhfA) asinvalid, with this reasoning: its concern is the head-SHA grouping forcheck_suite/workflow_runand the sharedpr-review-enumerateslot, which is the ratified ADR-0010 / package §4b design. The deleted stub'srun_idfallback is forbidden by ADR-0010. A reviewer-bot summary is NOT a change request. Do not edit the workflow to satisfy it. - Do the same for any bot summary (CodeRabbit, CodeAnt, cubic) that raises the concurrency groups, the
ci-failure-analystif:guard, or no-PR handling: those are all decided and tracked in Follow-ups from #2004 / PR #2051 and the markets ingress pilot (verifier region check, phantom Fixed replies, dispatch cancellation, dry-run slot) .github-private#2068. Dispositioninvalid/out-of-scope; never edit the ingress for them.
Activity
don-petry commentedon Oct 4, 2026
Dev-Lead Implementation Plan
Issue: #506 — [ADR-0007] Collapse per-role Class-1 stubs into agent-ingress.yml (pilot)
Prerequisite check
accepted. It was authored in feat: implement issue #2002 — ADR-0010: permit job-levelconcurrency:in agent-ingress.yml (bounded), and record that the enumerated schema is exhaustive .github-private#2010 and the maintainer flipped it to accepted in #2036 (issue #2035). The collapse package §3 was re-rendered to the ADR-0010 bounds afterwards in #2038 (commit0fff56d9). This PR uses that latest §3.mainruleset currently requires onlyCodeQL,SonarCloud,agent-shield / AgentShieldanddependency-audit / Detect ecosystems. None of the 5 roles is required, so the §8d atomic rename does not apply.Scope
Add
.github/workflows/agent-ingress.ymlwith the exact package §3 content and delete the 5 per-role stubs, both in one commit (§8b).Implementation Checklist
.github/workflows/agent-ingress.yml(verbatim package §3)dev-lead.yml,pr-auto-review.yml,pr-review.yml,pr-review-mention.yml,ci-failure-analyst.yml.github/scripts/tests/pr-review-mention-workflow.bats. It currently asserts against the deletedpr-review-mention.yml. The same [Fleet Monitor] petry-projects/markets — .github/workflows/pr-review-mention.yml #307 guards (Bot-sender skip, v2-stable pin, triggers,pull-requests: write) will now be asserted against thepr-review-mentionjob inagent-ingress.yml.Tests to Write
.github/scripts/tests/agent-ingress-workflow.bats, checking:permissions: {}uses:pin and anif:cancel-in-progresspr-reviewfallback isenumerate, notbatchpr-review-mention-workflow.bats(see above)validate-ingress-if.shandvalidate-caller-inputs.shguards overagent-ingress.ymlTest Command
bats .github/scripts/tests/*.batsplusbash .dev-lead/scripts/dev-lead-lint.shOut of scope (§5 follow-ups, not bundled)
pr-review/stablebare-tier pinci-failure-analystbare-SHA pindon-petry commentedon Oct 4, 2026
Dev-Lead: Progress (in progress — not yet durable)
Plan execution (intended)
.github/workflows/agent-ingress.yml. It is a verbatim copy of package §3, post-#2038 re-render, and I diffed it to confirm the bytes are identical.dev-lead.yml,pr-auto-review.yml,pr-review.yml,pr-review-mention.ymlandci-failure-analyst.ymlin the same change..github/scripts/tests/pr-review-mention-workflow.batsto the ingresspr-review-mentionjob. The [Fleet Monitor] petry-projects/markets — .github/workflows/pr-review-mention.yml #307 guards are kept and tightened slightly..github/scripts/tests/agent-ingress-workflow.bats. It checks the collapse shape, pin parity, the trigger union, that the carve-outs are still present, and the ADR-0010 concurrency bounds, including thatpr-reviewfalls back toenumerateand notbatch.§8a gate, run locally (provisional)
mainrequiresCodeQL,SonarCloud,agent-shield / AgentShieldanddependency-audit / Detect ecosystems. None of the 5 roles is required, so §8d does not apply.accepted(.github-private#2036).validate-ingress-if.shwas run against the frozen rulings TSV. Output:OK — … pure event-filter if: and bounded concurrency.validate-caller-inputs.shwas run with each reusable fetched at its exact pinned ref. It reports no forwarded-input violation and no concurrency-group collision for any of the 5 jobs. That includesdev-lead, which declares no caller group.Notes
sonar-project.properties: still has S7637resourceKeyentries for the deleteddev-lead.ymlandpr-auto-review.yml, plus an entry forpr-review-mention.yml. They match nothing now, so they do no harm. The ingress carries an inlineNOSONAR(githubactions:S7637)marker on each channel-pinneduses:. I left this file alone to keep the PR to the §8b scope. Prune the entries in a follow-up.dependabot-rebase.ymlas apull_request_targetrole. The live file actually triggers onpush,scheduleandworkflow_dispatch. It is still ineligible for the ingress and stays untouched, but the package's stated reason for the carve-out is stale.pr-auto-reviewnon-PR events now share one slot per head SHA.pr-reviewsweeps with no PR now share thepr-review-enumerateslot, so a later sweep cancels an earlier one.pr-review/stableand bare-SHAci-failure-analystpins are preserved and marked# DEFECTIVE PIN.STUB_REGISTRYrows (§9a).don-petry commentedon Oct 4, 2026
Dev-Lead: Implementation Complete — PR #513
The implementation for issue #506 is durable: commits are pushed and a pull request is open. This record is backed by verifiable artifacts you can confirm in one click.
624e3414374cf870aa6a93b2614cd79fc1cf7de6main: 8 file(s), +331/-333 linesReview happens on the PR. Acceptance criteria and test results are evidenced by the PR's diff and CI checks — not asserted here. If a later stage fails, this claim is retracted in place.
fix(reviews): carry main's Dependabot pin bump into ci-failure-analys…
feat: implement issue #506 — [ADR-0007] Collapse per-role Class-1 stu…
fix(reviews): carry main's Dependabot pin bump into ci-failure-analys…
feat: implement issue #506 — [ADR-0007] Collapse per-role Class-1 stu…
don-petry commentedon Oct 10, 2026
AC7 progress: first live runs of the collapsed ingress (observed 2026-10-10, within minutes of the merge of #513)
agent-ingress.ymlis live onmain(merged file is byte-identical to the one validated before merge). 29Agent Ingressruns occurred in the first minutes (events:issue_comment,pull_request_review,repository_dispatch,check_run,check_suite). "Run succeeded" is not enough evidence on its own, since a skipped job also counts, so this counts only jobs that actually executed (conclusion success or failure), per role:dev-leaddev-lead / dispatch, eventissue_commentpr-auto-reviewpr-auto-review / check-and-dispatch, eventpull_request_reviewpr-reviewpr-review / review, eventcheck_suitepr-review-mention@donpetry-botmention or a review request)ci-failure-analystThe one failure is
dev-lead / dispatchat step "Run rebase" (run 38012532951, eventissue_comment, on the #517 sync PR): the dev-lead rebase path through the shared reusable, not something the collapse introduced.AC7 is therefore 3 of 5. Still to observe:
pr-review-mention(any owner@donpetry-botmention on a markets PR) andci-failure-analyst(any failing check run on a markets PR). Observing those two closes AC7. Skip/execute counts also give the AC10 kind-(a) skip data once there is more traffic.don-petry commentedon Oct 10, 2026
AC7: observed execution per collapsed role on
agent-ingress.yml(final: 4 of 5 executed, 1 accepted unobserved)Only jobs that executed (conclusion
success/failure) count. A role whose inner job was skipped does not.dev-leaddev-lead / dispatch(issue_comment, 2026-10-10 01:16Z)pr-auto-reviewpr-auto-review / check-and-dispatch(workflow_run, 01:16Z)pr-reviewpr-review / review(check_suite, 01:18Z)pr-review-mentionpr-review-mention / handle-mention(pull_request: review_requestedfordonpetry-boton #517, 09:54Z)ci-failure-analystcheck_runevents it gets are third-party check failures. GitHub Actions' own check runs deliver none (combsmith/.github-private#2235). No third-party check failed on markets from 2026-10-10T01:16Z to 2026-10-14T02:45Z, so it billed 0 jobs. Its trigger and self-exclusion guard (#523,9310b6e) are verified by.github/scripts/tests/agent-ingress-workflow.bats.Counts for the first 59 ingress runs (01:16Z to 07:04Z), by caller job:
dev-leadexecuted 21 times.pr-auto-reviewexecuted 17 times.pr-reviewexecuted 3 times.pr-review-mentionrouted 19 times; its innerhandle-mentionskipped each time, because none of those comments mentioned the bot.Final, 2026-10-14. The maintainer finalized the pilot on this evidence (combsmith/.github-private#1729). The first live
ci-failure-analystrun on markets depends on #2235 (aworkflow_runtrigger) shipping throughci-failure-analyst/v1-stable.Generated by Claude Code
don-petry commentedon Oct 12, 2026
Drift monitoring now covers this repo's collapsed ingress. Fleet Monitor classifies all five roles in
.github/workflows/agent-ingress.yml(main at9310b6e, after #523) as ALIGNED with the canonical template petry-projects/.githubstandards/workflows/agent-ingress.yml(452ea69). Run: https://github.com/petry-projects/.github-private/actions/runs/38193525415. The full evidence is on combsmith/.github-private#1729.Remediation is pointed at that template. It will therefore preserve this repo's current blocks, including the
ci-failure-analyst/v1-stablepin and the corrected self-exclusion guard from #523, and will not revert them. Any future change to a job block here must land in the template in the same window.AC7 is still 4/5.
ci-failure-analysthas not executed since #523, because no check run has failed on this repo yet.Generated by Claude Code
don-petry commentedon Oct 14, 2026
The pilot is finalized. All acceptance criteria are met, except ci-failure-analyst's live run, which the maintainer accepted unobserved (see the final AC7 evidence above). The full verdict and the measured cost are on combsmith/.github-private#1729 (closed). Closing this companion issue.
Generated by Claude Code