Repository navigation
fix(hosted-mcp): drift reads the claims the pin recorded, and silence withdraws them - #2023
Merged
Merged
Conversation
… withdraws them Three arms replace the two that came before (75449, 75454, 75457; written into §3 by #2016): - a recorded `readOnlyHint: true` is withdrawn when the vendor stops saying it (unchanged); - a recorded `destructiveHint: false` is withdrawn when the vendor stops saying it. The spec defaults an absent `destructiveHint` to `true`, so silence is the unsafe value, and the old arm could not see this case at all: it read `pinned.destructiveHint !== true`, and an unannotated pin has no `destructiveHint` to withdraw (vera 75423, measured 75445); - a live `destructiveHint: true` beside a recorded `readOnlyHint: true` is the pair the entry load refuses (#2014), and drift does not admit later what entry refuses. Every arm reads the pin's annotations, never its class, so a pin that recorded neither claim no longer drifts when the vendor spells the spec default (wren 75449). The withdrawn-claim arms come first: a pin that recorded both claims reports the `destructiveHint: false` it lost rather than the generic contradiction (75457). The three drift fixtures #2014 makes entry-illegal are re-pointed at `class: write` — `tightened`, `unpinned`, `silent` — and the recorded-nothing pair is flipped to `ok`, which is what the ruling predicts for a write pin. The hole-on-record arm stays: its pin is not a catalogue state any more, and keeping it is the point. A census of every `pinned()` call in the suite, run against #2014's head, is what found them (75461, 75462). Two comments the rulings staled are corrected: `movedTowardWrite`'s "losing `destructiveHint` is not drift", and `entries.ts`'s "a tool whose vendor annotates nothing can only be pinned `write`" (75440). Ledger: 12 mutants on the predicate, 11 killed, 1 recorded equivalent (the mirror's wording may change as long as it names the claim the pin lost — the arms assert the claim, not the sentence), 0 NAMED-ARM MISSES, baseline 20/20 asserted on every run. Neighbourhood 17 suites / 266 passed; full backend 498 suites / 4691 passed, 24 skipped, 0 failed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this is
The successor diff to #2014's entry guards, ruled in pod 75449 / 75454 / 75457 and written into
docs/plans/hosted-mcp-connection-scope.md§3 by #2016.movedTowardWritehad two arms keyed on spelling rather than the claims the pin recorded; it now has three keyed on what the pin recorded.pinned.readOnlyHint === true && live?.readOnlyHint !== true→readOnlyHint withdrawn upstreampinned.destructiveHint === false && live?.destructiveHint !== false→destructiveHint: false withdrawn upstreamdestructiveHinttotrue, so silence withdraws the claim. The old arm readpinned.destructiveHint !== trueand an unannotated pin has nothing to withdraw, so a recordeddestructiveHint: falsecould be withdrawn silently (vera 75423; measured 75445)pinned.readOnlyHint === true && live?.destructiveHint === true→destructiveHint set upstreamOrdering is load-bearing and witnessed: a pin that recorded both claims, against a vendor now saying
destructiveHint: true, fires arms 2 and 3 — and reports the claim it lost, not the generic contradiction (75457). A pin that recorded neither claim no longer drifts when the vendor spells the spec default, so the old arm's false positive on awritepin is gone (wren 75449).Fixtures
A scripted census of every
pinned()call in the suite, run against #2014's head, found three drift fixtures that #2014 makes entry-illegal — an arm witnessing the comparison on a shape the entry layer can no longer create (75461, 75462):tightened→ re-pointedclass: write(legal, and stillok: gainingreadOnlyHintis not drift);unpinned,silent→ re-pointedclass: write, and the recorded-nothing pair is flipped took, which is the ruling for a write pin.The fourth illegal fixture is left alone on purpose: it is #2014's hole-on-record arm, whose comment already says the load guard refuses that pin.
Two comments the rulings staled are corrected:
movedTowardWrite's "losingdestructiveHintis not drift", andentries.ts's "a tool whose vendor annotates nothing can only be pinnedwrite" (75440 — no entry at all).Evidence at
89461b4fhostedMcp|toolBroker|grantBroker|connectorSecretKinds) 17 suites / 266 passed.eslinton both source files: 0 findings. The test file holds 11 messages against main's 15 (the re-points replacedObject.assignwith spread).destructiveHint: false), not the sentence.Gate: Vera (code).