Skip to content

docs(pr-management): export the PR head for adversarial reviewers - #1986

Merged
potiuk merged 1 commit into
apache:mainfrom
potiuk:adversarial-export-excludes-policy
Nov 4, 2026
Merged

potiuk merged 1 commit into
apache:mainfrom
potiuk:adversarial-export-excludes-policy

Conversation

@potiuk

@potiuk potiuk commented Nov 4, 2026

Copy link
Copy Markdown
Member

Summary

  • The code-review skill now gives adversarial reviewers an export of the PR's head as --repo-dir, instead of an empty directory. With an empty directory they see only the diff, title and body, and reply without findings.
  • The export leaves out .apache-magpie-overrides/tools/vetted-ops. The secure setup denies writes to that path wherever it appears, so a full git archive | tar -x stops partway through. The deny rule stays as it is.
  • The skill now says the exported tree reaches the reviewers' model providers, in both the "what leaves the machine" note and the session announcement.

Type of change

  • Skill change (.claude/skills/<name>/) — eval fixtures updated below
  • Tool / bridge contract (tools/<system>/*.md)
  • Python package (tools/*/ with pyproject.toml)
  • Groovy reference impl
  • Cross-cutting (RFC, AGENTS.md, sandbox, privacy-LLM)
  • Documentation (docs/, README.md, CONTRIBUTING.md)
  • Project template (projects/_template/)
  • CI / dev loop (prek, workflows, validators)
  • Other:

Test plan

  • Commit hooks pass on the two changed files, and prek run --files with workspace-pytest skipped reports no failures. prek run --all-files was not run.
  • Eval suite for pr-management-code-review — not run. No fixtures changed.
  • Other: ran the documented git archive export against a real PR head under the sandbox. tar exited 0 and the policy path is absent.

Notes for reviewers

  • The exclusion also applies when a PR changes the policy file, so the skill tells the reviewer to read that file themselves.
  • git archive honours export-ignore, so those paths are missing from the export too. The skill says so.
  • More now leaves the machine than before: the whole head tree rather than the diff alone. The existing "ask first on a private <upstream>" rule covers this.

Gen-AI disclosure

Drafted with Claude Code (Claude Opus 5), and reviewed by the maintainer opening this PR.

🤖 Generated with Claude Code

Reviewers given an empty --repo-dir see only the diff and reply without
findings, so the code-review skill now exports the PR's head instead.
The export excludes the vetted-ops policy path, which the secure setup
denies writing anywhere, so the rule stays in place and the export
completes. The skill also says the exported tree now reaches the
reviewers' providers.

Generated-by: Claude Opus 5
@github-actions github-actions Bot added family:pr-management pr-management-* skills capability:review Deep per-item code review or contributor mentoring labels Nov 4, 2026
@potiuk
potiuk merged commit ad075ad into apache:main Nov 4, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

capability:review Deep per-item code review or contributor mentoring family:pr-management pr-management-* skills

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant