docs: define OAuth support boundary (#79) - #90
Conversation
📝 WalkthroughWalkthroughDocuments Miftah’s current OAuth boundary, static remote credential support, future remote OAuth contract, and identity separation. Adds a deterministic loopback compatibility probe and tests for documentation alignment and the remote MCP OAuth flow. ChangesOAuth support boundary and compatibility probe
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related issues Poem
Caution Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional.
❌ Failed checks (1 error)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@tests/helpers/fake-remote-upstream.ts`:
- Around line 322-331: Update the fake OAuth upstream’s authorization and token
flows in tests/helpers/fake-remote-upstream.ts (lines 58-65 and 322-331) to
retain the authorization redirect’s code_challenge, derive the S256 challenge
from the token request’s code_verifier, and record or validate that the values
match instead of only checking codeVerifierPresent. Update
tests/remote-oauth-compatibility.test.ts (lines 98-117) to assert the PKCE
verifier/challenge match so mismatched pairs are rejected.
In `@tests/oauth-support-docs-contract.test.ts`:
- Around line 82-92: Replace the exact whitespace-sensitive `upstreamManager`
assertion for `requestInit: { headers }` with a formatting-tolerant check that
still verifies the upstream request uses configured headers and does not
introduce an OAuth provider. Keep the surrounding OAuth documentation contract
assertions unchanged.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: b52ea56e-6e0b-4039-915a-01d1ff0965db
📒 Files selected for processing (9)
README.mddocs/architecture.mddocs/config.mddocs/library-api.mddocs/oauth-support.mddocs/security.mdtests/helpers/fake-remote-upstream.tstests/oauth-support-docs-contract.test.tstests/remote-oauth-compatibility.test.ts
Summary
No production OAuth configuration, token lifecycle, or runtime authentication behavior is introduced by this research issue.
Validation
Closes #79
Summary by CodeRabbit
Documentation
Tests