Skip to content

fix(review): point reviewers at REST GitHub reads - #1764

Merged
obviyus merged 3 commits into
mainfrom
review-one-context-path
Oct 8, 2026
Merged

obviyus merged 3 commits into
mainfrom
review-one-context-path

Conversation

@obviyus

@obviyus obviyus commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

What

Follow-up to #1762: the GitHub reads that the review prompt suggests now work in the hosted review network.

The hosted review profile (review-permissions.toml, proxy mode = "limited") allows only read methods. gh issue view, gh pr view, gh issue list, gh pr list and gh release list use GraphQL POST and fail with HTTP 403 (Method not allowed in limited mode). The prompt suggested all of them. It now names the gh api REST forms: repos/<owner>/<repo>/issues/<n>, .../issues/<n>/comments, .../pulls/<n>, .../releases, and -X GET search/issues -f q=.... Policy v33.

Why

#1762 omits linked-item bodies when the reviewer can read GitHub, and tells it to fetch them. Its own smoke run tried gh issue view / gh pr view for two linked items, and both returned 403. From 2026-04 to 2026-09 the reviewer had no token or network (31ac62b73, #1487, #1489), so ClawSweeper inlined linked bodies for it and the broken commands went unnoticed.

Proof

Run on the hosted-pinned Codex 0.159.3 with the checked-in profile in an isolated Codex home:

gh issue view 87637 --repo openclaw/openclaw --json title   -> HTTP 403 (https://api.github.com/graphql)
gh api graphql -f query='{viewer{login}}'                   -> Method not allowed in limited mode. HTTP 403
gh api repos/openclaw/openclaw/issues/87637 -q .title       -> [Bug] openclaw doctor reports memory search disabled ...
gh api repos/openclaw/openclaw/issues/87637/comments        -> 3 comments
gh api repos/openclaw/openclaw/pulls/92165 -q .merged       -> false
gh api repos/openclaw/openclaw/releases -q '.[0].tag_name'  -> v2026.9.9
gh api -X GET search/issues -f q='repo:openclaw/openclaw doctor memory dreaming' -q .total_count -> 406

Full review through the shipped entry point, with the same profile: pnpm run review -- --local-only --target-repo openclaw/openclaw --item-number 167298 --codex-model gpt-6.1-sol --codex-sandbox clawsweeper-review --output-retention debug --artifact-dir <dir>:

  • review_status: complete.
  • The reviewer read the linked issue, its comments, the linked PR and two more PRs with gh api, and the reads succeeded.
  • Verdict: keep_open, patch correct, no findings, B/B/B (same as main).

pnpm run check passes except interrupted native unshallow cleans its lock and settles transport before retry (git acquisition, untouched). That test fails only under full-suite load and passes 3/3 when run alone.

Limits: Actions job logs redirect to a host outside the allowlist, so gh api .../actions/jobs/<id>/logs still fails. Local --local-only runs still use the operator's Codex home, so they load personal Codex instructions and run without the review network. That is a separate change, because isolating the home has to respect each operator's credential storage.

Merge Danger

Door: two-way: prompt text only.

Blast radius: every hosted review prompt; reviewers can now read linked items they could not read before.

@clawsweeper

clawsweeper Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@obviyus obviyus changed the title fix(review): read GitHub through REST and review locally in the hosted profile fix(review): point reviewers at REST GitHub reads Oct 8, 2026
@clawsweeper clawsweeper Bot added P2 Normal priority bug or improvement with limited blast radius. proof: sufficient Contributor real behavior proof is sufficient. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 8, 2026
@clawsweeper

clawsweeper Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed October 8, 2026, 2:08 PM ET / 18:08 UTC.

ClawSweeper review

What this changes

Replace GraphQL-backed GitHub command examples with REST GET commands that work within the hosted review network.

Example: A reviewer reads linked issue 87637

  • Before: The suggested gh issue view command returns HTTP 403.
  • After: The suggested REST request returns the issue title and allows its comments to be read.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, correct repair backed by successful command traces and a real review run.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (terminal): The current body records successful REST reads under the hosted-pinned Codex restricted profile and a completed shipped review run that fetched linked issue, comment, and PR details. This directly exercises the changed prompt guidance; it does not claim to repair blocked job-log redirects or local-home isolation. No stored-data contract changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Hosted reviewers cannot retrieve linked GitHub evidence using the commands their instructions recommend.
Reason: The change repairs the existing evidence-reading contract with a small instruction correction. It preserves the linked-context design established by the same area's prior merged work.

Merge readiness

✅ Ready for maintainer review

This PR fixes a concrete hosted-review failure that remains on current main. The change is narrow, supported by real review-run evidence, and has no actionable patch findings.

Priority: P2
Reviewed head: f458a7be128af3a16799f0525701d8f6d54642e0

Before merge

None.

Findings

None.

Agent review details

How this fits together

ClawSweeper supplies reviewers with instructions and an index of related GitHub items. Reviewers fetch relevant details through a restricted, read-only network before returning a maintenance decision.

flowchart TD
 A[Item and linked references] --> B[Review prompt]
 B --> C[Reviewer selects relevant evidence]
 C --> D[REST GET requests]
 D --> E[Restricted GitHub network]
 E --> F[Issue and PR details]
 F --> G[Maintenance decision]
Loading

Technical review

Best possible solution:

Keep the existing restricted network and direct reviewers to working REST GET reads for relevant GitHub evidence.

Do we have a high-confidence way to reproduce the issue?

Yes: current main suggests GraphQL-backed commands under a limited network profile, and both this PR and the preceding merged PR record their HTTP 403 failures. No target code was executed during this read-only review.

Is this the best way to solve the issue?

Yes: correcting the command examples repairs the evidence-fetching path while retaining the intended network restrictions and existing context design.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 1e7c8d998141.

Provenance checked

Testing

Proof path: shipped entry point. Added test files: 0.

Security

None.

Evidence

What I checked:

  • Introduced scope: The pinned introduced delta changes four prompt paragraphs, increments the review policy version, and adds one changelog fragment; it does not change credentials or network permissions. (prompts/review-item.md:11, f458a7be128a)
  • Existing network boundary: The checked-in hosted profile extends read-only permissions, uses limited network mode, and permits api.github.com; this PR preserves that boundary. (.github/actions/setup-codex/review-permissions.toml:11, f458a7be128a)
  • Current-main need and original intent: Current main still suggests gh issue view and gh pr view. perf(review): keep the review prompt an index of linked items #1762 intentionally omitted linked bodies for network-enabled reviewers, and its updated body confirms those suggested commands failed with HTTP 403. (prompts/review-item.md:19, 3db5c867c82e)
  • Real behavior proof: The complete current PR body reports Codex 0.159.3 using the checked-in restricted profile: GraphQL requests returned 403, REST issue/comments/PR/releases/search reads succeeded, and the shipped pnpm review entry point completed while successfully reading linked items. The supplied body source identity is c8325eed99a7301c556b8eb8edfd334934c3cc445c2b61619822273de68a8c01. (f458a7be128a)
  • Verified merge scope: The raw test-merge parents are exactly pinned main followed by pinned head. Its comparison against main contains only the three introduced files, preserving main's newer provenance implementation. (38ec2c118919)
  • Area history: String-history search connects the command guidance to the merged linked-context work and earlier read-only review hardening; broader file history identifies Ayaan Zaidi and Peter Steinberger as relevant routing candidates. (prompts/review-item.md:19, 3db5c867c82e)

Likely related people:

  • obviyus: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Labels

Label changes:

  • add P2: This restores evidence reads used by hosted reviews without expanding permissions or changing review outcomes by policy.
  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P2: This restores evidence reads used by hosted reviews without expanding permissions or changing review outcomes by policy.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only; repair and merge need explicit maintainer commands such as @clawsweeper autofix or @clawsweeper automerge.

@obviyus
obviyus merged commit ad52903 into main Oct 8, 2026
22 checks passed
@obviyus
obviyus deleted the review-one-context-path branch October 8, 2026 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal priority bug or improvement with limited blast radius. proof: sufficient Contributor real behavior proof is sufficient. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant