Skip to content

fix(review-remote-pr): require persisted setup state before root acceptance - #557

Merged
thewrz merged 7 commits into
mainfrom
feat/issue-542
Aug 30, 2026
Merged

fix(review-remote-pr): require persisted setup state before root acceptance#557
thewrz merged 7 commits into
mainfrom
feat/issue-542

Conversation

@thewrz

@thewrz thewrz commented Aug 28, 2026

Copy link
Copy Markdown
Collaborator

This was written agentically; verify its assertions:

Why

Setup workers could report completion without leaving the canonical evidence that the root review loop must verify.

What

  • Require the canonical per-PR run directory, persisted state artifacts, and a setup.result contract.
  • Make root recovery regenerate missing setup state once and record the contract violation.
  • Add regressions for empty setup directories and canonical run-directory reporting.

Decisions

  • Reuse the existing durable run-directory machinery so setup and root resolve the same evidence path.
  • Treat missing persisted state as an explicit contract failure, with one bounded root regeneration attempt.
  • Stacked on fix(review-remote-pr): pr-loop-setup reports repository-global Code Quality counts as PR blockers #555 — merge that PR first. Agent-driven merges run chain-advance.sh --retarget --pr <this-PR> --base <default> and require its full proof before merging; interactive human merges may merge then delete the predecessor branch for GitHub's automatic retarget.

base=69b8f07c8c40011af20f910c6b29ccd9a9dc99bd
files=4
total.insertions=131
total.deletions=10
total.lines=141
operational.files=4
operational.insertions=131
operational.deletions=10
operational.lines=141
generated.files=0
generated.insertions=0
generated.deletions=0
generated.lines=0
lockfile.files=0
lockfile.insertions=0
lockfile.deletions=0
lockfile.lines=0
fixture.files=0
fixture.insertions=0
fixture.deletions=0
fixture.lines=0
non_operational.files=0
non_operational.insertions=0
non_operational.deletions=0
non_operational.lines=0

Testing

  • tests/run-tests.sh — ALL GREEN
  • Green log: /home/adam/github/agent-kit/.worktrees/feat/issue-542/.agent/logs/20260828T153221Z-test.log

🤖 Co-authored by Codex gpt-5.6-luna high.

Closes #542

Keep PR-loop setup evidence in one canonical run directory and reject or regenerate empty setup state before acceptance.

Co-Authored-By: Codex gpt-5.6-luna <noreply@openai.com>
@coderabbitai

coderabbitai Bot commented Aug 28, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: bb2ee62a-31b6-4004-b07c-a1c5d28d9792

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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

mergetest and others added 3 commits August 28, 2026 11:11
Capture CI status, require run-directory-bearing terminal lines, and rebuild acceptance arguments during root recovery.

Co-Authored-By: Codex gpt-5.6-luna <noreply@openai.com>
Expose stable failing-check names in the CI digest and preserve the named check through setup completion.

Co-Authored-By: Codex gpt-5.6-luna <noreply@openai.com>
Merge the issue 541 predecessor changes while preserving the issue 542 setup evidence contract.

Co-Authored-By: Codex gpt-5.6-luna <noreply@openai.com>
@thewrz

thewrz commented Aug 28, 2026

Copy link
Copy Markdown
Collaborator Author

This was written agentically; verify its assertions:

Adversarial review receipt

  • Reviewer: provider=anthropic; model=claude-fable-5; effort=xhigh; mode=cross-provider (reason: User-authorized Claude Fable adversarial review)
  • Counts: P1=0; P2=4; total=4
  • Reviewed head: ae0c1ff
  • Confirmed finding: Create state directory before gh-pr-state — verdict=declined; decline rationale=gh-pr-state.sh calls private_dir_ensure on --tmpdir, which creates and validates the state directory; the observed setup path reached artifact writes without a caller mkdir.
  • Confirmed finding: Include run-dir in exact terminal contract — verdict=fixed; fix commit SHA(s)=a46d9192be00fa93a061ee3efc9b12acf1ffec3b
  • Confirmed finding: Persist named failing CI check — verdict=fixed; fix commit SHA(s)=a46d9192be00fa93a061ee3efc9b12acf1ffec3b
  • Confirmed finding: Rebuild acceptance arguments during root recovery — verdict=fixed; fix commit SHA(s)=a46d9192be00fa93a061ee3efc9b12acf1ffec3b

🤖 Co-authored by Codex.

@thewrz

thewrz commented Aug 28, 2026

Copy link
Copy Markdown
Collaborator Author

This was written agentically; verify its assertions:

Review ledger

Machine-readable record of every review already performed on this PR.

{
  "version": 1,
  "pr": 557,
  "repo": "wrzonance/agent-kit",
  "reviews": [
    {
      "kind": "adversarial",
      "provider": "anthropic",
      "model": "claude-fable-5",
      "effort": "xhigh",
      "mode": "cross-provider",
      "head_sha": "ae0c1ff8b4d96834760256b4bb9e5fbbe3a8fe7b",
      "covered_heads": [
        "a46d9192be00fa93a061ee3efc9b12acf1ffec3b",
        "ae0c1ff8b4d96834760256b4bb9e5fbbe3a8fe7b"
      ],
      "counts": {
        "p1": 0,
        "p2": 4
      },
      "reviewed_at": "2026-08-28T18:36:57Z"
    }
  ]
}

🤖 Co-authored by Codex.

mergetest and others added 3 commits August 28, 2026 11:44
Keep wait-ci arithmetic numeric when the digest carries named failing checks, including names with spaces.

Co-Authored-By: Codex gpt-5.6-luna <noreply@openai.com>
Base automatically changed from feat/issue-541 to main August 30, 2026 04:13
@thewrz
thewrz marked this pull request as ready for review August 30, 2026 04:13
@thewrz
thewrz merged commit 8187131 into main Aug 30, 2026
2 checks passed
@thewrz
thewrz deleted the feat/issue-542 branch August 30, 2026 04:14
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.

fix(review-remote-pr): pr-loop-setup can complete with an empty run-dir — require persisted state before the root accepts it

1 participant