Skip to content

Fix repository-scoped issue trust - #42

Merged
mchwang merged 3 commits into
mainfrom
codex/lane-h-followup-41
Sep 24, 2026
Merged

mchwang merged 3 commits into
mainfrom
codex/lane-h-followup-41

Conversation

@mchwang

@mchwang mchwang commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Closes #41

Outcome

Issue trust now follows GitHub's current repository collaborator list instead of treating organization membership as repository access. author_association remains validated, visible metadata.

Reproduction

On baseline 1e59b7dfda199c8156c09a9cb9a690e5b55f1b5e, the enum-complete fixture failed because MEMBER normalized to trusted without repository-specific evidence.

Changes

  • validate and retain the issue author login, distinguishing an explicit deleted author from an omitted field
  • retrieve current collaborators with literal read-only arguments, bounded pagination, one overall deadline, and fail-closed validation
  • classify trust from case-insensitive current collaborator membership for every author-association enum
  • document the corrected trust boundary and unavailable-on-permission-failure behavior

Validation

Validated head: 9bf0c951b2855fdd9fee7b0cfdb7e4350a0ec2b6

  • npm test — 15 files, 341 tests passed
  • npm run typecheck — passed
  • git diff --check — passed before commit; exact validated head is clean

Review rounds

  • Self-review round 1: no findings after adding bounded collaborator pagination, malformed/duplicate response rejection, deleted/omitted-author handling, and the enum-complete trust matrix.
  • Copilot round 1: no inline findings. Its summary concern reproduced: an early return for all-deleted authors bypassed the documented collaborator-access validation. Removed that bypass and added a failing-before/passing-after regression. Declined: none.
  • Copilot round 2: no inline findings. Its summary concern reproduced at the remaining zero-issue early return, which also bypassed collaborator-access validation. Removed the final bypass and added a failing-before/passing-after empty-snapshot regression. Declined: none.
  • Copilot round 3: converged with Findings: None, no inline threads, and only the expected request for final human review of the authorization-sensitive change. Changed: none. Declined: none.

Review-lesson audit

  • Covered by existing rule: validate every field used to classify an external record as clear, and fail closed on malformed policy data (AGENTS.md, Guarded external actions).
  • Covered by existing rule: bounded safety scans fail closed when their limit is exceeded (AGENTS.md, Guarded external actions).
  • Covered by existing rule: require every safety-critical API field before an early return, including terminal-success paths (AGENTS.md, Guarded external actions).
  • New reusable rule: none. This fix applies the existing repository-scoped authorization and fail-closed rules.
  • One-off: GitHub MEMBER specifically means organization membership and therefore cannot itself establish repository access.

Deferred scope

  • H4 issue-screen integration remains gated on G4 and is not part of this follow-up.

@mchwang
mchwang marked this pull request as ready for review September 24, 2026 16:39
Copilot AI lite review requested due to automatic review settings September 24, 2026 16:39

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

A moderate unresolved issue weakens fail-closed behavior when no non-deleted authors are present.

Review effort: Lite
Findings: None

What changed in this PR

Updates GitHub issue trust to use current repository collaborators instead of organization membership, with validated author metadata and fail-closed handling.

Changes:

  • Adds author validation and collaborator-based trust classification.
  • Adds bounded collaborator pagination and malformed-response checks.
  • Updates tests and documentation for the repository-scoped policy.
  • Moderate unresolved finding: collaborator validation is skipped when no non-deleted authors exist.
File Description
test/​issues.test.ts Adds trust, pagination, and validation coverage.
test/​issue-ranking.test.ts Updates issue fixtures with author identity.
github/​issues.ts Implements author validation and collaborator-based trust.
docs/​implementation/​issue-prioritization.md Documents the corrected trust boundary.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Copilot AI review requested due to automatic review settings September 24, 2026 16:42

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

Collaborator permission failures can be silently bypassed when no issues are returned.

Review effort: Lite
Findings: None

Copilot AI review requested due to automatic review settings September 24, 2026 16:47

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

Security-sensitive authorization changes require final human review.

Review effort: Lite
Findings: None

@mchwang
mchwang merged commit dbdc917 into main Sep 24, 2026
3 checks passed
@mchwang
mchwang deleted the codex/lane-h-followup-41 branch September 24, 2026 17:01
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.

Reproduce summary-only Lane H review concerns

2 participants