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 gentle_reviewSTART fails during candidate view owner preparation, the returned diagnostic drops the underlying errno and outputs an unhelpful generic message:
{"code":"candidate-owner-preparation-failed","message":"candidate view rejected before native START"}
In lib/review-candidate-view.ts, candidateOwnerPreparationError explicitly computes and formats the bounded safe errno (EPERM, EACCES, ENOENT, EIO, ETIMEDOUT) into error.message (e.g. candidate view owner preparation failed (EACCES)). However, in extensions/gentle-ai.ts:7098 (nativeOperationFailure), the pre-native CandidateViewError branch discarded error.message and hardcoded "candidate view rejected before native START". In contrast, the non-pre-native branch immediately below preserved error.message.
Solution
Preserve error.message on pre-native CandidateViewError:
In extensions/gentle-ai.ts:7098, updated the fallback to error.diagnostics ?? { code: error.reason, message: error.message }, allowing the computed errno to surface cleanly to callers.
Regression Coverage:
In tests/gentle-ai.test.ts, verified that candidate-owner-preparation-failed preserves the formatted errno in result.diagnostics.message.
Changes
File
Change
extensions/gentle-ai.ts
Preserve error.message in pre-native CandidateViewError diagnostic fallback
tests/gentle-ai.test.ts
Assert result.diagnostics.message retains the computed errno
GREEN: All 123 tests in tests/gentle-ai.test.ts pass.
Typecheck & Integrity:
npm run typecheck: 0 diagnostics, no regressions.
Summary by CodeRabbit
Bug Fixes
Candidate-owner preparation errors now retain their specific diagnostic messages, including error codes such as EACCES, instead of showing a generic rejection message.
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 1 remain after this review.
📝 Walkthrough
For pre-native START failures caused by CandidateViewError, nativeOperationFailure now preserves the error’s message instead of returning a generic message. The test checks that the returned diagnostic includes (EACCES).
The pre-native START diagnostic now uses the CandidateViewError message. The test expects the (EACCES) detail, and the task record documents the test, implementation, and reported verification.
Candidate-owner preparation failures now retain their bounded errno in the caller-facing diagnostic, with no actionable merge risk identified.
Pre-merge checks: 5
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title clearly and concisely describes the main change: preserving the candidate-owner preparation errno in the diagnostic message.
Linked Issues check
Issue #2376 requires the pre-native CandidateViewError diagnostic to expose the bounded errno. extensions/gentle-ai.ts now uses error.message when error.diagnostics is absent. The regression t…
Out of Scope Changes check
The source change directly implements issue #2376. The test provides regression coverage for that change. The task document records the same implementation and verification work. No unrelated change i…
Docstring Coverage
No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Full details: Linked Issues check
Explanation
Issue #2376 requires the pre-native CandidateViewError diagnostic to expose the bounded errno. extensions/gentle-ai.ts now uses error.message when error.diagnostics is absent. The regression test verifies candidate-owner-preparation-failed with (EACCES). The issue requires diagnosability; it does not require this patch to resolve the underlying owner-preparation failure.
Full details: Out of Scope Changes check
Explanation
The source change directly implements issue #2376. The test provides regression coverage for that change. The task document records the same implementation and verification work. No unrelated change is shown.
Full details: Docstring Coverage
Explanation
No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1 files. (2 skipped: 1 unsupported, 1 too large.)
✨ Finishing Touches
🧪 Generate unit tests (beta)
Create a new PR
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.
Comment @coderabbitai help to get the list of available commands.
This branch has not been deployed
No deployments
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.
Closes #2376
Problem
When
gentle_reviewSTARTfails during candidate view owner preparation, the returned diagnostic drops the underlying errno and outputs an unhelpful generic message:{"code":"candidate-owner-preparation-failed","message":"candidate view rejected before native START"}In
lib/review-candidate-view.ts,candidateOwnerPreparationErrorexplicitly computes and formats the bounded safe errno (EPERM,EACCES,ENOENT,EIO,ETIMEDOUT) intoerror.message(e.g.candidate view owner preparation failed (EACCES)). However, inextensions/gentle-ai.ts:7098(nativeOperationFailure), the pre-nativeCandidateViewErrorbranch discardederror.messageand hardcoded"candidate view rejected before native START". In contrast, the non-pre-native branch immediately below preservederror.message.Solution
error.messageon pre-nativeCandidateViewError:extensions/gentle-ai.ts:7098, updated the fallback toerror.diagnostics ?? { code: error.reason, message: error.message }, allowing the computed errno to surface cleanly to callers.tests/gentle-ai.test.ts, verified thatcandidate-owner-preparation-failedpreserves the formatted errno inresult.diagnostics.message.Changes
extensions/gentle-ai.tserror.messagein pre-nativeCandidateViewErrordiagnostic fallbacktests/gentle-ai.test.tsresult.diagnostics.messageretains the computed errnoodd/tasks/fix-2376-candidate-owner-preparation-errno-diagnostic.mdVerification
message: 'candidate view rejected before native START' !== 'candidate view owner preparation failed (EACCES)'.tests/gentle-ai.test.tspass.npm run typecheck: 0 diagnostics, no regressions.Summary by CodeRabbit
EACCES, instead of showing a generic rejection message.