Skip to content

fix(server): stop the roots fetch for a closed session and interleave FR-011 latency arms - #1517

Merged
Dumbris merged 2 commits into
mainfrom
fix/issues-w2b3-backend-internal-server-worksp
Oct 5, 2026
Merged

Dumbris merged 2 commits into
mainfrom
fix/issues-w2b3-backend-internal-server-worksp

Conversation

@Dumbris

@Dumbris Dumbris commented Oct 5, 2026

Copy link
Copy Markdown
Member

Summary

Stops the workspace roots fetch from continuing after its session has closed, and makes the FR-011 scope-latency measurement less sensitive to runner noise.

Items

  • Roots fetch for a closed session (internal/server/workspace.go): the retry loop treated a soft-closed session (kept for closedSessionTTL) as still present, so a disconnect mid-fetch kept calling RequestRoots for the remaining attempts. The loop is now fetchRootsWithRetry and treats a closed session as gone. Test: internal/server/workspace_test.go.
  • 1465-4, FR-011 scope-latency flake (approved decision: sample the two arms interleaved, gate stays advisory): the scoped/admin and legacy/v3 arms are sampled via measureInterleaved with alternating order. Budget, p95 and the advisory continue-on-error gate are unchanged. Tests: internal/server/scope_latency_test.go, internal/server/scope_latency_profile_v3_test.go.

Skipped

None.

Review Status

clean after 1 round(s), unresolved findings: []

Refs #1465
Refs #1387

… FR-011 latency arms

The workspace roots retry loop treated a soft-closed session (kept for
closedSessionTTL) as still present, so a disconnect mid-fetch kept calling
RequestRoots for the remaining attempts. Extract the loop into
fetchRootsWithRetry and treat closed as gone.

Sample the scoped/admin and legacy/v3 latency arms interleaved
(measureInterleaved, alternating order) so a runner noise burst cannot land
on one arm alone. Budget, p95 and the advisory gate are unchanged.

Refs #1465, #1387
@Dumbris
Dumbris enabled auto-merge (squash) October 5, 2026 17:45
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying mcpproxy-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 5d77785
Status: ✅  Deploy successful!
Preview URL: https://5b3bc409.mcpproxy-docs.pages.dev
Branch Preview URL: https://fix-issues-w2b3-backend-inte.mcpproxy-docs.pages.dev

View logs

@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 66.66667% with 6 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
internal/server/workspace.go 66.66% 5 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

@Dumbris
Dumbris merged commit 2bcd256 into main Oct 5, 2026
44 of 45 checks passed
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.

2 participants