Repository navigation
fix(app): watchdog + recorded outcomes for cloud MCP maintenance - #2778
Merged
Merged
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
Rebased onto the structured-maintenance rewrite (#2779), slimmed to the two pieces #2779 does not cover: - runSessionMcpMaintenanceTask races the task against a timeout so one hung await cannot wedge every future tick for a target until app restart (field incident); a run token keeps a late-settling task from releasing a newer run's lock - each run persists its last outcome (ok/error/timed_out, capped detail) per target under openwork.den.mcp.lastMaintenanceOutcome with a reader for the diagnostics UI — complementing #2779's ephemeral inspector events and React state with a cross-restart signal
benjaminshafii
force-pushed
the
fix/cloud-mcp-maintenance-watchdog
branch
from
July 15, 2026 05:57
d9dc06b to
cbb43ab
Compare
This branch was successfully deployed
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
Field incident (Jul 14): after the cloud MCP token death spiral, clearing the localStorage gates did nothing until a full app restart — consistent with a wedged in-flight lock:
runSessionMcpMaintenanceTaskreleases its lock only infinally, so one hung network await blocks every future tick for that target forever.Rebased onto the structured-maintenance rewrite (#2779) and slimmed to the two pieces it does not cover:
timed_out; a run-token guard prevents the late-settling task from releasing a newer run's lock.ok | error | timed_out(+ length-capped detail, newest 8 targets) underopenwork.den.mcp.lastMaintenanceOutcome, withreadCloudMcpMaintenanceOutcome(targetKey)exported for the diagnostics UI (feat(mcp): add live connection diagnostic tracing #2672). This complements fix(mcp): gate sends until Cloud search tools are ready #2779's ephemeral inspector events and per-session React state with a cross-restart signal.Dropped from the original version of this PR: the tick catch-rewrite — #2779's retry/state/inspector plumbing now covers failure surfacing inside the tick.
Testing
bun test tests/inapps/app— 298 pass / 0 fail (5 tests: hung tick → lock released + timed_out recorded + next tick runs; late-settle cannot release a newer run's lock; throwing tick records error + releases; detail cap + newest-8 retention; corrupt storage tolerated)pnpm typecheckinapps/app— cleanfraimz: skipped — unit-tested renderer logic, no visual surface change. Part 3/3 of the token-death-spiral fixes (#2776 auth-code matching, #2777 provisioning-only gate — both merged).