{"record":{"id":"39b04eb18d7a9b9f","repo":"router-for-me/CLIProxyAPI","slug":"unsupported-schema-version-d","errorCode":null,"errorMessage":"unsupported schema-version %d","messagePattern":"unsupported schema-version (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/pluginstore/manifest.go","lineNumber":113,"sourceCode":"\tinstallType := strings.ToLower(strings.TrimSpace(m.Install.Type))\n\tif installType == \"\" {\n\t\treturn InstallTypeGitHubRelease\n\t}\n\treturn installType\n}\n\nfunc (m Manifest) Validate() error {\n\tversion := strings.TrimSpace(m.Version)\n\tif version == \"\" {\n\t\treturn fmt.Errorf(\"missing required field version\")\n\t}\n\tif !validPluginVersion(normalizeVersion(version)) {\n\t\treturn fmt.Errorf(\"invalid plugin version %q\", m.Version)\n\t}\n\tswitch m.InstallType() {\n\tcase InstallTypeDirect:\n\t\tif m.SchemaVersion != 0 && m.SchemaVersion != SchemaVersionV2 {\n\t\t\treturn fmt.Errorf(\"unsupported schema-version %d\", m.SchemaVersion)\n\t\t}\n\t\tif errID := validateManifestPluginID(m.ID); errID != nil {\n\t\t\treturn errID\n\t\t}\n\t\tplan := NormalizeInstallPlan(m.Install)\n\t\tplan.Type = InstallTypeDirect\n\t\tif len(plan.Artifacts) > 0 {\n\t\t\tif errValidate := ValidateInstallPlan(plan); errValidate != nil {\n\t\t\t\treturn errValidate\n\t\t\t}\n\t\t\treturn validatePinnedArtifactURLs(plan.Artifacts)\n\t\t}\n\t\treturn validateManifestSourceURL(m.SourceURL)\n\tcase InstallTypeGitHubRelease:\n\t\treleaseTag := strings.TrimSpace(m.ReleaseTag)\n\t\tif releaseTag == \"\" {\n\t\t\treturn fmt.Errorf(\"missing required field release-tag\")\n\t\t}","sourceCodeStart":95,"sourceCodeEnd":131,"githubUrl":"https://github.com/router-for-me/CLIProxyAPI/blob/78f0c4079e3e6273d65d03b5549cffc898703264/internal/pluginstore/manifest.go#L95-L131","documentation":"For manifests whose install type resolves to \"direct\", Validate() checks the optional schema-version field: it must be either 0 (unset) or SchemaVersionV2 (2). Any other integer means the manifest was written for a schema this build does not understand, so it is rejected before any install plan is processed.","triggerScenarios":"Manifest with SchemaVersion set to 1 or 3 (or any non-zero, non-2 value) while install.type is \"direct\" (or empty, which defaults to direct); typically after hand-porting a manifest from an older/newer pluginstore format.","commonSituations":"Registry schema migration where manifests carry schema-version: 1 from an earlier format; typos like schema-version: 22; tools generating manifests against a different pluginstore major version.","solutions":["Set schema-version: 2 in the manifest, or delete the field entirely (0/unset is accepted)","Check the constant pluginstore.SchemaVersionV2 in the version of the code you run and align the manifest","If you truly need an older schema, use a pluginstore build that supports it instead of editing this check"],"exampleFix":"// before\nm := pluginstore.Manifest{Version: \"1.0.0\", SchemaVersion: 1}\nerr := m.Validate() // unsupported schema-version 1\n\n// after\nm := pluginstore.Manifest{Version: \"1.0.0\", SchemaVersion: 2}\nerr := m.Validate() // nil","handlingStrategy":"validation","validationCode":"if m.InstallType() == pluginstore.InstallTypeDirect {\n    if m.SchemaVersion != 0 && m.SchemaVersion != pluginstore.SchemaVersionV2 {\n        return fmt.Errorf(\"manifest schema-version %d unsupported; use 2 or omit\", m.SchemaVersion)\n    }\n}\n_ = m.Validate()","typeGuard":"func schemaVersionOK(sv int32) bool { return sv == 0 || sv == pluginstore.SchemaVersionV2 }","tryCatchPattern":"if err := m.Validate(); err != nil && strings.Contains(err.Error(), \"unsupported schema-version\") { m.SchemaVersion = pluginstore.SchemaVersionV2; err = m.Validate() }","preventionTips":["Pin the pluginstore version your manifests target","Default new manifests to schema-version: 2","Add a schema-version enum check to manifest linting"],"tags":["pluginstore","manifest","schema-version","validation"],"backgroundTag":null,"analyzedSha":"78f0c4079e3e6273d65d03b5549cffc898703264","analyzedAt":"2026-08-15T12:26:37.444Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}