breadbug store exceeds configured total cap before rotation #39
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found by independent review of BREAD-14, PR22 exact head
d970e8f8a1. Confidence high: compiled immutable-crate probe reproduces 24,140 bytes with max_total_bytes=1000, max_bytes_per_file=100000 after 50 append_log writes of "boring message ".repeat(30). No rotation occurs, so bread-bug/src/store.rs:423-456 never calls enforce_total at 479-503. Existing test store/tests.rs:148-162 explicitly tolerates cap plus three files, contrary to acceptance requiring usage under configured cap. Oversized event or marker records can also exceed per-file limits. Repair on existing PR22: enforce actual serialized record/global limits on every append and open, define oversized-record policy, assert strict bounds after each append across apps/logs/events/markers and reopen. Probe/results preserved /tmp/opencode/review-bread15/probe.rs and probe22-results.txt. No implementation or merge performed.Repair pushed on existing PR22 at
47c0b1f: reserve actual serialized bytes before every append, propagate eviction failures, reject oversized records intact with stored=false, enforce lowered global/per-file caps on reopen. 26 bread-bug tests and clippy pass, including strict per-append mixed log/event/marker flood, no-rotation reproduction, JSON escaping, oversized markers and lowered reopen limits. Not done: independent exact-head review and integration still required.PR22 advanced from
b3f763fto5741945d3dc35b977bbfa8159a55a21dc8b9cb48 with test-only actual-daemon restart regression. Store cap implementation unchanged. New restart and reload integration tests both pass. Prior full headb3f763f passed410 workspace tests/clippy/fmt/docs. Fresh acceptance must bind current head, not assume previous approval carries forward.Independent changes_requested at exact PR22 head
5741945d3d. Full criterion mapping/checklist persisted #22 (comment). Normal original flood now966 bytes vs1000, 26 tests/crate clippy/fmt/docs pass. Remaining high-confidence error-path cap defect independently reproduced: store482 bytes in pad, chmod apps/pad000, append two482-byte clip logs. Both Ok(true), reported964, actual after restoring permissions1446 >1000. store.rs:494-496 silently skips enumeration/metadata errors; usage_of548-568 understates usage. Repair fail-closed accounting and truthful health, add permission/eviction error regressions on existing PR22. Current-head CI missing; prior run132 is failed for oldd970e8f. PR21 blocked/unmerged and broader BREAD14 acceptance separate. No merge/retarget/done or implementation. Evidence /tmp/opencode/review-bread40/error-probe.rs and error-probe.txt. Move todo for coordinator repair and fresh exact-SHA review.Rejection repaired on existing PR22 exact head
a3e1854e53. Total accounting and usage now propagate directory-entry/read/metadata errors instead of omitting bytes. App eviction enumeration/removal also propagates failures. Health reports available=false plus accounting error, with no false total_bytes. Unprivileged unreadable-directory reproduction and failed-eviction regression pass, as does health error regression. All28 crate tests, workspace all-target clippy and docs checker pass. Independent fresh SHA review and exact-head CI still required; no merge/done.Independent scoped re-review BLOCKED at
a3e1854e53. Code criteria now locally pass: unprivileged original permission probe rejects both appends, usage reports error, restored actual482 <=1000; original flood966 <=1000.28 crate tests, targeted health regression, workspace all-target clippy -D warnings, fmt/docs independently pass. No additional BREAD40 code defect found. Full evidence #22 (comment). Required exact-head check / check (push) FAILURE Actions134/job0 (id2406), cause not established; local passes cannot waive. PR21 blocked/unmerged, broader BREAD14 acceptance unresolved. Leave review, no merge/retarget/done. Coordinator inspect run134 logs and repair/re-run CI; fresh SHA review if changed, resolve prerequisites separately. Evidence /tmp/opencode/review-bread40-a3e1854/.Independent rerun BLOCKED at exact live PR22 head
a3e1854e53, base39ff313. Criterion mapping and fresh independent evidence persisted #22 (comment). All scoped code criteria locally pass: original permission probe uid1000 rejects both appends and usage errors; restored actual482 <=1000, original flood966 <=1000.28 crate tests, targeted health regression, workspace all-target clippy -D warnings, fmt/docs pass. No new scoped defect. Exact-head check / check (push) FAILURE Actions134/job0 API id2406, cause not established. Coordinator inspect logs and repair/re-run, fresh review if SHA changes. PR21 remains open/unmerged/blocked and broader BREAD14 consumer acceptance separate. Leave review; no merge/retarget/done or implementation. Existing cancelled-session evidence4344/1893 was persisted and this rerun independently confirms it. Durable session updated blocked with PR4391. Fresh evidence /tmp/opencode/review-bread40-rerun/. User and generated graph work preserved.Exact-head2b641bb4213c6ae1631f414953a9dd7783afd28c review CHANGES_REQUESTED: #22 (comment). Pin-only delta; functional cap/error source unchanged and fresh28 local tests pass. Actual run135 now FAILURE: unreadable-app test passes, failed_eviction_does_not_allow_append fails tests.rs:214 left0/right1. Test does not establish distinct mtimes for pad/clip; tie sort by path can evict clip seed before genuine pad removal failure. Repair deterministic victim/contract assertion while retaining unprivileged failure and no-new-record/bounds assertions, rerun CI and fresh SHA review. Continues existing BREAD40, confidence high for observed CI failure, tied-mtime cause inferred from code ordering. No new cap bypass observed. No merge/retarget/done; preserve stack. Move todo for coordinator repair.
CI135 eviction regression repaired at74d436e098603bf451b6f60fcdb7bfef8b07948f on existingPR22. Test explicitly sets pad/log.jsonl mtime to UNIX_EPOCH via std FileTimes and asserts it precedes clip seed before removing pad write permission. This deterministically reaches failed victim first without sleep or filesystem timestamp-resolution assumptions. Genuine permission failure, cap bound and no-new-record assertions retained.28 crate tests/clippy/fmt pass. Fresh push triggers CI; independent exact-SHA re-review required.
Independent exact-head74d436e098603bf451b6f60fcdb7bfef8b07948f review BLOCKED, full criterion evidence #22 (comment).14-line test-only repair establishes pad victim mtime UNIX_EPOCH and asserts read-back older than clip before chmod0500. No sleeps/skips or weaker error/no-new-record/cap checks. Prior eviction regression rejection resolved;28 crate tests, crate all-target clippy -D warnings and fmt independently pass uid1000. Store and integrated CI pin unchanged from prior reviews. Exact-head check / check (push) PENDING Actions136/job0 id2416; available logs clippy/build complete, no final workflow/cleanup result yet. One snapshot, no polling loop. PR21 unmerged/blocked and broader BREAD14 acceptance unresolved. Keep review, no merge/retarget/done or remote access. Durable session updated blocked current SHA. Next obtain completed CI result, repair genuine failures if any, fresh review if SHA changes. Evidence /tmp/opencode/review-bread40-41-74d436e/.
Independent exact-head review PASS at
1505b0d445. Criterion mapping and evidence: #22 (comment) . Required check / check (push) success, Actions run 141 job 2446, every step success including Complete job. Re-read head1505b0dand base4a164fdimmediately before merge. Merged=true, merge SHAaea9879d61. feature/breadbug-store kept for stacked PR23. This is not done: leave review. Two-pass consumer verification happens on main after PR23. If breadboard sync auto-closes this card, restore review; known server limitation.Integrated verification on descendant main merge6699643099a82023ab1334b2e1bd0304b8e9d862: clean worktree cargo test --locked -p bread-bug -p breadbug --lib passed47+11, including strict total caps, lowered caps/reopen, failed eviction/unreadable accounting, exclusions and wipe. cargo test --locked -p breadd --test ipc_integration bug_store_survives passed2 real-daemon restart/module-reload tests with store health and noncolliding markers. PR22 independent pass comment4597; PR23 composition pass4672. CI unprivileged pin and checkout cleanup verified in PR22 run141; integrated dev-release at6699643 success.