Skip to content

Move PR Review Advisor workflow programs into tools/pr-review-advisor #6956

Closed

Description

@cv

Parent: #6952

Problem

.github/workflows/pr-review-advisor.yaml contains 353 nonblank executable lines despite already having an owning tool directory. The largest remaining programs prepare the isolated PR-data worktree, bootstrap/fallback advisor output, and validate downloaded artifacts before publication.

The workflow has strict privilege separation: model-bearing analysis cannot write, and the publisher cannot receive the model credential or execute PR code.

Work

  • Move target/ref validation and isolated worktree preparation into tools/pr-review-advisor/.
  • Move bootstrap/fallback result generation into the existing analysis owner.
  • Move bounded regular-file, schema, lane-consistency, secondary-artifact, and stale-head/base validation into a dedicated publisher-side helper.
  • Execute every helper from the checkout pinned to github.workflow_sha, never from the PR data worktree.
  • Keep permissions, secret mapping, artifact download, and job separation in YAML.

Acceptance criteria

  • The 50-line workspace-preparation, 74-line analysis wrapper, and 162-line artifact-validation programs become short trusted helper invocations.
  • Owner/repo, PR number, branch/ref, base SHA, head SHA, workflow SHA, symlink removal, hook/submodule disabling, and immutable fetch checks remain fail-closed.
  • Artifact roots and files remain non-symlink, bounded, contained, schema-valid, and correlated to the triggering head/base.
  • An invalid secondary artifact cannot suppress a valid primary review.
  • No model-bearing step gains write permission and no publisher step gains the model credential.
  • Tests call the helpers directly and retain boundary tests for trusted checkout, permissions, artifact source, and publication ordering.

Coordinate with #6145 before implementation because it changes advisor triggering and trust behavior.

Activity

  1. added
    area: ci
    area: architecture
    on Jul 15, 2026
  2. added theissue type on Jul 15, 2026
  3. added
    help wanted
    on Jul 15, 2026
  4. self-assigned this
    on Jul 16, 2026
  5. added a commit that references this issue on Jul 18, 2026
    b4eb4a7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area: architecturearea: cihelp wanted

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions