fix(parser): match easy_bee bee-audit.json/runtime-health.json outside export/

bee-support v12.x bundles place bee-audit.json under tasks/_state/ and
runtime-health.json under status/, not export/. Detection was path-locked
to export/, dropping confidence to 50 and relying on a coincidental
export/reanimator.json duplicate to find the snapshot at all.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Mikhail Chusavitin
2026-08-24 17:22:24 +03:00
co-authored by Claude Sonnet 5
parent 6599ab49c2
commit 99d8f098ac
2 changed files with 35 additions and 3 deletions
+3 -3
View File
@@ -58,12 +58,12 @@ func (p *Parser) Detect(files []parser.ExtractedFile) int {
}
}
if strings.HasSuffix(path, "/export/bee-audit.json") || path == "bee-audit.json" {
if strings.HasSuffix(path, "/bee-audit.json") || path == "bee-audit.json" {
hasBeeAudit = true
confidence += 55
}
if hasBundlePrefix && (strings.HasSuffix(path, "/export/runtime-health.json") || path == "runtime-health.json") {
if hasBundlePrefix && (strings.HasSuffix(path, "/runtime-health.json") || path == "runtime-health.json") {
hasRuntimeHealth = true
confidence += 10
}
@@ -267,7 +267,7 @@ type manifestMetadata struct {
func findSnapshotFile(files []parser.ExtractedFile) *parser.ExtractedFile {
for i := range files {
path := strings.ToLower(strings.TrimSpace(files[i].Path))
if strings.HasSuffix(path, "/export/bee-audit.json") || path == "bee-audit.json" {
if strings.HasSuffix(path, "/bee-audit.json") || path == "bee-audit.json" {
return &files[i]
}
}