Commit a4804e6
feat(app): opt-in debug logging mode and safer, richer diagnostic bundles
Closes #309, closes #204.
instead of cloning GlobalSettings and patching one field, so a future
secret-bearing field fails to compile here rather than leaking silently.
Fixes three concrete leaks: pre/post_backup_hook command lines (a classic
home for embedded secrets) are now redacted wholesale, custom_root_ca_path
is hashed like every other path in the bundle, and proxy_url in PAC mode
(a local file path, not a URL) is now hashed instead of passing the
userinfo-strip-only path through untouched. The ProxyError Display leak
the issue also flagged was already fixed by #208 - verified, not touched.
always-visible amber warning, backed by a real runtime-reloadable tracing
filter (logging.rs) that raises Driven's own crates to trace level while
on. The toggle persists an epoch-ms expiry and auto-turns-off 24h after
being enabled, enforced by a boot-time reconcile plus a periodic watchdog
(debug_mode.rs) so the window is honoured even across a restart. The
rolling log cap widens from 25 MB to 250 MB while debug mode is on. The
diagnostic bundle gains a DEBUG_MODE.txt notice and an unredacted
debug/engine_state.txt when debug mode is on - the one deliberate
exception to the #204 redaction rules, gated on the user's explicit
opt-in. Every bundle now also ships manifest.txt (entry name + size).
Activity's export button shows an amber "Debug data included" chip while
debug mode is on.
Also closes the long-documented gap where global.log_level only exported
RUST_LOG for the next launch - it now reloads the live filter too.
Testing: 18 Rust redaction tests (leak-shaped fixtures for hooks, CA path,
PAC-mode path, PAC-mode URL, and one full end-to-end fixture asserting the
serialized bundle JSON), 5 debug_mode watchdog/expiry tests, 5
settings-persistence round-trip tests. cargo test -p driven-app --lib:
458 passed. cargo clippy --workspace --all-targets -- -D warnings: clean.
cargo fmt --all -- --check: clean. pnpm vitest run: 793 passed across 60
files (new: activity-debug-chip.test.ts, plus PrivacyPage toggle tests in
settings-pages.test.ts). vue-tsc --noEmit: clean. Linux visual baselines
regenerated via `just visual-update` (privacy.png light+dark) and pass.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019xKUm9vH4ifb5LHR5szy1v1 parent d462592 commit a4804e6
19 files changed
Lines changed: 1595 additions & 47 deletions
File tree
- src-tauri/src
- commands
- ui
- e2e-visual/__screenshots__/linux
- dark/settings.spec.ts
- light/settings.spec.ts
- src
- __tests__
- ipc
- locales
- views
- settings
- test-support
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | | - | |
| 99 | + | |
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| |||
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
192 | | - | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
193 | 198 | | |
194 | 199 | | |
195 | 200 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
308 | 308 | | |
309 | 309 | | |
310 | 310 | | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
311 | 317 | | |
312 | 318 | | |
313 | 319 | | |
| |||
440 | 446 | | |
441 | 447 | | |
442 | 448 | | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
443 | 465 | | |
444 | 466 | | |
445 | 467 | | |
| |||
702 | 724 | | |
703 | 725 | | |
704 | 726 | | |
| 727 | + | |
705 | 728 | | |
706 | 729 | | |
707 | 730 | | |
| |||
1104 | 1127 | | |
1105 | 1128 | | |
1106 | 1129 | | |
| 1130 | + | |
| 1131 | + | |
| 1132 | + | |
| 1133 | + | |
| 1134 | + | |
| 1135 | + | |
| 1136 | + | |
| 1137 | + | |
| 1138 | + | |
| 1139 | + | |
| 1140 | + | |
| 1141 | + | |
| 1142 | + | |
| 1143 | + | |
| 1144 | + | |
| 1145 | + | |
| 1146 | + | |
| 1147 | + | |
| 1148 | + | |
| 1149 | + | |
| 1150 | + | |
| 1151 | + | |
| 1152 | + | |
| 1153 | + | |
| 1154 | + | |
| 1155 | + | |
| 1156 | + | |
| 1157 | + | |
| 1158 | + | |
| 1159 | + | |
| 1160 | + | |
| 1161 | + | |
| 1162 | + | |
| 1163 | + | |
| 1164 | + | |
| 1165 | + | |
| 1166 | + | |
| 1167 | + | |
1107 | 1168 | | |
1108 | 1169 | | |
1109 | 1170 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
968 | 968 | | |
969 | 969 | | |
970 | 970 | | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
| 986 | + | |
| 987 | + | |
971 | 988 | | |
972 | 989 | | |
973 | 990 | | |
| |||
1288 | 1305 | | |
1289 | 1306 | | |
1290 | 1307 | | |
| 1308 | + | |
| 1309 | + | |
| 1310 | + | |
| 1311 | + | |
| 1312 | + | |
1291 | 1313 | | |
1292 | 1314 | | |
1293 | 1315 | | |
| |||
0 commit comments