Repository navigation
fix(deps): cap kiota below 1.13 — /me was reaching the wire as the SDK placeholder - #81
Merged
Merged
Conversation
…K placeholder A fresh `uv tool install outlook-graph-mcp` resolved microsoft-kiota-* 1.13+ and every /me call failed with "me-token-to-replace is invalid" (#80). kiota 1.13.0 (2026-09-18) moved per-request options from a monkey-patched `request.options` attribute to `request.extensions["kiota_request_options"]`, and its UrlReplaceHandler now reads only the new place. msgraph-core 1.5.1, the latest release, still reads `request.options` in middleware/async_graph_transport.py, so the rewrite it installs for `/users/me-token-to-replace` -> `/me` never fires and Graph receives the literal placeholder. The upstream fix is microsoftgraph/msgraph-sdk-python-core#1129, open and unreleased. Nothing capped kiota; msgraph-core itself allows <2.0. The lock pinned 1.12.3, so `uv sync`, every CI job and every developer install were green while every new user's install was broken — the fresh-install and published-install canaries imported the package, counted the tools and never sent a request. Same class as the five-week outage. The kiota family is capped below 1.13 until a msgraph-core release carries #1129; the lock is unchanged at 1.12.3. tests/test_me_rewrite_reaches_the_wire.py builds the client exactly as msgraph does, hands the factory an httpx client on a mock transport, and asserts on the URL the real middleware pipeline sends. It runs against whatever the environment resolved, which is the point. Verified by mutation: under the lock it passes; against kiota 1.14.0 it fails on `.../users/me-token-to-replace`. Both install jobs in ci.yml now run it as a script after their version report. Note the published-install job installs PyPI-latest, which IS broken, so that weekly job will be red until the next release ships — that is the canary doing its job. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LparmojWQ3m9tcJhRGqZjP
Graph tolerates /users/<anything> one segment deep, so a bare /me health check returns 200 with the placeholder still in the URL while every nested path 404s. A canary that probed Graph with /me alone would stay green (Nyaecho, #80). Asserting on the URL string catches both; the nested case carries the explanation. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LparmojWQ3m9tcJhRGqZjP
This was referenced Sep 30, 2026
mpalermiti
added a commit
that referenced
this pull request
Sep 30, 2026
…K placeholder (#81) * fix(deps): cap kiota below 1.13 — /me was reaching the wire as the SDK placeholder A fresh `uv tool install outlook-graph-mcp` resolved microsoft-kiota-* 1.13+ and every /me call failed with "me-token-to-replace is invalid" (#80). kiota 1.13.0 (2026-09-18) moved per-request options from a monkey-patched `request.options` attribute to `request.extensions["kiota_request_options"]`, and its UrlReplaceHandler now reads only the new place. msgraph-core 1.5.1, the latest release, still reads `request.options` in middleware/async_graph_transport.py, so the rewrite it installs for `/users/me-token-to-replace` -> `/me` never fires and Graph receives the literal placeholder. The upstream fix is microsoftgraph/msgraph-sdk-python-core#1129, open and unreleased. Nothing capped kiota; msgraph-core itself allows <2.0. The lock pinned 1.12.3, so `uv sync`, every CI job and every developer install were green while every new user's install was broken — the fresh-install and published-install canaries imported the package, counted the tools and never sent a request. Same class as the five-week outage. The kiota family is capped below 1.13 until a msgraph-core release carries #1129; the lock is unchanged at 1.12.3. tests/test_me_rewrite_reaches_the_wire.py builds the client exactly as msgraph does, hands the factory an httpx client on a mock transport, and asserts on the URL the real middleware pipeline sends. It runs against whatever the environment resolved, which is the point. Verified by mutation: under the lock it passes; against kiota 1.14.0 it fails on `.../users/me-token-to-replace`. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LparmojWQ3m9tcJhRGqZjP * test(wire): the nested /me path is rewritten too, and says why Graph tolerates /users/<anything> one segment deep, so a bare /me health check returns 200 with the placeholder still in the URL while every nested path 404s. A canary that probed Graph with /me alone would stay green (Nyaecho, #80). Asserting on the URL string catches both; the nested case carries the explanation. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LparmojWQ3m9tcJhRGqZjP (cherry picked from commit d16bd30 onto v1.22.0 for the 1.22.1 hotfix; CHANGELOG entry rewritten as a 1.22.1 section. The ci.yml step that runs this test in the install jobs is not part of #81 as merged and is not included here.) --------- Co-authored-by: Michael Palermiti <253352132+mpalermiti@users.noreply.github.com> Co-authored-by: Claude <noreply@anthropic.com>
mpalermiti
added a commit
that referenced
this pull request
Sep 30, 2026
Hotfix cut from v1.22.0 carrying only the kiota cap (#81), so a fresh install stops sending /users/me-token-to-replace to Graph (#80). Version bumped in pyproject.toml, both server.json fields and the lock. Tool count unchanged at 62, so the published-install assert in ci.yml stays correct. Co-Authored-By: Claude <noreply@anthropic.com>
mpalermiti
added a commit
that referenced
this pull request
Sep 30, 2026
) #81's entry said the fresh-install and published-install jobs assert the resolved kiota version. That ci.yml step was never pushed (it needs a token with the workflow scope), so main made a claim its CI doesn't back. The entry moves out of [Unreleased] into a 1.22.1 section matching the hotfix branch (release/1.22.x), with the wording describing the test that does exist. Merge after v1.22.1 is published. Co-authored-by: Michael Palermiti <253352132+mpalermiti@users.noreply.github.com> Co-authored-by: Claude <noreply@anthropic.com>
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.
Fixes #80.
A fresh
uv tool install outlook-graph-mcp==1.22.0resolvesmicrosoft-kiota-* 1.14.0today, and every/mecall fails withme-token-to-replace is invalid. Every new user's install is broken right now; every developer and CI install is green. That asymmetry is the whole bug.Root cause, verified against the installed packages
request.optionsattribute torequest.extensions["kiota_request_options"], and itsUrlReplaceHandlernow reads only the new place. Diffedkiota_http1.12.3 → 1.13.0 to confirm.request.optionsatmiddleware/async_graph_transport.py:29. So the rewrite it installs for/users/me-token-to-replace → /menever fires and Graph gets the literal placeholder.<2.0, so nothing upstream excludes 1.13/1.14.pyproject.tomlcapped kiota.uv.lockpins 1.12.3 — which is whyuv sync, all four CI jobs and every developer install passed while the published package was broken.The fix
Cap
microsoft-kiota-{abstractions,http,authentication-azure,serialization-json} < 1.13with a comment that says exactly when to lift it (a msgraph-core release carrying #1129). The lock is unchanged.The guard, because the cap alone would just move the next one
The install canaries imported the package, counted tools and ran the CLI — they never sent a request, so they could not see a URL.
tests/test_me_rewrite_reaches_the_wire.pybuilds the client exactly the waymsgraphdoes, hands the factory an httpx client on a mock transport, and asserts on the URL the real middleware pipeline hands to it. No network. It runs against whatever kiota/msgraph-core the environment resolved — under the lock it pins the rewrite; in the fresh-install and published-install jobs it fails the moment a dependency drifts outside the working range. Both jobs now run it as a script after their version report.Verified by mutation, not by assertion:
Expect the weekly
published-installjob to go red as soon as this merges — it installs PyPI-latest, which is 1.22.0, which is broken. That's the canary working. It goes green when the next release ships, which is the argument for shipping it soon.Notes
HOMEredirected..github/workflows/ci.yml, so this needs theworkflowscope or a UI merge.Generated with Claude Code
https://claude.ai/code/session_01LparmojWQ3m9tcJhRGqZjP