You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a feature is manually set to 'done' via update_feature while an agent is still running for it, the agent's failure/retry logic overwrites the status back to 'in_progress' with statusChangeReason 'Max agent retries exceeded (3)'. The done status should be authoritative — a running agent should check current status before overwriting and bail if the feature is already done/verified. Observed on feature-1774719460192-zwdq8xqoh in mythxengine project.
Recovered automatically by Automaker post-agent hook
Summary by CodeRabbit
Release Notes
Bug Fixes
Processors now recognize when a feature has been manually marked as complete and skip further processing, preventing unintended re-operations on finalized work.
Tests
Added test coverage for feature completion detection and processing guards.
This PR adds pre-transition guards to both the EscalateProcessor and ExecuteProcessor services that prevent further processing when a feature's current persisted status is already in a terminal state (done or verified). The guards log informational messages and return early with a suppressed state transition. Comprehensive test coverage validates this guard behavior.
Added identical pre-transition guards at the start of process() methods that reload the feature's persisted status; if terminal (done or verified), processing is skipped with a suppressed state transition and informational log.
Test Coverage apps/server/tests/unit/services/lead-engineer-escalation.test.ts
Added new test suite validating that EscalateProcessor correctly detects terminal feature states and skips processing without updating the persisted status, while allowing normal flow for non-terminal states.
Estimated code review effort
🎯 2 (Simple) | ⏱️ ~12 minutes
Poem
🐰 A guard stands watch at the gate so tall,
Checking the status before the call,
If done or verified, no need to roam—
The feature's already found its home! 🏠
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
✅ Passed
The title accurately describes the main bug being fixed: preventing agent retries from overwriting a manually-set 'done' status, which is the core issue addressed across both lead-engineer service modifications.
Docstring Coverage
✅ Passed
No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✏️ Tip: You can configure your own custom pre-merge checks in the settings.
✨ Finishing Touches📝 Generate docstrings
Create stacked PR
Commit on current branch
🧪 Generate unit tests (beta)
Create PR with unit tests
Commit unit tests in branch feature/bug-agent-retries-overwrite-manually
Comment @coderabbitai help to get the list of available commands and usage tips.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
When a feature is manually set to 'done' via update_feature while an agent is still running for it, the agent's failure/retry logic overwrites the status back to 'in_progress' with statusChangeReason 'Max agent retries exceeded (3)'. The done status should be authoritative — a running agent should check current status before overwriting and bail if the feature is already done/verified. Observed on feature-1774719460192-zwdq8xqoh in mythxengine project.
Recovered automatically by Automaker post-agent hook
Summary by CodeRabbit
Release Notes
Bug Fixes
Tests