breadbug: persistent per-app log and event store in breadd #13

Closed
opened 2026-10-08 20:14:10 +08:00 by Breadway · 4 comments
Owner

Part of ECO-EP1 (see ECO-66 for the full spec).

breadd keeps, per app, a bounded ring of recent logs and recent events so breadbug never has to query a dead or hung app.

Requirements

  • Disk-backed (module store does not survive a daemon restart, so it cannot be reused). Bounded size per app and in total, rotated.
  • Per-app retention of the last N log lines and last N events (names and shapes only; payloads dropped unless allowlisted).
  • Apps push logs through bread-client (see the capture issue). Also ingest relevant journal entries for the app's unit.
  • Scrub on ingest using the shared scrubber (separate issue). Raw unscrubbed data must never hit disk.
  • File permissions 0600 under the user's state dir; documented location so breadbug can read it with breadd down.
  • Crash/freeze markers recorded in the store (timestamp, kind, app version, build-id).
  • Per-app exclusion list honored (excluded apps are never stored).
  • Wipe API used by bos-settings "delete local data".

Acceptance

  • Store survives breadd restart and reload.
  • Disk use stays under the configured cap under a log flood test.
  • bread doctor reports store health.
Part of ECO-EP1 (see ECO-66 for the full spec). breadd keeps, per app, a bounded ring of recent logs and recent events so breadbug never has to query a dead or hung app. ## Requirements - Disk-backed (module `store` does not survive a daemon restart, so it cannot be reused). Bounded size per app and in total, rotated. - Per-app retention of the last N log lines and last N events (names and shapes only; payloads dropped unless allowlisted). - Apps push logs through bread-client (see the capture issue). Also ingest relevant journal entries for the app's unit. - Scrub on ingest using the shared scrubber (separate issue). Raw unscrubbed data must never hit disk. - File permissions 0600 under the user's state dir; documented location so breadbug can read it with breadd down. - Crash/freeze markers recorded in the store (timestamp, kind, app version, build-id). - Per-app exclusion list honored (excluded apps are never stored). - Wipe API used by bos-settings "delete local data". ## Acceptance - Store survives `breadd` restart and reload. - Disk use stays under the configured cap under a log flood test. - `bread doctor` reports store health.
Author
Owner

Independent changes_requested at d970e8f8a1. Full criterion mapping and repair checklist persisted #22 (comment). High-confidence total-cap failure:24140 bytes vs1000 cap, filed BREAD-40; journal ingest missing.23 crate tests/clippy/fmt/docs pass; exact-head CI132 pending. Prerequisite PR21 blocked, no merge/retarget. Move todo for repairs on existingPR22, preserve stack; coordinator integrated verification before done.

Independent changes_requested at d970e8f8a1fb8dd103b9c16faeadc26c0fbd1ceb. Full criterion mapping and repair checklist persisted https://git.breadway.dev/Breadway/bread/pulls/22#issuecomment-4309. High-confidence total-cap failure:24140 bytes vs1000 cap, filed BREAD-40; journal ingest missing.23 crate tests/clippy/fmt/docs pass; exact-head CI132 pending. Prerequisite PR21 blocked, no merge/retarget. Move todo for repairs on existingPR22, preserve stack; coordinator integrated verification before done.
Author
Owner

Store cap repair pushed at47c0b1f and journal feeder at1c0fcf4 on existing PR22. Feeder follows explicitly mapped user units, scrubs before writing, honors exclusions, bounds journal lines to64KiB, retries on child exit and reaps child on shutdown. Routing/privacy and spawned child stream/shutdown fixture tests pass. New real-daemon module reload retention/health regression also passes. Full final workspace checks running; remaining lifecycle/client/settings acceptance still needs reconciliation and independent review.

Store cap repair pushed at47c0b1f and journal feeder at1c0fcf4 on existing PR22. Feeder follows explicitly mapped user units, scrubs before writing, honors exclusions, bounds journal lines to64KiB, retries on child exit and reaps child on shutdown. Routing/privacy and spawned child stream/shutdown fixture tests pass. New real-daemon module reload retention/health regression also passes. Full final workspace checks running; remaining lifecycle/client/settings acceptance still needs reconciliation and independent review.
Author
Owner

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 head 1505b0d and base 4a164fd immediately before merge. Merged=true, merge SHA aea9879d61. 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.

Independent exact-head review PASS at 1505b0d445c7715f551fd0f8870dfff8c22d6ca3. Criterion mapping and evidence: https://git.breadway.dev/Breadway/bread/pulls/22#issuecomment-4597 . Required check / check (push) success, Actions run 141 job 2446, every step success including Complete job. Re-read head 1505b0d and base 4a164fd immediately before merge. Merged=true, merge SHA aea9879d61deaf55000ec7b5a377e79299170232. 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.
Breadway reopened this issue 2026-10-14 08:50:14 +08:00
Author
Owner

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.

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.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Breadway/bread#13
No description provided.