Skip to content

fix(canary): fail closed on a non-array run list; Zulu cut date; canonical agent-ingress.yml + registry lint - #1276

Merged
don-petry merged 8 commits into
mainfrom
claude/sleepy-bardeen-28vd7h
Oct 10, 2026
Merged

don-petry merged 8 commits into
mainfrom
claude/sleepy-bardeen-28vd7h

Conversation

@don-petry

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

Copy link
Copy Markdown
Contributor

Refs #1244 (items 15, 17) and #1246 (item 10). Does not close either tracker.

1. #1244 items 15 and 17 (original scope of this PR)

  • Item 15: _repo_wf_runs_cached passed a successful gh run list body through unchecked. On the legacy per-role path a non-array body (an error object, proxy HTML) was reduced to [] and read as "no runs / no caller". The shared reader now treats a non-array 2xx body as a failed fetch: retry, then fail closed with the existing fetch-failure flag. The bad body is never cached.
  • Item 17: candidate_cut_date's last-resort local-host fallback returned git log --format=%cI verbatim (can carry a non-Zulu offset) while the window filters compare timestamps as strings. It now goes through _to_z.

2. #1246 item 10 (added to this PR at the owner's direction)

With the per-role workflow absent, the ingress present and no completed ingress run in the window, a misspelled ingress_job read as "no caller" and waive_sample_if_no_caller could allow a dwell-only promotion. A runtime check cannot fail on "role absent from this member's ingress" (that is also what a legitimate non-consumer looks like), so the approved approach is a static registry lint in CI. Runtime behavior is unchanged.

  • standards/workflows/agent-ingress.yml: the canonical ADR-0007 ingress (.github-private initiative doc §9b / AC11(a): authored here by the owner), one job per ring-registered role (dev-lead, pr-auto-review, pr-review, pr-review-mention, ci-failure-analyst). Based on the markets pilot (§3) with its two defective pins corrected to real moving channels: pr-review/stable → pr-review/v1-stable, bare SHA → ci-failure-analyst/v1-stable (both tags exist). Published as a standard only: not in DEPLOYABLE_WORKFLOWS, nothing is deployed by this change. Verified with the .github-private guards validate-ingress-if.sh (pure event-filter if:, bounded concurrency) and validate-caller-inputs.sh (inputs and concurrency groups against the reusables at the pinned refs); the two reusables hosted in this repo were checked by hand.
  • Registry lint (tests/canary_rollout.bats): ingress_job values are plain unique job keys; every one is a job of the canonical template; the lint logic is tested against a fixture (typo, role-name prefix, agent without ingress_job).
  • canary-rollout-tests.yml now also triggers on standards/canary-rings.json, the canonical template and scripts/lib/agent-ingress.sh: a registry edit previously did not run the suite that would catch the typo.

Existing tests touched (please look at these)

Tests

Canary suite 457/457 in both modes (also with CANARY_PRELOAD_REGISTRY=1); standards-templates, compliance-audit S7637, seed-template, deploy-standard-workflows, standards-deploy-driver and persona-mention suites green; shellcheck --severity=warning clean. New tests fail without the change (items 15/17) or exercise the lint logic against a fixture (item 10).

🤖 Generated with Claude Code

https://claude.ai/code/session_01MjXPsBTaL6WV9AhCH2ajuv

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: test/scripts/standards-templates/vform-pins.bats,tests/canary_rollout.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.

…he local cut date (#1244 items 15, 17)

Item 15: _repo_wf_runs_cached passed a 2xx body through unchecked, so on the legacy per-role path a
non-array body was reduced to [] and read as 'no runs / no caller'. It now treats a non-array body
like a failed fetch (retry, then fail closed with the fetch-failure flag) and never caches it. This
subsumes the ingress-only check from #1250; that test now asserts the fetch failure.

Item 17: candidate_cut_date's last-resort local fallback returned git's %cI verbatim, which can carry a
non-Zulu offset, while the window filters compare timestamps as strings. It now goes through _to_z.

Also fixes two retry-sleep test stubs whose printf-built payload was invalid JSON (they only asserted
the sleep fallback, so it never mattered until the reader validated the body).

Refs #1244

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MjXPsBTaL6WV9AhCH2ajuv
@don-petry
don-petry requested a review from a team as a code owner October 10, 2026 02:45
@don-petry
don-petry enabled auto-merge (squash) October 10, 2026 02:45
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

Copy link
Copy Markdown
Contributor Author

@donpetry-bot please review.


Generated by Claude Code

@qodo-code-review

Copy link
Copy Markdown

ⓘ Qodo reviews are paused because your trial has ended. Ask your workspace admin to add credits to resume reviews. Manage billing

@coderabbitai

coderabbitai Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 59 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: a8752f9b-d4dc-4e91-87f8-ada3b389099b

📥 Commits

Reviewing files that changed from the base of the PR and between 3cd1511 and dbbe184.


📒 Files selected for processing (6)
  • .github/workflows/canary-rollout-tests.yml
  • scripts/canary-rollout.sh
  • standards/ci-standards.md
  • standards/workflows/agent-ingress.yml
  • test/scripts/standards-templates/vform-pins.bats
  • tests/canary_rollout.bats

  • 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.

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

Copy link
Copy Markdown
Contributor

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 normalizes the local commit date fallback to Zulu time in candidate_cut_date and adds validation to ensure gh run list outputs a valid JSON array in _repo_wf_runs_cached to prevent failed fetches from being incorrectly interpreted as empty runs. Feedback on the tests suggests asserting the exact non-zero exit status in BATS to avoid false positives, and replacing the undefined INGRESS_RINGS variable with the globally defined $RINGS in the new candidate_cut_date test.

Comment thread tests/canary_rollout.bats Resolved
Comment thread tests/canary_rollout.bats Resolved
@donpetry-bot

Copy link
Copy Markdown
Contributor

@don-petry I'm on it — starting a fresh review now. Results will appear in a few minutes.

@codeant-ai

codeant-ai Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

CodeAnt PR Risk: Low Risk

  • The PR appears safe to merge based on the supplied changes.
  • The canary reader rejects non-array run-list responses and normalizes local commit-date fallbacks, with regression tests for both behaviors.
  • The canonical ingress template is checked against registry job names, and changes to the template or registry trigger the canary test workflow.

Assessed commit: dbbe18418089

@donpetry-bot

Copy link
Copy Markdown
Contributor

Advisory bots were rate-limited; auto-approval is withheld until they recover. pr-review-sweep will re-review this PR after 2026-10-10T03:49:58Z.

@don-petry
don-petry disabled auto-merge October 10, 2026 02:50
@don-petry

Copy link
Copy Markdown
Contributor Author

Dev-Lead — review-changes (applied)

Changes committed and pushed. Requested items addressed:

  • tests/canary_rollout.bats:5957 — applied
  • tests/canary_rollout.bats:5986 — applied

@don-petry
don-petry enabled auto-merge (squash) October 10, 2026 02:57
@donpetry-bot

Copy link
Copy Markdown
Contributor

Advisory bots were rate-limited; auto-approval is withheld until they recover. pr-review-sweep will re-review this PR after 2026-10-10T03:59:26Z.

@donpetry-bot

Copy link
Copy Markdown
Contributor

No description provided.

@don-petry
don-petry disabled auto-merge October 10, 2026 05:40
@don-petry

This comment has been minimized.

@don-petry

Copy link
Copy Markdown
Contributor Author

Dev-Lead — fix-bot-comment (no-changes)

Agent reasoning
## Summary
**Bot:** coderabbitai[bot]
**Issues addressed:** 0 (no code findings)
**Status:** Disposition posted for non-actionable rate-limit notice
The CodeRabbit comment is a pure **operational notice** — the code review was throttled due to free OSS quota limits. There are no actual code findings, security hotspots, or actionable issues reported. The comment contains no findings-bearing sections (no Security Architecture Review, Actionable comments, or code issues).
**Actions taken:**
- Posted disposition reply on the PR comment marking it as `informational` with the required `dev-lead:comment-disposition` marker — the harness will minimize the original bot comment RESOLVED and clear the maintainer-comment gate.
**No code changes required.** All CI checks pass, no reviews request changes, and no code issues exist to address.

@don-petry
don-petry enabled auto-merge (squash) October 10, 2026 05:41
@don-petry

Copy link
Copy Markdown
Contributor Author

No description provided.

@don-petry
don-petry disabled auto-merge October 10, 2026 05:55
@don-petry
don-petry enabled auto-merge (squash) October 10, 2026 05:56

Copy link
Copy Markdown
Contributor Author

@donpetry-bot please review. The advisory-bot rate-limit window you noted (reset 03:59Z) has passed; the head is 795f1be with all checks green and the review threads resolved.


Generated by Claude Code

@donpetry-bot

Copy link
Copy Markdown
Contributor

@don-petry I'm on it — starting a fresh review now. Results will appear in a few minutes.

@donpetry-bot

Copy link
Copy Markdown
Contributor

No description provided.

@don-petry
don-petry disabled auto-merge October 10, 2026 09:37
@don-petry
don-petry enabled auto-merge (squash) October 10, 2026 09:38
@don-petry

Copy link
Copy Markdown
Contributor Author

Qodo billing/trial-ended notice: reviews are paused, with no code finding. Acknowledged; nothing to change.

@don-petry

Copy link
Copy Markdown
Contributor Author

CodeAnt reports Low Risk with no findings, only a summary of the fail-closed run-list handling and the Zulu date normalization. Acknowledged; nothing to change.

@don-petry

Copy link
Copy Markdown
Contributor Author

SonarCloud Quality Gate passed with 0 new issues and 0 hotspots. Acknowledged; nothing to change.

@don-petry

Copy link
Copy Markdown
Contributor Author

Dev-Lead — fix-reviews (no-changes)

Agent reasoning
Addressed 0 review threads. None were open.
- **Tier 1 blockers:** none. All CI checks are success or skipped, and no review has `CHANGES_REQUESTED`.
- **Gemini review:** it is `COMMENTED`, so I treated it as neutral and made no change for it. It suggests asserting the exact non-zero exit status in the BATS test and using `$RINGS` instead of the undefined `INGRESS_RINGS`. Neither suggestion was applied.
- **Issue comments:** four bot comments had no disposition: Codex usage limit, Qodo trial ended, CodeAnt "Low Risk", and SonarCloud quality gate passed. I posted one `informational` disposition reply on each. None carries a finding, so no code change was needed.
- **Already handled:** the CodeRabbit rate-limit notice already had a disposition from an earlier pass.
Test verification: not run, since I made no code changes.
Files changed: none.

@don-petry
don-petry enabled auto-merge (squash) October 10, 2026 11:37
@don-petry

Copy link
Copy Markdown
Contributor Author

No description provided.

@don-petry
don-petry disabled auto-merge October 10, 2026 12:17
@don-petry

Copy link
Copy Markdown
Contributor Author

This is a rate-limit notice indicating CodeRabbit's free OSS review quota was reached during this PR's review cycle. No code changes are required — the rate-limit itself is not a code finding. All CI checks pass successfully.

@don-petry

Copy link
Copy Markdown
Contributor Author

Dev-Lead — fix-bot-comment (no-changes)

Agent reasoning
**Bot:** coderabbitai[bot]  
**Issues addressed:** 0 (comment is operational notice only)  
**Files changed:** None  
**Dispositioning:** informational
The CodeRabbit comment is a rate-limit notice indicating the free OSS review quota was reached. It contains:
- **No Security Architecture Review findings** (`<!-- architecture_review_start -->` absent)
- **No actionable code findings** (specific defects tied to files/lines)
- Only the rate-limit block and share/tips sections
Since this is an **operational notice with no code findings**, there are no changes to make to the diff. I've posted a disposition reply marking it `informational` (the only section present — the rate-limit block — carries no findings). The harness will minimize the original comment RESOLVED once the disposition is verified.
**All CI checks pass.** The PR is unblocked pending this disposition verification.

@don-petry
don-petry enabled auto-merge (squash) October 10, 2026 12:18
@don-petry

Copy link
Copy Markdown
Contributor Author

No description provided.

@donpetry-bot

Copy link
Copy Markdown
Contributor

No description provided.

@don-petry
don-petry disabled auto-merge October 10, 2026 14:04
@don-petry
don-petry enabled auto-merge (squash) October 10, 2026 14:05
@donpetry-bot

Copy link
Copy Markdown
Contributor

No description provided.

@don-petry

Copy link
Copy Markdown
Contributor Author

No description provided.

@don-petry
don-petry disabled auto-merge October 10, 2026 16:23
@don-petry
don-petry enabled auto-merge (squash) October 10, 2026 16:24
@sonarqubecloud

Copy link
Copy Markdown

@don-petry

Copy link
Copy Markdown
Contributor Author

No description provided.

@donpetry-bot

Copy link
Copy Markdown
Contributor

Advisory bots were rate-limited; auto-approval is withheld until they recover. pr-review-sweep will re-review this PR after 2026-10-10T18:08:28Z.

@donpetry-bot donpetry-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Automated review — APPROVED ✓

Risk: MEDIUM
Reviewed commit: dbbe1841808956eb0df76738069f6de128a0eea5
Review mode: triage-approved (single reviewer)

Summary

Fixes two canary-rollout fail-open edges (#1244 items 15/17) and implements the maintainer-recommended static registry lint for #1246 item 10. It publishes the canonical ADR-0007 agent-ingress.yml as a standard only (not in DEPLOYABLE_WORKFLOWS) and lints ingress_job values against it. Logic is correct, tests cover each change, and all CI is green.

Linked issue analysis

  • #1244 item 15: _repo_wf_runs_cached now checks that a 2xx body is a JSON array (jq -e 'type == "array"'). A non-array body is written to the errfile and goes through the existing retry → fail-closed path, which sets _CANARY_FETCH_FAIL_FLAG and returns 1. The bad body is never cached. Because the error text is synthetic, it can't match the "could not find any workflow" no-runs branch. An empty body still becomes [], as before.
  • #1244 item 17: candidate_cut_date's last-resort git log %cI fallback now goes through _to_z. Empty input still passes through, and the new test checks that +05:00 becomes Z.
  • #1246 item 10: implements option 1 (static registry lint), which the issue recommends. The lint reuses the existing agent_ingress_has_role_job (indent-aware and prefix-safe). A fixture test covers a typo, a role-name prefix and an agent without ingress_job. The canary test workflow now also triggers on the registry, the template and scripts/lib/agent-ingress.sh.
  • The PR says Refs and correctly leaves both trackers open.

Findings

No blocking findings.

  • Template pins verified: all five channel tags resolve (dev-lead/v139-stable, pr-review/v1-stable and ci-failure-analyst/v1-stable in .github-private; pr-auto-review/v1-stable and pr-review-mention/v2-stable in .github). All five registry ingress_job values (dev-lead, pr-auto-review, pr-review, pr-review-mention, ci-failure-analyst) match job keys in the template.
  • Secrets in the template: forwarded only to pinned first-party petry-projects/* reusables (secrets: inherit / explicit map). No secret reaches a run: step, and there are no third-party reusables. Top-level permissions: {} with per-job least privilege. Every if: is a pure event filter. The template is published only, not deployed, so it doesn't change any repo's runtime.
  • Disclosed test changes (accepted): the #1250 ingress non-array test now expects a fetch failure (exit 1 + fetch-fail flag) instead of UNRESOLVED/exit 0. This fails closed harder and isn't one of the end-to-end tests #1246 says must stay unchanged. The two RETRY_SLEEP stubs only got their invalid-JSON payload fixed. The vform-pins.bats generalization pairs each agent_ref with the uses: line before it, which still catches mismatches.
  • Nit (non-blocking): the template header says "full-file identical across every adopting repo, modulo the per-repo ring/channel pin". The pins shown (e.g. dev-lead/v139-stable) are a snapshot that adopters will need to bump. The ci-standards.md text already covers this.

CI status

All checks pass or are skipped: bats ×2, Lint, Lint and bats, ShellCheck, CodeQL / Analyze (actions, python), SonarCloud (Quality Gate passed, 0 new issues), gitleaks, AgentShield, Agent Security Scan, duplicate-decl-gate and dependency-audit. Both Gemini review threads are resolved, and there are no unanswered human questions.


Reviewed automatically by the PR-review agent (single-reviewer mode: opus 5.5 [opus 4.8, opus 4.7]). Reply if you need a human review.

@don-petry
don-petry merged commit 0e51987 into main Oct 10, 2026
29 checks passed
@donpetry-bot

Copy link
Copy Markdown
Contributor

pr-review approved on PARTIAL advisory evidence: 3/5 required advisory bots reported before the gate's quiescence-timeout fallback proceeded. Recorded for the miss-rate metric (#1596).

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