{"record":{"id":"590bd1d2b8ba74b5","repo":"larksuite/cli","slug":"remove-suite-child-s-w","errorCode":null,"errorMessage":"remove suite child %s: %w","messagePattern":"remove suite child (.+?): %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/skillscheck/layout.go","lineNumber":101,"sourceCode":"\nfunc prepareSuite(suitePath string, official, target []string) error {\n\treferencesPath := filepath.Join(suitePath, \"references\")\n\tarchived, err := listDirectSubdirs(referencesPath)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"inspect suite archive: %w\", err)\n\t}\n\tif err := assertSameSkillNames(archived, official, \"suite archive\"); err != nil {\n\t\treturn err\n\t}\n\n\ttargetSet := toSet(target)\n\tremoved := []string{}\n\tfor _, name := range official {\n\t\tif targetSet[name] {\n\t\t\tcontinue\n\t\t}\n\t\tif err := vfs.RemoveAll(filepath.Join(referencesPath, name)); err != nil {\n\t\t\treturn fmt.Errorf(\"remove suite child %s: %w\", name, err)\n\t\t}\n\t\tremoved = append(removed, name)\n\t}\n\n\tskillPath := filepath.Join(suitePath, \"SKILL.md\")\n\traw, err := vfs.ReadFile(skillPath)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"read suite SKILL.md: %w\", err)\n\t}\n\trendered, err := cropSuiteRoutes(string(raw), removed, target)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif err := vfs.WriteFile(skillPath, []byte(rendered), 0o644); err != nil {\n\t\treturn fmt.Errorf(\"write cropped suite SKILL.md: %w\", err)\n\t}\n\n\tkept, err := listDirectSubdirs(referencesPath)","sourceCodeStart":83,"sourceCodeEnd":119,"githubUrl":"https://github.com/larksuite/cli/blob/7fd6ef3c07182257ce776cdc5a614e122d5bd4b3/internal/skillscheck/layout.go#L83-L119","documentation":"Wraps vfs.RemoveAll failure while deleting an uninstalled official skill's references directory inside the prepared suite. The suite crop could not remove a stale child directory.","triggerScenarios":"Thrown at internal/skillscheck/layout.go:101 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check staging directory permissions and retry the sync"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7fd6ef3c07182257ce776cdc5a614e122d5bd4b3","analyzedAt":"2026-09-04T21:17:44.649Z","contentChangedAt":"2026-09-04T21:17:44.649Z","schemaVersion":2},"datasetVersion":"2026-09-12T02:17:10.037Z"}