ServerOptions.OCIStore is a dead field
Where: internal/mcp/server.go:36-37
// OCIStore is the directory for OCI artifact caching.
OCIStore string
What's wrong: OCIStore is documented as "the directory for OCI artifact caching",
but nothing in production ever reads it. NewServer drives caching solely from
opts.CacheDir (server.go:79 → source.LoadArtifacts(..., opts.CacheDir)). The only
writers of OCIStore are the unit tests (internal/mcp/server_test.go:45, 81, 112, 236).
Why it matters: the struct has two cache-directory-looking fields, OCIStore and
CacheDir, and only one works. A caller who follows the doc comment and sets OCIStore
gets no caching and no warning — the empty CacheDir makes loadBundleArtifacts fall
back to the in-memory store. The MCP unit tests also set a field the real code path
ignores, so they assert against configuration that has no effect.
Suggestion: delete OCIStore, and update server_test.go to set CacheDir.
Drafted with LLM assistance (Claude Opus 4.6).
ServerOptions.OCIStore is a dead field
Where:
internal/mcp/server.go:36-37What's wrong:
OCIStoreis documented as "the directory for OCI artifact caching",but nothing in production ever reads it.
NewServerdrives caching solely fromopts.CacheDir(server.go:79 →source.LoadArtifacts(..., opts.CacheDir)). The onlywriters of
OCIStoreare the unit tests (internal/mcp/server_test.go:45, 81, 112, 236).Why it matters: the struct has two cache-directory-looking fields,
OCIStoreandCacheDir, and only one works. A caller who follows the doc comment and setsOCIStoregets no caching and no warning — the empty
CacheDirmakesloadBundleArtifactsfallback to the in-memory store. The MCP unit tests also set a field the real code path
ignores, so they assert against configuration that has no effect.
Suggestion: delete
OCIStore, and updateserver_test.goto setCacheDir.Drafted with LLM assistance (Claude Opus 4.6).