Repository navigation
Conversation
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅
|
|
✅ Ponytail Reviewer completed successfully!
|
|
✅ PR Code Quality Reviewer completed the code quality review. PR Code Quality ReviewerOutcome: The agent completed and reported one or more actions. The no-op output is a completion signal, not a claim that no action was taken. The No-op messageCompleted PR #80757 review: no findings; review submitted and review-history recorded.
|
|
✅ PR Specification Reviewer completed successfully! PR Specification ReviewerOutcome: The agent completed and reported one or more actions. The no-op output is a completion signal, not a claim that no action was taken. The No-op messageSpecification review completed for PR #80757 at head abf810f; applicable changed contracts and evidence are aligned, with no actionable findings or specification updates required.
|
|
✅ Test Quality Sentinel completed test quality analysis.
|
There was a problem hiding this comment.
Reviewed the changed lines and found no merge-blocking correctness, security, performance, or maintainability issues. The deduplication helper operates on a freshly constructed local accept list, and the added tests cover both []any and []string inputs while preserving first-seen order.
🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~2 AIC · ⌖ ~2 AIC · ⊞ 1.7K
Comment /review to run again
Comment MemoryPeek at saved memory (review-history)History |
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the safe-output deduplication change.
No open issues 🎉
What changed in this PR
This PR fixes GP-07 compliance in gh-aw by deduplicating derived safe-output accept entries while preserving first-seen order. Repository-scope normalization remains unchanged.
Changes:
- Deduplicate transformed accept entries and add regression tests for both supported array representations.
- Align guard-policy specifications with runtime sink visibility and compiler-versus-gateway responsibilities.
- Document advisory fork prerequisites and workflow-security fixture count assertions.
| File | Description |
|---|---|
specs/workflow-security/README.md |
Documents fixture count assertions against compiled output. |
specs/advisory-handoff/README.md |
Clarifies the advisory fork prerequisite and recovery hint. |
scratchpad/guard-policies-specification.md |
Updates deduplication requirements, sink visibility examples, and GP-07 traceability. |
scratchpad/github-mcp-access-control-specification.md |
Clarifies implementation status and conformance boundaries. |
pkg/workflow/safeoutputs_guard_policy_test.go |
Adds duplicate-pattern regression cases for []any and []string. |
pkg/workflow/mcp_github_config.go |
Deduplicates derived accept entries while retaining their original order. |
Review effort: Balanced (adaptive)
There was a problem hiding this comment.
What this change does: It removes duplicate derived accept entries in first-seen order and updates the related specifications.
Should fix
- Reuse the existing
sliceutil.Deduplicatehelper. It already handles repeated entries in the same order, so the new helper duplicates code that must otherwise be maintained separately.
Verdict: fix 1 first.
Lean: -11 lines possible.
Generated by ✂️ Ponytail Reviewer for #80757 · codex · routed: gpt61 medium · ~5 AIC · ⌖ ~1 AIC · ⊞ 176
Comment /ponytail to run again
| } | ||
| } | ||
|
|
||
| func deduplicateAcceptEntries(entries []string) []string { |
There was a problem hiding this comment.
Reuse sliceutil.Deduplicate(acceptList) from pkg/sliceutil/sliceutil.go; it already removes repeated entries in first-seen order, so this duplicate helper can be deleted.
There was a problem hiding this comment.
Replaced the local helper with sliceutil.Deduplicate, which preserves first-seen order and does not mutate the input. Addressed in 174bb47.
Comment MemoryPeek at saved memory (spec-review-history)History |
There was a problem hiding this comment.
Summary
The top-level guard-policy dedup is correct, and the two new cases cover both []any and []string input with first-seen order. The targeted TestDeriveSafeOutputsGuardPolicyFromGitHub run passes.
One gap blocks approval: GP-07 requires no duplicate accept entries in any derived write-sink policy, but the enclave paths still skip dedup. Details are in the inline comment on writeSinkAcceptLabelsForRepos.
Other notes
deduplicateAcceptEntriesreuses the input backing array. Safe today, but a fresh slice avoids surprising callers.- The workflow-security paragraph splits a lead-in from its code block. Moving it above the lead-in fixes the flow.
- Spec wording checks out: the counts in
fixtures/cross-repo.mdare asserted bycheck.py, and the advisory fork precondition matcheserrAdvisoryForkMissing.
@copilot please address the inline comments.
🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · routed: haiku55 xhigh · ~6 AIC · ⌖ ~2 AIC · ⊞ 5.1K
Comment /matt to run again
|
|
||
| writeSink := map[string]any{ | ||
| "accept": acceptList, | ||
| "accept": deduplicateAcceptEntries(acceptList), |
There was a problem hiding this comment.
[/diagnosing-bugs] The dedup only covers deriveSafeOutputsGuardPolicyFromGitHub. The enclave write-sink paths still emit duplicates: writeSinkAcceptLabelsForRepos (line 210, used at lines 188 and 207) builds accept from raw repo lists without deduplicating, and GP-07 says derived write-sink policies MUST NOT contain duplicate accept entries. Fix: call deduplicateAcceptEntries inside writeSinkAcceptLabelsForRepos so every writer gets it, then add a regression case with a duplicated enclave repo list. @copilot please address this.
There was a problem hiding this comment.
Deduplication now runs in writeSinkAcceptLabelsForRepos, covering enclave write-sink policies; added a duplicate static-enclave regression case. Addressed in 174bb47.
|
|
||
| func deduplicateAcceptEntries(entries []string) []string { | ||
| seen := make(map[string]struct{}, len(entries)) | ||
| deduplicated := entries[:0] |
There was a problem hiding this comment.
[/codebase-design] entries[:0] reuses the caller's backing array, so this helper overwrites the input slice while it runs. Current callers pass freshly built slices, so there is no bug today, but any caller that reuses its input will see it mutated. Fix: deduplicated := make([]string, 0, len(entries)). @copilot please address this.
There was a problem hiding this comment.
Removed the in-place helper and use sliceutil.Deduplicate, which returns a new slice without mutating caller data. Addressed in 174bb47.
| The compile-only seed uses fictitious credentials and a fake dependency. | ||
| Never dispatch it. Compile a copy into a new temporary directory: | ||
|
|
||
| The expected checkout-token and GitHub App safe-output counts in the header of |
There was a problem hiding this comment.
[/grill-with-docs] This new paragraph is inserted between the Compile a copy into a new temporary directory: lead-in (line 834) and its bash block, so the lead-in now introduces prose instead of the commands. Move the paragraph above the lead-in sentence. @copilot please address this.
There was a problem hiding this comment.
Moved the fixture-count paragraph above the sentence introducing the compile commands. Addressed in 174bb47.
🧪 Test Quality Sentinel Report✅ Test Quality Score: 90/100 — Excellent
📊 Metrics (2 tests)
i️ Notes
Verdict
|
There was a problem hiding this comment.
✅ Test Quality Sentinel: 90/100. 0% implementation tests (threshold: 30%). No violations.
🧪 Test quality analysis by Test Quality Sentinel · copilot · routed: haiku55 xhigh · ~4 AIC · ⌖ ~2 AIC · ⊞ 7.4K
Comment /review to run again
|
🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:
Keeping the changes focused; human review and CI get the final taste test. No merging or CI triggering. Structured data{
"completed_task": 0,
"head": "abf810feeed074da8eb159d24db3acc7bb8bf527",
"kind": "requested",
"schema_version": "1",
"state": "5b94b4a92152f90fbc89a994b1e75459cb144bf6d91fa279d4ecca2d34a655b9",
"work": [
"31bcc5835f4f8229e388c1cda8517bdb2a9f6e268a27665b88fa6db1f7b266e5",
"3ad226ba844e7e3f9678fe3df939c6359d33686a56249956a9a2b0681e39d9f8",
"625b5511f6c3267fd08e7314fd8a1b9a514da6b1bd50356c0a5f631922ad81a0",
"637cc7e565a2c527e9a04110d59768a52c5d6a58f1b23f01d29a4c2ee4a60f22"
],
"workflow": "pr-sous-chef"
}
|
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
…ec-work-plan-2026-11-24 Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
GP-07 requires derived safe-output accept entries to be deduplicated, but duplicate repository patterns were emitted more than once. The related specifications also lacked alignment with the current implementation.
For example,
["github/*", "github/*"]now derivesaccept: ["private:github"].