You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Harness-side publication for credential-free Claude review stages #79
PR #74 runs Claude read-only stages in an independent disposable clone with no GitHub or Git credentials: a temporary HOME, an empty GH_CONFIG_DIR, no GH_TOKEN/GITHUB_TOKEN, a neutral GIT_CONFIG_GLOBAL with GIT_CONFIG_NOSYSTEM=1, no SSH agent, and interactive prompts disabled. This means the reviewer can't write to the branch. It also means it can't publish, so for now Claude is ineligible for the read-only stages that publish (review, rereview). A direct dispatch of one of those stages returns BLOCKED / harness_publication.
Proposal
Let the harness publish on the stage's behalf, so Claude can serve review and rereview again:
Context in. Before dispatch, the runtime uses its own credentials to snapshot what a credential-free reviewer can no longer read: PR metadata, labels, base/head, the complete comment history for contract recovery, and gh pr checks output. It writes the snapshot outside the disposable clone and passes its path in the prompt.
Comment out. The stage returns the complete review comment body (run line, REV-xxx headers, and prose) between delimiters in its output, or writes it to a file in a harness-owned directory.
Validate. The runtime parses the body with scripts/review_contract.py. It requires one new review run line, well-formed finding headers, and no ID collisions with the recovered history, and it refuses to publish anything that fails.
Publish. The runtime posts the body with gh pr comment --body-file, using the credentials the publication preflight already verified, and records the comment URL.
Telemetry. Record read_only_mode=isolated_verified and a new publication=harness field on the row.
Codex stages stay as they are.
Acceptance
Claude can be routed to review/rereview and still never holds GitHub or Git write credentials.
A malformed or contract-violating body is not published, and the stage reports why.
Tests cover the context snapshot, validation failures, and the publication path, all with fake gh.
Obsolete. The credential-free reviewer this issue assumed was reverted before PR #74 merged: per the Decision on #72, Claude read-only stages keep their normal gh/git access and record read_only_mode = detected (no isolated_verified, no harness_publication refusal). Claude can already publish review/rereview comments itself, so harness-side publication is not needed. If a credential-free reviewer mode is wanted later, it should be a new opt-in issue.
Activity
Run Claude reviews without credentials and fail on leftover clones
Allow Claude in read-only roles via isolated worktrees (#74)
datacas commentedon Sep 25, 2026
Obsolete. The credential-free reviewer this issue assumed was reverted before PR #74 merged: per the Decision on #72, Claude read-only stages keep their normal
gh/gitaccess and recordread_only_mode = detected(noisolated_verified, noharness_publicationrefusal). Claude can already publishreview/rereviewcomments itself, so harness-side publication is not needed. If a credential-free reviewer mode is wanted later, it should be a new opt-in issue.