Skip to content

[UPDATED] Update PR Test - Processed by Copilot#1904

Closed
dsyme wants to merge 1 commit intomainfrom
test-pr-1776235680
Closed

[UPDATED] Update PR Test - Processed by Copilot#1904
dsyme wants to merge 1 commit intomainfrom
test-pr-1776235680

Conversation

@dsyme
Copy link
Copy Markdown
Collaborator

@dsyme dsyme commented Apr 15, 2026

This PR is for testing test-copilot-update-pull-request


This pull request was automatically updated by the Copilot agentic workflow.

@github-actions github-actions bot changed the title Test PR for Copilot Update PR [UPDATED] Update PR Test - Processed by Copilot Apr 15, 2026
@dsyme dsyme closed this Apr 15, 2026
lpcox added a commit to github/gh-aw-mcpg that referenced this pull request Apr 15, 2026
…tions (#3831)

## Problem

Issue content authored by an org owner (@dsyme) was unexpectedly
filtered by integrity policy in [this workflow
run](https://github.com/githubnext/gh-aw-test/actions/runs/24441119155/job/71406472575).
The agent reported the issue content was "filtered by the integrity
policy" even though the author is an org owner with admin rights.

Related issue: githubnext/gh-aw-test#1904

## Root Cause

PR #2863 added a collaborator permission API fallback to
`resolve_author_integrity` in `tool_rules.rs` (Phase 1 —
`LabelResource`). However, for **read operations**, Phase 2
(coarse-grained check) is skipped, deferring to Phase 5's per-item
labels from `LabelResponse`. The per-item integrity functions —
`issue_integrity`, `pr_integrity`, and `commit_integrity` in
`helpers.rs` — did **not** have the collaborator permission fallback.

For org owners whose `author_association` is reported as `"NONE"`
(because admin access is inherited through org ownership rather than
direct collaboration), the per-item integrity was computed as `none`,
which is below the agent's `min_integrity` threshold, causing the
content to be filtered.

## Fix

- Extract a shared `elevate_via_collaborator_permission` helper that
encapsulates the org-repo check + collaborator permission API fallback
logic
- Apply it in all four integrity-computing call sites:
- `resolve_author_integrity` in `tool_rules.rs` (refactored to use
shared helper)
  - `issue_integrity` in `helpers.rs` (new fallback)
  - `pr_integrity` in `helpers.rs` (new fallback)  
  - `commit_integrity` in `helpers.rs` (new fallback)

This ensures consistent integrity computation across both Phase 1
(resource labeling) and Phase 5 (response labeling).

## Testing

- All 291 Rust guard tests pass
- `make agent-finished` passes (format, build, lint, all Go tests)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant