test(factory): add fixture-only provenance-bound MCP OAuth scope step-up coverage - #2014
groupthinking with Copilot wants to merge 6 commits into
Conversation
|
Important Review skippedBot user detected. To trigger a single review, invoke the ⚙️ Run configurationConfiguration used: Repository: groupthinking/EventRelay/.coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Co-authored-by: groupthinking <154503486+groupthinking@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Pull request overview
Adds fixture-only MCP OAuth scope step-up enforcement and receipt tracking for the official conformance fixture server, along with new unit tests and updated conformance receipt metadata to document upstream/unmerged scope-step-up status.
Changes:
- Introduced a scope step-up mode in the fixture server that returns pre-handler 403 challenges with
WWW-Authenticate: ... insufficient_scope ...and emits machine-readable receipts. - Added unit tests covering challenge-then-retry, pre-handler enforcement for resources/prompts, and rejection of malformed targets / peer-agent provenance.
- Updated the conformance harness + stored receipt JSON to pin scope-step-up SDK commit and track upstream issue/PR as unmerged and excluded from official claims.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| tests/unit/test_official_mcp_conformance.py | Adds fixture-server start helper and new tests for scope step-up challenge/receipt behavior. |
| tests/testing/official_mcp_fixture_server.py | Implements fixture-only scope step-up enforcement, canonical target validation, and receipt emission endpoints. |
| tests/fixtures/mcp_conformance/official-2026-07-28-receipt.json | Records scope-step-up metadata/policy/exclusions in the stored conformance receipt. |
| scripts/testing/official_mcp_conformance.py | Extends receipt builder to include scope-step-up commit pin and upstream tracking metadata. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
🔍 PR Validation |
✅ E2E Test Results: ALL TESTS PASSED
Test Output |
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
✅ E2E Test Results: ALL TESTS PASSED
Test Output |
Execution receipt — fixture-only OAuth scope step-upDecision: TEST Inputs
Decision and mutationThe earlier PR head was non-draft but did not satisfy the issue’s security contract. I converted the existing canonical PR to draft and corrected it instead of opening competing work. The corrected branch now:
The branch was then refreshed onto current main Verification
Boundary and next actionNo merge, deployment, live authorization exchange, provider invocation, spending, or production mutation occurred. Next action is an exact-head human review and explicit approval before merging |
Canonical issue
Fixes #2005.
Outcome
This draft adds fixture-only, provenance-bound MCP OAuth scope step-up behavior for Agent Factory/EventRelay. Live authorization remains disabled.
Enforced fixture contract
params, operation, and target before dynamic scope evaluation.tools/call, static and templatedresources/read, andprompts/get.GO, Skill content, Video Pack/OCR/canvas text, or workspace files.WWW-Authenticatevalues.Evidence boundary
6032170443f75dnot_executed_by_official_suite. It makes no official conformance or live OAuth claim.Exact verified head
1134c78ee53ff6de3fa7c6a094266a371eb1fb15The branch was refreshed onto main
276d738891361bb8a7118afe0785d5b11f3c91b9before final verification.Exact-head verification
Boundary and rollback
This remains an open, draft, unmerged PR. It performs no production activation, deployment, live OAuth exchange, provider spending, messaging, or merge. Rollback is a branch revert of the four fixture/conformance files.