Skip to content

fix(agent-ingress): pin ci-failure-analyst to v1-stable; fix the analyst loop guard - #523

Merged
don-petry merged 1 commit into
mainfrom
claude/cfa-v1-stable-pin
Oct 12, 2026
Merged

don-petry merged 1 commit into
mainfrom
claude/cfa-v1-stable-pin

Conversation

@don-petry

@don-petry don-petry commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

What

Two defects in the ci-failure-analyst job of .github/workflows/agent-ingress.yml. Both were carried over unchanged from the pre-collapse stub when markets#513 collapsed the roles:

  1. Bare-SHA pin to channel. @b58510275dd1… # DEFECTIVE PIN becomes @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).
    • The reusable at ci-failure-analyst/v1-stable (cc0bc61) has the same interface: the single required secret CLAUDE_CODE_OAUTH_TOKEN and job analyze.
    • It runs the same steps and loads no external prompts or scripts.
    • Its only difference from b585102 is a workflow-level permissions: block, which this job already grants.
  2. Loop guard. !startsWith(check_run.name, 'CI Failure Analyst') becomes 'ci-failure-analyst'. The analyst's own check run is named ci-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-stable resolves 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 no DEFECTIVE PIN marker.
  • Job-block SHAs: dev-lead, pr-auto-review, pr-review and pr-review-mention are unchanged. ci-failure-analyst is now 4368213cf1825f4ff9c936b2a9340e95805a1acf. 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

View guided diff Turn on auto-fix

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

  • Chores
    • Updated the CI failure analyst workflow to use its stable release channel and consistently recognize its check-run names.
    • Added checks to verify the workflow’s channel and check-run matching.

…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
@don-petry
don-petry requested a review from a team as a code owner October 12, 2026 01:36
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-12T01:38:08.492351Z dd038b3 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: petry-projects/markets/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f39daa26-91cb-482b-a66d-b470b69fa211


📥 Commits

Reviewing files that changed from the base of the PR and between 3d2db7e and dd038b3.



📒 Files selected for processing (2)
  • .github/scripts/tests/agent-ingress-workflow.bats
  • .github/workflows/agent-ingress.yml


Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.




📝 Walkthrough
📝 Walkthrough

Walkthrough

The CI-failure-analyst job now uses a lowercase check-run prefix and the v1-stable reusable-workflow reference. Workflow tests assert the updated guard and reference.

Changes

Agent ingress analyst workflow

Layer / File(s) Summary
Update analyst workflow guard and reference
.github/workflows/agent-ingress.yml, .github/scripts/tests/agent-ingress-workflow.bats
The job excludes check runs with the ci-failure-analyst prefix and uses the ci-failure-analyst/v1-stable reference. Tests assert both values.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix



Merge Risk: ⚪ Minimal · up to dd038

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 | Passed 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes both primary changes: pinning ci-failure-analyst to v1-stable and correcting the analyst loop guard.

✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR



🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR



  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sonarqubecloud

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread .github/scripts/tests/agent-ingress-workflow.bats
@don-petry

Copy link
Copy Markdown
Contributor Author

Dev-Lead — waiting on PR blockers (intent: review-changes)

PR: #523
No changes were committed, but the PR still can't be marked done: required check SonarCloud is still pending. The retry cron will re-attempt automatically. Next attempt after: 2026-10-12T02:07:37Z

@don-petry

Copy link
Copy Markdown
Contributor Author

Note

@don-petry I reviewed this PR and no code changes were needed, but I can't mark it done yet: required check SonarCloud is still pending. I'll re-check automatically.
Next attempt after: 2026-10-12T02:07:37Z

@don-petry
don-petry enabled auto-merge (squash) October 12, 2026 01:37
@codeant-ai

codeant-ai Bot commented Oct 12, 2026

Copy link
Copy Markdown

CodeAnt PR Risk: Medium Risk

  • The PR needs attention before merging because it replaces an immutable workflow SHA with a movable channel ref.
  • Changes to ci-failure-analyst/v1-stable can alter CI behavior without a change to this repository.

Assessed commit: dd038b34a24e

@don-petry
don-petry disabled auto-merge October 12, 2026 01:39
don-petry pushed a commit to combsmith/.github that referenced this pull request Oct 12, 2026
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
@don-petry

Copy link
Copy Markdown
Contributor Author

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.

@don-petry
don-petry enabled auto-merge (squash) October 12, 2026 01:41
@don-petry
don-petry merged commit 9310b6e into main Oct 12, 2026
56 of 68 checks passed
@don-petry
don-petry deleted the claude/cfa-v1-stable-pin branch October 12, 2026 01:43
don-petry added a commit to combsmith/.github that referenced this pull request Oct 12, 2026
…-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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants