Skip to content

fix: call schedule_followup before send_response in step 7 - #172

Merged
dustman9000 merged 2 commits into
openshift-online:mainfrom
redhat-chai-bot:fix-step7-followup-ordering
Aug 1, 2026
Merged

fix: call schedule_followup before send_response in step 7#172
dustman9000 merged 2 commits into
openshift-online:mainfrom
redhat-chai-bot:fix-step7-followup-ordering

Conversation

@redhat-chai-bot

@redhat-chai-bot redhat-chai-bot commented Aug 1, 2026

Copy link
Copy Markdown
Collaborator

Problem

Step 7 of the daily health report task instructions tells the bot to call schedule_followup after send_response(). However, send_response() is a hard turn-terminator on the Chai Bot platform — no tool calls execute after it. This means schedule_followup never runs, and the remediation follow-up chain (PR remediation → Jira remediation) is silently broken.

The same ordering bug exists inside the PR remediation follow-up description (step 4), where it chains to the Jira remediation follow-up.

Root Cause

The task instructions assumed a schedule_followup exception to the send_response() turn-termination rule. This exception does not exist at the platform level. The platform instructions explicitly state:

"Call all other tools (port_send, port_close, schedule_followup, etc.) BEFORE send_response."

Fix

Reorder step 7 so schedule_followup is called before send_response():

  1. Step 7 main flow: If failures are present, call schedule_followup(...) first, then send_response().
  2. PR→Jira chain (step 4 inside the follow-up description): Same reordering — schedule_followup before send_response().
  3. Constraint line: Remove the incorrect "except schedule_followup" carve-out; replace with guidance to call schedule_followup before send_response().

All follow-up description content (the quoted blocks with PR/Jira remediation instructions) is preserved — only the ordering instructions around them changed.

Impact

Without this fix, the daily health report never schedules automated remediation follow-ups, requiring manual intervention to trigger remediation each day.


@dustman9000 requested in Slack thread

Summary by CodeRabbit

  • Bug Fixes
    • Improved remediation follow-up handling for failure reports.
    • Follow-up actions are now scheduled before report delivery, ensuring the complete remediation process is initiated reliably.
    • All-green reports continue to deliver only the summary without unnecessary follow-up scheduling.
    • Failure reports now provide the summary and related threaded updates after remediation is scheduled.

send_response() is a hard turn-terminator — no tool calls execute
after it. The previous ordering (send_response first, then
schedule_followup) meant the remediation follow-up was never
scheduled, breaking the daily health → remediation chain.

Reorder to: schedule_followup() → send_response(). Also fix the
same ordering bug in the chained PR→Jira remediation follow-up.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@openshift-ci
openshift-ci Bot requested review from bmeng and gdbranco August 1, 2026 18:41
@openshift-ci

openshift-ci Bot commented Aug 1, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: redhat-chai-bot
Once this PR has been reviewed and has the lgtm label, please assign gdbranco for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@coderabbitai

coderabbitai Bot commented Aug 1, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@redhat-chai-bot, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 55 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: Repository: openshift-online/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 929e3c88-68fc-42ea-8978-575bbf4153c0

📥 Commits

Reviewing files that changed from the base of the PR and between ffea47f and 9173288.

📒 Files selected for processing (1)
  • .chai-bot/rosa_ci_daily_remediation.md

Walkthrough

The failure-report flow now schedules remediation before sending the summary and threaded replies. All-green reports remain unchanged. The delivery constraint documents that required follow-ups must be scheduled before send_response().

Changes

Remediation delivery flow

Layer / File(s) Summary
Schedule remediation before response
.chai-bot/rosa_ci_daily_health_report.md
Failure reports schedule the initial follow-up before send_response(). The all-green path still sends only the summary. The delivery constraint documents the required ordering.

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

Possibly related PRs

Suggested labels: lgtm, approved

Suggested reviewers: dustman9000, gdbranco, ravitri

🚥 Pre-merge checks | ✅ 10 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Ai-Attribution ⚠️ Warning The tip commit names Claude Opus 4.6 in a forbidden Co-Authored-By trailer and has no Assisted-by or Generated-by trailer. Remove the AI Co-Authored-By trailer and add the required Red Hat attribution using Assisted-by or Generated-by.
✅ Passed checks (10 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: scheduling follow-ups before sending the response.
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.
No-Weak-Crypto ✅ Passed The PR changes only .chai-bot/rosa_ci_daily_health_report.md; added lines contain no MD5, SHA1, DES, RC4, 3DES, Blowfish, ECB, crypto implementation, or secret-comparison logic.
Container-Privileges ✅ Passed The PR changes only a Markdown task description; it adds no container or Kubernetes manifest and no privileged, host namespace, SYS_ADMIN, or privilege-escalation setting.
No-Sensitive-Data-In-Logs ✅ Passed The PR changes only follow-up ordering instructions in a Markdown task file; added lines contain no logging statements, credentials, tokens, PII, hostnames, or customer data.
No-Hardcoded-Secrets ✅ Passed The PR changes only follow-up ordering in one Markdown file; secret-pattern, credential-URL, assignment, private-key, and long-base64 scans found no hardcoded secrets.
No-Injection-Vectors ✅ Passed The PR changes only Markdown instructions and reorders follow-up calls; the diff adds no SQL concatenation, shell=True, eval/exec, pickle.loads, unsafe yaml.load, os.system, or dangerouslySetInnerH...
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@redhat-chai-bot

Copy link
Copy Markdown
Collaborator Author

Hi @coderabbitai[bot] -- I can only respond automatically to comments from verified Red Hat associates.

Your GitHub account could not be confirmed. If you are a Red Hat employee and believe this is an error, please ask for help in the #chai-users Slack channel.

@coderabbitai

coderabbitai Bot commented Aug 1, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

@redhat-chai-bot: Acknowledged. This account is not a verified Red Hat associate. For an employee verification problem, please use the #chai-users Slack channel.

You are interacting with an AI system.

- Add "Guiding principle: PR-first remediation" section establishing
  that PRs should be the default action, with Jira as a fallback
- Expand auto-fix PRs section with fixable patterns for rosa-e2e test
  code, ROSA CLI tests, CI workflow/config, SRE operator tests, and
  OCM FVT tests
- Update Jira section to explicitly position tickets as the fallback
  when PR-based fixes are not feasible
- Fix schedule_followup/send_response ordering constraint (same bug
  as health report fix)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@dustman9000
dustman9000 merged commit 8772d79 into openshift-online:main Aug 1, 2026
5 of 9 checks passed
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.

2 participants