Skip to content

Fix #1758: exclude base-branch commits from re-review deltas - #1906

Merged
jwbron merged 8 commits into
mainfrom
egg/issue-1758
Apr 23, 2026
Merged

Fix #1758: exclude base-branch commits from re-review deltas#1906
jwbron merged 8 commits into
mainfrom
egg/issue-1758

Conversation

@james-in-a-box

Copy link
Copy Markdown
Contributor

Re-review prompts used git diff ${LAST_REVIEW_COMMIT}..HEAD, a snapshot diff that includes any base-branch merge that landed between the last review and HEAD. This caused reviewers to attribute merged-in work to the PR author (see issue #1758 for a concrete example on PR #1692).

Switches all five affected call sites (three GHA prompt builders plus two in orchestrator/routes/pipelines.py:_build_review_prompt) to git log ${LAST_REVIEW_COMMIT}..HEAD --not origin/${BASE_REF} -p, which explicitly excludes commits reachable from the base branch. Shell scripts accept a new BASE_REF env var (default main); reusable-review.yml plumbs the real base ref from its existing pr-meta step. Cycle-1 full-PR reviews are unchanged.

Test Plan

  • Automated: pytest tests/action/test_build_review_prompt.py tests/action/test_build_agent_mode_design_review_prompt.py tests/action/test_build_contract_verification_prompt.py orchestrator/tests/test_pipeline_prompts.py — all re-review assertions updated, plus new non-default-base-ref coverage
  • Automated: make test — full suite passes
  • Manual: trigger a re-review on a PR that has a base-branch merge commit since the last review (either via the GHA bots or a BRC re-review cycle) and confirm the reviewer sees only PR-authored commits in the delta, not the merged-in base-branch work

Manual Steps

Pre-merge: none
Post-merge: monitor the next few automated re-reviews (especially on PRs that have merged main during their lifecycle) for a few days to confirm the attribution issue is gone

Pipeline Context

Pipeline: issue-1758
Issue: #1758

Per-phase BRC transcripts: implement.

Authored-by: egg

@egg-reviewer egg-reviewer Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No agent-mode design concerns.

The prompts continue to instruct the agent which git command to run (orientation) rather than pre-fetching diffs — the agent still explores on its own. The procedural git log ... --not origin/<base> -p instruction is justified: the correct syntax to exclude base-branch merges is non-obvious and falls squarely under "procedural context that provides information the agent can't easily discover."

— Authored by egg

@james-in-a-box

This comment has been minimized.

@egg-reviewer egg-reviewer Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Review: Fix #1758 — exclude base-branch commits from re-review deltas

The core fix is correct and well-motivated. Switching from git diff A..HEAD to git log A..HEAD --not origin/<base> -p properly excludes base-branch commits that were merged into the PR branch between review cycles. The git semantics are sound, the change is applied consistently across all five call sites, and test coverage is thorough.

No blocking issues. Two non-blocking suggestions below.


Non-blocking: fetch nudge missing from step 1 in orchestrator prompt

orchestrator/routes/pipelines.py:3311-3312 — The procedural step 1 embeds the git log ... --not origin/<base> -p command:

lines.append(
    f"1. Review the implementation using `git log --oneline -10` and `{diff_command}`"
)

But the git fetch origin <base> instruction only appears ~140 lines later in the ## Delta Review section (line 3455). A reviewer following the prompt top-to-bottom would encounter the --not origin/<base> command in step 1 without having fetched first, which could produce stale results if origin/<base> is behind.

By contrast, the three GHA shell scripts correctly combine both in a single instruction: "First run git fetch origin ${base_ref} …, then use git log …".

Suggested fix — prepend the fetch to step 1 for delta reviews, or replace the step-1 command with a forward reference to the Delta Review section:

if is_delta_review:
    lines.append(
        f"1. First run `git fetch origin {_delta_base_branch}`, then review "
        f"the delta using `{diff_command}` (see **Delta Review** below)"
    )
else:
    lines.append(
        f"1. Review the implementation using `git log --oneline -10` and `{diff_command}`"
    )

Non-blocking: _delta_base_branch bypasses _resolve_origin_ref normalization

orchestrator/routes/pipelines.py:3451:

_delta_base_branch = base_branch or "main"

This doesn't go through _resolve_origin_ref, which exists specifically to tolerate callers that pass "origin/develop" instead of "develop". If base_branch were ever "origin/develop", _base_ref would correctly resolve to "origin/develop", but _delta_base_branch would be "origin/develop" verbatim — producing git fetch origin origin/develop (wrong).

In practice, callers pass bare branch names ("main", "develop"), so this won't fire today. But _resolve_origin_ref was written precisely because this assumption can't be guaranteed. For consistency:

_delta_base_branch = _base_ref.removeprefix("origin/")

This derives the bare branch name from the already-normalized _base_ref, keeping both sides in sync regardless of input format.


What looks good

  • Git semantics are correct. git log A..HEAD --not origin/<base> -p excludes exactly the right commits. Merge commits appear in the log but without patches (default git log -p behavior for merges), which is the right behavior.
  • All five call sites updated consistently: three GHA prompt builders + both paths in _build_review_prompt().
  • BASE_REF plumbing is complete. reusable-review.yml extracts base.ref from the PR API in pr-meta and passes it as BASE_REF to the prompt builder step. Since all three prompt scripts are invoked through this same reusable workflow, all three receive the variable.
  • Tests are thorough. Each test file asserts the new command form, the fetch nudge, the absence of the old two-dot form, and non-default base branch threading. Good negative assertions.
  • REVIEWER-SYNC.md checklist addition is a useful maintenance aid for future changes to the re-review diff command.
  • Documentation across all surfaces (architecture, concurrent-execution, github-automation, action README) is consistent and technically accurate.

— Authored by egg

@james-in-a-box james-in-a-box Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Contract Verification — PR #1906 (Issue #1758)

Comprehensive contract verification of all 6 tasks in phase-1 (Implement). All tasks verified against the PR diff and live codebase.

Task-by-Task Verification

task-1-1 VERIFIEDorchestrator/routes/pipelines.py:3293-3306
The is_delta_review branch of diff_command now uses f"git log {last_reviewed_commit}..HEAD --not {_base_ref} -p" (L3303). Cycle-1 three-dot git diff {_base_ref}...HEAD is unchanged (L3305). _base_ref = _resolve_origin_ref(base_branch) correctly resolves to origin/<branch>.

  • AC met: cycle > 1 produces git log; cycle 1 produces three-dot git diff.

task-1-2 VERIFIEDorchestrator/routes/pipelines.py:3449-3461
Delta Review directive references git log {last_reviewed_commit}..HEAD --not {_base_ref} -p (L3457) and includes git fetch origin {_delta_base_branch} nudge (L3455). _delta_base_branch = base_branch or "main" handles None defensively.

  • AC met: Delta Review section names new command and includes git fetch.

task-1-3 VERIFIED — all three action shell scripts

  • build-review-prompt.sh: L13 documents BASE_REF, L135 local base_ref="${BASE_REF:-main}", L148 emits two-part instruction. Initial-review path untouched.
  • build-agent-mode-design-review-prompt.sh: L12 documents BASE_REF, L81 default, L98 two-part instruction. Initial-review path untouched.
  • build-contract-verification-prompt.sh: L15 documents BASE_REF, L99 default, L112 two-part instruction. Initial-review path untouched.
  • AC met: all three scripts emit git fetch origin main + git log abc123..HEAD --not origin/main -p; no git diff abc123..HEAD on re-review path.

task-1-4 VERIFIED.github/workflows/reusable-review.yml
L365 emits base-ref=$(echo "$pr_json" | jq -r '.base.ref') in the pr-meta step. L496 plumbs BASE_REF: ${{ steps.pr-meta.outputs.base-ref }} to the prompt-builder step env block. No consumer-workflow changes.

  • AC met: workflow sets BASE_REF to PR's actual base branch.

task-1-5 VERIFIED — three action test files

  • test_build_review_prompt.py: helper accepts base_ref kwarg (L19, L33-34); test_includes_git_log_instruction asserts new form (L179) + fetch (L181) + old form gone (L183); test_custom_base_ref_threaded_through with base_ref="develop" (L185-203).
  • test_build_agent_mode_design_review_prompt.py: same pattern (L19, L187-207).
  • test_build_contract_verification_prompt.py: same pattern (L19, L157-177).
  • AC met: pytest tests/action/ passes (all 46 tests). Zero tests assert git diff <sha>..HEAD on re-review path.

task-1-6 VERIFIEDorchestrator/tests/test_pipeline_prompts.py

  • test_delta_review_directive (L2326): asserts git log abc123..HEAD --not origin/main -p (L2345), git fetch origin main (L2347), old form gone (L2350).
  • test_delta_review_still_uses_commit_sha (L3124): updated to new form (L3140), old form gone (L3144).
  • New test_delta_review_with_non_default_base_branch (L3146): base_branch="develop", asserts origin/develop in both fetch (L3165) and log (L3163), origin/main not present (L3167).
  • New test_delta_review_contract_reviewer_uses_base_branch (L3171): contract reviewer also threads develop correctly.
  • Cycle-1 tests unchanged.
  • AC met: pytest orchestrator/tests/test_pipeline_prompts.py passes (302 tests). Non-default-base tests would fail if base_branch isn't threaded through.

Test Results

All 348 focused tests pass:

tests/action/test_build_review_prompt.py ................ 20 passed
tests/action/test_build_agent_mode_design_review_prompt.py ... 14 passed
tests/action/test_build_contract_verification_prompt.py ... 12 passed
orchestrator/tests/test_pipeline_prompts.py .............. 302 passed

Contract Integrity

  • All 6 tasks marked complete with linked commits
  • task-1-1 through task-1-4: commit 3898fc6bd (coder)
  • task-1-5 and task-1-6: commit 445b189cb (tester)
  • No orphaned code outside task scope
  • No contract violations found
  • Phase consistency: all tasks complete, phase status is consistent
  • BRC consensus reached with all agents ACKing

Non-blocking observations

  • orchestrator/routes/pipelines.py:3451: _delta_base_branch = base_branch or "main" duplicates computation already in _resolve_origin_ref. Not a bug — cosmetic.
  • tests/action/test_build_review_prompt.py:143: docstring on test_generates_rereview_prompt still mentions "git diff" but the test body only asserts identity markers, not the diff command. Stale docstring, cosmetic.
  • Task-1-5 status in contract JSON is pending despite commits being linked — likely a timing issue where egg-contract complete-task was not called for these tasks (only add-commit was). Not a code issue.

— Authored by egg

@james-in-a-box

This comment has been minimized.

@james-in-a-box

This comment has been minimized.

@james-in-a-box

This comment has been minimized.

@james-in-a-box

This comment has been minimized.

@james-in-a-box

This comment has been minimized.

@james-in-a-box james-in-a-box Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Both non-blocking suggestions addressed in 654c7c5:

  1. Fetch nudge in step 1 — delta reviews now show 1. First run git fetch origin <base>, then review the delta using <command> (see **Delta Review** below) instead of the bare git log command. This matches the GHA scripts that already combined both instructions.

  2. _delta_base_branch normalization — replaced base_branch or "main" with _base_ref.removeprefix("origin/"), deriving the bare branch name from the already-normalized _base_ref. Moved the definition up next to _base_ref so both the step-1 block and the Delta Review section share the same variable.

Also fixed a stale docstring in test_build_review_prompt.py (mentioned by contract verification) — "git diff" → "git log".

All 348 tests pass (302 pipeline prompts + 46 action tests).

— Authored by egg

@james-in-a-box

This comment has been minimized.

@james-in-a-box

Copy link
Copy Markdown
Contributor Author
Autofix tracking
{"Test/Unit Tests": 1}

@james-in-a-box

This comment has been minimized.

egg-orchestrator and others added 7 commits April 22, 2026 23:36
Update reviewer-facing documentation so the delta / re-review diff
command is explicitly described as `git log A..HEAD --not origin/<base> -p`
(preceded by a `git fetch`), not the old two-dot `git diff` form that
attributed base-branch merges to the PR's delta.

- docs/guides/github-automation.md: expand the re-review detection step
  to describe the new command, the BASE_REF plumbing from `pr-meta`, and
  why two-dot / three-dot `git diff` don't work.
- docs/guides/concurrent-execution.md: add a "Delta re-review command"
  subsection alongside the existing "Reviewer diff command" note,
  covering BRC `review_cycle > 1` behavior in `_build_review_prompt()`.
- docs/architecture/orchestrator.md: mention the delta-cycle switch in
  the Prompt Context Scoping paragraph.
- action/README.md: document the new `BASE_REF` env var on the three
  reviewer prompt builders and note the automatic plumbing through
  `reusable-review.yml`.
- shared/prompts/REVIEWER-SYNC.md: split the "Diff command" alignment
  row into first-review vs re-review/delta, and add a modification
  checklist item for the delta command surfaces.

Closes part of #1758 (documentation surface).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
reviewer_code non-blocking nit (#1758): my original prose conflated
two-dot and three-dot git diff reasoning. Two-dot git diff A..HEAD is
a direct tree comparison and doesn't involve a merge-base; only
three-dot (git diff A...HEAD -> git diff merge-base(A,HEAD)..HEAD)
does. Separate the two explanations while keeping the net technical
claim (both naive forms show merged-in changes) intact.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Re-review prompts used `git diff ${LAST_REVIEW_COMMIT}..HEAD`, a snapshot
diff that includes any base-branch merge that landed between the last
review and HEAD. This caused reviewers to attribute merged-in base-branch
work to the PR author.

Switch all five affected call sites to
`git log ${LAST_REVIEW_COMMIT}..HEAD --not origin/${BASE_REF} -p`, which
explicitly excludes commits reachable from the base branch. Three-dot
diff alone doesn't help — `merge-base(LAST_REVIEW_COMMIT, HEAD)` collapses
to `LAST_REVIEW_COMMIT` when the latter is an ancestor of HEAD.

Changes:
- orchestrator/routes/pipelines.py: swap the `is_delta_review` branch
  of `diff_command` in `_build_review_prompt()` to the new `git log`
  form; update the "Delta Review" directive to mention `git fetch
  origin {base_branch}` followed by the new command. Cycle-1 three-dot
  `git diff origin/{base}...HEAD` path is unchanged.
- action/build-review-prompt.sh, build-agent-mode-design-review-prompt.sh,
  build-contract-verification-prompt.sh: accept a new `BASE_REF` env var
  (default `main`); replace the old `git diff <sha>..HEAD` instruction
  with `git fetch origin ${BASE_REF}` + the new `git log` form. Initial-
  review paths untouched.
- .github/workflows/reusable-review.yml: extend `pr-meta` to emit the
  PR's actual base ref (`jq '.base.ref'`), and plumb it into the
  prompt-builder step as `BASE_REF`. No consumer-workflow edits needed.

Follow-up: tests for the new delta command form are owned by the tester
role and will be updated in a separate commit (tasks 1-5 and 1-6 of
the contract).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…1758)

Tasks 1-5 and 1-6 from the contract: update the existing re-review
assertions in `tests/action/` and `orchestrator/tests/test_pipeline_prompts.py`
now that the prompt builders emit
`git log <sha>..HEAD --not origin/<base> -p`
instead of `git diff <sha>..HEAD` on the delta path.

- tests/action/test_build_review_prompt.py,
  test_build_agent_mode_design_review_prompt.py,
  test_build_contract_verification_prompt.py:
    * helper accepts `base_ref` kwarg, threaded as `BASE_REF` env
    * existing re-review `git diff` assertions rewritten to expect the
      new `git log --not origin/main -p` form plus the
      `git fetch origin main` nudge, and explicitly `not in` the old
      two-dot `git diff` form
    * new `test_custom_base_ref_threaded_through` test per file passes
      `base_ref="develop"` and asserts the prompt mentions
      `origin/develop` (and not `origin/main`) on both the fetch and
      log lines
    * initial-review assertions unchanged

- orchestrator/tests/test_pipeline_prompts.py::TestBuildReviewPrompt::
  test_delta_review_directive: replaces `git diff abc123..HEAD`
  assertion with `git log abc123..HEAD --not origin/main -p`, adds
  assertions for the `git fetch origin main` nudge and the absence of
  the old two-dot form.

- orchestrator/tests/test_pipeline_prompts.py::TestReviewPromptBaseBranch::
  test_delta_review_still_uses_commit_sha: updated to assert the new
  command form; still asserts cycle-1 three-dot `origin/main...HEAD`
  is absent from delta reviews.

- orchestrator/tests/test_pipeline_prompts.py::TestReviewPromptBaseBranch
  (new): `test_delta_review_with_non_default_base_branch` calls
  `_build_review_prompt(..., review_cycle=2, last_reviewed_commit="deadbeef",
  base_branch="develop", ...)` and asserts the prompt uses
  `origin/develop` in both the log command and the fetch nudge — the
  regression test for non-default bases.

- orchestrator/tests/test_pipeline_prompts.py::TestReviewPromptBaseBranch
  (new): `test_delta_review_contract_reviewer_uses_base_branch`
  verifies contract reviewers also thread base_branch through the
  delta command.

All 369 prompt-related tests (`tests/action/` + `test_pipeline_prompts.py`)
pass against the coder's implementation (commit 3898fc6). Full lint
passes; mypy clean on test files. Cycle-1 three-dot `git diff
origin/main...HEAD` assertions stay unchanged as required by the
contract.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

@egg-reviewer egg-reviewer Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No agent-mode design concerns in the delta since e02568d.

The changes address the general reviewer's two non-blocking suggestions: (1) adding a git fetch nudge to step 1 for delta reviews, and (2) normalizing _delta_base_branch via _base_ref.removeprefix("origin/"). Both are mechanical improvements to the same prompt-instruction approach — the agent still receives a command to run rather than pre-fetched content.

— Authored by egg

@james-in-a-box

This comment has been minimized.

@egg-reviewer egg-reviewer Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Re-Review: Fix #1758 — exclude base-branch commits from re-review deltas

Re-review of changes since e02568d (branch was rebased into a single squashed commit 4fc180f).

Both non-blocking suggestions from the prior review have been properly addressed:

  1. Fetch nudge in step 1orchestrator/routes/pipelines.py:3581-3585 now emits 1. First run git fetch origin {_delta_base_branch}, then review the delta using {diff_command} (see **Delta Review** below) for delta reviews. Matches the GHA scripts.

  2. _delta_base_branch normalizationorchestrator/routes/pipelines.py:3572 now derives from _base_ref.removeprefix("origin/") instead of the previous base_branch or "main". Correctly shares the normalized path with _resolve_origin_ref.

  3. Stale docstring in test_build_review_prompt.py (noted by contract verification) — fixed at line 143, now reads "git log" instead of "git diff".


Non-blocking: two stale docstrings remain in other test files

tests/action/test_build_agent_mode_design_review_prompt.py:151:

"""Re-review uses git diff from last reviewed commit."""

Should be "git log" — the test body correctly asserts git log, but the docstring still says git diff.

tests/action/test_build_contract_verification_prompt.py:124:

"""Re-verification uses git diff from last reviewed commit."""

Same issue — should say "git log".

The test_build_review_prompt.py version was fixed (line 143 now says "git log"), so these two were likely missed during that pass.


Verification summary

  • Orchestrator code: diff_command correctly uses git log {sha}..HEAD --not {_base_ref} -p for delta reviews, three-dot git diff for cycle-1. Step 1 includes fetch nudge. _delta_base_branch derived from normalized _base_ref. Delta Review section at L3726-3737 correctly references both fetch and log commands. All sound.
  • GHA scripts: All three scripts document BASE_REF, default to main, emit fetch + git log on re-review, leave initial-review path unchanged. Consistent across all three.
  • Workflow plumbing: reusable-review.yml extracts base.ref from PR API and passes it as BASE_REF to prompt builders. Complete.
  • Tests: All four test files assert the new git log form, include fetch nudge assertions, negative assertions against old git diff form, and non-default base ref threading. 348 tests pass.
  • Documentation: REVIEWER-SYNC.md checklist addition, action/README.md delta plumbing section, docs/architecture/orchestrator.md, docs/guides/concurrent-execution.md, and docs/guides/github-automation.md all updated accurately and consistently.
  • CI: All checks pass (Unit Tests, Prompt Builder Tests, all linters, security scan).

No blocking issues.

— Authored by egg

@james-in-a-box

This comment has been minimized.

@james-in-a-box james-in-a-box Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Contract Re-Verification — PR #1906 (Issue #1758)

Incremental re-verification following review feedback commit 4fc180f5. Previous review at e02568d.

Delta Since Last Review

The latest commit addresses the two non-blocking suggestions from my previous review:

  1. Fetch nudge in step 1orchestrator/routes/pipelines.py:3581-3585: delta reviews now show 1. First run git fetch origin <base>, then review the delta using <command> in the step-1 instruction, matching the GHA script pattern.
  2. _delta_base_branch normalizationorchestrator/routes/pipelines.py:3572: changed from base_branch or "main" to _base_ref.removeprefix("origin/"), deriving the bare branch name from the already-resolved _base_ref. Cleaner and consistent.
  3. Stale docstring fixtests/action/test_build_review_prompt.py:143: "git diff" → "git log".

All three changes are correct and improve the implementation without breaking any contract requirements.

Regression Check — Previously Verified Tasks

All 6 tasks re-verified against the updated code:

Task Status Evidence
task-1-1 VERIFIED orchestrator/routes/pipelines.py:3573-3577 — delta uses git log ..HEAD --not origin/<base> -p; cycle-1 uses git diff origin/<base>...HEAD
task-1-2 VERIFIED orchestrator/routes/pipelines.py:3726-3737 — Delta Review directive references new command + git fetch origin {_delta_base_branch} nudge
task-1-3 VERIFIED All three shell scripts: BASE_REF env var documented in headers, defaults to main, two-part instruction on re-review path, initial-review untouched
task-1-4 VERIFIED .github/workflows/reusable-review.yml:365 emits base-ref; L496 plumbs BASE_REF to prompt builder
task-1-5 VERIFIED All three action test files: helpers accept base_ref kwarg, re-review assertions check new git log form + fetch nudge + old form absent, test_custom_base_ref_threaded_through tests non-default base
task-1-6 VERIFIED orchestrator/tests/test_pipeline_prompts.py: test_delta_review_directive, test_delta_review_still_uses_commit_sha updated; new test_delta_review_with_non_default_base_branch and test_delta_review_contract_reviewer_uses_base_branch tests added

Test Results

All 348 focused tests pass locally:

tests/action/test_build_review_prompt.py ................ 20 passed
tests/action/test_build_agent_mode_design_review_prompt.py ... 14 passed
tests/action/test_build_contract_verification_prompt.py ... 12 passed
orchestrator/tests/test_pipeline_prompts.py .............. 302 passed

CI checks also passing: Unit Tests ✓, Prompt Builder Tests ✓, all linters ✓.

Non-blocking observation

Two stale docstrings remain (cosmetic, not blocking):

  • tests/action/test_build_agent_mode_design_review_prompt.py:151: "Re-review uses git diff from last reviewed commit." (should say "git log")
  • tests/action/test_build_contract_verification_prompt.py:124: "Re-verification uses git diff from last reviewed commit." (should say "git log")

The feedback commit fixed the equivalent docstring in test_build_review_prompt.py but missed these two. Test bodies are correct — only the docstrings are stale.

Contract Integrity

  • All 6 tasks verified, implementations match descriptions
  • No regressions from the review feedback changes
  • No contract violations
  • Note: tasks 1-5 and 1-6 status is pending in the contract JSON despite having commits linked (445b189cb) — egg-contract complete-task was not called for these tasks. This is a process issue, not a code issue.

— Authored by egg

@james-in-a-box

This comment has been minimized.

@james-in-a-box

This comment has been minimized.

@james-in-a-box

Copy link
Copy Markdown
Contributor Author

Fixed the two remaining stale docstrings in 7be2b59:

  • tests/action/test_build_agent_mode_design_review_prompt.py:151: "git diff" → "git log"
  • tests/action/test_build_contract_verification_prompt.py:124: "git diff" → "git log"

All 348 tests pass.

— Authored by egg

@james-in-a-box

This comment has been minimized.

@egg-reviewer egg-reviewer Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No agent-mode design concerns in the delta since 4fc180f.

The only change is fixing two stale docstrings in test files ("git diff" → "git log"). No prompt content, agent behavior, or design patterns affected.

— Authored by egg

@james-in-a-box

This comment has been minimized.

@egg-reviewer egg-reviewer Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Re-Review: Fix #1758 — exclude base-branch commits from re-review deltas

Re-review of changes since 4fc180f (commit 7be2b59).

Previous feedback — verified fixed

Both non-blocking items from my last review are properly addressed:

  1. Stale docstring in test_build_agent_mode_design_review_prompt.py:151 — now reads "Re-review uses git log from last reviewed commit." Fixed.

  2. Stale docstring in test_build_contract_verification_prompt.py:124 — now reads "Re-verification uses git log from last reviewed commit." Fixed.

Full state verification

Re-verified the complete PR to confirm no regressions from the docstring fix commit:

  • Orchestrator: diff_command correctly uses git log {sha}..HEAD --not {_base_ref} -p for delta reviews (L3573-3576). _delta_base_branch derives from _base_ref.removeprefix("origin/") (L3572). Step 1 includes fetch nudge (L3581-3584). Delta Review section references both fetch and log commands (L3727-3737). All sound.
  • GHA scripts: All three scripts read BASE_REF with main default, emit git fetch origin <base> + git log <sha>..HEAD --not origin/<base> -p on re-review, leave initial-review paths unchanged. Consistent across all three.
  • Workflow: reusable-review.yml extracts base.ref from PR API (L440) and passes as BASE_REF (L453). Complete.
  • Tests: All four test files assert the new git log form, include git fetch nudge assertions, negative assertions against old git diff form, and non-default base ref threading. All docstrings now accurate.

No blocking issues. No new suggestions.

— Authored by egg

@james-in-a-box

This comment has been minimized.

@james-in-a-box james-in-a-box Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Contract Re-Verification (Incremental)

Previous review commit: 4fc180f529c4afaffc0a01c47e800a729c6d98a9
Current HEAD: 7be2b597161312062ff8acc9be97e3869522cbda

Delta Since Last Review

One commit since last review: 7be2b5971 ("Fix stale docstrings: git diff -> git log in test files"). Changes are purely cosmetic — two docstrings updated in test files to reflect the new git log command form:

  • tests/action/test_build_agent_mode_design_review_prompt.py:150 — docstring "git diff" → "git log"
  • tests/action/test_build_contract_verification_prompt.py:123 — docstring "git diff" → "git log"

No functional code changes. No regressions possible.

Full Contract Verification

All 6 tasks verified against the codebase:

Task Description Status Verified
task-1-1 Replace delta diff_command with git log ... --not complete orchestrator/routes/pipelines.py:3573-3577
task-1-2 Update Delta Review directive text complete orchestrator/routes/pipelines.py:3726-3736
task-1-3 Update 3 action shell scripts with BASE_REF complete ✅ All 3 scripts accept BASE_REF, default to main, use git log --not
task-1-4 Plumb base-ref through reusable-review.yml complete pr-meta emits base-ref (L365), prompt step consumes it (L496)
task-1-5 Update action test files pending* ✅ Tests updated, base_ref kwarg added, develop tests present, 46/46 pass
task-1-6 Update test_pipeline_prompts.py pending* ✅ Tests updated, non-default base test present, 25/25 relevant tests pass

*Tasks 1-5 and 1-6 are marked pending in the contract but their implementation is complete and verified. Code exists at commit 445b189cb and all tests pass.

Acceptance Criteria Verification

  1. Cycle > 1 produces git log <sha>..HEAD --not origin/<base> -p — ✅ Verified in pipelines.py:3574
  2. Cycle 1 still produces three-dot git diff — ✅ Verified in pipelines.py:3576
  3. Delta Review section references new command + fetch nudge — ✅ Verified in pipelines.py:3730-3732
  4. Shell scripts accept BASE_REF, produce correct output — ✅ All 3 scripts verified
  5. Workflow plumbs BASE_REF from PR metadata — ✅ Verified in reusable-review.yml:365,496
  6. No test asserts old git diff <sha>..HEAD on re-review path — ✅ Grep confirmed
  7. All tests pass — ✅ 46/46 action tests + 25/25 relevant pipeline prompt tests

Verdict

No contract violations found. All acceptance criteria met. The delta since last review is a non-functional docstring fix that improves accuracy. Previously verified criteria remain intact.

Note: Tasks 1-5 and 1-6 have their contract status as pending but implementation is complete — the implementer should mark them complete.

— Authored by egg

@james-in-a-box

This comment has been minimized.

@james-in-a-box

Copy link
Copy Markdown
Contributor Author
egg is addressing review feedback...

@james-in-a-box

Copy link
Copy Markdown
Contributor Author

All review feedback has been addressed in prior commits. The latest review cycle (on 7be2b59) approved with no new actionable suggestions across all three reviewers.

All 348 tests pass locally. CI checks are green.

— Authored by egg

@james-in-a-box

Copy link
Copy Markdown
Contributor Author

egg feedback addressed. View run logs

16 previous review(s) hidden.

@jwbron
jwbron merged commit 24b9b42 into main Apr 23, 2026
43 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant