Skip to content

feat: implement issue #820 — {"message": "No server is currently available to service your request. Sorry about that. Please try resubmitting your request and contact us if the problem persists."} Unknown - #821

Merged
don-petry merged 3 commits into
mainfrom
dev-lead/issue-820-20260720-0032
Jul 20, 2026

Conversation

@don-petry

@don-petry don-petry commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Closes #820

Implemented by dev-lead agent. Please review.

Summary by CodeRabbit

  • Bug Fixes
    • Improved canary issue synchronization when run-history data is temporarily unavailable.
    • Prevented incomplete data from silently closing blockers or producing misleading status.
    • Blockers now remain open with clear “PARTIAL DATA” evidence and human-triage guidance.
    • Fleet dashboards identify unknown states, and synchronization fails safely when canary state cannot be determined.
  • Tests
    • Added coverage for partial run-history outages, blocker updates, dashboard reporting, and fail-closed behavior.

…lable to service your request. Sorry about that. Please try resubmitting your request and contact us if the problem persists."}

Unknown
@don-petry
don-petry requested a review from a team as a code owner July 20, 2026 00:59
Copilot AI review requested due to automatic review settings July 20, 2026 00:59
@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@don-petry, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 27 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 8553f4e8-bfd8-445e-af68-3cfc32043fdd

📥 Commits

Reviewing files that changed from the base of the PR and between ae8819b and 7a24725.

📒 Files selected for processing (2)
  • scripts/canary-rollout.sh
  • tests/canary_rollout.bats
📝 Walkthrough

Walkthrough

Changes

sync-issues resilience

Layer / File(s) Summary
Resilient state detection
scripts/canary-rollout.sh, tests/canary_rollout.bats
Run-history failures are tracked, while _frontier_state_resilient returns complete state, reconstructs partial state with datagap=1, or fails when state cannot be resolved.
Partial-data blocker handling
scripts/canary-rollout.sh, tests/canary_rollout.bats
sync-issues renders partial-data blocker evidence, preserves open issues, and includes data-gap status in dashboard and issue content.
Undetermined-state failure propagation
scripts/canary-rollout.sh, tests/canary_rollout.bats
Unresolvable agents render as UNKNOWN, and synchronization exits non-zero after the fleet dashboard is produced.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant sync_issues
  participant FrontierState
  participant RunHistory
  participant GitHubIssues
  participant JobSummary
  sync_issues->>FrontierState: evaluate agent state
  FrontierState->>RunHistory: fetch run history
  RunHistory-->>FrontierState: records or data-gap failure
  FrontierState-->>sync_issues: state and datagap marker
  sync_issues->>GitHubIssues: open or update blocker
  sync_issues->>JobSummary: render fleet status
Loading

Possibly related issues

Possibly related PRs

Suggested labels: needs-human-review

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title references issue #820, which matches the PR’s main purpose, but it includes noisy placeholder text and is not very clean.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dev-lead/issue-820-20260720-0032

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.

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

Copilot AI 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.

Pull request overview

This PR addresses issue #820 by making the canary-rollout sync-issues path fail closed when GitHub Actions run-history data is partially/unavailable, preventing false “all clear” states and ensuring a blocker issue is still opened/updated with the data gap clearly annotated.

Changes:

  • Record sustained gh run list failures in _run_json so higher-level logic can detect partial run-history fetch outages.
  • Add _frontier_state_resilient and wire cmd_sync_issues to use it, producing fail-closed BLOCKED states on data gaps and returning non-zero on total undeterminability.
  • Add Bats coverage for partial run-history outage behavior and the total-undeterminable hard-fail behavior.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
scripts/canary-rollout.sh Adds run-history outage signaling + resilient state computation, and updates sync-issues to fail closed on partial/total state gaps.
tests/canary_rollout.bats Adds regression tests covering partial run-history fetch outages and total inability to determine state.

Comment thread scripts/canary-rollout.sh Outdated
Comment thread scripts/canary-rollout.sh Outdated
@don-petry

Copy link
Copy Markdown
Contributor Author

Dev-Lead — review-changes (applied)

Changes committed and pushed.

@don-petry
don-petry enabled auto-merge (squash) July 20, 2026 01:07
@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown

Caution

Failed to replace (edit) comment. This is likely due to insufficient permissions or the comment being deleted.

Error details
No server is currently available to service your request. Sorry about that. Please try resubmitting your request and contact us if the problem persists.

@don-petry
don-petry disabled auto-merge July 20, 2026 01:16
@don-petry

Copy link
Copy Markdown
Contributor Author

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

Agent reasoning
  - Shell script syntax: ✓ Valid
  - New functions: ✓ Well-structured error handling
  - Test coverage: ✓ Comprehensive bats tests added for resilience scenarios
#### 3. Code Quality Verification
The PR implements issue #820 correctly:
- ✅ Adds resilient state computation (`_frontier_state_resilient`) that fails closed on data gaps
- ✅ Records run-history fetch failures to signal partial data states
- ✅ Adds comprehensive Bats test coverage for both partial and total data unavailability scenarios
- ✅ Maintains backward compatibility (transparent pass-through for normal states)
**Conclusion:** Both the bot comment failure and the CodeQL initialization failure are transient infrastructure issues unrelated to the PR's code changes. There are no actionable code issues to address.

@don-petry
don-petry enabled auto-merge (squash) July 20, 2026 01:20

@coderabbitai coderabbitai 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.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@scripts/canary-rollout.sh`:
- Around line 1486-1501: Update _frontier_state_resilient so failure to create
the mktemp flag is treated as a detection failure: do not run _frontier_state
through the unarmed else path, set a nonzero return status and mark
fetch_failed, and preserve cleanup and existing handling when the flag is
created successfully.

In `@tests/canary_rollout.bats`:
- Around line 2634-2669: Refactor the shared stub setup in _sync_stub and
_sync_gap_stub to eliminate duplicated git/gh heredoc boilerplate. Parameterize
the differing run list failure behavior and ref=cccc/ref=bbbb responses, then
have _sync_gap_stub reuse the shared implementation while preserving its
existing gap-test behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 703dcea6-3497-4181-b8e4-80d58a895eef

📥 Commits

Reviewing files that changed from the base of the PR and between d1254f7 and ae8819b.

⛔ Files ignored due to path filters (2)
  • node_modules/.package-lock.json is excluded by !**/node_modules/**
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (2)
  • scripts/canary-rollout.sh
  • tests/canary_rollout.bats

Comment thread scripts/canary-rollout.sh
Comment thread tests/canary_rollout.bats
@don-petry
don-petry disabled auto-merge July 20, 2026 01:25
coderabbitai[bot]
coderabbitai Bot previously approved these changes Jul 20, 2026
@don-petry

Copy link
Copy Markdown
Contributor Author

Dev-Lead — fix-reviews (applied)

Changes committed and pushed.

@don-petry
don-petry enabled auto-merge (squash) July 20, 2026 01:39
@sonarqubecloud

Copy link
Copy Markdown

@don-petry
don-petry disabled auto-merge July 20, 2026 01:41
@don-petry

Copy link
Copy Markdown
Contributor Author

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

Agent reasoning
Issues addressed: 0
Files changed: none
Tier 1 blockers: 0
Status: ✅ All checks passing
```

@don-petry
don-petry enabled auto-merge (squash) July 20, 2026 01:41

@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: 7a24725c3c454deedf4df2645908c149423676d4
Review mode: triage-approved (single reviewer)

Summary

Implements fail-closed sync-issues for canary-rollout (#820): a new _frontier_state_resilient wrapper detects sustained run-history fetch failures via a file flag armed around _run_json, reconstructs tag-only state (candidate/frontier/transition/reusable-differs) on a data gap, and fails closed to a tracked BLOCKED issue annotated with a PARTIAL DATA banner instead of silently skipping or auto-closing regression issues. A total inability to determine state ends the step non-zero. 5 new bats tests cover the create, update/no-auto-close, pass-through, total-inability, and non-zero-exit paths.

Linked issue analysis

Closes #820 (re-split 2/2 of #803). All three acceptance criteria are met: (1) a forced partial fetch still opens/updates the REGRESSION needs-human blocker with the gap annotated (bats: create + update cases assert PARTIAL DATA banner, needs-human label, no CLOSE); (2) no regression is silently un-tracked — the datagap path always upserts BLOCKED and total inability is a hard error rendered in the fleet dashboard as UNKNOWN/fail-closed; (3) existing bats stay green (Lint and bats check passed) and partial-data cases were added.

Findings

No blocking findings.

  • All 4 review threads (2 Copilot, 2 CodeRabbit) are resolved, and each fix is verified present in the head diff: the _blocker_body header comment documents the 16th [<data_gap>] param; _frontier_state_resilient propagates non-data-gap _frontier_state errors instead of mis-annotating them as datagap=1; a failed mktemp now fails closed (fetch_failed=1) rather than running unarmed; _sync_gap_stub is a thin wrapper over a parameterized _sync_stub. CodeRabbit's CHANGES_REQUESTED review was subsequently dismissed after the fixes.
  • Field-count consistency verified: the reconstructed datagap state line emits 19 fields matching the 19-variable read in cmd_sync_issues; the normal path appends a trailing datagap=0.
  • Minor (non-blocking): package-lock.json and node_modules/.package-lock.json change only the cosmetic name field (pr-782 -> pr-821), a tooling artifact with no dependency changes.
  • Secret scan: run_secret_scanning MCP tool not available in this environment; gitleaks CI check is green.

CI status

All validation checks green: ShellCheck, Lint, Lint and bats, CodeQL (Analyze/actions), SonarCloud (x2 + Code Analysis), Secret scan (gitleaks), npm audit, Agent Security Scan, agent-shield, pr-auto-review, CodeRabbit. Skipped: pnpm/cargo/pip audits, govulncheck (ecosystems not present). Cancelled: dev-lead dispatch/ci-relay — the authoring agent's own orchestration jobs, not validation checks.


Reviewed automatically by the PR-review agent (single-reviewer mode: fable 5). Reply if you need a human review.

@don-petry
don-petry merged commit 65a4f97 into main Jul 20, 2026
21 of 23 checks passed
@don-petry
don-petry deleted the dev-lead/issue-820-20260720-0032 branch July 20, 2026 01:44
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.

[#811 re-split 2/2] canary-rollout: fail-closed sync-issues (never drop regression tracking on partial data)

3 participants