Skip to content

Add a reusable, traceable review framework - #14

Open
Andyyesiyu wants to merge 2 commits into
mainfrom
codex/reusable-review-framework
Open

Add a reusable, traceable review framework#14
Andyyesiyu wants to merge 2 commits into
mainfrom
codex/reusable-review-framework

Conversation

@Andyyesiyu

@Andyyesiyu Andyyesiyu commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add reusable TOML review tasks plus validated report, finding, evidence, and run contracts
  • run Codex through Docker-free Harbor in a detached worktree and retain ATIF trajectory, result, report, resolved commits, and wall time
  • add an evidence-based review skill and Python/LLM engineering rubric
  • let LocalEnvironment map an existing workspace while isolating Harbor-owned paths and agent HOME
  • fix command rewriting for mapped host paths containing spaces

Validation

  • uv run ruff check .
  • uv run ty check
  • uv run pytest -q (379 passed)
  • skill validation and wheel content validation
  • real Codex forward run: 452.55149 seconds, 38 ATIF steps; its path-quoting finding was reproduced and fixed

Usage

uv run evolve review . --base origin/main --head HEAD

The generated job can be inspected with Harbor View, and the full task snapshot is retained in run.json.

Summary by CodeRabbit

  • New Features

    • Added a built-in change review workflow through the evolve review command.
    • Generates validated review reports and traceable execution records for committed changes.
    • Added reusable framework-quality review criteria and an evidence-based reviewer skill.
    • Added support for reviewing an existing local workspace.
  • Documentation

    • Documented review workflows, workspace configuration, generated artifacts, and packaging updates.
  • Tests

    • Added coverage for review execution, report validation, workspace mapping, and safe path handling.

@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@Andyyesiyu, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 18 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Free

Run ID: f88ad6b3-0275-407a-be67-4cb1d3f9783f

📥 Commits

Reviewing files that changed from the base of the PR and between 97e290a and 841a725.

📒 Files selected for processing (6)
  • .agents/skills/review-change/SKILL.md
  • .agents/skills/review-change/agents/openai.yaml
  • .agents/skills/review-change/references/rubric.md
  • README.md
  • src/evolve/review.py
  • tests/test_review_framework.py
📝 Walkthrough

Walkthrough

Adds an evolve review workflow that validates reusable task and report formats, runs Harbor over a detached commit range, collects ATIF and JSON artifacts, exposes CLI controls, packages review assets, and supports mapped local workspaces with shell-safe path rewriting.

Changes

Review framework

Layer / File(s) Summary
Review contracts and skill
src/evolve/review.py, review_tasks/framework-quality.toml, skills/review-change/*, tests/test_review_framework.py
Defines validated task, finding, evidence, and report models, plus the review skill, rubric, default task, and format-validation tests.
Review runtime and CLI
src/evolve/review.py, src/evolve/cli.py, pyproject.toml, skills/manifest.json, skills/review-change/agents/openai.yaml, README.md, ARCHITECTURE.md, tests/test_coherence.py, tests/test_review_framework.py
Runs Harbor reviews against detached commit ranges, collects trajectory and report artifacts, exposes the review command, packages review assets, and documents the workflow.
Workspace mapping and shell quoting
src/evolve/harbor_local.py, tests/test_harbor_local_environment.py, LOCAL_ENVIRONMENT.md
Adds workspace_dir mapping, shell-aware path quoting, validation for missing directories, and coverage for mapped and spaced paths.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant CLI
  participant ReviewPipeline
  participant Harbor
  participant RunDirectory
  CLI->>ReviewPipeline: load task and resolve base/head refs
  ReviewPipeline->>Harbor: run review in detached worktree
  Harbor->>RunDirectory: write report, trajectory, and result artifacts
  ReviewPipeline->>RunDirectory: validate and collect artifacts
  RunDirectory-->>CLI: return verdict and output paths
Loading

Note

🎁 Summarized by CodeRabbit Free

Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login.

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 97e290a1d1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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".

Comment thread src/evolve/review.py
raise RuntimeError(f"missing {label}: {path}")
_validate_trajectory(trajectory_path)
report = ReviewReport.load(report_path, task)
resolved_wall = wall_s if wall_s is not None else _result_wall_s(result_path)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve the original wall time when recovering a run

For every successful review, the initial collection records run_owned().wall_s, but a later collect_review_run(run_dir) recomputes the value from the trial's started_at and finished_at. Those measure different intervals because the process duration includes Harbor startup and shutdown, so merely recovering a run can overwrite run.json with a different wall time and make repeated analysis inconsistent. Use one timing source consistently, or reuse the already persisted wall_s during recovery.

Useful? React with 👍 / 👎.

Comment thread src/evolve/review.py
Comment on lines +191 to +192
if result.returncode != 0:
raise RuntimeError(f"review agent failed with exit {result.returncode}; artifacts: {run_dir}")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Record failed review runs before raising

When Harbor exits nonzero, this branch raises after saving only stdout and stderr, leaving run.json without the exit code, failure state, or elapsed wall time and making collect_review_run unusable. Agent/setup failures are precisely the runs for which retained operational evidence is needed, so persist the failure metadata before raising rather than producing less trace information than a successful run.

Useful? React with 👍 / 👎.

@zimuwang-real
zimuwang-real deleted the codex/reusable-review-framework branch August 10, 2026 02:41
@zimuwang-real
zimuwang-real restored the codex/reusable-review-framework branch August 10, 2026 09:06
@zimuwang-real zimuwang-real reopened this Aug 10, 2026
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.

3 participants