Repository navigation
fix(agent-ingress): pin ci-failure-analyst to v1-stable; fix the analyst loop guard - #523
Conversation
…fix the analyst loop guard Two defects carried over unchanged from the pre-collapse ci-failure-analyst stub: - The job pinned the reusable to a bare commit SHA (b5851027), so channel promotions and rollbacks never reached markets (org pinning standard, combsmith/.github-private#2176). It now pins @ci-failure-analyst/v1-stable, like the other four roles pin their channels. The reusable at v1-stable (cc0bc61) has the same interface (the single required CLAUDE_CODE_OAUTH_TOKEN secret, job `analyze`) and the same steps; the only difference is a workflow-level permissions block that this job already grants. - The loop guard excluded check runs starting 'CI Failure Analyst', but the analyst's own check run is 'ci-failure-analyst / analyze', so a failed analyst run would re-trigger the analyst (combsmith/.github-private#2175). The guard now matches 'ci-failure-analyst'. The canonical template (petry-projects/.github standards/workflows/agent-ingress.yml) gets the same block in the same window. Refs combsmith/.github-private#1729 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Muchy4bnEhyVEnd89TUtjj
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to The analyst workflow now uses the stable channel and configured self-check prefix. The channel is compatible; the emitted check name remains unverified, but no concrete failure is established to block merging. Pre-merge checks |
|
|
There was a problem hiding this comment.
Code Review
This pull request updates the ci-failure-analyst workflow pin to use a stable channel instead of a bare SHA, adjusts the loop guard check run name matching logic, and adds two new BATS tests to verify these behaviors. The review feedback suggests refactoring the newly added BATS test to use the run helper instead of a bare command-substitution assignment when extracting the prefix, ensuring any command failures are caught immediately.
Dev-Lead — waiting on PR blockers (intent: review-changes)PR: #523 |
|
Note @don-petry I reviewed this PR and no code changes were needed, but I can't mark it done yet: required check |
CodeAnt PR Risk: Medium Risk
Assessed commit: |
The analyst's check runs are named `ci-failure-analyst / …`, so the `!startsWith(check_run.name, 'CI Failure Analyst')` guard never matched and a failed analyst run could re-trigger the analyst. Match the real prefix. With this, the ci-failure-analyst block is identical to combsmith/markets#523 (block SHA 4368213c), which pins the same v1-stable channel ref. Refs combsmith/.github-private#1729, combsmith/.github-private#2175 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01B3euCoLvC3YmanzKoc4hox
|
The channel ref to ci-failure-analyst/v1-stable is intentional per CLAUDE.md: first-party channel tags are mutable refs and serve as the release/rollback mechanism. This follows the org's standard documented in AGENTS.md and is required for channel promotions to reach this repository without re-cutting the PR. |
…-auto-review, pr-review, ci-failure-analyst) (#1316) * fix(standards): sync agent-ingress template job blocks to markets Replace the pr-auto-review, pr-review and ci-failure-analyst job blocks in standards/workflows/agent-ingress.yml with the blocks deployed in petry-projects/markets main (62587ec), byte for byte, so the Fleet Monitor's per-job block hashes align. Header, on:, permissions:, the dev-lead and pr-review-mention jobs, and inter-job comments are unchanged. Refs combsmith/.github-private#1729 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01B3euCoLvC3YmanzKoc4hox * fix(bot): restore ci-failure-analyst to moving channel tag Reverted the bare SHA pin that blocked channel promotions/rollbacks. Per ci-standards.md, first-party reusable workflows must use moving channel tags (e.g. @ci-failure-analyst/v1-stable) to enable the release/rollback mechanism. The bare SHA pin violated this requirement and prevented the org's coordinated channel promotions from reaching this workflow. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com> * Revert "fix(bot): restore ci-failure-analyst to moving channel tag" This reverts commit 2c0fee3. The template's ci-failure-analyst block must stay byte-identical to markets' live agent-ingress.yml (AC11). ci-failure-analyst/v1-stable has been frozen at v1.0.0 since July (.github#1270), so the template mirrors markets' deployed bare SHA until both move together. Refs combsmith/.github-private#1729 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01B3euCoLvC3YmanzKoc4hox * fix(standards): pin ci-failure-analyst to its release channel Per the org pinning standard, first-party reusables are always pinned to a release channel, never a bare SHA. Restore @ci-failure-analyst/v1-stable with the NOSONAR(githubactions:S7637) marker, so the line is covered by the vform-pins guard again. The ci-failure-analyst block no longer matches markets' live file; markets needs the same one-line change to restore parity. Refs combsmith/.github-private#1729 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01B3euCoLvC3YmanzKoc4hox * fix(standards): ci-failure-analyst loop guard matches its own check name The analyst's check runs are named `ci-failure-analyst / …`, so the `!startsWith(check_run.name, 'CI Failure Analyst')` guard never matched and a failed analyst run could re-trigger the analyst. Match the real prefix. With this, the ci-failure-analyst block is identical to combsmith/markets#523 (block SHA 4368213c), which pins the same v1-stable channel ref. Refs combsmith/.github-private#1729, combsmith/.github-private#2175 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01B3euCoLvC3YmanzKoc4hox --------- Co-authored-by: Claude <noreply@anthropic.com>



What
Two defects in the
ci-failure-analystjob of.github/workflows/agent-ingress.yml. Both were carried over unchanged from the pre-collapse stub when markets#513 collapsed the roles:@b58510275dd1… # DEFECTIVE PINbecomes@ci-failure-analyst/v1-stable # NOSONAR(githubactions:S7637) first-party channel ref, matching how the other four roles pin their channels (markets ingress pins ci-failure-analyst by bare commit SHA (DEFECTIVE PIN): move it to a channel once stable is no longer frozen .github-private#2176).ci-failure-analyst/v1-stable(cc0bc61) has the same interface: the single required secretCLAUDE_CODE_OAUTH_TOKENand jobanalyze.b585102is a workflow-levelpermissions:block, which this job already grants.!startsWith(check_run.name, 'CI Failure Analyst')becomes'ci-failure-analyst'. The analyst's own check run is namedci-failure-analyst / analyze, so the old guard never matched, and a failed analyst run would re-trigger the analyst (ci-failure-analyst caller: the self-exclusion guard never matches a real check name, and no-PR failures still start the analyst .github-private#2175).Checks
scripts/validate-ingress-if.sh(from .github-private): OK.scripts/validate-caller-inputs.sh: OK.ci-failure-analyst@v1-stableresolves and its concurrency group does not collide with the reusable's..github/scripts/tests/agent-ingress-workflow.bats: the two assertions that encoded the old values are updated. Two tests are added: one checks the guard prefix matches the real check name, and one checks the pin is the channel and carries noDEFECTIVE PINmarker.dev-lead,pr-auto-review,pr-reviewandpr-review-mentionare unchanged.ci-failure-analystis now4368213cf1825f4ff9c936b2a9340e95805a1acf. The canonical template in fix(standards): sync agent-ingress template job blocks to markets (pr-auto-review, pr-review, ci-failure-analyst) .github#1316 gets the identical block in the same window, so the Fleet Monitor classifies all five roles ALIGNED.Refs combsmith/.github-private#1729, combsmith/.github-private#2176, combsmith/.github-private#2175
🤖 Generated with Claude Code
https://claude.ai/code/session_01Muchy4bnEhyVEnd89TUtjj
Generated by Claude Code
Problem
See the linked issue.
Risk
Medium — changes GitHub Actions workflow behavior, which is exercised only post-merge; verify via the affected workflow runs.
Test plan
Tests added/updated:
.github/scripts/tests/agent-ingress-workflow.bats. Verification:bash scripts/dev-lead-lint.sh(shellcheck --severity=warning) ran pre-commit; the bats suite runs in CI.Rollback
Revert this PR. No non-revertible side effects (no tags, migrations, or external state).
Monitoring
Watch the affected workflow run(s) in the Actions tab and this PR's Lint check for regressions.
Summary by CodeRabbit