mirror of
https://github.com/boshu2/agentops.git
synced 2026-09-14 15:08:13 +08:00
88cf6b0be1
Closes the RG-KEEP failure by making the TREE stop tripping the heuristic rather than by touching the snapshot. Both files mention a .jsonl path and both invoked a raw bufio.NewScanner, so a normal --regenerate pinned them and grew the grandfather 5 -> 7. Neither now invokes a raw scanner, so regeneration reproduces the committed five-entry file exactly. evidence/citations.go — LoadCitations keeps its own os.Open, so the "open citation ledger: %w" wrapping and the (nil, nil) missing-ledger case are untouched; only the scanner becomes storage.ScanJSONL. A read error is still wrapped "scan citation ledger: %w" and still returns the PARTIAL citations collected before it. Buffer policy widens from the local 1MB cap to the storage package's 8MB cap with a loud ErrLineTooLong instead of silent truncation, which is the point of the blessed helper. provenancegraph/store.go — DecodeEdges keeps its line numbering and its exact "ledger line %d: invalid JSON: %w" / "scan ledger: %w" errors. storage.ScanJSONL cannot be aborted from its callback, so the first malformed line is captured and later lines are skipped instead of decoded; the returned value is identical to the previous early return, and the first error in stream order still wins over any later scan failure. No import cycle: cli/internal/storage depends on neither package (go list -deps). No behavior change in either package's tests. scripts/.jsonl-scanner-grandfather is NOT touched and is byte-identical at a15f326f172e0346aadc17c0f4498861eb61e8c07df88c6e554f214bc90beb8e; neither the gate script nor scripts/lib/ratchet.sh is modified. Claude-Session: https://claude.ai/code/session_013fqQZAMZVFswA3oFrCDAFf