Skip to content

feat(code-review): add guided review fix workflow - #5271

Closed
atomsbaza wants to merge 1 commit into
kirodotdev:mainfrom
atomsbaza:feat/code-review-sage-pr-base
Closed

feat(code-review): add guided review fix workflow#5271
atomsbaza wants to merge 1 commit into
kirodotdev:mainfrom
atomsbaza:feat/code-review-sage-pr-base

Conversation

@atomsbaza

Copy link
Copy Markdown
Contributor

Problem / Motivation

Code Review Sage previously exposed review context and findings, but it did not provide a complete governed path from local review feedback to safely applying fixes. Users could inspect findings, but could not select candidate fixes, group dependent changes, validate them, apply them, commit them, and request a re-review through one coherent workflow.

Why it matters

Without a guided workflow, applying review fixes requires manual worktree and Git coordination, making it easier to mix unrelated changes, apply an unsafe candidate, lose dependency ordering, or blur the boundaries between Apply, Commit, Push, and Review again. This feature makes those transitions explicit and gives users deterministic validation and evidence for the changes they accept.

What changed (motivation → approach → change)

The implementation adds a local-review → feedback → Review Fix lifecycle while keeping candidate changes isolated and state transitions governed:

  • Added local review context, lifecycle handling, Review Fix task routes, candidate worktree coordination, dependency grouping, CAS state transitions, model resolution/pinning, and validation before Apply.
  • Kept Apply, Commit, Push, and Review-again as separate boundaries, with conflict, retry, and re-plan handling.
  • Added deterministic fake ACP edit behavior and safety restrictions for repeatable tests.
  • Added the Code Review Sage local-review view, Review Fix setup and task panel, model picker, diff/markdown selection support, stable Monaco layout handling, API/types, translations, and focused UI coverage.
  • Updated Sage documentation and committed redacted UI evidence under temp-screenshots/interactive-code-review/.
  • Ops Mission Control and Redirects E2E gate repair are deliberately excluded from this PR and will be handled in a separate PR.

Tests

  • Backend targeted tests: 65 passed, covering local review, fake ACP, Git coordination, Review Fix routes, and task-runner behavior.
  • Frontend targeted Vitest: 7 files / 56 tests passed, covering Sage model API/context, Review Fix UI, model picker, PR review detail, PR pick list, and run detail.
  • mypy: Success: no issues found in 19 source files.
  • tsc -b: passed.
  • npm run i18n:check: passed.
  • py_compile, isort, and flake8: passed.
  • ESLint on the Sage scope: 0 errors and 15 accessibility warnings.
  • git diff --check: passed for source/test files; committed PNG evidence is valid binary image data.

Manual verification

Performed against an isolated Gateway, temporary repository, and fake ACP backend (isolated evidence only; this is not production integration verification):

  1. Created a review finding and grouped dependent fixes.
  2. Started execution and observed the awaiting-validation state.
  3. Ran validation, then applied the candidate.
  4. Observed the awaiting-commit state and committed the accepted group.
  5. Confirmed the target file changed as expected, the target repository was clean, and the target HEAD matched the expected commit.

Screenshots / video

Review context

Diff view

Review running

Additional redacted evidence

Comment hover

Comment dialog

Pending comment

Local review

Related Issues

No linked issue: this feature has no tracked issue reference.

Checklist

  • Single commit with a Conventional Commits title (feat|fix|docs|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

Contribution License Agreement

N/A — repository template placeholder remains unchanged.

@atomsbaza
atomsbaza requested a review from a team August 23, 2026 11:50
@atomsbaza
atomsbaza requested a review from a team as a code owner August 23, 2026 11:50
@atomsbaza
atomsbaza requested a review from cixuuz August 23, 2026 11:50
@github-actions github-actions Bot added fork Pull request from a fork (external contributor) readiness: checking Automated validation is still running merge conflict Branch has merge conflicts with its base — author must resolve before merge labels Aug 23, 2026
@atomsbaza

Copy link
Copy Markdown
Contributor Author

Superseded by PR #5274, which is based on the current upstream main and contains the single-commit replacement. Closing this stale-history PR; no force-push was used.

@atomsbaza atomsbaza closed this Aug 23, 2026
@github-actions github-actions Bot removed the readiness: checking Automated validation is still running label Aug 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fork Pull request from a fork (external contributor) merge conflict Branch has merge conflicts with its base — author must resolve before merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant