Skip to content

fix(mcp): follow the spec's transport session rules - #1308

Open
lucasheriques wants to merge 4 commits into
lucas/mcp-client-meta-sessionfrom
lucas/mcp-session-spec-align
Open

lucasheriques wants to merge 4 commits into
lucas/mcp-client-meta-sessionfrom
lucas/mcp-session-spec-align

Conversation

@lucasheriques

@lucasheriques lucasheriques commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

💡 Motivation and Context

Every PostHog MCP SDK should follow the sdk-specs "Session identity" requirement (PostHog/sdk-specs#225, merged 2026-11-23). #1193 adds client conversation ids. This PR, stacked on it, aligns the transport rules it left alone.

  • Rule 4. A stateless HTTP request that carries no session gets one of its own. Before, only client-id and handle-free calls did. Every other sessionless HTTP call shared the process session with every other caller. After any request with an Mcp-Session-Id, a sticky branch handed that client's session to later sessionless callers.
  • Every event of a call uses the session resolved when it arrived. The call event re-resolved at record time, so a stdio call longer than 30 minutes switched session midway, and its custom events and its $mcp_tool_call disagreed.
  • Rotation. A one-client connection rotates when 30 or more minutes pass between the end of one tool call and the arrival of the next. It used > and counted from any request's arrival, including tools/list.
  • SSE. The deprecated SSE transport keeps one session per connection. Its session_id query parameter is the transport session, read only on a connection that completed a handshake. A forged ?session_id on a stateless request still gets a fresh session, so the veria-ai finding fixed in feat(mcp): group sessions by ChatGPT, Codex and VS Code conversation ids #1193 (3a6d34d) stays fixed.

Changes

  • session.resolve_session_id_with_source takes over_http and tool_call. A sessionless HTTP request returns a fresh "request" session and never touches shared state. The sticky "mcp" branch and last_mcp_session_id are gone. Only a tool call's arrival rotates or stamps the stdio clock. _is_stale uses >=.
  • ToolCallLifecycle.prime_session resolves once and caches arrival. prepare_session layers the client id or delivered handle on top, and touches the connection when the call ends.
  • request_headers.read_transport_session_id replaces four per-adapter Mcp-Session-Id readers and adds the handshake-gated SSE query read. _is_sse_request is gone.
  • The stateless-wiring warning fires for any sessionless HTTP request, but not for 2026-07-28 requests, which no middleware can group.

Customer-visible. A stateless server without PostHogMcpStatelessSessionMiddleware now reports one session per request. It no longer reports a first-request $mcp_initialize. The changeset says so.

Dropped from the audit, and why

  • merge_identities keeps a cached identity when identify returns null. posthog-js handleIdentify does the same, so this is cross-SDK behavior, not a python gap. Changing one SDK would split a session across two persons. It belongs in an sdk-specs clarification.
  • Manual prepare_tool_call(session_id=...) passes the raw id through. I implemented derivation, then reverted it. capture_initialize and capture_tools_list still send the id unchanged, so one dispatcher's events split across two sessions. The spec's manual step API also wants connection keys the SDK tracks and rotates. Both belong in one follow-up.

Known gaps (follow-ups)

  • Two stdio calls that overlap for more than 30 minutes: the second rotates, because the first has not ended. Base mis-handles this too. A fix needs an in-flight count that every call path closes.
  • On mcp 2.x, a stateless initialize posted with a forged ?session_id lands its $mcp_initialize in a session derived from that value. At the initialize seam an SSE handshake looks the same, since the middleware mints a token for both. Base put that initialize in the process session every client shared.
  • On mcp 1.x, an initialize posted with ?session_id is not observed by the middleware, which predates this change.

💚 How did you test it?

  • uv run --frozen --extra test pytest posthog/test/mcp: 994 passed on mcp 1.30. The same suite with mcp 2.3 (no fastmcp): 797 passed. CI covers fastmcp 2 and 4.
  • New posthog/test/mcp/test_session_rules.py, parameterized. It covers rule 4 per client and after a transport call, listings, arrival sessions on result and error, rotation at the 30-minute boundary measured from the call's end, a listing between calls, SSE query handling per transport shape, and the 2026-07-28 warning. Each fails on 3a6d34d.
  • The SSE end-to-end test passes on both majors. The unwired-route test now asserts one session per request.
  • ruff, mypy (baseline), and the public API snapshot pass.
  • Pre-PR gate:
    • Two adversaries (Opus and Sonnet) ran the parity, completeness, isolation, and upgrade lenses on both majors.
    • Fixed: a tools/list kept an idle stdio connection alive, the warning fired on 2026-07-28 requests, and the manual API split sessions.
    • Deferred: the three follow-ups above.
    • Comment Sicko trimmed docstrings, and /simplify named the sessionless revision once.

📝 Checklist

  • All commits are signed (see Commit signing)
  • I reviewed the submitted code.
  • I added tests to verify the changes.
  • I updated the docs if needed.
  • No breaking change or entry added to the changelog.

If releasing new changes

  • Ran sampo add to generate a changeset file

🤖 Agent context

Autonomy: Human-driven (agent-assisted)

Claude Code (Opus) wrote this from a read-only spec-alignment audit across the MCP SDKs, verifying each gap before fixing it. An earlier attempt gated rule 4 on "has a request" and was reverted in #1193, because real SSE lost its session. Reading the SSE query parameter as a transport session, only on a handshaked connection, resolves both that and the forged-parameter case. Pre-PR adversaries ran on Opus and Sonnet. The comment and /simplify passes ran on Sonnet.

Aligns posthog.mcp with sdk-specs "Session identity" rules 3 and 4 and the
manual call step:
- Every sessionless HTTP request gets its own session (rule 4). Before, only
  client-id and handle-free calls did; the rest shared the process session, and
  the sticky "mcp" branch handed one client's Mcp-Session-Id session to later
  sessionless callers. The resolver now takes over_http and the sticky branch
  and last_mcp_session_id are gone.
- A tool call resolves its transport/connection session once, on arrival, and
  every event of the call uses it; a >30-min stdio call no longer rotates midway.
- A one-client connection rotates at >= 30 idle minutes, counted from the end of
  the previous call (every stdio call now touches the connection when it ends).
- SSE keeps one session per connection: its session_id query parameter is the
  transport session, read only on a connection that completed a handshake, so a
  forged ?session_id on a stateless request still gets a fresh session.
- prepare_tool_call(session_id=...) derives the raw transport id or decodes a
  PostHog token, as instrument() does.

Customer-visible: an unwired stateless route no longer reports a first-request
$mcp_initialize; each request is its own session (see changeset).

Tested: uv run --frozen --extra test pytest posthog/test/mcp -> 996 passed
(mcp 1.30); same suite with mcp 2.3 bare -> 798 passed; ruff format/check and
mypy baseline clean. New posthog/test/mcp/test_session_rules.py fails before.
…API as is

Pre-PR gate fixes (two adversaries, Opus and Sonnet):
- A tools/list or resource request on stdio no longer resets or rotates the
  one-client connection's idle clock: resolve_session_id_with_source takes
  tool_call, and only a tool call's arrival and end count.
- The stateless-wiring warning skips 2026-07-28 requests, which no middleware
  can group.
- Revert the manual prepare_tool_call(session_id=...) derivation: capture_*
  still sent the raw id, so one dispatcher's events split across two sessions.
  The manual step API (derivation plus tracked connection keys) is a follow-up.

Tested: new tests in test_session_rules.py fail before (listing between calls,
2026-07-28 warning). uv run --frozen --extra test pytest posthog/test/mcp ->
994 passed; mcp 2.3 bare -> 797 passed; ruff, mypy baseline, public API clean.
…t check

/simplify pass: SESSIONLESS_PROTOCOL_VERSION replaces two literals, the
connection touch reads the arrival's source alone, resolve_session_id keeps
its earlier signature, and request_headers unwraps the context in one place.

Tested: pytest posthog/test/mcp 994 passed (mcp 1.30), 797 passed (mcp 2.3);
ruff, mypy baseline, public API clean.
@lucasheriques lucasheriques added the stamphog Request stamphog review label Nov 25, 2026
@lucasheriques lucasheriques self-assigned this Nov 25, 2026
@lucasheriques lucasheriques changed the title lucas/mcp session spec align fix(mcp): follow the spec's transport session rules Nov 25, 2026
@lucasheriques
lucasheriques marked this pull request as ready for review November 25, 2026 19:29
@lucasheriques
lucasheriques requested a review from a team as a code owner November 25, 2026 19:29
@veria-ai

veria-ai Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

PR overview

No security issues were found in this pull request.

Reviews

@stamphog stamphog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not approved — this change needs a human reviewer.

Adding the stamphog label gives the same result unless the changed files change.

The deny-list gate refused this pull request because it touches posthog/test/mcp/test_session_token.py, which matches the auth pattern. Because of that match, the tier gate placed the whole change in the never-auto-review tier. The size gate passed, so splitting is not needed for size. The author can ask a human reviewer to look at it. If the session-token test change can stand on its own, it could go in a separate pull request so the rest of the work is reviewed on its own merits.

Gate mechanics and policy version
Gate Result
prerequisites ✓ all clear
deny-list ✗ matches: auth in posthog/test/mcp/test_session_token.py
every_file_attested ✓ not a bot PR
size ✓ 332L, 9F substantive, 632L/16F incl. docs/generated/snapshots — within ceiling
tier ✗ T2-never because the deny-list matched auth
stamphog 2.9.1 .stamphog/policy.yml @ unknown · reviewed head 5c6cb5a

@stamphog stamphog Bot removed the stamphog Request stamphog review label Nov 25, 2026

@posthog posthog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PostHog Review · Standard · reviewed 5c6cb5a: 1 Should fix.

New pushes to this pull request won't start an automatic review. Comment @posthog review to review new changes.

See this review and its findings in PostHog Review. Comment @posthog review --deep for a Deep review. A Deep review takes longer and looks deeper than a Standard review.

Comment on lines +194 to +196
incoming = read_transport_session_id(ctx, handshake=True)
if incoming:
return incoming, token
return incoming, decode_session_id(incoming)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 · Validate the SSE transport before accepting its query session

On MCP 2.x, a stateless Streamable HTTP initialize carrying ?session_id=chosen reaches _initialize_session, where handshake=True accepts the unvalidated query and overrides the middleware-minted token. The handshake uses a caller-chosen analytics session while later calls use the returned token, violating the session identity contract; restrict query reads to verified SSE transport sessions.

@github-actions

Copy link
Copy Markdown
Contributor

SDK performance: posthog-python

Benchmarks completed. No changes flagged for review.

Flags require at least a 5% change in the median and all six pairs agreeing on direction. This is a noise filter, not proof of a performance change or a CI gate.

View all results
Test Measurement Before PR With PR Change Assessment
Capture and deliver events (32-byte payload, burst)
Shard: capture
Managed heap after settling — — — unavailable; base:​ unsupported; head:​ unsupported; base:​ CPython has no uninstrumented total managed-heap byte counter; tracing would distort this RSS pass.​; head:​ CPython has no uninstrumented total managed-heap byte counter; tracing would distort this RSS pass.​
Capture and deliver events (4,096-byte payload, burst)
Shard: capture
Managed heap after settling — — — unavailable; base:​ unsupported; head:​ unsupported; base:​ CPython has no uninstrumented total managed-heap byte counter; tracing would distort this RSS pass.​; head:​ CPython has no uninstrumented total managed-heap byte counter; tracing would distort this RSS pass.​
Capture and deliver events (32-byte payload, steady)
Shard: capture
Managed heap after settling — — — unavailable; base:​ unsupported; head:​ unsupported; base:​ CPython has no uninstrumented total managed-heap byte counter; tracing would distort this RSS pass.​; head:​ CPython has no uninstrumented total managed-heap byte counter; tracing would distort this RSS pass.​
Capture and deliver events (4,096-byte payload, steady)
Shard: capture
Managed heap after settling — — — unavailable; base:​ unsupported; head:​ unsupported; base:​ CPython has no uninstrumented total managed-heap byte counter; tracing would distort this RSS pass.​; head:​ CPython has no uninstrumented total managed-heap byte counter; tracing would distort this RSS pass.​
Queue an event (32-byte payload)
Shard: capture
Allocated memory per operation — — — unavailable; base:​ unsupported; head:​ unsupported; base:​ Background preparation has no public completion boundary before flush; see capture.​drain for full-pipeline allocations.​; head:​ Background preparation has no public completion boundary before flush; see capture.​drain for full-pipeline allocations.​
Queue an event (32-byte payload)
Shard: capture
Allocations per operation — — — unavailable; base:​ unsupported; head:​ unsupported; base:​ Background preparation has no public completion boundary before flush; see capture.​drain for full-pipeline allocations.​; head:​ Background preparation has no public completion boundary before flush; see capture.​drain for full-pipeline allocations.​
Queue an event (4,096-byte payload)
Shard: capture
Allocated memory per operation — — — unavailable; base:​ unsupported; head:​ unsupported; base:​ Background preparation has no public completion boundary before flush; see capture.​drain for full-pipeline allocations.​; head:​ Background preparation has no public completion boundary before flush; see capture.​drain for full-pipeline allocations.​
Queue an event (4,096-byte payload)
Shard: capture
Allocations per operation — — — unavailable; base:​ unsupported; head:​ unsupported; base:​ Background preparation has no public completion boundary before flush; see capture.​drain for full-pipeline allocations.​; head:​ Background preparation has no public completion boundary before flush; see capture.​drain for full-pipeline allocations.​
Evaluate 1,000 flags under concurrent load
Shard: flags-memory
Managed heap after settling — — — unavailable; base:​ unsupported; head:​ unsupported; base:​ CPython has no uninstrumented total managed-heap byte counter; tracing would distort this RSS pass.​; head:​ CPython has no uninstrumented total managed-heap byte counter; tracing would distort this RSS pass.​
Refresh 1,000 flag definitions
Shard: flags-memory
Managed heap after settling — — — unavailable; base:​ unsupported; head:​ unsupported; base:​ CPython has no uninstrumented total managed-heap byte counter; tracing would distort this RSS pass.​; head:​ CPython has no uninstrumented total managed-heap byte counter; tracing would distort this RSS pass.​
Capture and deliver events (32-byte payload, burst)
Shard: capture
Allocated memory per operation 133.67 KiB/op 133.67 KiB/op <0.1% less memory Not flagged
Capture and deliver events (32-byte payload, burst)
Shard: capture
Allocations per operation 1,345.53 count/op 1,345.53 count/op <0.1% fewer Not flagged
Capture and deliver events (32-byte payload, burst)
Shard: capture
Time per operation 83.92 µs/op 86.01 µs/op 2.5% more time Not flagged
Capture and deliver events (32-byte payload, burst)
Shard: capture
Idle process memory (RSS) 37.74 MiB 37.89 MiB 0.4% more memory Not flagged
Capture and deliver events (32-byte payload, burst)
Shard: capture
Observed peak process memory (RSS) 40.19 MiB 40.34 MiB 0.4% more memory Not flagged
Capture and deliver events (32-byte payload, burst)
Shard: capture
Process memory after settling (RSS) 40.19 MiB 40.34 MiB 0.4% more memory Not flagged
Capture and deliver events (32-byte payload, burst)
Shard: capture
Process CPU time per operation 84.14 µs/op 86.48 µs/op 2.8% more time Not flagged
Capture and deliver events (32-byte payload, burst)
Shard: capture
Lifetime peak process memory (RSS) 40.45 MiB 40.5 MiB 0.1% more memory Not flagged
Capture and deliver events (4,096-byte payload, burst)
Shard: capture
Allocated memory per operation 185.75 KiB/op 185.75 KiB/op No observed change Not flagged
Capture and deliver events (4,096-byte payload, burst)
Shard: capture
Allocations per operation 1,337.52 count/op 1,337.52 count/op No observed change Not flagged
Capture and deliver events (4,096-byte payload, burst)
Shard: capture
Time per operation 109.75 µs/op 111.77 µs/op 1.8% more time Not flagged
Capture and deliver events (4,096-byte payload, burst)
Shard: capture
Idle process memory (RSS) 41.26 MiB 41.37 MiB 0.3% more memory Not flagged
Capture and deliver events (4,096-byte payload, burst)
Shard: capture
Observed peak process memory (RSS) 47.04 MiB 47.15 MiB 0.2% more memory Not flagged
Capture and deliver events (4,096-byte payload, burst)
Shard: capture
Process memory after settling (RSS) 47.04 MiB 47.15 MiB 0.2% more memory Not flagged
Capture and deliver events (4,096-byte payload, burst)
Shard: capture
Process CPU time per operation 102.47 µs/op 104.84 µs/op 2.3% more time Not flagged
Capture and deliver events (4,096-byte payload, burst)
Shard: capture
Lifetime peak process memory (RSS) 51.5 MiB 51.52 MiB <0.1% more memory Not flagged
Capture and deliver events (32-byte payload, steady)
Shard: capture
Allocated memory per operation 138.74 KiB/op 138.74 KiB/op <0.1% more memory Not flagged
Capture and deliver events (32-byte payload, steady)
Shard: capture
Allocations per operation 1,390.42 count/op 1,390.42 count/op <0.1% more Not flagged
Capture and deliver events (32-byte payload, steady)
Shard: capture
Time per operation 98.67 µs/op 99.52 µs/op 0.9% more time Not flagged
Capture and deliver events (32-byte payload, steady)
Shard: capture
Idle process memory (RSS) 37.73 MiB 37.73 MiB No observed change Not flagged
Capture and deliver events (32-byte payload, steady)
Shard: capture
Observed peak process memory (RSS) 37.91 MiB 37.89 MiB <0.1% less memory Not flagged
Capture and deliver events (32-byte payload, steady)
Shard: capture
Process memory after settling (RSS) 37.91 MiB 37.89 MiB <0.1% less memory Not flagged
Capture and deliver events (32-byte payload, steady)
Shard: capture
Process CPU time per operation 97.71 µs/op 98.99 µs/op 1.3% more time Not flagged
Capture and deliver events (32-byte payload, steady)
Shard: capture
Lifetime peak process memory (RSS) 40.45 MiB 40.45 MiB No observed change Not flagged
Capture and deliver events (4,096-byte payload, steady)
Shard: capture
Allocated memory per operation 190.92 KiB/op 190.92 KiB/op No observed change Not flagged
Capture and deliver events (4,096-byte payload, steady)
Shard: capture
Allocations per operation 1,382.36 count/op 1,382.36 count/op No observed change Not flagged
Capture and deliver events (4,096-byte payload, steady)
Shard: capture
Time per operation 117.7 µs/op 123.6 µs/op 5% more time Not flagged
Capture and deliver events (4,096-byte payload, steady)
Shard: capture
Idle process memory (RSS) 41.16 MiB 41.11 MiB 0.1% less memory Not flagged
Capture and deliver events (4,096-byte payload, steady)
Shard: capture
Observed peak process memory (RSS) 41.61 MiB 41.54 MiB 0.2% less memory Not flagged
Capture and deliver events (4,096-byte payload, steady)
Shard: capture
Process memory after settling (RSS) 41.22 MiB 41.15 MiB 0.2% less memory Not flagged
Capture and deliver events (4,096-byte payload, steady)
Shard: capture
Process CPU time per operation 112.45 µs/op 119.5 µs/op 6.3% more time Not flagged
Capture and deliver events (4,096-byte payload, steady)
Shard: capture
Lifetime peak process memory (RSS) 41.58 MiB 41.52 MiB 0.1% less memory Not flagged
Queue an event (32-byte payload)
Shard: capture
Caller-thread CPU time per operation 62.39 µs/op 61.14 µs/op 2% less time Not flagged
Queue an event (32-byte payload)
Shard: capture
Time per operation 64.03 µs/op 61.37 µs/op 4.2% less time Not flagged
Queue an event (4,096-byte payload)
Shard: capture
Caller-thread CPU time per operation 60 µs/op 58.22 µs/op 3% less time Not flagged
Queue an event (4,096-byte payload)
Shard: capture
Time per operation 63.22 µs/op 59.08 µs/op 6.6% less time Not flagged
Evaluate all 10 flags
Shard: flags-scaling
Allocated memory per operation 225.43 KiB/op 225.43 KiB/op No observed change Not flagged
Evaluate all 10 flags
Shard: flags-scaling
Allocations per operation 2,279.42 count/op 2,279.42 count/op No observed change Not flagged
Evaluate all 10 flags
Shard: flags-scaling
Time per operation 82.38 µs/op 82.67 µs/op 0.3% more time Not flagged
Evaluate all 10 flags
Shard: flags-scaling
Process CPU time per operation 82.38 µs/op 82.65 µs/op 0.3% more time Not flagged
Evaluate all 100 flags
Shard: flags-scaling
Allocated memory per operation 2.17 MiB/op 2.17 MiB/op No observed change Not flagged
Evaluate all 100 flags
Shard: flags-scaling
Allocations per operation 22,413.69 count/op 22,413.69 count/op No observed change Not flagged
Evaluate all 100 flags
Shard: flags-scaling
Time per operation 774.07 µs/op 774.05 µs/op <0.1% less time Not flagged
Evaluate all 100 flags
Shard: flags-scaling
Process CPU time per operation 774.05 µs/op 774.11 µs/op <0.1% more time Not flagged
Evaluate all 1,000 flags
Shard: flags-scaling
Allocated memory per operation 21.63 MiB/op 21.63 MiB/op No observed change Not flagged
Evaluate all 1,000 flags
Shard: flags-scaling
Allocations per operation 223,655.44 count/op 223,655.44 count/op No observed change Not flagged
Evaluate all 1,000 flags
Shard: flags-scaling
Time per operation 7.68 ms/op 7.7 ms/op 0.2% more time Not flagged
Evaluate all 1,000 flags
Shard: flags-scaling
Process CPU time per operation 7.68 ms/op 7.7 ms/op 0.2% more time Not flagged
Evaluate 1,000 flags under concurrent load
Shard: flags-memory
Idle process memory (RSS) 43.88 MiB 43.89 MiB <0.1% more memory Not flagged
Evaluate 1,000 flags under concurrent load
Shard: flags-memory
Observed peak process memory (RSS) 44.19 MiB 44.18 MiB <0.1% less memory Not flagged
Evaluate 1,000 flags under concurrent load
Shard: flags-memory
Process memory after settling (RSS) 44.19 MiB 44.18 MiB <0.1% less memory Not flagged
Evaluate 1,000 flags under concurrent load
Shard: flags-memory
Lifetime peak process memory (RSS) 43.92 MiB 43.98 MiB 0.1% more memory Not flagged
Refresh 1,000 flag definitions
Shard: flags-memory
Idle process memory (RSS) 42.95 MiB 42.96 MiB <0.1% more memory Not flagged
Refresh 1,000 flag definitions
Shard: flags-memory
Observed peak process memory (RSS) 42.96 MiB 42.96 MiB <0.1% more memory Not flagged
Refresh 1,000 flag definitions
Shard: flags-memory
Process memory after settling (RSS) 42.96 MiB 42.96 MiB <0.1% more memory Not flagged
Refresh 1,000 flag definitions
Shard: flags-memory
Lifetime peak process memory (RSS) 42.79 MiB 43.22 MiB 1% more memory Not flagged
Evaluate one boolean flag
Shard: flags-single
Allocated memory per operation 15.74 KiB/op 15.74 KiB/op No observed change Not flagged
Evaluate one boolean flag
Shard: flags-single
Allocations per operation 162.77 count/op 162.77 count/op No observed change Not flagged
Evaluate one boolean flag
Shard: flags-single
Time per operation 8.19 µs/op 8.22 µs/op 0.4% more time Not flagged
Evaluate one boolean flag
Shard: flags-single
Process CPU time per operation 8.19 µs/op 8.22 µs/op 0.4% more time Not flagged
Evaluate a cohort-filtered flag
Shard: flags-single
Allocated memory per operation 24.6 KiB/op 24.6 KiB/op No observed change Not flagged
Evaluate a cohort-filtered flag
Shard: flags-single
Allocations per operation 239.28 count/op 239.28 count/op No observed change Not flagged
Evaluate a cohort-filtered flag
Shard: flags-single
Time per operation 11.47 µs/op 11.49 µs/op 0.2% more time Not flagged
Evaluate a cohort-filtered flag
Shard: flags-single
Process CPU time per operation 11.47 µs/op 11.49 µs/op 0.2% more time Not flagged
Evaluate a flag (early match)
Shard: flags-single
Allocated memory per operation 39.81 KiB/op 39.81 KiB/op No observed change Not flagged
Evaluate a flag (early match)
Shard: flags-single
Allocations per operation 388.27 count/op 388.27 count/op No observed change Not flagged
Evaluate a flag (early match)
Shard: flags-single
Time per operation 16.33 µs/op 16.33 µs/op <0.1% more time Not flagged
Evaluate a flag (early match)
Shard: flags-single
Process CPU time per operation 16.33 µs/op 16.33 µs/op <0.1% more time Not flagged
Evaluate a flag (late match)
Shard: flags-single
Allocated memory per operation 60.59 KiB/op 60.59 KiB/op No observed change Not flagged
Evaluate a flag (late match)
Shard: flags-single
Allocations per operation 584.27 count/op 584.27 count/op No observed change Not flagged
Evaluate a flag (late match)
Shard: flags-single
Time per operation 23.51 µs/op 23.47 µs/op 0.2% less time Not flagged
Evaluate a flag (late match)
Shard: flags-single
Process CPU time per operation 23.51 µs/op 23.47 µs/op 0.2% less time Not flagged
Evaluate a flag (no match)
Shard: flags-single
Allocated memory per operation 59.22 KiB/op 59.22 KiB/op No observed change Not flagged
Evaluate a flag (no match)
Shard: flags-single
Allocations per operation 567.77 count/op 567.77 count/op No observed change Not flagged
Evaluate a flag (no match)
Shard: flags-single
Time per operation 22.39 µs/op 22.14 µs/op 1.1% less time Not flagged
Evaluate a flag (no match)
Shard: flags-single
Process CPU time per operation 22.39 µs/op 22.14 µs/op 1.1% less time Not flagged
Evaluate a property-filtered flag
Shard: flags-single
Allocated memory per operation 19.04 KiB/op 19.04 KiB/op No observed change Not flagged
Evaluate a property-filtered flag
Shard: flags-single
Allocations per operation 192.27 count/op 192.27 count/op No observed change Not flagged
Evaluate a property-filtered flag
Shard: flags-single
Time per operation 9.28 µs/op 9.25 µs/op 0.4% less time Not flagged
Evaluate a property-filtered flag
Shard: flags-single
Process CPU time per operation 9.28 µs/op 9.25 µs/op 0.4% less time Not flagged
Evaluate a regex-filtered flag
Shard: flags-single
Allocated memory per operation 20.66 KiB/op 20.66 KiB/op No observed change Not flagged
Evaluate a regex-filtered flag
Shard: flags-single
Allocations per operation 197.77 count/op 197.77 count/op No observed change Not flagged
Evaluate a regex-filtered flag
Shard: flags-single
Time per operation 9.83 µs/op 9.81 µs/op 0.2% less time Not flagged
Evaluate a regex-filtered flag
Shard: flags-single
Process CPU time per operation 9.83 µs/op 9.81 µs/op 0.2% less time Not flagged
Evaluate a rollout flag
Shard: flags-single
Allocated memory per operation 14.89 KiB/op 14.89 KiB/op No observed change Not flagged
Evaluate a rollout flag
Shard: flags-single
Allocations per operation 152.77 count/op 152.77 count/op No observed change Not flagged
Evaluate a rollout flag
Shard: flags-single
Time per operation 7.71 µs/op 7.64 µs/op 0.9% less time Not flagged
Evaluate a rollout flag
Shard: flags-single
Process CPU time per operation 7.71 µs/op 7.64 µs/op 0.9% less time Not flagged
Evaluate a multivariate flag
Shard: flags-single
Allocated memory per operation 15.9 KiB/op 15.9 KiB/op No observed change Not flagged
Evaluate a multivariate flag
Shard: flags-single
Allocations per operation 166.77 count/op 166.77 count/op No observed change Not flagged
Evaluate a multivariate flag
Shard: flags-single
Time per operation 8.58 µs/op 8.57 µs/op <0.1% less time Not flagged
Evaluate a multivariate flag
Shard: flags-single
Process CPU time per operation 8.58 µs/op 8.57 µs/op <0.1% less time Not flagged

Values are medians of paired measurements. Not flagged does not mean unchanged. Unavailable means a measurement could not be provided, not zero. Estimated allocation measurements retain their instrumentation uncertainty. RSS measures the whole process, not just SDK allocations; observed peaks are sampled checkpoints. Paired ranges in the diagnostics describe variability, not confidence intervals.

Each shard uses its own runner; compare Before PR against With PR within a row, not across shards.

Compared 3a6d34d88940c4d08466ea09c946bdf7ccf8fc94 → 5c6cb5a0af8f5afebb17e301039b9479b8eac044.

Full report and diagnostics

102 metric rows; 102 rows shown in all results. Omitted or shortened data remain in comparison.json, including per-runner environments, resource limits, measurement methods, samples and checkpoints.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant