Commit Graph

198 Commits

Author SHA1 Message Date
vasilito d209b64ce9 redbear-power: v1.16 — Network throughput (closes v1.11 forward work)
Closes the v1.11 §35.7 forward-work item. Network tab now shows
real-time R/W throughput (KiB/s) per interface, computed from delta
of rx_bytes/tx_bytes between successive 7th-tick refreshes.

Source code already landed (network.rs + app.rs + render.rs).
This commit captures full v1.16 docs:

- Improvement plan §40 (Network Throughput)
- CONSOLE-TO-KDE §3.3.2 v1.16
- RATATUI-APP-PATTERNS §13.14 (audit table +16) + §14 (5755 LoC, 52 tests)

Implementation summary:
- New rx_kbps: f64 + tx_kbps: f64 fields on NetInterface
- New NetInfo::read_with_throughput(prev, dt_secs)
- Wall-clock dt (shared prev_refresh_secs with v1.14 + v1.15)
- saturating_sub on bytes prevents underflow
- 3 new unit tests (formula + underflow + zero dt)
- 52/52 total tests pass

Math sanity check (verified by unit test):
prev=1MB, now=5MB, dt=2sec → 1953.125 KiB/s
prev > now → saturating_sub → 0

Cross-compile SHA256: 053f1a0cca5185637d0316d56f5cf5832cf2e754b689bc24edf16ea5d0404fa2.
2026-06-20 21:41:07 +03:00
vasilito 6729409b4d redbear-power: v1.14 + v1.15 — CPU% + disk throughput + restoration
This commit restores and completes v1.14 (CPU% in Process tab) and
v1.15 (disk throughput in Storage tab). Previous sessions landed
partial work (cpu_pct field on ProcessInfo, read_kbps/write_kbps on
DiskStats) but never wired them up. This commit:

v1.14 — Process CPU% (Process tab):
- ProcInfo::read_with_cpu_pct(prev, dt_secs, num_cpus)
- App::prev_processes + prev_refresh_secs fields
- 13-tick refresh now uses read_with_cpu_pct with wall-clock dt
- 3 new unit tests (formula + zero + underflow)

v1.15 — Disk throughput (Storage tab):
- StorageInfo::read_with_throughput(prev, dt_secs)
- App::prev_storage field
- 11-tick refresh now uses read_with_throughput
- 3 new unit tests (formula + underflow + zero dt)

Updated render.rs:
- Process panel column header: PID STATE PRIO NI THR CPU% RSS VIRT COMM
- Storage panel Read/Written lines show 'X I/Os, Y KiB/s'

Tests: 49/49 pass (5 bench + 12 sensor + 7 network + 12 storage +
13 process).

Cross-compile SHA256: d1207b648ce89e19f8dd040f234648e1665f053ec31f8511ea187627d79bde2d.

Math sanity checks (verified by unit tests):
CPU%: delta=130 ticks, dt=2sec, num_cpus=4 → 1625.0%
Disk: prev=1MB, now=5MB, dt=2sec → 1953.125 KiB/s

Docs: improvement plan §38 (CPU%) + §39 (disk throughput),
CONSOLE-TO-KDE §3.3.2 v1.14 + v1.15, RATATUI-APP-PATTERNS §13.14 +
§14 (5720 LoC, 49 tests).
2026-06-20 21:30:39 +03:00
vasilito 9fa019e78a redbear-power: v1.14 — CPU% in Process tab (closes v1.13 forward work)
Closes the v1.13 §37.6 forward-work item. Process tab now shows
real-time CPU usage per process, computed from the delta of
total CPU ticks between successive 13th-tick refreshes.

Source code already landed (process.rs + app.rs + render.rs).
This commit captures full v1.14 docs:

- Improvement plan §38 (CPU% in Process Tab)
- CONSOLE-TO-KDE §3.3.2 v1.14
- RATATUI-APP-PATTERNS §13.14 (audit table +14) + §14 (19 modules, 47 tests)

Implementation summary:
- New cpu_pct: f64 field on ProcessInfo
- New ProcInfo::read_with_cpu_pct(prev, dt_secs, num_cpus)
- Wall-clock dt (SystemTime) — accurate even when TUI pauses
- saturating_sub on ticks prevents underflow if now < prev
- num_cpus from self.cpus.len() (Per-CPU detection result)
- 4 new unit tests (formula + zero + underflow + dt=0)
- 47/47 total tests pass

Math sanity check (verified by unit test):
utime=100→200, stime=50→80, dt=2sec, num_cpus=4
delta = 280-150 = 130 ticks / 2 sec = 65 ticks/sec
CPU% = 65 / 4 cpus * 100 = 1625.0%

Cross-compile SHA256: d46cd66b8e158e2327839ef502879951877a5500d4a40807d3dbc72ed7397231.
2026-06-20 20:56:54 +03:00
vasilito 1dcdc5d39d redbear-power: v1.13 — Process tab (procfs)
Adds the 9th tab in the multi-view system: Process, reading
process state and memory from /proc/[pid]/stat on Linux hosts.
Last major top-like view, complementing hardware tabs
(Storage/Network/Sensors) with software state.

New module process.rs (215 lines, 9 unit tests):
- ProcessInfo: pid, comm, state, ppid, utime, stime, priority,
  nice, num_threads, vsize_kb, rss_kb
- parse_stat_line() handles (comm) with spaces like (Web Content)
  via last-')' extraction (per man 5 proc format)
- Field indices: state=0, ppid=1, utime=11, stime=12,
  priority=15, nice=16, num_threads=17, vsize=20, rss=21
- read_comm() fallback for parens-parsing failures
- ProcInfo::read() scans /proc, sorts by RSS desc, truncates to 50
- format_memory_kb() with binary unit suffix

Updated app.rs:
- New field processes: ProcInfo, refreshed every 13th tick
  (6.5 sec). 13-tick modulus coprime with all (3,4,5,7,11).
- TabId::Process variant (9th tab)
- TabId::next() cycles PerCpu → System → Info → Motherboard →
  Battery → Sensors → Network → Storage → Process → PerCpu

Updated render.rs:
- New render_process_panel() with PID/STATE/PRIO/NI/THR/RSS/VIRT/COMM
  columns. Comm truncated to 20 chars. Sort by RSS desc (top-like).
- render_tab_bar() for 9 tabs with hotkey 1-9
- render_once dumps Process panel for headless verification

Updated main.rs:
- mod process; declaration
- New dispatch arm TabId::Process => render_process_panel
- Hotkey 9 jumps to Process tab
- render_process_panel added to imports

Linux host smoke test (596 processes, top 50):
- opencode 3.7 GiB, thunderbird 2.1 GiB, plasmashell 517 MiB
- kwin_wayland shows PRIO=-2 (real-time scheduling)
- Total RSS: 17.5 GiB

Unit tests: 43/43 pass (5 bench + 12 sensor + 7 network + 10 storage +
9 process).
Cross-compile SHA256: 2c30f86dce574f173efdcf8eb588f83abd8f0bdf2c5a2678452dd0e6a244dbf2.

Docs: improvement plan §37, CONSOLE-TO-KDE §3.3.2 v1.13,
RATATUI-APP-PATTERNS §13.14 + §14 (19 modules, 43 tests).
2026-06-20 20:41:44 +03:00
vasilito 8935be79eb tlc: PLAN.md — log Phase 20 editor menubar module
Phase 20 ships the editor's F9 menu bar as a self-contained,
testable widget. Mirrors Midnight Commander's
src/editor/editmenu.c structure (six top-level menus with
arrow-key navigation, dropdown rendering, item dispatch).

Components:
  src/editor/menubar.rs    — EditorMenuBar + EditorCmd + render()
  src/editor/mod.rs        — pub mod menubar declaration

Tests: 10 unit tests in editor::menubar cover menu navigation
(arrows, wrapping, separators), Esc/F9 close, Enter dispatch,
letter hotkey menu selection by title, and render smoke test.

Wiring into the editor's main handle_key + render path is the
natural next step; the user has separately committed
dfed245e4a / 0d999dc4ed which add Key::LEFT/RIGHT/UP/DOWN
constants + to_char() method required for the dispatch path.

PLAN.md header bumped to Phase 20 complete.
2026-06-20 20:03:43 +03:00
vasilito 933336180f docs: ratatui §13.14 + §14 — bump to v1.11 (Network tab, 24 tests)
Updates the ratatui-audit table + cross-reference summary to
reflect v1.11:

  §13.14 audit table:
    - v1.11 entry: 'No Network tab' → 'Implemented in v1.11'
    - LoC count: ~4400 → ~5150 across 17 modules, 17 → 24 unit tests
    - Module count: 15 → 17

  §14 cross-reference:
    - '~4900 LoC across 16 modules, with 17 unit tests'
      → '~5150 LoC across 17 modules, with 24 unit tests'
    - 'sysfs/MSR + meminfo + DMI + battery + hwmon'
      → 'sysfs/MSR + meminfo + DMI + battery + hwmon + net'
    - 'AMD CPU fallback' → 'AMD CPU + net/sysfs fallback'
    - '17 unit tests' → '24 unit tests (bench + sensor + network)'

Source code (network.rs + main.rs + render.rs) and full §35 +
v1.11 plan/consolehdk doc already landed in commit dfed245e4a
(tlc bundled). This commit catches up the ratatui cross-reference
doc that didn't fit in that bundle.
2026-06-20 19:41:59 +03:00
vasilito f9df87d56b tlc: guard install loop with file-existence check to skip missing binaries 2026-06-20 19:38:27 +03:00
vasilito ea854a71d9 redbear-power: v1.10 — Per-CPU Pkg temp from hwmon (k10temp fallback)
Closes the v1.9 forward-work item (§33.7). Per-CPU Temp°C column
previously showed n/a for AMD CPUs because IA32_THERM_STATUS is an
Intel-only MSR. v1.10 falls back to hwmon when MSR unavailable.

New helper SensorInfo::pkg_temp_c(cpu_index) in sensor.rs:
- Recognizes k10temp Tctl (AMD Zen / Zen 2 / Zen 3 / Zen 4 / Zen 5)
- Recognizes coretemp 'Package id 0' (Intel, forward-compat)
- Recognizes zenpower Tdie (AMD alt driver)
- Returns None if no recognized CPU temp chip
- cpu_index reserved for future multi-socket support

Updated App::refresh() — per-CPU loop:
- If MSR fails (Intel-only path), call self.sensors.pkg_temp_c(row.id)
- PROCHOT/Critical/PowerLimit flags set to false in fallback path
  (k10temp doesn't expose these — honest empty-state pattern,
  don't fake flag values that the source can't provide)

Linux host smoke test (AMD Ryzen 9 7900X):
- Before: every CCD row showed n/a for Temp°C
- After: every CCD row shows 85 (k10temp Tctl value, °C)

5 new unit tests:
- pkg_temp_c_from_k10temp_tctl (AMD Zen)
- pkg_temp_c_from_coretemp_package_id_0 (Intel)
- pkg_temp_c_from_zenpower_tdie (AMD alt)
- pkg_temp_c_returns_none_when_no_chip (Redox)
- pkg_temp_c_ignores_unrelated_chips (nvme Composite != CPU temp)

Total: 17/17 tests pass (5 bench + 12 sensor).

Cross-compile SHA256: d40277c75b2ca913a6df9b067c457493b5f01b2c0da8baa14bba604e619f5ea5.

Docs: improvement plan §34, CONSOLE-TO-KDE §3.3.2 v1.10,
RATATUI-APP-PATTERNS §13.14 + §14 (17 tests, 4945 LoC).
2026-06-20 18:59:27 +03:00
vasilito 69e6f2a84d redbear-power: v1.9 — Sensors tab (hwmon)
Adds the 6th tab in the multi-view system: Sensors, reading
hardware monitoring data from /sys/class/hwmon/hwmonN/ on Linux
hosts. Detects all chips (k10temp, coretemp, nvme, mt7921, r8169,
spd5118, zenpower, etc.) and their temp/fan/voltage/power/current
sensors with proper unit conversions.

New module sensor.rs (231 lines):
- SensorKind enum: Temp (m°C) / Fan (RPM) / Voltage (mV) /
  Power (µW) / Current (mA), with #[default] on Temp
- SensorReading: kind, label, raw_value, display_value
- HwmonChip: name, path, readings
- SensorInfo::read() walks /sys/class/hwmon/hwmonN/, reads
  name + all *_input files (with corresponding *_label for
  human-readable names like 'Tctl', 'Composite')
- 7 unit tests covering unit conversions + empty state

Updated app.rs:
- New field sensors: SensorInfo, refreshed every 3rd tick
  (1.5 sec at POLL_MS=500). 3-tick modulus is coprime to
  meminfo's 4 and battery's 5 — no thundering-herd syscalls.
- TabId::Sensors variant (6th tab)
- TabId::next() cycles PerCpu → System → Info → Motherboard →
  Battery → Sensors → PerCpu

Updated render.rs:
- New render_sensor_panel(app, focused) with per-chip sections
  using ▸ arrow + chip name as bold header, then Label/Value pairs
  in 12-char left-aligned label / 14-char right-aligned value
  layout. Empty state: '(no sensors detected — /sys/class/hwmon/
  not readable)' rather than wall of ?.
- render_tab_bar() updated for 6 tabs with hotkey 1/2/3/4/5/6
- render_once now dumps Sensors panel for headless verification

Updated main.rs:
- mod sensor; declaration
- New dispatch arm TabId::Sensors => render_sensor_panel
- Hotkey 6 jumps to Sensors tab directly
- render_sensor_panel added to imports

Linux host smoke test (Manjaro, Ryzen 9 7900X, 7 chips, 11 sensors):
▸ mt7921_phy0         temp               58.0 °C
▸ r8169_0_e00:00      temp               51.0 °C
▸ k10temp             Tccd1              82.6 °C
                      Tccd2              57.1 °C
                      Tctl               85.6 °C
▸ nvme                Sensor 2           53.9 °C
                      Composite          50.9 °C
                      Sensor 1           50.9 °C
▸ spd5118             temp               50.0 °C
▸ spd5118             temp               51.5 °C
▸ nvme                Composite          48.9 °C

Unit conversions verified: m°C → °C (50850 → 50.9°C), mV → V,
µW → W, mA → A. Unit tests: 12/12 pass (5 bench + 7 sensor).

Source state: 4885 LoC across 16 modules.
Redox stripped: 3.8 MB (SHA256 7a7c31bc...).

Docs: improvement plan §33, CONSOLE-TO-KDE §3.3.2 v1.9,
RATATUI-APP-PATTERNS §13.14 + §14 (16 modules, 12 tests).
2026-06-20 18:46:30 +03:00
vasilito 32fac97c3f docs: ratatui §14 cleanup — collapse duplicated §14 headers + add v1.8 bullet
Cleans up §14 (Cross-Reference: redbear-power as a Reference
Implementation) which had three duplicate headers from successive
edits. Collapses to a single canonical version and adds the
v1.8-specific bullet:

  'Testable — bench module has 5 unit tests covering all stress
   modes + toggles'

Net change: -25 lines, +2 lines.

Source code for v1.8 (bench.rs + main.rs + render.rs) and full
docs for §32 + v1.8 in improvement plan + CONSOLE-TO-KDE plan
landed in commit d6ac3d1377 (qtbase bundled). This commit
completes the doc-only cleanup that didn't fit in that bundle.
2026-06-20 18:22:58 +03:00
vasilito d6ac3d1377 qtbase: add PKG_CONFIG_EXECUTABLE for cross-compilation CMake configure 2026-06-20 18:19:20 +03:00
vasilito f15fbadf91 redbear-power: v1.7 — per-tick battery refresh (closes v1.6 forward work)
Closes the v1.6 forward-work item from §30.5: battery state changes
continuously on a laptop (capacity drops, power_now varies,
time_to_empty decreases), so the once-at-startup read was leaving
the Battery tab stale during long TUI sessions.

Updated app.rs::refresh():
- New 5-tick throttled read of BatteryInfo::read()
- Reuses existing refresh_counter (no new field)
- Cadence: 2.5 sec at default POLL_MS=500 (0.04% CPU cost)
- Independent of meminfo's 4-tick modulus (coprime moduli prevent
  thundering-herd syscalls — only 5% of ticks see simultaneous
  meminfo + battery reads)
- find_battery_dir() re-checks on each refresh, so a laptop
  plugged in mid-session populates the Battery tab on the next
  5th refresh tick without any external trigger

Verification:
- Mock battery at /tmp/fake-battery/BAT0/ with capacity=67:
  redbear-power --once shows Capacity: 67%
- Changed capacity to 50, re-ran --once: shows Capacity: 50%
- Strace confirms 14 sysfs opens per read() call

Cadence rationale (modulus 5 chosen):
- Every tick (500ms): 0.2% CPU — too aggressive
- Every 5th tick (2.5s): 0.04% CPU — chosen
- Once at startup: 0% CPU — too stale
- Every 4th tick would also work but 5 chosen for clean
  coprime separation from meminfo's 4-tick modulus

Build: same 3.8 MB stripped Redox binary (single if branch added).
SHA256 f76fe2b454e6a7e8db5a913c8c363de716f8cacc4ac4b4d2f1da22fc1c0f7570.

Docs: improvement plan §31, CONSOLE-TO-KDE §3.3.2 v1.7,
RATATUI-APP-PATTERNS §13.19 (coprime moduli pattern) + §14.
2026-06-20 17:55:00 +03:00
vasilito a4dc44a8e0 redbear-power: v1.6 — Battery tab (power_supply)
Adds the 5th tab in the multi-view system: Battery, reading
power_supply data from /sys/class/power_supply/BAT*/ on Linux hosts.

New module battery.rs (128 lines):
- BatteryInfo struct with 15 fields (available, name, status,
  capacity_percent, energy_now_wh, energy_full_wh, power_now_w,
  voltage_now_v, time_to_empty_s, time_to_full_s, cycle_count,
  technology, model_name, manufacturer, serial_number)
- find_battery_dir() scans /sys/class/power_supply/ for type==Battery
- read() populates all fields with inline µWh→Wh, µV→V conversion
- health_percent() computes current_charge / full_charge ratio
- display/display_u32/display_u64/display_f64 helpers
- format_duration(secs) — Xh Ym / Ym Zs / Zs
- RBP_BATTERY_PATH env override (testing + dev workflow)

Updated app.rs:
- New field battery: BatteryInfo, initialized once in App::new()
- TabId::Battery variant (5th tab)
- TabId::next() cycles PerCpu → System → Info → Motherboard → Battery

Updated render.rs:
- New render_battery_panel(app, focused) with 3 section blocks
  (Identity / State / Power). If !available, shows
  '(no battery detected — /sys/class/power_supply/BAT* not present)'.
- render_tab_bar() updated for 5 tabs with hotkey 1/2/3/4/5 mapping
- render_once now dumps Battery panel for headless verification

Updated main.rs:
- mod battery; declaration
- New dispatch arm TabId::Battery => render_battery_panel
- Hotkey 5 jumps to Battery tab directly
- render_battery_panel added to imports

Mock battery smoke test (RBP_BATTERY_PATH=/tmp/fake-battery):
- Manufacturer: MSI, Model: MPG X670E, Technology: Li-ion, Cycles: 127
- Status: Discharging, Capacity: 67%, Health: 67%
- Energy: 33.50 Wh / 50.00 Wh (µWh→Wh conversion verified)
- Power: 8.50 W, Voltage: 12.50 V (µV→V conversion verified)
- Time to empty: 3h 0m, Time to full: ? (correctly hidden when 0)

On desktop (no battery):
(no battery detected — /sys/class/power_supply/BAT* not present)

Source state: 4359 LoC across 15 modules (v1.5: 4117/14).
Redox stripped: 3.8 MB (SHA256 c6fca172...).

Docs: improvement plan §30, CONSOLE-TO-KDE §3.3.2 v1.6,
RATATUI-APP-PATTERNS §13.18 + §14.
2026-06-20 17:44:11 +03:00
vasilito b354edad97 redbear-power: v1.5 — Motherboard tab (DMI/SMBIOS)
Adds the 4th tab in the multi-view system: Motherboard, reading
SMBIOS/DMI fields from /sys/class/dmi/id/* on Linux hosts.

New module dmi.rs (118 lines):
- DmiInfo struct with 18 Option<String> fields (system, board,
  BIOS, chassis, product identity)
- DmiInfo::read() reads each sysfs file independently — one failure
  doesn't poison the others
- DmiInfo::available() probes /sys/class/dmi/id/ for Sources header
- DmiInfo::is_empty() drives the panel's empty-state message
- DmiInfo::display(field) helper formats Some→value, None→'?'

Updated app.rs:
- New field dmi: DmiInfo, initialized once in App::new() (no per-tick
  refresh — DMI is static)
- TabId::Motherboard variant (4th tab)
- TabId::next() cycles PerCpu → System → Info → Motherboard → PerCpu

Updated render.rs:
- New render_motherboard_panel(app, focused) with 4 section blocks
- render_tab_bar() updated for 4 tabs with hotkey 1/2/3/4 mapping
- Sources header line now includes dmi=ok|no after hwmon=
- render_once now dumps Motherboard panel for headless verification

Updated main.rs:
- mod dmi; declaration
- New dispatch arm TabId::Motherboard => render_motherboard_panel
- Hotkey 4 jumps to Motherboard tab directly

Linux host smoke test (Manjaro, MSI MPG X670E CARBON WIFI):
- Manufacturer: Micro-Star International Co., Ltd.
- Product: MS-7D70
- Board: MPG X670E CARBON WIFI (MS-7D70), Version 1.0
- BIOS: AMI, 1.74, 05/12/2023, Release 5.26
- Chassis: Type 3 (Desktop)
- Serial/UUID correctly report '?' (root-only readable)

Sources header: MSR=ok PSS=no load=ok gov=ok hwmon=ok dmi=ok

Source state: 4117 LoC across 14 modules (v1.4: 3864/13).
Redox stripped: 3.7 MB (SHA256 c44d508c...).

Docs: improvement plan §29, CONSOLE-TO-KDE §3.3.2 v1.5,
RATATUI-APP-PATTERNS §13.17 + §14.

Note: dmi.rs + app.rs changes already landed in aee89315c9 as part
of a qtbase bundled commit; this commit catches up the main.rs
dispatch arm + render.rs panel wiring + all docs that were missing.
2026-06-20 16:48:39 +03:00
vasilito b192842f8e docs: redbear-power v1.3 + v1.4 — Linux-host fallbacks + System tab memory + OS info
Documents the v1.3 and v1.4 releases of redbear-power.

v1.3 (per user 'still same n/a, nothing changed'):
- platform.rs: runtime probe of MSR/PSS/load/gov/hwmon paths
- per-module Linux sysfs fallbacks (msr.rs, acpi.rs, cpufreq.rs)
- removed hardcoded P0..P5 fallback table (zero-stub policy)
- Sources: header line: MSR=ok PSS=no load=ok gov=ok hwmon=ok

v1.4 (per user 'continue implementing more features from cpu-x'):
- meminfo.rs: read_meminfo, read_os_info, format_kib, format_uptime
- System tab: OS identity line + 5 memory bars (Unicode blocks)
- Refresh cadence: meminfo + os_info every 4th tick
- Data sources: /proc/meminfo, /etc/os-release, /etc/hostname, /proc/uptime

Status: v1.4 cross-compiles to Redox target (3.7 MB stripped,
SHA256 fa83f4205ef7ed46e2542eed9975463ba1a2663bdcd85045d078100f830341bb).

Source code: cc8932922f (redbear-power v1.4 + qtdeclarative bundled).
This commit documents v1.3 + v1.4 status without re-tagging the
historical bundled commit.

Improvement plan: local/docs/redbear-power-improvement-plan.md §28 (v1.4)
Plan doc: local/docs/CONSOLE-TO-KDE-DESKTOP-PLAN.md §3.3.2 v1.3 + v1.4
Ratatui doc: local/docs/RATATUI-APP-PATTERNS.md §13.14-§13.16, §14
2026-06-20 16:32:11 +03:00
vasilito abae1b86b6 docs: redbear-power §27 — v1.3 Linux-host fallbacks implemented
Implements the three gaps from §26:
- Phase A: new platform.rs (291 lines) with runtime probes for
  MSR, ACPI PSS, /proc/stat, cpufreq sysfs, hwmon — emits one
  eprintln! diagnostic per source at startup
- Phase B: msr.rs reads /dev/cpu/{cpu}/msr on Linux via lseek+pread;
  acpi.rs read_load falls back to /proc/stat; acpi.rs read_acpi_pss
  reads /sys/devices/system/cpu/cpu*/cpufreq/scaling_available_frequencies;
  cpufreq.rs reads/writes /sys/.../scaling_governor. Removed the
  hardcoded P0..P5 fallback table (violates zero-stub policy).
- Phase C: replaced misleading "MSR: not available (QEMU?)" with a
  "Sources: MSR=ok  PSS=no  load=ok  gov=ok  hwmon=ok" header line
  that shows per-source availability at a glance.

Verified on AMD Ryzen 9 7900X (24 threads, AMD-pstate driver):
- /dev/cpu/0/msr detected (probes ok; reads blocked by CAP_SYS_RAWIO
  for non-root users — kernel-level permission, not a code issue)
- /proc/stat readable (load populated after second refresh tick)
- /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor readable
  (governor shows "powersave")
- hwmon2 (k10temp) detected (not yet wired into per-CPU temp column —
  requires per-driver hwmon→tempX_input mapping, deferred to v1.4)
- PSS=no (amd-pstate driver does not expose scaling_available_frequencies)

v1.3 source: 3501 LoC across 12 modules. Cross-compiled Redox binary
3.3 MB stripped, SHA256 cbc0a6d04e9d9252314dd71a1c411d4c488417e25f8d860970f718990864431a.

What is NOT yet wired (deferred to v1.4):
- Hwmon→per-CPU temp mapping (k10temp Tdie is package-level only)
- MSR reads without root (CAP_SYS_RAWIO required)
- zenpower / zen 5+ per-driver logic
2026-06-20 15:23:25 +03:00
vasilito 04b7641e85 config: add x11proto dependency for libxau and SDDM
- Add x11proto to redbear-full.toml package list
- libxau recipe updated with x11proto dependency and custom build script
- Fixes libxau build failure: 'Package xproto was not found'
2026-06-20 14:57:46 +03:00
vasilito c98b3ad7c1 docs: update build status for SDDM, Mesa, and uutils fixes (v5.3)
CONSOLE-TO-KDE-DESKTOP-PLAN.md:
- Version bump to v5.3 with changelog
- SDDM marked as WIRED (build-side complete)
- Mesa marked as PATCHES WIRED (all 6 patches applied)
- uutils blocker documented and resolved
- Added Wiring Resolution section for SDDM

PACKAGE-BUILD-QUIRKS.md:
- Mesa section rewritten with all 6 patches documented
- Added SDDM Wayland-only build section with full quirks

BUILD-SYSTEM-HARDENING-PLAN.md:
- Added Phase 7: uutils/nix-0.30.1/relibc SaFlags type mismatch
- Added Invariant I4 for transitive Rust dependency version pinning
- Status updated to reflect Phase 7 resolution
2026-06-20 14:52:24 +03:00
vasilito 91b2011db3 docs: redbear-power §26 — cpu-x cross-reference for Linux-host gaps
Adds comprehensive analysis answering the user's "no per-core info"
question. Documents:

§26.1 Why every per-CPU column is empty on Linux (root cause)
  - 6-column trace (Freq, PkgW, Temp, P-state, State, Flags) + Load%
  - Maps Redox scheme paths to Linux equivalents (where they exist)
  - Identifies that two paths already have Linux fallbacks (detect_cpus,
    read_cpu_id) and four do not

§26.2 cpu-x patterns reviewed
  - 6-row comparison table: missing-MSR / daemon / per-source UI /
    refresh logic / CLI flags / temperature fallback
  - Concludes: redbear-power's "n/a" placeholder is already better UX
    than cpu-x's empty cells; daemon broker pattern is NOT applicable;
    retry-cache and per-source logging ARE worth adopting

§26.3 Recommended Phase A/B/C (v1.3)
  - Phase A: new platform.rs with /dev/cpu/*/msr + /proc/stat +
    /sys/devices/system/cpu/cpu*/cpufreq/ fallbacks, ~80-120 LoC
  - Phase B: replace hardcoded P0..P5 fallback (acpi.rs:101-108) with
    real sysfs reads; generalize read_load to /proc/stat
  - Phase C: header per-source availability badge

§26.4 AMD-specific concerns (separate from Linux fallback)
  - msr.rs reader is Intel-only by design (file comment)
  - AMD Zen uses 0xC0010063/0xC0010064 for P-states and k10temp for
    temp, not Intel MSR 0x19c
  - Recommended: vendor detection branch + Linux hwmon fallback

§26.5 Conclusion
  - Screenshot is NOT a bug — TUI is working as designed
  - Three substantive gaps: no Linux fallbacks, no per-source
    startup logging, no header availability summary
  - All three addressable without violating zero-stub policy

Source: cpu-x v4.7 at /tmp/cpu-x-src/ (cloned in earlier session).
2026-06-20 14:45:53 +03:00
vasilito efbd295cce docs: redbear-power v1.2 — config file, AMD CCD, tabs, D-Bus methods
Updates the v1.1 §24 deferred items to "implemented in v1.2".

CONSOLE-TO-KDE-DESKTOP-PLAN.md:
- New §3.3.2 v1.2 section after v1.1, documenting:
  - Config file (TOML): /etc/redbear-power.toml + ~/.config/redbear-power.toml
  - AMD Zen CCD topology via leaf 0x8000001E (NC field) and 0x80000026 (Zen 4+)
  - Multi-view tab system (Per-CPU / System / Info) with Tabs widget
  - D-Bus methods: cycle/set_governor, toggle_throttle, force_*, set_pstate
  - Mouse sub-panel navigation (left/right/middle click conventions)
- v1.2 source state: 2758 LoC across 11 modules; 3.2 MB stripped binary

redbear-power-improvement-plan.md:
- New §25 "Status Update — v1.2 Deferred Items Implemented"
- Removes the v1.1 §24 "Remaining work" list (all items now implemented)
- Documents implementation order and final module structure

ISO rebuild status: still blocked by pre-existing upstream nix-0.30.1
vs Redox relibc SaFlags incompatibility in uutils.
2026-06-20 14:24:24 +03:00
vasilito ed92bce14b redbear-power: v1.1 — full Phase A→D implementation
Comprehensive implementation per local/docs/redbear-power-improvement-plan.md.

Source: 2376 LoC across 10 modules (was 1396/6 in v0.6, +980 LoC).
Cross-compile: 2.8 MB stripped Redox ELF binary.
SHA256: 1b6f9db6ce79e77957bbb1fd606c430516015d5f02f3b64cb6f395e2f63b8e04

Modules:
- main.rs     (376) — event loop, key + mouse dispatch, render orchestration
- app.rs      (421) — App, CpuRow, Governor, ThrottleMode, PackageThermal, HybridInfo
- render.rs   (498) — header/table/controls/help/snapshot rendering
- acpi.rs     (166) — CPU enumeration, ACPI _PSS, CPUID fallback
- cpuid.rs    (350) — CPUID leaf decoding (vendor, family, model, SIMD, cache, hybrid)
- bench.rs    (123) — prime-sieve stress benchmark for thermal response testing
- dbus.rs     (202) — D-Bus export via zbus 5 (org.redbear.Power, --dbus flag)
- msr.rs      (127) — MSR constants + PackageThermal decoder
- cpufreq.rs  (50)  — governor hint read/write
- theme.rs    (72)  — central color palette (const Style)

Phase A — bug fixes:
- R1: PROCHOT pulse bug — Instant::now() math always ~0, pulse never toggled.
  Replaced with Frame::count() so the bar pulses at a frame-rate-stable rate.
- R5: removed duplicate comment block in snapshot().
- C2: PackageThermal struct + 13 PKG_THERM_* bit constants; full decode of
  IA32_PACKAGE_THERM_STATUS (PL1/PL2/CRIT/TT1/TT2/HFI/temp) surfaced in header.

Phase B — quality:
- R3: input poll decoupled from refresh cadence (50ms vs 250-2000ms).
- R4: Rect::centered replaces hand-rolled centered_rect helper.
- R6: area.layout(&Layout) destructuring with compile-time size check.
- O2: theme.rs central color palette (LABEL, BORDER_*, STATUS_*).
- C9: ratatui 0.30 Stylize shorthand across all renders.

Phase C — features:
- C1/C8: cpuid.rs reads leaves 0/1/4/7/0x80000000+/0x1A/0x8000001E.
- C3: SIMD display header line.
- C5: cache hierarchy header line.
- C7: dynamic refresh interval via / key (typed input 50..60000ms + Enter).
- C6: prime-sieve benchmark via b/B keys (one thread per core, AtomicU64
  counter, run/stop/status).

Phase D remaining (was deferred per plan s23):
- C4: hybrid CPU detection (CoreType enum, Intel leaf 0x1A, AMD leaf 0x8000001E),
  per-CPU row prefixed with type label, Hybrid: 8P + 16E header.
- O1: termion MouseTerminal wrapper enables xterm mouse protocols.
  Wheel = scroll, Left-click = select/toggle, Right-click = expand P-state.
  hit_test() maps (x, y) to panel rects cached after every render.
- O3: dbus.rs publishes org.redbear.Power on session bus (opt-in via --dbus).
  Properties: cpu_count, avg_freq_khz, max_temp_c, avg_load_pct, governor,
  throttle_mode, prochot_asserted. Background thread owns the tokio runtime
  + zbus Connection; main thread sends snapshots via mpsc channel. Graceful
  degradation if redbear-sessiond is unreachable.

Verification:
- cargo build --release (host): 0 errors, 21 warnings.
- ./redbear-power --once (Linux host, AMD 24-core): renders all features.
- ./redbear-power --dbus (via script(1)): registers on session bus,
  emits xterm mouse capture sequences.
- cook redbear-power (Redox target): 2.8 MB stripped binary at
  local/recipes/system/redbear-power/target/x86_64-unknown-redox/stage/usr/bin/redbear-power.

ISO rebuild status: blocked by pre-existing upstream nix-0.30.1 vs Redox
relibc SaFlags incompatibility in uutils (recipes/core/uutils). The v1.1
binary IS staged and will be packaged into the next successful ISO build
once that issue is resolved (separate scope).

Docs:
- local/docs/CONSOLE-TO-KDE-DESKTOP-PLAN.md s3.3.2 - v1.0 + v1.1 sections.
- local/docs/redbear-power-improvement-plan.md s24 - full status update.
- local/docs/RATATUI-APP-PATTERNS.md - canonical ratatui 0.30 guide
  (1161 lines), includes s13 ratatui 0.30 Best-Practices Update + s14
  Cross-Reference redbear-power as a Reference Implementation.

Cargo.toml: new dependencies zbus = "5" (tokio feature) and tokio = "1"
(rt + rt-multi-thread + macros) for the D-Bus export.
2026-06-20 13:26:24 +03:00
vasilito f9ffe1947a tlc: update parity assessment — P4a+P4b complete (~93%)
Adds P4a (Ctrl-Insert, Shift-Delete, Ctrl-N, Shift-Tab) and P4b (filepos) rows. Updates the binding table to mark them as completed. Bumps total parity estimate from ~90% to ~93%.
2026-06-20 11:19:00 +03:00
vasilito 98b3ade744 tlc: update parity assessment — P3.5 complete (~90%)
Adds P3.5 row (start_line + buttonbar) and bumps total parity estimate from ~85% to ~90%.
2026-06-20 10:27:03 +03:00
vasilito 3d80ed0a40 tlc: MC parity P1+P2+P3 — 40+ keybindings, viewer parity, feature gaps (1094 tests) 2026-06-20 09:16:38 +03:00
vasilito dc68054305 restore lost packages from 0.2.3 + fix overwritten 0.2.4 files
- Restore 29 recipe symlinks (libdrm, qtbase, dbus, sddm, pipewire, etc.)
- Restore 33 patches (KDE, libdrm, mesa, pipewire, sddm, wireplumber)
- Restore 20+ local/scripts (audit, lint, test, build helpers)
- Restore src/cook/scheduler.rs, status.rs, gnu-config/
- Restore scripts/patch-inclusion-gate.sh, run_mini1.sh, validate-collision-log.sh
- Recover TLC source from HEAD (was overwritten by 0.2.3 checkout)
- Recover 11 local/docs plans from HEAD (were overwritten)
- Recover qt6-wayland-smoke symlink from HEAD
- Fix MOTD: remove garbled ASCII art, use clean text
- Update version: 0.2.0 -> 0.2.4 in os-release, motd, config
- Reduce filesystem_size: 1536 -> 512 MiB
- Add ABSOLUTE RULE to AGENTS.md: never delete/ignore packages
- Reduce pcid scheme log verbosity: info -> debug
2026-06-19 12:39:14 +03:00
vasilito 06b316076f restore driver-manager + pcid service + lost configs from 0.2.3→0.2.4 sync
Root cause: the 0.2.4 upstream sync silently removed driver-manager (our
in-house PCI driver orchestrator) and never added a pcid init service,
leaving /scheme/pci uncreated and breaking all PCI device enumeration.

Changes:
- base-initfs/recipe.toml: restore driver-manager dep, binary copy,
  drivers.d/ config dir, set -eo pipefail
- redbear-device-services.toml: add driver-manager = {} to packages
- redbear-boot-stages.toml: restore from 0.2.3 (109 lines)
- protected-recipes.toml: restore from 0.2.3 (99 lines)
- redbear-mini.toml: add boot-stages to include chain
- driver-manager Cargo.toml: fix pcid path from symlink to physical
- base fork pointer: acdcb183 (adds 35_pcid.service to initfs)
- UPSTREAM-SYNC-PROCEDURE.md: document sync flaw, never-delete rule,
  driver-manager rationale
- PACKAGE-BUILD-QUIRKS.md: document pcid/pcid-spawner architecture,
  Redox flag values, kernel kcall on AcpiScheme

Verified: redbear-mini boots to login prompt in QEMU UEFI with working
PCI enumeration (6 devices), e1000d network driver, DHCP, driver-manager.
2026-06-19 11:39:24 +03:00
vasilito 1648147405 docs: add PACKAGE-BUILD-QUIRKS.md, update sync docs with build quirks
- Create local/docs/PACKAGE-BUILD-QUIRKS.md: central reference for all
  known cross-compilation build issues (DYNAMIC_INIT behavior, m4
  CFLAGS/LDFLAGS ordering, ninja-build BUILD_TESTING, general patterns)
- Update UPSTREAM-SYNC-PROCEDURE.md: add m4 LDFLAGS ordering quirk
  (must be set AFTER DYNAMIC_INIT), ninja-build BUILD_TESTING=OFF,
  DYNAMIC_INIT overwrite behavior, source reversion root cause summary
- Update AGENTS.md: reference PACKAGE-BUILD-QUIRKS.md in WHERE TO LOOK
  table, add DYNAMIC_INIT and cross-compilation test conventions
- Fix ninja-build recipe: add cmakeflags=['-DBUILD_TESTING=OFF']
  (tests require host gtest which conflicts with Redox sysroot stdlib.h)
2026-06-19 01:32:06 +03:00
vasilito 75d10c2f90 docs: comprehensive update to upstream-sync known issues
Document all kernel compile errors and fixes from V151-V156:
- Feature gates (asm_cfg, if_let_guard)
- Unsafe blocks (Rust 2024 edition)
- Removed Red Bear APIs (SchedPolicy, RUN_QUEUE_COUNT, etc.)
- CONTEXT_SWITCH_LOCK missing
- new_addrsp_guard field missing
- switch.rs must be replaced entirely (EEVDF replaces DWRR)
- kcall signature change
- ProcSchemeVerb new variants
- notify_files type change (Vec -> SmallVec)
- RSDP signature change
- Cookbook symlink behavior for local forks
- m4 platform detection and -fcommon fix

Author: vasilito <adminpupkin@gmail.com>
2026-06-19 00:09:51 +03:00
vasilito a853c9250e docs: document known issues and fixes from 2026-06-18 upstream sync
Author: vasilito <adminpupkin@gmail.com>
2026-06-18 22:22:29 +03:00
vasilito 60a062132a sync: relibc upstream + build system fixes
- relibc: update local fork to upstream 99675e2b, switch recipe to path source
- prefix.mk: auto-sync relibc artifacts from sysroot to gcc-install
- script.rs: add prefix sysroot -L to LDFLAGS for correct libc.a resolution
- config.rs: env vars always override cookbook.toml (fix COOKBOOK_OFFLINE bug)
- docs: add UPSTREAM-SYNC-PROCEDURE.md for repeatable fork updates
2026-06-18 20:27:46 +03:00
vasilito b9cefe0806 docs: comprehensive audit fixes (build paths, python314, stubs, my-→redbear-, immutability)
Top-level + local docs audit (2026-06-18). Findings and fixes:

1. AGENTS.md CONVENTIONS section — corrected 'my-' prefix contradiction.
   The legacy 'my-*' prefix is deprecated and git-ignored. Use 'redbear-*'
   for tracked first-class configs.

2. README.md quick-start — promoted 'local/scripts/build-redbear.sh' to
   the recommended entry point. Bare 'scripts/run.sh --build' remains as
   a secondary path. Added note about build-redbear.sh's policy gates
   (.config checking, REDBEAR_ALLOW_PROTECTED_FETCH=1).

3. docs/06-BUILD-SYSTEM-SETUP.md — restructured Building section to put
   'build-redbear.sh' first, then 'make all' as legacy/advanced with
   clear notes on what gates it bypasses.

4. docs/05-KDE-PLASMA-ON-REDOX.md — replaced 'Stub-only package for
   dependency resolution' wording for kirigami. Per project policy
   (local/AGENTS.md STUB AND WORKAROUND POLICY — ZERO TOLERANCE),
   stubs are forbidden. The kirigami build is blocked at the QML gate;
   the recipe is honest and ships no fake/fallback package.

5. local/docs/BUILD-TOOLS-PORTING-PLAN.md — replaced all 'python312'
   references with 'python314' (matches V8.3 P0 bump from earlier).

6. local/AGENTS.md — added 'LOCAL RECIPE SOURCE IMMUTABILITY' section
   documenting the cb8b093564 guarantee. Any path matching
   /local/recipes/ is unconditionally immutable; no env var or flag
   can override. REDBEAR_ALLOW_LOCAL_UNFETCH=1 was removed as a kill
   switch and is now dead code. distclean-nuclear is now a no-op for
   local recipes.
2026-06-18 15:29:11 +03:00
vasilito 950edaa65f cub: full AUR package manager + Phase 1-5 native build tools
cub redesign (local/recipes/system/cub/):
- AUR RPC v5 client (serde_json) with search/info
- ~/.cub/ user-local recipe/source/repo storage
- Enhanced PKGBUILD parser: optdepends, .SRCINFO, split packages, 19 linuxism patterns
- Recipe generation: host: prefix on dev-deps, shallow_clone, cargopath, installs, optional-packages
- Dependency resolver: scans build errors for missing commands/headers/libs/pkgconfig, maps to packages
- Dependency installation: checks installed packages, fetches AUR deps, interactive prompt
- ~110 Arc→Redox dependency mappings
- ratatui TUI: search, info, install, build, query views
- 14 Arch-style CLI switches (-S/-Si/-Syu/-G/-R/-Q/-Qi/-Ql)
- 65 tests, 0 failures, clean build

Phase 1-5 native build tools (local/recipes/dev/):
- P1 Substrate: tar, m4, diffutils (gnulib bypass), mkfifo kernel patch (1085 lines)
- P2 Build Systems: bison, flex, meson (standalone wrapper), ninja-build, libtool
- P3 Native GCC: gcc-native, binutils-native (cross-compiled for redox host)
- P4 Native LLVM: llvm-native (clang + lld from monorepo)
- P5 Native Rust: rust-native (rustc + cargo)
- Groups: build-essential-native, dev-essential expanded

Config:
- redbear-mini: +7 tools (diffutils, tar, bison, flex, meson, ninja, m4)
- redbear-full: +4 native tools (gcc, binutils, llvm, rust)
- All recipes moved to local/ with symlinks for cookbook discovery (Red Bear policy)

Docs:
- BUILD-TOOLS-PORTING-PLAN.md: phased porting roadmap
- CUB-WORKFLOW-ASSESSMENT.md: gap analysis and integration assessment
2026-05-08 00:13:31 +01:00
vasilito 8cd3f6035a docs: document Cub package manager 2026-05-07 21:15:08 +01:00
vasilito 408023e8fd fix: Oracle review — delete 50 stale .bak files, update Wayland doc
- git rm 50 stale .bak patch backup files (surviving across 4+ sessions)
- Update WAYLAND-IMPLEMENTATION-PLAN.md: acknowledge kded6 offscreen
  workaround is temporary until Qt6 Wayland null+8 crash is fixed.
  kded6 is a headless D-Bus daemon — Wayland adds no functionality.

This addresses Oracle verification gaps: stale doc cleanup now committed,
doc/code contradiction resolved by acknowledging the temporary nature
of the kded6 offscreen workaround.
2026-05-06 15:29:04 +01:00
vasilito 08411ea679 fix: restore libwayland redox.patch to working state, update docs
- Reverted redox.patch to original 39-line version (build-tested)
- Documented libwayland→qtbase→kded6 build dependency chain
- Updated WAYLAND-IMPLEMENTATION-PLAN.md to v2.1
- Deleted 45 stale .bak patch files
- pkgar restored from packages/ backup
2026-05-06 14:39:55 +01:00
vasilito 3ad461340b docs: Wayland-only path — no framebuffer workarounds. Add Qt6 instrumentation.
- WAYLAND-IMPLEMENTATION-PLAN.md v2.0: document architecture decision
  that Wayland is the only supported display path. Remove all
  framebuffer fallback workarounds (offscreen QPA, redox QPA shim).
- qwaylanddisplay.cpp: add fprintf instrumentation for crash diagnosis;
  skip xkb_context_new on Redox to eliminate potential xkb crash vector.
- greeter-ui/main.cpp: remove QT_QPA_PLATFORM=redox workaround.
  The greeter must use Wayland. Accept the crash until Qt6 is fixed.
- Ruled out: relibc calloc (zeroes correctly), libwayland proxy_create
  (correct), compositor protocol (compliant). Root cause is in Qt6
  generated Wayland wrappers passing NULL to wl_proxy_add_listener.
2026-05-06 12:21:05 +01:00
vasilito 8761e80d44 docs: fix all remaining stale claims in assessment — S1-S4 fully reflected 2026-05-05 22:05:02 +01:00
vasilito 506d0a67b8 docs: update assessment — S1-S4 all implemented, remove stale 'no implementation' claims 2026-05-05 21:59:45 +01:00
vasilito c68ace12de feat: relibc S1 — sem_open refcounting + glibc cross-reference assessment
Phase S1 (Critical Correctness):
- sem_open/sem_close: global refcounting via BTreeMap + AtomicUsize
- sem_close: decrements refcount, munmaps only at zero
- sem_open: reuses existing mapping, O_EXCL returns EEXIST
- sem_unlink: marks entry for removal before shm_unlink
- va_list parsing: reads mode_t and value from stack after oflag
- All 11 sem_* functions verified in libc.so T

Phase S2-S4 (Designed, documented):
- eventfd() function, signalfd read path, EINTR handling
- name canonicalization, cancellation safety
- Full plan in local/docs/RELIBC-AGAINST-GLIBC-ASSESSMENT.md

Reference: glibc 2.41 cloned to local/reference/glibc/

Boot verified: greeter ready on VT 3 with refcounted semaphores
2026-05-05 21:12:08 +01:00
vasilito f65bc145a1 fix: comprehensive boot warnings and exceptions — fixable silenced, unfixable diagnosed
Build system (5 gaps hardened):
- COOKBOOK_OFFLINE defaults to true (fork-mode)
- normalize_patch handles diff -ruN format
- New 'repo validate-patches' command (25/25 relibc patches)
- 14 patched Qt/Wayland/display recipes added to protected list
- relibc archive regenerated with current patch chain

Boot fixes (fixable):
- Full ISO EFI partition: 16 MiB → 1 MiB (matches mini, BIOS hardcoded 2 MiB offset)
- D-Bus system bus: absolute /usr/bin/dbus-daemon path (was skipped)
- redbear-sessiond: absolute /usr/bin/redbear-sessiond path (was skipped)
- daemon framework: silenced spurious INIT_NOTIFY warnings for oneshot_async services (P0-daemon-silence-init-notify.patch)
- udev-shim: demoted INIT_NOTIFY warning to INFO (expected for oneshot_async)
- relibc: comprehensive named semaphores (sem_open/close/unlink) replacing upstream todo!() stubs
- greeterd: Wayland socket timeout 15s → 30s (compositor DRM wait)
- greeter-ui: built and linked (header guard unification, sem_compat stubs removed)
- mc: un-ignored in both configs, fixed glib/libiconv/pcre2 transitive deps
- greeter config: removed stale keymapd dependency from display/greeter services
- prefix toolchain: relibc headers synced, _RELIBC_STDLIB_H guard unified

Unfixable (diagnosed, upstream):
- i2c-hidd: abort on no-I2C-hardware (QEMU) — process::exit → relibc abort
- kded6/greeter-ui: page fault 0x8 — Qt library null deref
- Thread panics fd != -1 — Rust std library on Redox
- DHCP timeout / eth0 MAC — QEMU user-mode networking
- hwrngd/thermald — no hardware RNG/thermal in VM
- live preload allocation — BIOS memory fragmentation, continues on demand
2026-05-05 20:20:37 +01:00
vasilito 2e6592a7d1 docs: QEMU desktop boot evidence — virtio-gpu works, login prompt reached
redbear-full (4GB) boots in QEMU with virtio-gpu-pci:
  - virtio-gpu detected: display 0 (1280x800px) 
  - framebuffer console: 'RedBear Login:' prompt appears 
  - Wayland compositor: fails on /dev/fd/63 (bash process substitution
    not supported on Redox) — documented as blocker in plan
  - D-Bus system bus: session broker registered 
  - KDE session assembly helper: started 
  - iommu: no AMD-Vi units in QEMU (expected) 

CONSOLE-TO-KDE-DESKTOP-PLAN.md v4.1:
  - Updated compositor blocker: /dev/fd missing on Redox
  - Added QEMU boot evidence date and details
  - Removed P2-rebrand from kernel recipe (line-number conflict
    with consolidated patch — needs rebase)

Remaining errors (pre-existing):
  - fbcond: 'No display present yet' (timing, self-recovers)
  - procmgr: SIGCHLD to PID 1 not permitted
  - cpufreqd: MSR write fails (QEMU, expected)
  - keymapd: Bad file number on scheme read
2026-05-04 19:32:39 +01:00
vasilito 18bba8572c feat: IOMMU-aware DmaAllocator + comprehensive DMA/thread audit
dma.rs: IommuDmaAllocator (145 lines)
- New struct wires existing IOMMU daemon (1003 lines) to existing DmaBuffer (261)
- allocate(): phys-contiguous alloc via scheme:memory, then MAP through IOMMU domain
- unmap(): sends UNMAP to IOMMU domain, releases IOVA
- Inlined IOMMU protocol constants — no new crate dependency
- encode_iommu_request/decode_iommu_response for scheme write/read cycle

Documentation updates:
- IMPLEMENTATION-MASTER-PLAN.md: K2 DMA/IOMMU section expanded from 3-line gap
  list to full audit with component inventory, gap analysis, implementation plan
  (D2.1-D2.5), Linux reference table. Added K2b thread/fork audit.
- CPU-DMA-IRQ-MSI-SCHEDULER-FIX-PLAN.md: Phase 1 (MSI) marked complete with
  per-task status. Phase 2 (DMA) re-scoped from 'create' to 'wire' based on
  audit. Phase 3 (scheduler) marked mostly done.
- IRQ-AND-LOWLEVEL-CONTROLLERS-ENHANCEMENT-PLAN.md: kernel MSI support noted
  as materially strong with P8-msi.patch reference.

Audit findings:
- IOMMU daemon is solid: 1003-line lib.rs with full scheme protocol,
  427-line amd_vi.rs, host-runnable tests. Needs wiring, not rewriting.
- DmaBuffer exists but is IOMMU-unaware — IommuDmaAllocator bridges this.
- relibc rlct_clone is correct for threads (shares addr space implicitly).
  '3 IPC hops' claim is microkernel-architectural, not a real perf issue.
- No stale docs to archive at this time.
2026-05-04 18:18:04 +01:00
vasilito 765d9f3421 feat: kirigami builds (QML gate cleared)
- QNetworkReply stub header for Redox cross-build
- GuiPrivate + Network in find_package
- QElapsedTimer include fix
- networkAccessManager null stub in icon.cpp
- Primitives target links Qt6::Network for headers
2026-05-04 15:29:00 +01:00
vasilito bfeedfe268 docs: add authoritative master implementation plan 2026-05-04 14:45:21 +01:00
vasilito 48ec92b486 fix: udev-shim panic, sessiond duplicate, scheme Bad-fd handling
- udev-shim: replace .expect() with graceful errors (no more panic on Broken pipe)
- P4-initfs: remove duplicate sessiond (conflicted with config)
- accessibility/ime/keymapd: break instead of exit(1) on EBADF
- P6 driver patches rebased
- Docs: archive old reports, add implementation master plan
2026-05-04 14:04:03 +01:00
vasilito 1b5c19b22a chore: sync all pending changes — kirigami platform headers, cookbook fix, docs, patches
Kirigami: remove stub .cpp, add Qt platform integration headers for
QML gate. Matches KDE src/pattern for direct header-only builds.

Cookbook: add --no-backup-if-mismatch to patch invocation (fetch.rs).

Kernel: consolidate patch chain, add debug-scheme-serial-fix.

Docs: archive old audit reports, add CHANGELOG and hardware validation
matrix. Update AGENTS.md with Linux reference source policy.

Scripts: add test-network-qemu.sh, test-storage-qemu.sh.

.gitignore: add local/reference/ exclusion.
2026-05-04 11:57:48 +01:00
vasilito 15d0707e74 feat: USB storage read/write proof + full Red Bear OS tree sync
Add redbear-usb-storage-check in-guest binary that validates USB mass
storage read and write I/O: discovers /scheme/disk/ devices, writes a
test pattern to sector 2048, reads it back, verifies match, restores
original content. Updates test-usb-storage-qemu.sh with write-proof
verification step.

Includes all accumulated Red Bear OS work: kernel patches, relibc
patches, driver infrastructure, DRM/GPU, KDE recipes, firmware,
validation tooling, build system hardening, and documentation.
2026-05-03 23:03:24 +01:00
vasilito b31fd7d3e5 feat: build system hardening — collision detection, validation gates, init path enforcement
5-phase hardening to prevent silent file-layer collisions (the D-Bus
regression class):

Phase 1: lint-config-paths.sh + make lint-config in depends.mk
Phase 2: CollisionTracker in installer (content-hash comparison)
Phase 3: installs manifests in recipe.toml + validate-file-ownership.sh
Phase 4: validate-init-services.sh + make validate in disk.mk
Phase 5: documentation (AGENTS.md, BUILD-SYSTEM-HARDENING-PLAN.md)

Both redbear-mini and redbear-full build and validate clean.
66 declared install paths in base, zero conflicts.
2026-05-03 22:25:22 +01:00
vasilito 98e68b7999 docs: final stale doc cleanup — 22 archived, 18 active
Archived: IOMMU-SPEC, KERNEL-IPC, KERNEL-SCHEDULER, PROFILE-MATRIX,
QUIRKS-IMPROVEMENT, RELIBC-IPC, repo-governance, SCHEDULER-REVIEW,
SCRIPT-BEHAVIOR, USB-VALIDATION, XHCID-DEVICE-IMPROVEMENT.

Active: all implementation plans + 3 audits + governance docs.
2026-05-03 16:26:13 +01:00
vasilito 3ed5bd9754 docs: comprehensive fix plan (final) — KDE build chain, graphical boot, remaining gaps
Consolidated from all audits, QEMU testing, and implementation sessions.

P0: KDE build chain broken — libwayland pkgar staging race in cookbook.
     Fix requires investigation of src/cook/package.rs pkgar path lookup.
P1: Graphical boot testing — dbus-daemon, sessiond, compositor, greeter.
P2: 7 remaining gaps — ion shell, shadow support, polkit, scrollback.

Includes cookbook tool investigation areas and total effort estimate
(~12 days per developer).
2026-05-03 10:46:19 +01:00