{"record":{"id":"2fec2f0a624aeb7e","repo":"siyuan-note/siyuan","slug":"too-many-boot-appearance-entries","errorCode":null,"errorMessage":"too many boot appearance entries","messagePattern":"too many boot appearance entries","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"kernel/model/boot_appearance.go","lineNumber":531,"sourceCode":"\t}\n\tinfo, err := os.Stat(appearanceDir)\n\tif err != nil || !info.IsDir() {\n\t\treturn ErrBootAppearanceNotFound\n\t}\n\tvar totalSize int64\n\tentryCount := 0\n\terr = filepath.WalkDir(appearanceDir, func(filePath string, entry os.DirEntry, walkErr error) error {\n\t\tif walkErr != nil {\n\t\t\treturn walkErr\n\t\t}\n\t\trelativePath, relativeErr := filepath.Rel(appearanceDir, filePath)\n\t\tif relativeErr != nil {\n\t\t\treturn ErrBootAppearanceAssetForbidden\n\t\t}\n\t\tif relativePath != \".\" {\n\t\t\tentryCount++\n\t\t\tif entryCount > maxBootAppearanceEntries {\n\t\t\t\treturn errors.New(\"too many boot appearance entries\")\n\t\t\t}\n\t\t\tif len(relativePath) > maxBootAppearancePathLength ||\n\t\t\t\tlen(strings.Split(filepath.ToSlash(relativePath), \"/\")) > maxBootAppearancePathDepth {\n\t\t\t\treturn errors.New(\"boot appearance path is too deep or long\")\n\t\t\t}\n\t\t}\n\t\tif entry.Type()&os.ModeSymlink != 0 {\n\t\t\treturn ErrBootAppearanceAssetForbidden\n\t\t}\n\t\tif entry.IsDir() {\n\t\t\treturn nil\n\t\t}\n\t\tinfo, infoErr := entry.Info()\n\t\tif infoErr != nil || !info.Mode().IsRegular() {\n\t\t\treturn ErrBootAppearanceAssetForbidden\n\t\t}\n\t\ttotalSize += info.Size()\n\t\tif totalSize > maxBootAppearanceTotalSize {","sourceCodeStart":513,"sourceCodeEnd":549,"githubUrl":"https://github.com/siyuan-note/siyuan/blob/8641553a1f07374001902d3ce773285db1292b2d/kernel/model/boot_appearance.go#L513-L549","documentation":"Thrown by validateBootAppearancePackage while walking a boot appearance package directory: the number of non-\".\" entries exceeds maxBootAppearanceEntries (256). It is a hard resource limit to keep packages bounded.","triggerScenarios":"Installing or validating a boot appearance package whose extracted tree contains more than 256 files/directories; the check runs during package walk (called by package load/install paths).","commonSituations":"Packages bundling per-frame animation image sequences, unpacked icon sets, or tooling that emits one file per layer/frame.","solutions":["Reduce the package to 256 or fewer entries: delete unused layers, frames, or helper files.","Consolidate image frames into fewer assets (sprite sheets, video) to cut the file count.","Split into multiple smaller boot appearance packages if genuinely needed."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"const {execSync} = require(\"child_process\");\nconst n = execSync(`find ${pkgDir} -type f | wc -l`).toString().trim();\nif (parseInt(n, 10) > 256) throw new Error(`package has ${n} entries; max 256`);","typeGuard":null,"tryCatchPattern":"try { await installBootAppearance(zipPath); } catch (e) { if (String(e).includes(\"too many boot appearance entries\")) { /* repackage with fewer files */ } else throw e; }","preventionTips":["Count package files in CI before shipping","Use sprite sheets or videos instead of frame-per-file assets","Keep packages minimal; ship only referenced assets"],"tags":["limit","boot-appearance","package"],"backgroundTag":"file-size-limit-exceeded","analyzedSha":"8641553a1f07374001902d3ce773285db1292b2d","analyzedAt":"2026-09-11T16:08:28.414Z","contentChangedAt":"2026-09-11T16:08:28.414Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}