Repository navigation
Align spec compliance checks and reject unsupported GitHub MCP controls - #78413
Conversation
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
|
🚀 PR Specification Reviewer has started processing this pull request |
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅
|
|
✅ 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. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ Ponytail Reviewer completed successfully!
|
|
✅ Test Quality Sentinel completed test quality analysis. Test Quality SentinelOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
There was a problem hiding this comment.
What this change does: It rejects unsupported GitHub MCP controls and adds checks for specification and fixture drift.
Should fix
- Share the fixture inventory with the timestamp test, so adding a fixture does not require maintaining a second list. See the inline comment.
Verdict: Ship.
Lean: -8 lines possible.
Generated by ✂️ Ponytail Reviewer for #78413 · codex · routed: gpt61 medium · ~5 AIC · ⌖ ~1 AIC · ⊞ 185
Comment /ponytail to run again
| sort.Strings(onDisk) | ||
| sort.Strings(documentedInReadme) | ||
|
|
||
| assert.Equal(t, documented, documentedInReadme, |
There was a problem hiding this comment.
The timestamp test above keeps a separate copy of this fixture list, so adding a fixture requires updating both lists even though this check says it verifies the exercised inventory. Make TestFormal_FC_P9_TimestampOrdering iterate documentedForecastFixtures and remove its local list; the check will then cover the fixtures that test actually runs and save eight lines.
There was a problem hiding this comment.
Updated TestFormal_FC_P9_TimestampOrdering to iterate documentedForecastFixtures, removing the duplicate fixture inventory. Commit 8bce442.
There was a problem hiding this comment.
Static review completed. I found no actionable correctness, security, performance, or maintainability issues in the changed lines. The specialist pass completed; its advisory candidates were checked and not retained. No tests were run per the static-review instructions.
🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~3 AIC · ⌖ ~1 AIC · ⊞ 1.5K
Comment /review to run again
Comment MemoryPeek at saved memory (review-history)History |
Comment MemoryPeek at saved memory (spec-review-history)History |
There was a problem hiding this comment.
Skills-Based Review 🧠
Applied /diagnosing-bugs and /tdd. Verdict: the behavior change is sound and the targeted tests pass, with two non-blocking follow-ups.
Verified: go test ./pkg/workflow/ -run TestValidateGitHubGuardPolicy|TestFormal|TestParseGitHub and go test ./pkg/cli/ -run TestOutcomeConformance|TestFormal_Fixture|TestFormal_ForecastSpecSync both pass. gofmt is clean. The outcome corpus has 95 cases, matching the spec. All six P1 backlog rows match the new regex and their .tla targets exist.
📋 Key Themes and Findings
Findings
- Inline,
tools_validation_github.go:227: the new "will not enforce access control" message is unreachable fromgh aw compile. The JSON schema rejectsrolesandprivate-reposfirst withUnknown property, so the new unit tests cover a path users never hit. The rejection itself is correct. Consider a compile-level test that checks the user-facing text. - Inline,
specs/workflow-security/check.py:240: the P1 extraction returns nothing only when zero rows match. It can silently skip a future P1 row with a different layout. Compare the count of| P1 |lines with the extracted targets.
Positive Highlights
- ✅ Fail-closed rejection of unsupported access-control fields, rather than silently ignoring them.
- ✅ Spec, README, and compliance fixture docs now agree on the
roles,private-repos, andreposstatus. - ✅ The forecast fixture check now compares the README table, the on-disk files, and the test list.
@copilot please address the review comments above.
🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · routed: haiku55 xhigh · ~9 AIC · ⌖ ~2 AIC · ⊞ 6.7K
Comment /matt to run again
| for _, field := range fields { | ||
| quotedFields = append(quotedFields, "'tools.github."+field+"'") | ||
| } | ||
| return fmt.Errorf("%s is not supported by the local compiler and will not enforce access control; remove the unsupported field", strings.Join(quotedFields, ", ")) |
There was a problem hiding this comment.
[/diagnosing-bugs] The new will not enforce access control message never reaches gh aw compile users. The JSON schema already rejects roles and private-repos as Unknown property (tools.github has additionalProperties: false), and the string compile API runs schema validation before validateGitHubGuardPolicy. The new unit cases do not run schema validation, so they cannot catch this.
💡 Suggested fix
Add a compile-level test that asserts this message for tools.github.roles and tools.github.private-repos, or document that the schema is the user-facing rejection and this check is defense-in-depth for programmatic callers.
@copilot please address this.
There was a problem hiding this comment.
Added compile-level checks for both unsupported fields supplied through relaxed imports. Normal main-workflow frontmatter is still rejected earlier by schema validation; the guard check is defense-in-depth for imported and direct callers. Commit 8bce442.
| def check_p1_backlog_modules(): | ||
| readme = (ROOT / "README.md").read_text() | ||
| targets = re.findall( | ||
| r"^\|[^|]+\|\s*P1\s*\|[^|]*\|\s*`([^`]+\.tla)`", |
There was a problem hiding this comment.
[/tdd] The P1 extraction regex only matches a backticked .tla in the fourth column, so a future P1 row with a different layout is silently skipped. The check only fails when zero rows match. All six current | P1 | rows match, so this is a robustness gap rather than a bug.
💡 Suggested check
Also count the lines containing | P1 | and raise when that count differs from the number of extracted targets.
@copilot please address this.
There was a problem hiding this comment.
Every P1 row is now parsed individually; malformed target cells fail explicitly, and every listed module is checked. Focused cases cover malformed cells and a missing module. Commit 8bce442.
There was a problem hiding this comment.
🟡 Changes recommended
The specification change leaves the compliance README and CI pins stale, causing main-branch and hourly checks to fail with 'Spec pin drift' after merge.
4 open issues
What changed in this PR
This PR aligns gh-aw’s GitHub MCP validation and specification documentation, while adding checks to detect specification and fixture drift.
Changes:
- Track and reject unsupported GitHub MCP access-control fields, with validation tests.
- Check P1 model-module references, outcome corpus counts, and forecast fixture inventories.
- Clarify deferred support, alias retention, implementation mappings, and guard-error precedence.
| File | Description |
|---|---|
specs/workflow-security/README.md |
Documents the P1 backlog module check. |
specs/workflow-security/check.py |
Checks referenced P1 modules before model checking. |
specs/github-mcp-access-control-compliance/README.md |
Clarifies unsupported controls and combined guard-error expectations. |
specs/forecast-compliance-fixtures/README.md |
Lists all six fixtures and describes synchronization checks. |
scratchpad/guard-policies-specification.md |
Records alias retention and updates implementation mappings. |
scratchpad/github-mcp-access-control-specification.md |
Refreshes field statuses, retention decisions, and implementation audit notes. |
pkg/workflow/tools_validation_test.go |
Tests rejection of unsupported fields individually and together. |
pkg/workflow/tools_validation_github.go |
Reports unsupported GitHub MCP access-control fields. |
pkg/workflow/tools_types.go |
Stores unsupported field names for validation. |
pkg/workflow/tools_parser.go |
Records unsupported keys during parsing. |
pkg/cli/outcome_conformance_test.go |
Compares the outcome corpus size with the specification. |
pkg/cli/forecast_compliance_fixtures_formal_test.go |
Compares the README, fixture files, and test inventory. |
Review effort: Max (dynamic)
| This section records the current mapping of Section 4 configuration fields to the compiler model, including fields for which no corresponding local Go entity exists. | ||
|
|
||
| **Last verified**: 2026-11-10 | ||
| **Last verified**: 2026-11-16 |
There was a problem hiding this comment.
Updated the README and CI pins to spec-changing commit 8bce442 in follow-up commit 03cf923; the README now documents the follow-up pin procedure.
| def check_p1_backlog_modules(): | ||
| readme = (ROOT / "README.md").read_text() | ||
| targets = re.findall( | ||
| r"^\|[^|]+\|\s*P1\s*\|[^|]*\|\s*`([^`]+\.tla)`", | ||
| readme, | ||
| re.MULTILINE, | ||
| ) | ||
| if not targets: | ||
| raise RuntimeError("No P1 refinement backlog module targets found in README.md") | ||
| missing = [target for target in targets if not (ROOT / target).is_file()] | ||
| if missing: | ||
| raise RuntimeError(f"P1 refinement backlog references missing TLA+ modules: {', '.join(missing)}") |
There was a problem hiding this comment.
P1 target parsing now rejects empty or malformed cells and checks every listed module; focused tests cover malformed rows and missing files. Commit 8bce442.
| for _, field := range []string{"roles", "private-repos"} { | ||
| if _, ok := configMap[field]; ok { | ||
| config.unsupportedAccessControlFields = append(config.unsupportedAccessControlFields, field) | ||
| } | ||
| } |
There was a problem hiding this comment.
Added compile-level relaxed-import tests for both roles and private-repos, and updated the sync notes to distinguish schema rejection from imported/direct-caller validation. The PR body itself was not updated because the available tools do not expose a PR-edit operation. Commit 8bce442.
| var quotedFields []string | ||
| for _, field := range fields { | ||
| quotedFields = append(quotedFields, "'tools.github."+field+"'") | ||
| } | ||
| return fmt.Errorf("%s is not supported by the local compiler and will not enforce access control; remove the unsupported field", strings.Join(quotedFields, ", ")) |
There was a problem hiding this comment.
The validation message now uses singular/plural wording consistently and includes a repository-scope YAML example labeled as separate from role/visibility filtering. Commit 8bce442.
|
🍳 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": "dc43187aed3ac60ebf0c3a456ba160f647fdff0f",
"kind": "requested",
"schema_version": "1",
"state": "fc5e571c8da405e732c3eefc509b8ef6ea3b653e724a1925261f7b3dad50286b",
"work": [
"4dbdb2862f0658d2bbb675ae53758160a060fd062f209981a1048ac5e086ec20",
"51e2287c3d1ee41b7e13769862add61dcd292a623cf943abc5968c984e246bcf",
"75099df605f2a750222bead85a57aa608977be198308192f1d99f0d666c00fdf",
"9c43aa2f0475cb5b0e9548be2fa88232dcfd60a801241bf01818f75fecafa757",
"a737a9398f3682e76c5c9c794e068462a866d6fdb8e2a6fa2bceee50f57dd223",
"a7c3b5b20ff99d616694551b8b4cd13b47d46afc114dbb5390161401e9de6c92",
"b3175ef3b5a3f8373a00f94b8670915f4348a1a61a3eae66e1829a4094f84a0c",
"c6ef6ffdb88ab0800500ce5a5aee847e933e33a4a68410e78b232c80fd2e9433"
],
"workflow": "pr-sous-chef"
}
|
…ec-work-plan Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Merged latest |
|
🍳 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": "03cf92384c07755aa43a12f84ba5069bec203380",
"kind": "requested",
"schema_version": "1",
"state": "f33d0b91fb9d83b9d1c558993f246453512c41bb5063be1fb05eddd51df231bd",
"work": [
"7fdcb480e7a98cc7e0f466a49ad1c7f7e8c5cfc22f8fbcc711724ed335220761"
],
"workflow": "pr-sous-chef"
}
|
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
|
|
@copilot review mcpg configuration and confirm changes. Remove unsupported features. |
…ec-work-plan Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Confirmed:
Merged latest
Confirmed:
Confirmed: |
|
🎉 This pull request is included in a new release. Release: |



The daily spec review found gaps between documented behavior, local validation, and fixture inventories. This change makes unsupported access-control fields explicit and adds checks to catch specification and fixture drift.
rolesandprivate-reposinstead of silently ignoring them; document their deferred status. Record that the deprecatedreposalias remains supported with no removal version scheduled.For example, this configuration now fails validation rather than implying role filtering is enforced: