Add memory management panel for breadram #78
No reviewers
Labels
No labels
breadbug
bug
displays
enhancement
keybinds
network
phase-1
power
privacy
recovery
search
snapshots
sound
ui
ux
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Breadway/bos-settings!78
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feature/ram-27-memory-panel"
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?
RAM-27. Live daemon state (mode, pressure, memory, version, effective rules, bounded action history with expected versus measured relief) degrades to an honest absent state with nothing running. Settings edit ~/.config/breadram/breadram.toml non-destructively with atomic backed-up writes; mode and protection changes also go through the daemon validated IPC with optional persist. Profile presets resolve to explicit settings. Registered as the Memory page with search entries and a screenshot view.
Verified in headless sway against a scripted breadramd socket, plus Rust round-trip/refusal tests. Head:
d5311d98fbIndependent review of head
d5311d98fb: changes requested, CI red. Do not merge.Required check state on this exact SHA:
check / check (push)is failure (run 148). Local repro:cargo fmt --all -- --checkinsrc/reports diffs insrc/src/commands/breadram.rs(lines 34, 47, 125 and following).cargo test(148 passed) andcargo clippy --all-targets(clean) andsvelte-check(0 errors, 0 warnings) pass here, so fmt is the CI blocker. Fix withcargo fmt --allon the branch.Criterion mapping (all line refs are this head):
Daemon validation and effective settings: partial.
set_breadram_modeallow-lists monitor/automatic before the wire (breadram.rs:479) and both mode and protection go through the daemon IPC, good. Effective rules render mode/actions/protected/config_path (Memory.svelte:337-346). But therulespayload'sbudgetsandruleslists (typed at Memory.svelte:73-74) are fetched and never rendered, and theplan(with its explanation of declined actions) is fetched and never rendered. Budgets are part of effective settings per RAM-22, so this is a gap, not a pass.Why observation-only / idle-unknown / unsupported: missing. The panel never renders plan explanations,
requires_confirmed_idle, action states (unsupported/skipped/denied), control levels, or capability reasons.capabilitiesis extracted in breadram.rs:460 but the Memory view never displays it. History rows show onlyreasonas hint text (Memory.svelte:358-363). A user cannot learn from this panel why a workload is observe-only or an action unsupported.Host RAM vs VRAM, reload delays, hard-limit consequences: missing. No VRAM display anywhere (the Rust layer drops
vram_bytes/gtt_*, Memory.svelte only formats ram_available/ram_total). No reload-delay or hard-limit text in the diff (grep for vram/reload/hard-limit/observation-only across the PR diff is empty).Atomic save, working config on error, reversible changes: fails on one real defect, rest passes. Atomic backed-up writes via the shared helper and refusal-before-write (breadram.rs:164-217, test
bad_values_are_refused_before_touching_the_file) pass; useDraft autosave passes. Defect A:save_config_torewrites[[providers]]modelling only 5 fields (breadram.rs:221-231), silently deleting daemon fields the panel does not model:credential_ref,igpu,command(the hook program),hook_timeout_ms,hook_max_output_bytes(see breadram-coreconfig/mod.rsProviderEndpoint). Saving any provider edit on a hook-provider config deletes its command and breaks it. Preserve unmodelled provider keys like the top-level round-trip test already requires. Defect B:gib_to_bytes(breadram.rs:155-157) is unsanitized: NaN passes the< 0.0guard and writes 0 bytes, +Inf saturates to i64::MAX, no upper bound (frontend caps at 1024 GiB but the command accepts any f64 from the webview). Reject non-finite and unreasonably large values before the write. Note (not a blocker today):apply_profile_to(breadram.rs:248-280) replaces the whole[automation]/[protection]tables; safe only because those tables currently hold single keys.Opens with no daemon installed, honest absence: pass. Every live call degrades to
present: false(breadram.rs:447-473), panel renders Unavailable/Daemon unavailable/Empty states, covered bylive_calls_report_presence_and_degrade_to_absence.Real controls, narrow layouts, accessibility, errors, reconnect in isolation: unverified by this reviewer. Code shows a 10s live poll plus Retry (Memory.svelte:133-141, 219-223), aria-labels on controls, flex-wrap rows. I ran the unit suites but did not repeat the headless sway session; re-verify after rework.
Security (bakery-shipped, webview-exposed): no generic runner (7 typed commands, lib.rs:115-121), no credential or argv handling, provider URLs are stored strings and never fetched, socket messages are fixed-shape with mode allow-listed pre-wire. Protection add/remove strings do reach the wire, but constrained to scope-key lists the daemon validates. No findings here beyond Defect A/B above.
Next action for coordinator: fix fmt, preserve unmodelled provider keys on save, sanitize GiB inputs, render budgets/capabilities/plan-explanation including observe-only and unsupported reasons, add VRAM/reload/hard-limit explanations, then request fresh review. This head must not merge.
Independent merge-review verdict: PASS on exact head
2214f71f16.Pre-merge re-checks (fresh, this session):
2214f71(no pushes since blocked verdict).14d1315872== PR base; merge-base == base, PR reports mergeable true.2214f71, push event on feature/ram-27-memory-panel).Code criteria mapping: see card comment on RAM-27 (re-review of this head). Merging under explicit authorization for this exact SHA only.
Integration result: PR 78 merged to main as
91cc5206c3(merge commit, repo default strategy, origin only, no tag). Merged head is the reviewed SHA2214f71f16; base was14d1315872; required check check / check (push) was success on the merged head. Branch feature/ram-27-memory-panel preserved for coordinator cleanup. Coordinator to verify integrated behavior; card stays in review per gate rules.