Repository navigation
fix(mcp-grant-sync): stop claiming the overlay releases the call - #556
Conversation
CLOUD-734 Re-project the committed MCP grants onto the session's generated config at SessionStart, so a rotating server id cannot silently revoke an approval a human already gave
Why
Where the policy actually lives — measured, not assumed. The per-session file So the decision is expressed locally, per tool, in a file this repo's hooks can reach. That is the lever. Measured negative: editing it mid-session does nothing. Flipping Why the ordering is plausible rather than hopeful. What makes the identification robust. The generated file carries no human label for the rotating servers; only Scope, and the line this must not cross. This re-projects grants a human already committed. It never widens: a tool with no committed grant keeps Acceptance
Refinement — Ready (re-project committed intent onto generated identity; identify a server by its tools, never by its name) Refinement gate: Definition of Ready & Done. This body carries only specializations.
What this does not attempt. Making the call succeed if the CCR proxy re-enforces policy server-side. Upstream (anthropics/claude-code#61044, #61015) reports the refusal arriving as an HTTP error from the endpoint, which if true means no local projection can help and the honest outcome is the measured negative in the acceptance above. That is a capability gap of the kind CLOUD-312 tracks, not something to engineer around here. |
Both headers asserted that the projection is read at the next session start and therefore puts the committed grant in force. Measured false: the overlay was on disk before this session started — same container, same disk, verified by mtime — and the identical committed-but-inert call was refused anyway, as it was for the generated config edited mid-session and for the overlay written mid-session. Every local surface reachable from this repository has now been tried. The refusal comes from the CCR proxy, upstream of the permission layer, which no settings file reaches. What the projection is for is stated instead: the committed intent expressed against the identity that actually attached, which is what mcp-allow-check's inert-rule predicate reads and what makes that predicate closable at all. Refs: CLOUD-734 DO-NOT-CLOSE
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 5 remain after this review. 📝 WalkthroughWalkthroughThe change updates comments in the session-start hook and MCP grant synchronization task. The comments distinguish startup configuration from permission enforcement and describe how committed intent supports ChangesMCP grant synchronization
Estimated code review effort: 1 (Trivial) | ~5 minutes Merge Risk: ⚪ Minimal · up to This change clarifies what the grant projection represents without changing runtime behavior. No actionable merge-blocking risk remains beyond normal checks and review. Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
b5d7944 to
3bca59f
Compare
|
|
/fast-forward |



Refs: CLOUD-734
DO-NOT-CLOSE
CLOUD-734 is already Done — released in v0.0.89. This corrects a claim its work
left in the repository, which is false and which a future session would read as
established.
Both headers asserted that the projection is read at the next session start and
therefore puts the committed grant in force. Measured false this session:
00:42, in the previous session00:42–02:50all present)02:58:57--allowed-toolscarries zero entries for that serverThat is the third surface tried and the third negative — after the generated
config edited mid-session and the overlay written mid-session. Every local
surface reachable from this repository has now been tested. The refusal comes
from the CCR proxy, upstream of the local permission layer, where no settings
file reaches it (anthropics/claude-code#61044, #61015; the capability gap
CLOUD-312 tracks).
No behaviour changes here, and the projection stays. CLOUD-734's acceptance
made the measurement the deliverable either way, and what shipped is still a
correct, tested, gated projection of committed intent onto a rotating identity —
it is also what makes
mcp-allow-check's inert-rule predicate closable, since"this rule names a server that never attached" is otherwise a verdict no edit can
satisfy. What changes is that both headers now say what the projection is for
instead of promising a release it does not deliver.
Touches no crate file, so release-plz cuts no tag for it.
Tests
No new cases — this is comment-only.
tests/session-start.bats,tests/mcp-grant-sync.batsandtests/mcp-allow-check.batsall still pass, andthe edit deliberately avoids every line those suites assert on.
Summary by CodeRabbit