Skip to content

Phase 4 self-review: use a plain PR comment, backfill on carried-over PRs, fold out-of-hunk notes into the body #40

Closed

Description

@dmccoystephenson

Template gap (consolidated)

The Phase 4 self-review mechanism fails three different ways in autonomous mode:

  1. The template posts a formal GitHub review (POST /pulls/<n>/reviews, "event":"COMMENT"). The auto-mode classifier blocks this as misrepresenting independent review.
  2. Phase 1's "if a valid open PR exists, jump to Phase 5" shortcut assumes the self-review already happened; a PR carried over from a prior cycle that never posted its Phase 4 self-review then sits forever with no review recorded.
  3. Phase 4 posts inline comments anchored to file line numbers; when an observation targets a line outside the PR's diff hunk, the whole review is rejected with HTTP 422: Line could not be resolved.

Rule to add to the template

  • Post the self-review as a plain PR comment (gh pr comment <n> --body "Self-review: ..."), not a formal review API call — it keeps the audit trail without implying reviewer independence.
  • In Phase 1's open-PR branch: if a valid open PR exists, check whether a Phase 4 self-review was already posted. If not, perform it now (CI must be green first) before jumping to Phase 5.
  • Reserve inline comments for lines the PR actually adds/changes; fold out-of-hunk observations into the review body. Do not retry a 422 with a different line number.

Consolidates (close on merge)

  • kingdom-first-era-dev-loop#11 — formal review blocked, use PR comment
  • example-l-dev-loop#23 — carried-over PR skips a never-completed Phase 4 self-review
  • example-|-dev-loop#2 — inline self-review 422 when line is outside the diff hunk

Consolidated upstream from per-loop self-audit findings. drafted by Claude on behalf of Daniel Stephenson

Activity

  1. added a commit that references this issue on Jul 18, 2026
  2. added 2 commits that reference this issue on Aug 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    template-ruleShould be promoted into create-dev-loop.md

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions