Skip to content

Harness-side publication for credential-free Claude review stages #79

Closed as not planned

Description

@datacas

Follow-up to #72 and PR #74 (REV-001).

Context

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:

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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.

Activity

  1. datacas commented on Sep 25, 2026

    @datacas
    OwnerAuthor

    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.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions