Add persistent input and main-loop diagnostics #17
Labels
No labels
ci
diagnostics
unresolvable
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Breadway/breadbox#17
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?
Add opt-in-safe diagnostic logging to breadbox so an intermittent launcher freeze can be distinguished from lost keyboard delivery. Write rotating structured logs beneath
$XDG_STATE_HOME/breadbox/(falling back to$HOME/.local/state/breadbox/) and expose a clear way for users to locate and share the recent log.Record GTK key press/release metadata without key text or search query contents, focus enter/leave transitions for the launcher/search entry, per-query elapsed time and result count, and a 500 ms GLib main-loop heartbeat while the popup is open. The heartbeat must be low overhead and stop when the popup closes. Include useful startup context such as desktop/session type and GTK version while excluding environment values that may contain credentials or personal data.
Add tests for log path selection, redaction boundaries, and diagnostic output/rotation where practical. Run the repository CI checks. Do not attempt a functional fix for BOX-8 based on the unconfirmed keyboard-grab hypothesis.
Implemented persistent diagnostics in breadbox PR #20: #20. Logs use a private 1 MiB rotating file, capture keycodes/modifiers, focus, query timing/counts, startup session metadata and a 500 ms GLib heartbeat, with no typed text.
breadbox --bug-reportemits only diagnostic-target events and allowlisted environment details. Local workspace tests, clippy and build pass.Review verdict: rework required. Acceptance criteria interpretation and mapping:
breadbox/src/diagnostics.rs:140-160, 246-286, plus README Diagnostics.breadbox/src/main.rs:163-165, 215-218, 257-278, 275-315.breadbox/src/main.rs:319-339.breadbox/src/diagnostics.rs:230-244, 338-442.The tests exercise path selection, the desktop-name allowlist, report target filtering, and rotation behavior. The target-filter test is behavioral, though it does not cover the subscriber configuration that creates the leak below.
breadbox/src/diagnostics.rs:181-188: the file subscriber appliesRUST_LOGdirectives to every tracing target, then writes all accepted events to the persistent diagnostics file. An override such asRUST_LOG=tracecan put other crates' event fields into the file, even though the README says the diagnostic log excludes query text. Keep the shareable-file subscriber restricted to the diagnostics target (or apply an explicit field-safe filter); add a regression test showing a non-diagnostics event containing query text is absent from the actual sink even when RUST_LOG is broad. Apply the same privacy policy to the stderr fallback if it is meant to be diagnostic-only.CI for head
dac831c995dbf118593b18f76139e35fdcbd9ad1is still pending, so I cannot verify the requested CI checks yet. Rework on the existing branchfix/box-17-diagnostics; keep PR #20 open and do not open a second PR for BOX-17.Reworking PR #20 against the review note. The persistent and stderr subscribers will use a fixed allowlist filter for
breadbox::diagnostics, independent ofRUST_LOG, and a regression test will exercise the actual sink with a non-diagnostics event carrying query text.Updated existing PR #20 with the privacy fix on commit
e8965ce. Both file and stderr subscribers now use a fixedbreadbox::diagnosticsallowlist and ignoreRUST_LOG; an actual-sink regression test runs in a subprocess withRUST_LOG=traceand confirms a query-bearing event from another crate is absent.RUST_LOG=trace cargo test --workspace(15 tests), clippy, build, touched-file rustfmt, andgit diff --checkpass.Re-review of PR #20 at
e8965ce: code review passes. Acceptance criteria and mapping:XDG_STATE_HOME, falling back to$HOME/.local/state, and provide a shareable recent-event report:breadbox/src/diagnostics.rs:140-216, 274-345; documented inREADME.md:68-81.breadbox/src/main.rs:163-168, 215-220, 257-266, 275-313, 319-337.breadbox/src/diagnostics.rs:224-271.breadbox/src/diagnostics.rs:348-474.The new regression test exercises the configured file sink with
RUST_LOG=traceand confirms an event from another target carrying query text is excluded. Both persistent and stderr subscribers use the fixed diagnostics-only filter, so the earlier privacy issue is addressed.The combined CI status for head
e8965ce906d9213483eaa03f1827db742f82fadeis currently pending (check / check (push) has started). No failed check is reported; the issue remains in REVIEW until CI completes.Independent re-review of PR #20 at head
e8965ce906d9213483eaa03f1827db742f82fade: PASS, ready to merge.Acceptance criteria mapping:
breadbox/src/diagnostics.rs:140-216, 274-345; documented inREADME.md:68-81.breadbox/src/main.rs:163-168, 215-220, 257-266, 275-313, 319-337.breadbox/src/diagnostics.rs:224-271.breadbox/src/diagnostics.rs:348-474.The prior privacy finding is fixed. Both file and stderr subscribers use the fixed
off,breadbox::diagnostics=infofilter, independent ofRUST_LOG. The regression launches an isolated process withRUST_LOG=trace, writes a query-bearing event from another target, and verifies that event is absent from the log sink while the diagnostic event is present.Combined CI status for this head is success, and PR #20 is mergeable. The issue remains in REVIEW pending merge.