Repository navigation
fix(#1195): sequant://install recomputes on every read and reports a broken manifest as {error} - #1225
Merged
admarble merged 5 commits intoSep 30, 2026
Conversation
…e as {error}
install is now an injected provider (ResourceContext.install: () => Promise<...>) invoked inside the resource's read handler instead of a value computed once at server start. A manifest written after start is seen without a restart, and a thrown/rejected read returns {error} instead of collapsing into {installed:false}.
Entire-Checkpoint: d17f76d50d15
…nifest reports {error}
QA AC_NOT_MET: getManifest() swallowed read/parse errors into null before the resource's catch; AC-2 was only proven against a synthetic provider. Adds readManifestStrict for getSkillsInstallStatus and real-provider tests.
Entire-Checkpoint: 608fecc0966c
Entire-Checkpoint: 4a743c0e4440
… serveResourceContext Entire-Checkpoint: fddbb6f2e07b
Entire-Checkpoint: 0bb2f015a480
admarble
deleted the
feature/1195-fix-mcp-sequant-install-is-computed-once-at-server
branch
September 30, 2026 06:10
This was referenced Sep 30, 2026
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.
Summary
sequant://installwas a snapshot taken once whensequant servestarted, and any read error was swallowed into{installed: false}. Now:ResourceContext.installis a provider, not a value (src/mcp/resources.ts).servebuilds it throughserveResourceContext()(src/commands/serve.ts), so a manifest written after the server started is seen on the next read without a restart. The startup stderr warning is still a one-shot snapshot that swallows errors, so it can never stop the server from starting.{error}. The resource catches provider errors and returns{ error }. The first exec pass stopped there, and QA's AC_NOT_MET was right: the lenientgetManifest()(src/lib/manifest.ts) caught read and parse errors and turned them intonullbefore they ever reached the resource. A newreadManifestStrict()throws when the manifest exists but can't be read or parsed.getSkillsInstallStatususes it by default.getManifest()now wraps it and keeps its lenient behaviour for every other caller, including the per-command pre-flight.Scope note:
src/lib/manifest.tsis outside the issue's "May touch" list. It's the smallest place to fix AC-2's real path, where the error was being swallowed. The alternative was duplicating the manifest read insideversion-preflight.ts.AC verification
npx vitest run src/mcp/install-resource.test.ts. The test goes throughserveResourceContext():{installed:false}, then a manifest is written, then{installed:true}from the same server. Mutation-verified below.getSkillsInstallStatusprovider. A corrupt manifest gives{error}, achmod 0manifest gives{error}, and an absent manifest still gives{installed:false}. Mutation-verified below.Mutation-verified: AC-2 — pointed
getSkillsInstallStatus's default deps back at the lenientdefaultDeps;src/mcp/install-resource.test.ts > #988 AC-3: sequant://install > through the real provider (AC-1, AC-2) > reports a corrupt manifest as { error }, not { installed: false }failed, together with the unreadable-manifest case (2 failed / 8 passed); restored.Mutation-verified: AC-1 — made
serveResourceContext()return a snapshot taken when it's created (const snapshot = getSkillsInstallStatus(); return { install: () => snapshot });src/mcp/install-resource.test.ts > #988 AC-3: sequant://install > through the real provider (AC-1, AC-2) > AC-1: one server sees a manifest written after it startedfailed (1 failed / 10 passed); restored.(The AC-2 mutation ran before the describe block was renamed from "AC-2 through the real getSkillsInstallStatus provider" to its current name. The test cases themselves are unchanged.)
Runner verification (graph #1203)
{installed:false}. Fixed by the runner ind1f9beae.servewiring was untested (QA's own mutation passed 170/170). Fixed in136e17cb/d800467dby adding theserveResourceContext()factory, which the AC-1 test now calls directly.manifest.tschange wasn't called out. It is now, in the scope note above.install-resource,serve.integration,version-preflight(20 passed). Every test file that importslib/manifest(9 files, 355 passed).tsc --noEmitandnpm run lintare clean.Test plan
timeout 600 npx vitest run src/mcp/install-resource.test.ts src/commands/serve.integration.test.ts src/commands/version-preflight.test.ts: 20 passedinit,sync,update×2,run,run-preflight-exit,doctor,unmanaged-skill-safety,version-preflight): 355 passednpx tsc --noEmit,npm run lintFixes #1195
Refs #1203
🤖 Generated with Claude Code