Skip to content

fix(code-review): keep export-ignore paths in the adversarial export - #2030

Merged
potiuk merged 1 commit into
apache:mainfrom
potiuk:fix/adversarial-export-ignore-paths
Nov 9, 2026
Merged

potiuk merged 1 commit into
apache:mainfrom
potiuk:fix/adversarial-export-ignore-paths

Conversation

@potiuk

@potiuk potiuk commented Nov 9, 2026

Copy link
Copy Markdown
Member

Summary

  • adversarial.md exports the PR head with git archive, which honours export-ignore. A project that marks a directory that way loses it from the export with no warning, even when the PR changes files there, so the reviewers cannot read the surrounding code.
  • The export now goes through a temporary index (read-tree, rm --cached, checkout-index), which ignores export-ignore and still drops the vetted-ops policy path.

Seen on apache/airflow#76510: dev/ is export-ignore there, so the export was missing every file the PR changed.

Type of change

  • Skill change (.claude/skills/<name>/) — eval fixtures updated below

Test plan

  • prek run --files <changed files> passes
  • Ran the three commands on apache/airflow: dev/ was exported, and the checkout and its real index were untouched
  • Ran them on a throwaway repository whose PR branch changes a stand-in policy file (the sandbox refuses the real path): git rm without -f fails, and with -f the export keeps the export-ignore directory and drops the policy file
  • No eval fixture added: the commands changed, not a decision

RFC-AI-0004 compliance

  • Sandbox — the policy path stays out of the export, so the secure setup's write denial is still respected
  • Privacy LLM — only files in the PR's public head are exported, as before

Linked issues

Refs #1986.

Notes for reviewers

An adversarial reviewer flagged that checkout-index applies smudge filters. So does git archive: on a test repository with a smudge filter both exported the same filtered content, so this change neither adds nor removes that exposure.

🤖 Generated with Claude Code

git archive honours export-ignore, so a project that marks a directory
that way lost it from the reviewers' export, even when the PR changed
files there. Export through a temporary index instead, forcing the
removal of the vetted-ops policy path, which a PR may change.

Generated-by: Claude Opus 5
@potiuk potiuk added family:pr-management pr-management-* skills capability:fix Implement code change to resolve an issue labels Nov 9, 2026
@github-actions github-actions Bot added the capability:review Deep per-item code review or contributor mentoring label Nov 9, 2026
@potiuk
potiuk merged commit 8dca728 into apache:main Nov 9, 2026
9 checks passed
@potiuk
potiuk deleted the fix/adversarial-export-ignore-paths branch November 9, 2026 03:02
potiuk added a commit that referenced this pull request Nov 10, 2026
Brings the specs up to main bfc99bb (37 commits since 1e5c4f9), ahead
of the next dev-version bump:

- security-issue-lifecycle: the import renders the report as defanged
  markdown under a data note, with `description_format: inert` as the
  fenced alternative (#2048).
- adapters: oauth-draft threading by explicit In-Reply-To / References
  (#2051); the typed-decision Jev request shape (#2023).
- adoption-and-setup, marketplace-distribution, codex-runtime: the setup
  sub-action is `update`, and every skill offers the upgrade until it has
  run (#2041); the most specific `sandbox.enabled` wins (#2011); the
  family MCP allows cover single-item reads only (#2020).
- agent-isolation-sandbox: bare `gh auth status` only (#2019); draft
  creation and whole-mailbox search stay prompted (#2020).
- pr-management-family: the CI gate's way out for a non-required check
  (#2029); the adversarial export keeps export-ignore paths (#2030);
  install.md per family (#2031); merge-candidates / thread-mentor names
  (#2025).
- contributor-growth: the candidate-screen committer / PMC headline
  (#2024).
- issue-management-family, repo-health-family: install.md (#2031).
- project-agnosticism: the merge-candidates example path and a re-counted
  example-name gap (#2025).

Generated-by: Claude Opus 5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

capability:fix Implement code change to resolve an issue 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