Skip to content

feat: skip_human_reviewed and rereview_requires_commits gate which PRs get a review (15.4.0) - #325

Merged
xjacka merged 5 commits into
dam-agents:mainfrom
lamoghaighoroje:feat/skip-human-reviewed
Dec 1, 2026
Merged

xjacka merged 5 commits into
dam-agents:mainfrom
lamoghaighoroje:feat/skip-human-reviewed

Conversation

@lamoghaighoroje

@lamoghaighoroje lamoghaighoroje commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

What and why

The operator wants less review clutter. The agent must not add a review to a PR that a person already reviewed, and must not post a second review without new commits. No key controls this now. This PR adds two opt-in keys. The defaults keep the current behavior.

  • skip_human_reviewed: enabled: no first review on a PR that a person already reviewed. A person is an account that is not a bot and not the PR author, with a submitted review that has no agent marker. A re-review trigger (the label, a review request, the delta label) still starts the review.
  • rereview_requires_commits: enabled: a re-review only after new commits. At the reviewed SHA, a trigger is cleared also after a description edit or a dismissed review, and the cleanup reply names the one remedy: push a commit. The one same-head exception is a guide_label that no round saw yet: it still starts a guide round, and the cleanup reply names it when it is set and unseen. A review guide that a round did not publish starts no second round at that head and holds no shepherd nudge.

Onboarding does not ask for or write either key. The 15.4.0 Upgrade block offers both keys to the operator of a deployed instance.

Where to look

  • scripts/preflight.sh → the first-review branch: human_reviewed reuses the cached review list of the marker scan. An API failure defers the decision, and it never skips the review silently.
  • scripts/preflight.sh → the same-SHA branch and has_owed: under the key, only new commits or an unseen guide_label can schedule a review at that head. (open)
  • scripts/preflight.sh → the shepherd guide hold: under rereview_requires_commits: enabled, an owed guide does not hold the reviewer nudge.

Scope

preflight.sh (both gates, config object, the shepherd guide hold), review-pr.sh (one comment), verify-onboarding.sh (keys, checks), the key docs (config.md, review-bookkeeping.md, review-rereview.md, artifact.md, shepherd.md, runbook.md, worklist.md, README.md), tests, VERSION 15.4.0 and CHANGELOG.md. No issue tracks this change. #324 merged first as 15.3.0, so this PR takes 15.4.0.

Testing

test_review_basic.sh (six new cases), test_verify_onboarding.sh and test_profile.sh passed at 6e16e7e. The fix round adds one case to test_shepherd.sh and one assertion to test_review_basic.sh; the suite did not run for that round or for the round at 2b6ef52, which changes docs and one code comment only (no Docker daemon).

lamoghaighoroje and others added 2 commits November 27, 2026 15:22
…s get a review (15.3.0)

skip_human_reviewed: enabled gives no first review to a PR that a person
already reviewed, unless a re-review trigger asks. rereview_requires_commits:
enabled re-reviews only after new commits: a trigger at the reviewed SHA is
cleared after a description edit or a dismissal, and an owed review guide
starts no second round at that head. Both default to the current behavior.

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

@dam-code-protector dam-code-protector 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.

🛡️ Code Guardian - Code guardian repo — ⚠️ Code Review @ 6e16e7e

PR #325: feat: skip_human_reviewed and rereview_requires_commits gate which PRs get a review (15.3.0)

Author: lamoghaighoroje | Branch: feat/skip-human-reviewed → main | Changes: +132 −9 (10 files)

Summary

The PR adds two opt-in gates. skip_human_reviewed skips a first review on a person-reviewed PR; rereview_requires_commits needs new commits for a second review.
Limits: 3 skill(s) did not run: issue-fit, typescript-engineering, react-ui-engineering.
4 suggestion(s) dropped under the 🟢 budget.

Findings

  • 🟡 Warning: The 15.3.0 entry says only "Nothing — docs are re-read per run" (CHANGELOG.md:16). This PR adds two off-by-default keys, and a migration reads only this block. No instance then offers the keys (docs/self-modification.md §12, docs/persistence.md step 2). Reported by Agent Engineering.
    Fix: Name each off-by-default key and its one-line effect in the 15.3.0 Upgrade block, in the offer form.
  • 🟡 Warning: Under rereview_requires_commits: enabled a description edit or a dismissed review enters the same-SHA cleanup (docs/review-bookkeeping.md:29). The cleanup comment then states "no description edit since" and offers two remedies that the key refuses (docs/review-bookkeeping.md:23, scripts/preflight.sh:1376). docs/review-rereview.md:21 still says an edited body always answers the trigger. Reported by Agent Engineering.
    Fix: Derive the reason and the remedy from the branch that produced the entry. Name the one remedy that works.
  • 🟡 Warning: docs/config.md:110 says an unpublished owed guide starts no second round at that head. docs/artifact.md:47 and its self-check (docs/artifact.md:125) still promise one guide round. Under the key the <!-- guide-owed --> marker has no end state, and the shepherd holds its nudge (docs/shepherd.md:49). Reported by Agent Engineering.
    Fix: State the exception in the document that owns the guide round. Define what clears the owed marker and the held nudge.

Human Review Guide

📊 Visual guide for the human reviewer — who counts as a human reviewer, and whether the same-SHA doc stays (about 20 min)

Documentation Check (doc-drift)

✅ No findings.

Agent Engineering

  • 🟢 Suggestion: The new skip_human_reviewed bullet cites worklist.md → The pre-flight contract (docs/config.md:104). That section's decision list does not name the new suppression. An agent then sees a skipped PR with only a log line.
    Fix: Add the first-review decision to the section that lists the decisions preflight computes.

Verdict

COMMENT — The gates work, but three statements in the tree still contradict them.

For the human reviewer

The change adds two switches. One switch stops the first automatic review when a person already reviewed the pull request. The other switch allows a second review only after new commits. A person must decide whether a switch that withholds a review also withholds the review guide, because the agent then never builds that page.


Review by Code Guardian - Code guardian repo · automated code guardian · cb/rits/deepseek-ai/DeepSeek-V4.1-Flash-1017 on pi

…at upgrade, keep them out of onboarding (15.3.0)

- The same-SHA cleanup reply and its log line derive the reason and the
  remedy from rereview_requires_commits.
- Under the key an owed review guide starts no round and holds no shepherd
  nudge; artifact.md, shepherd.md, review-rereview.md and runbook.md say so.
- The 15.3.0 Upgrade block offers both keys; ONBOARDING.md does not set them.
- worklist.md lists the first-review decision of skip_human_reviewed.
@xjacka

xjacka commented Dec 1, 2026

Copy link
Copy Markdown
Collaborator

Answer to the review at 6e16e7e, fixed in 238fcb2:

  • Fixed — 15.3.0 entry offers no key for two new gates: the Upgrade block offers skip_human_reviewed and rereview_requires_commits, each with its effect, and writes a key only on the operator's yes. By operator decision, ONBOARDING.md does not set either key; README.md marks both "not set".
  • Fixed — cleanup reply states a false reason and refused remedies: docs/review-bookkeeping.md gives one reply per config.rereview_requires_commits value, and the enabled reply names only "push a commit". The preflight.sh log line names the key as the reason. docs/review-rereview.md (same-SHA re-review), docs/worklist.md (label_cleanups_due) and docs/runbook.md (trigger gate) state the exception.
  • Fixed — withheld guide round leaves a stale promise and a held nudge: under the key, the shepherd does not hold the nudge for an owed guide (preflight.sh, new case in test_shepherd.sh). docs/artifact.md (section and self-check), docs/shepherd.md, docs/review-rereview.md (guide round), docs/config.md and the review-pr.sh comment state the exception. docs/artifact.md also states what clears the marker: the next round, at new commits, writes a new history section.

Checks: check 1 → CHANGELOG.md:19,21 name both keys; check 2 → no hits; check 3 → every remaining hit states the exception or is about the guide_label (CHANGELOG.md:232 is an old entry). The test suite did not run for this round (no Docker daemon).
Optional item taken: docs/worklist.md → The pre-flight contract lists the skip_human_reviewed first-review decision.

@xjacka xjacka added the code-guardian:rereview Request a code-guardian delta re-review label Dec 1, 2026

@dam-code-protector dam-code-protector 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.

🛡️ Code Guardian - Code guardian repo — ⚠️ Code Review @ 238fcb2

PR #325: feat: skip_human_reviewed and rereview_requires_commits gate which PRs get a review (15.3.0)

Author: lamoghaighoroje | Branch: feat/skip-human-reviewed → main | Changes: +204 −34 (16 files)

Summary

Two new opt-in keys gate which PRs get a review. skip_human_reviewed skips a first review on a person-reviewed PR, and rereview_requires_commits needs new commits for a second one.
Limits: 3 skill(s) did not run: issue-fit, typescript-engineering, react-ui-engineering.

Changes since last review

Previous HEAD: 6e16e7e (2026-11-30T14:37:24Z) — verdict COMMENT

  • ✅ Fixed: 15.3.0 entry offers no key for two new gates (CHANGELOG.md:16)
  • ✅ Fixed: cleanup reply states a false reason and refused remedies (docs/review-bookkeeping.md:29)
  • ✅ Fixed: withheld guide round leaves a stale promise and a held nudge (docs/config.md:110)
  • ✅ Fixed: config.md cites a worklist section without the new decision (docs/config.md:104)
  • 🆕 New: same-head rule omits the unseen guide_label exception (docs/config.md:106)

Findings

  • 🟡 Warning: Four places say a second review comes only after new commits (docs/config.md:106, README.md:148, CHANGELOG.md:21, docs/review-bookkeeping.md:32). An unseen guide_label still posts one at the reviewed head (docs/runbook.md:288), and preflight acts on it (scripts/preflight.sh:1364). An operator who reads the key reference cannot predict that case.
    Fix: name the unseen guide_label as the one same-head exception in each of the four places.

Human Review Guide

📊 Visual guide for the human reviewer — whether an unseen guide_label stays the one same-head exception (about 15 min)

Documentation Check (doc-drift)

✅ No findings.

Agent Engineering

✅ No findings.

Verdict

COMMENT — the key reference states the same-head rule without its guide_label exception.


Review by Code Guardian - Code guardian repo · automated code guardian · cb/rits/deepseek-ai/DeepSeek-V4.1-Flash-1017 on pi

@dam-code-protector dam-code-protector Bot removed the code-guardian:rereview Request a code-guardian delta re-review label Dec 1, 2026
@xjacka

xjacka commented Dec 1, 2026

Copy link
Copy Markdown
Collaborator

Answer to the review at 238fcb2 (fix at 2b6ef52):

  • Fixed — same-head rule omits the unseen guide_label exception: docs/config.md:106, README.md:148, CHANGELOG.md:21 and docs/review-bookkeeping.md:17 now name a guide_label that no round saw yet as the one same-head exception. The cleanup reply (docs/review-bookkeeping.md:36) ends with the guide-label remedy when guide_label is set and unseen. The same rule is also stated in the label_cleanups_due row (docs/worklist.md:109) and the has_owed comment (scripts/preflight.sh:1305), so these changed too.
  • Checks: git grep -nE -e 'only after new commits' → 3 hits, and each names the exception or occurs only where the exception cannot apply (the reply text with its new guide-label ending). bash -n scripts/preflight.sh passed. The test suite did not run (no Docker daemon). This round changes only docs and one code comment.

@xjacka xjacka changed the title feat: skip_human_reviewed and rereview_requires_commits gate which PRs get a review (15.3.0) feat: skip_human_reviewed and rereview_requires_commits gate which PRs get a review (15.4.0) Dec 1, 2026
@xjacka
xjacka merged commit c4d8f35 into dam-agents:main Dec 1, 2026
1 of 2 checks passed
@lamoghaighoroje
lamoghaighoroje deleted the feat/skip-human-reviewed branch December 1, 2026 14:59
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.

2 participants