{"record":{"id":"d59deec63b69bf1d","repo":"fish2018/pansou","slug":"s-d59dee","errorCode":null,"errorMessage":"缓存文件中缺少键: %s","messagePattern":"缓存文件中缺少键: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"plugin/panyq/panyq.go","lineNumber":1381,"sourceCode":"\n// loadActionIDsFromFile 从文件加载Action IDs\nfunc (p *PanyqPlugin) loadActionIDsFromFile() (map[string]string, error) {\n\tconfigPath := filepath.Join(\".\", ConfigFileName)\n\t\n\tdata, err := os.ReadFile(configPath)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\t\n\tvar ids map[string]string\n\tif err := json.Unmarshal(data, &ids); err != nil {\n\t\treturn nil, err\n\t}\n\t\n\t// 验证所有必需的键是否存在\n\tfor _, key := range ActionIDKeys {\n\t\tif _, ok := ids[key]; !ok {\n\t\t\treturn nil, fmt.Errorf(\"缓存文件中缺少键: %s\", key)\n\t\t}\n\t}\n\t\n\treturn ids, nil\n}\n\n// saveActionIDsToFile 保存Action IDs到文件\nfunc (p *PanyqPlugin) saveActionIDsToFile(ids map[string]string) error {\n\tdata, err := json.Marshal(ids)\n\tif err != nil {\n\t\treturn err\n\t}\n\t\n\tconfigPath := filepath.Join(\".\", ConfigFileName)\n\treturn os.WriteFile(configPath, data, 0644)\n}\n","sourceCodeStart":1363,"sourceCodeEnd":1398,"githubUrl":"https://github.com/fish2018/pansou/blob/beaa56133755a548ebc51b090b3816e2ae044aa6/plugin/panyq/panyq.go#L1363-L1398","documentation":"Cache-integrity error in PanyqPlugin.loadActionIDsFromFile (plugin/panyq/panyq.go:1381): the config file loaded and parsed, but one of the required ActionIDKeys is absent from the map, so the cached action IDs are incomplete and must be re-discovered.","triggerScenarios":"Thrown at plugin/panyq/panyq.go:1381 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["删除损坏缓存文件并重新发现 action ID","加载失败时自动回退到 discoverActionIDs 流程","写文件时做原子写入避免损坏"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"beaa56133755a548ebc51b090b3816e2ae044aa6","analyzedAt":"2026-09-07T00:31:18.025Z","contentChangedAt":"2026-09-07T00:31:18.025Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}