fix(guardian): make feature-check posts reliable#1341
Conversation
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
|
Important Review skippedNo new commits to review since the last review. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughThe relay-feature-guardian now uses an explicit OpenCode model, gates Slack activation on ChangesRelay feature guardian Slack behavior
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant Guardian
participant Slack
participant CycleState
Guardian->>Slack: messages.write
Slack-->>Guardian: error or receipt
Guardian->>CycleState: advance only after valid timestamp
Guardian-->>Guardian: log post-failed and reject on failure
Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Code Review
This pull request picker-gates the 'relay-feature-guardian' Slack integration to the configured 'SLACK_CHANNEL' by adding 'optional: true' and 'enabledByInput: 'SLACK_CHANNEL'' to the Slack integration configuration in 'persona.json'. It also updates the corresponding TypeScript tests, documents the changes in 'CHANGELOG.md' under a new '[Unreleased - Patch]' section, and includes the completed trajectory files tracking the decisions made during this task. There are no review comments, and I have no feedback to provide.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
5db3f94 to
0ae936f
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. Swish! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
.agentworkforce/agents/relay-feature-guardian/agent.ts (1)
783-788: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winThrow an error when the Slack timestamp is missing to ensure the run fails.
While you correctly added
throw err;in thecatchblock (line 783), the subsequent check for missing timestamps (!ts) still uses an earlyreturn. This results in a silent success for the agent run, which contradicts the PR objective to surface failed posts as failed runs.More importantly, returning here skips the progress checkpoint, causing the agent to silently get stuck in an infinite loop picking the exact same feature on every subsequent cron tick. Throwing an error here ensures the run fails loudly and behaves identically to the exception path.
🐛 Proposed fix
throw err; } const ts = deliveredSlackTs(result); if (!ts) { ctx.log('error', 'relay-feature-guardian.post-failed', { channel, feature: feature.id }); - return; + throw new Error(`Slack post failed: no timestamp returned for feature ${feature.id}`); }🤖 Prompt for 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. In @.agentworkforce/agents/relay-feature-guardian/agent.ts around lines 783 - 788, In the missing-timestamp branch after deliveredSlackTs(result), replace the early return with a thrown error so the run fails and does not skip the progress checkpoint. Preserve the existing relay-feature-guardian.post-failed log before throwing.
🤖 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.
Outside diff comments:
In @.agentworkforce/agents/relay-feature-guardian/agent.ts:
- Around line 783-788: In the missing-timestamp branch after
deliveredSlackTs(result), replace the early return with a thrown error so the
run fails and does not skip the progress checkpoint. Preserve the existing
relay-feature-guardian.post-failed log before throwing.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 27df195b-9d01-4c3d-95aa-1f61ca1f4dfe
📒 Files selected for processing (6)
.agentworkforce/agents/relay-feature-guardian/agent.test.ts.agentworkforce/agents/relay-feature-guardian/agent.ts.agentworkforce/agents/relay-feature-guardian/persona.json.agentworkforce/trajectories/completed/2026-07/traj_u2rlmhnu5q7f/summary.md.agentworkforce/trajectories/completed/2026-07/traj_u2rlmhnu5q7f/trajectory.jsonCHANGELOG.md
🚧 Files skipped from review as they are similar to previous changes (2)
- .agentworkforce/trajectories/completed/2026-07/traj_u2rlmhnu5q7f/trajectory.json
- .agentworkforce/trajectories/completed/2026-07/traj_u2rlmhnu5q7f/summary.md
|
Addressed the fresh CodeRabbit finding at exact head |
|
Codex Review: Didn't find any major issues. What shall we delve into next? Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@coderabbitai review |
✅ Action performedReview finished.
|
7c2aa36 to
a01f310
Compare
|
Rebased byte-equivalently onto live Relay main @coderabbitai review |
|
✅ Action performedReview finished.
|
|
Codex Review: Didn't find any major issues. 🎉 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
SLACK_CHANNELso Cloud derives only the selected production channel mirrorrunner.handler.errorinstead of falsely reportingrunner.handler.okopencode/deepseek-v4-flash-freeThe harness/model change is robustness hardening after the unusual multi-worker contention on 2026-07-19. The prior
useSubscription: trueconfiguration had run successfully since 2026-07-16; this PR does not characterize it as a standing configuration defect.Validation
undefinedinstead of rejectingtsresolvedundefinedinstead of rejectinggit diff --checkpassed after rebase onto current Relay mainProduction gate
Do not merge on source/CI proof alone. Deploy this exact persona bundle with all current production inputs preserved, announce the exact redeploy command before execution, then require a real guardian fire on
opencode/deepseek-v4-flash-freeto reachrelay-feature-guardian.postedwith a real Slacktsandrunner.handler.ok. Any miss is fail/stop, not retry.