Skip to content

Smarter review loop with soft-pass and environment issue detection#3

Merged
Ghvstcode merged 2 commits intomainfrom
review-softpass-and-env-issues
Mar 18, 2026
Merged

Smarter review loop with soft-pass and environment issue detection#3
Ghvstcode merged 2 commits intomainfrom
review-softpass-and-env-issues

Conversation

@Ghvstcode
Copy link
Copy Markdown
Owner

Summary

  • Review loop overhaul: Updated the review prompt to distinguish critical issues (bugs, security, data loss) from suggestions (style nits). Reviews now only fail on critical issues. After max retries (increased from 3 to 5 attempts), tasks with only non-critical feedback soft-pass with warnings attached instead of hard-failing.
  • Environment issue detection: Added pre-flight git health checks before each task that detect known env errors (Xcode license, missing git, etc.) and emit an agent:environment-issue event. The frontend shows a persistent toast with a "Fix in Terminal" button that opens Terminal.app with the appropriate fix command.
  • Error formatting cleanup: Replaced Rust Debug formatting ({:?}) with proper string unwrapping so users no longer see raw Some("...") wrappers in error messages.

Test plan

  • Verified environment issue toast renders correctly via debug command
  • Verified "Fix in Terminal" button opens Terminal.app with the command
  • Trigger a task on a repo to verify the updated review prompt and soft-pass logic
  • Verify error messages no longer show Some("...") formatting
  • Test with Xcode license unaccepted (if possible) to verify real pre-flight detection

…sue detection

Overhaul the engine's review/retry loop to prevent false review failures
and add pre-flight environment checks with actionable in-app fix prompts.

Review improvements:
- Update review prompt to distinguish "critical" (bugs, security, data
  loss) from "suggestion" (style nits, nice-to-haves) severity
- Add ReviewOutput.has_critical_issues() to inspect structured issues
- Soft-pass after max retries when only non-critical suggestions remain
  — task succeeds with review_warnings attached instead of hard-failing
- Increase max_retries from 2 to 4 (5 total attempts)
- Fix error formatting: replace Rust Debug {:?} with proper unwrap so
  users no longer see raw Some("...") wrappers in error messages

Environment issue detection:
- Add git::preflight_check() that runs before each task and pattern-
  matches known env errors (Xcode license, git not found, not a repo)
- Emit agent:environment-issue event with error, fixCommand, fixLabel
- Add run_terminal_command Tauri command that opens Terminal.app via
  AppleScript to run interactive fix commands (e.g. sudo xcodebuild)
- Add persistent environmentIssueToast with "Fix in Terminal" button
- Mount useEnvironmentIssueListener in AppContent (not AppShell) so it
  stays active across all routes including /settings
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 17, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
sustn Ready Ready Preview, Comment Mar 18, 2026 6:50am

…omments

Swap out react-diff-view for @pierre/diffs, gaining Shiki-powered syntax
highlighting, split/unified toggle, word-level inline change detection,
and Shadow DOM rendering.

- Remove react-diff-view and unidiff dependencies
- Rewrite TaskDiffViewer around PatchDiff component from @pierre/diffs
- Add line selection (enableLineSelection) for highlighting ranges
- Add inline commenting via gutter utility — users click a line to
  leave a comment, which renders as an annotation bubble in the diff
- Collect inline comments into structured markdown when submitting
  "Request Changes" feedback, so the agent gets file:line context
- Show inline comment count badge in the feedback mode banner
- Add v0.2.0 changelog entry covering the new diff viewer, inline
  comments, and the review loop / environment check improvements
@Ghvstcode Ghvstcode merged commit b6a900a into main Mar 18, 2026
3 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.

1 participant