Fix structural ledger corruption handling and newline separation - #67
Conversation
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Your fix landed before mine did — merged and correct on all four points. I had pushed an independent one to #66 at about the same time; rather than propose it, I cross-checked yours against it. The eight controls I wrote independently all pass against your implementation. Grafted onto Including the ones aimed at cases beyond the two reported: One small measured note, entirely optional — a genuine tradeoff, not a defect.
Your fix keeps the O(1) property — I expected the cost to scale with ledger size and measured that it does not. It is flat at ~9 ms whether the ledger holds 0 rows or 1,200:
So it is a constant ~9 ms per append, not a scaling problem, and it is almost certainly a Windows-with-AV artifact — on Linux CI an extra open is microseconds and none of this is visible. For your 139-verdict suite it is around a second on a Windows dev machine and nothing at all in CI. If you want it back, Thank you for the review. The first finding is the failure mode the module exists to prevent, and it shipped in the module that prevents it — I have fixed both upstream in the internal tool this was adapted from, with your two cases as the regression controls. |
Ensure non-object JSON lines in verdict ledgers raise LedgerError and report findings during verification, and prepend missing newlines when appending to ledger files.
PR created automatically by Jules for task 7124355643454311203 started by @dfeen87