a4bbfbd83be53cc4f8ec374edf072fa4aef358c2
49
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
a4bbfbd83b |
qemu: boot the UI through the panel's shipped init chain (flare-edge#2210)
ci / prune-artifacts (push) Skipped
ci / patches-apply (push) Successful in 24s
ci / bench (pull_request) Successful in 16s
ci / test (push) Successful in 24s
ci / mcdc (push) Successful in 29s
ci / kernel-build (push) Skipped
ci / test (pull_request) Successful in 10s
ci / quality (push) Successful in 39s
ci / badges (push) Skipped
ci / mcdc (pull_request) Successful in 30s
ci / bench (push) Successful in 10s
ci / qemu-tools (push) Successful in 3m16s
ci / qemu-tools (pull_request) Successful in 2m34s
ci / kernel-symbols (pull_request) Successful in 1m54s
ci / prune-artifacts (pull_request) Skipped
ci / kernel-build (pull_request) Skipped
ci / patches-apply (pull_request) Successful in 55s
ci / quality (pull_request) Successful in 1m36s
ci / badges (pull_request) Skipped
ci / kernel-symbols (push) Successful in 4m24s
The rig's stage-2 init starts /usr/bin/warden-ui directly as root, so it never ran S03warden-accounts, S99lvgl or warden-ui-run: no privilege drop, respawn loop or safe mode was exercised, and the BusyBox setpriv bug of flare-edge #1903 left every rebuild image without a UI while CI was green. - mkimage.sh: ROOTFS_OVERLAY lays a directory of panel files over the rootfs of both slots, modes kept. Only etc/ and usr/ at its top, no symlinks; a refused overlay writes no image. - sbin/init: with warden.initchain on the command line it runs /etc/init.d/S00-S09 before the bus and S10-S99 after the payload daemons, in place of the direct UI start (warden_init_chain in warden-lib.sh). The splash handover is marked done and warden-ui-run gets "-b fbdev". A chain boot without scripts prints WARDEN-QEMU-INITCHAIN-EMPTY and starts no UI. - warden_rig_bus_owners: when the accounts exist, cred/ui belongs to warden-ui and the cred directory to group warden-bus, as S10bus does. - Tests: init-chain-test.sh (19 checks, also under busybox sh) and rootfs-overlay.sh (17 scenarios, images read back with debugfs), both in CI. Refs flare-edge#2210 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KerYPVh72hhNgKi3wS5ijG |
||
|
|
eebfd23a96 |
qemu: test_qmp_drive.py removes its temp dirs (Fixes #30)
ci / mcdc (push) Successful in 13s
ci / bench (push) Successful in 5s
ci / prune-artifacts (push) Skipped
ci / test (push) Successful in 10s
ci / qemu-tools (push) Successful in 1m22s
ci / kernel-build (push) Skipped
ci / patches-apply (push) Successful in 48s
ci / quality (push) Successful in 57s
ci / badges (push) Skipped
ci / kernel-symbols (push) Successful in 4m7s
Every temp dir the module makes (a drive's out dir per run_script, the console and QMP socket dirs) now lands under one root per run, removed at exit; a run used to leave about 40 dirs in $TMPDIR. TempDirs runs one test of each kind in a child under a fresh TMPDIR and checks it is empty after. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KerYPVh72hhNgKi3wS5ijG |
||
|
|
06b86e68b4 |
qemu: payload-dir.sh uses if blocks (shellcheck SC2015)
ci / test (push) Successful in 19s
ci / bench (push) Successful in 13s
ci / quality (push) Successful in 1m35s
ci / badges (push) Skipped
ci / mcdc (push) Successful in 14s
ci / qemu-tools (push) Successful in 2m47s
ci / prune-artifacts (push) Skipped
ci / kernel-build (push) Skipped
ci / patches-apply (push) Successful in 39s
ci / kernel-symbols (push) Canceled after 4m16s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KerYPVh72hhNgKi3wS5ijG |
||
|
|
9998182ef5 |
qemu: PAYLOAD_DIR lets one run boot its own payload set
ci / kernel-build (push) Canceled after 0s
ci / quality (push) Canceled after 0s
ci / badges (push) Canceled after 0s
ci / test (push) Canceled after 0s
ci / mcdc (push) Canceled after 0s
ci / bench (push) Canceled after 0s
ci / qemu-tools (push) Canceled after 0s
ci / kernel-symbols (push) Canceled after 0s
ci / patches-apply (push) Canceled after 0s
ci / prune-artifacts (push) Canceled after 0s
mkimage.sh copies PAYLOAD_DIR (default qemu/payload) into /usr/bin of both slots and fails closed when it is not a directory; ui-drive.sh checks for warden-ui in the same directory. flare-edge boots the hook set (production payload plus the test-flavor UI and wthctl) for a flow that pins documents while the other flows of a batch keep reading qemu/payload (flare-edge#2054). qemu/tests/payload-dir.sh builds the images on a copy of qemu/ and reads both rootfs slots back with debugfs; wired into CI. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KerYPVh72hhNgKi3wS5ijG |
||
|
|
dd15eac1a8 |
qemu: drive a flow's override step through the UI test hook
ci / kernel-build (push) Skipped
ci / patches-apply (push) Successful in 59s
ci / test (pull_request) Successful in 29s
ci / bench (pull_request) Successful in 5s
ci / bench (push) Successful in 13s
ci / qemu-tools (push) Successful in 1m56s
ci / prune-artifacts (pull_request) Skipped
ci / kernel-build (pull_request) Skipped
ci / patches-apply (pull_request) Successful in 1m5s
ci / kernel-symbols (push) Successful in 4m0s
ci / quality (pull_request) Successful in 1m51s
ci / test (push) Successful in 15s
ci / mcdc (push) Successful in 30s
ci / prune-artifacts (push) Skipped
ci / mcdc (pull_request) Successful in 30s
ci / qemu-tools (pull_request) Successful in 1m18s
ci / badges (pull_request) Skipped
ci / quality (push) Successful in 2m5s
ci / badges (push) Skipped
ci / kernel-symbols (pull_request) Successful in 5m14s
flowc compiles a flow's `override` action to `override TOPIC DOC|null`, and a test-flavor warden-ui answers the override verb on test/req/ui, but the rig driver had no such verb and the control bridge only reached the UI's old FIFO, so a flow using it failed with an unknown command (flare-edge #2054). qmp.py `override` sends the request through the control bridge: the args JSON in `@hookdoc` / `@hookdoc+` pieces of 2000 bytes (the ctl port is a cooked tty that cuts a line at 4095 bytes; a document may be 16 KiB), then `@hook override`. The bridge runs the payload's wthctl as bus user testhook and answers its reply. ok:true passes, ok:false fails with the hook's err, and a request that never reached the hook (no client, no bus, no reply, a reply that is not a hook envelope) is fatal. The rig bus writes a testhook credential. Only plain words reach the client. ctl-bridge-test.sh covers the pieces, single use of the args, the word filter, ok:false, no reply and no client, now also under busybox sh in CI; test_qmp_drive.py covers the verb's ok, fail and fatal rows. Refs flare-edge #2054. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KerYPVh72hhNgKi3wS5ijG |
||
|
|
5494b87dc3 |
qemu: start the device bus when the payload carries a broker
ci / test (push) Successful in 28s
ci / prune-artifacts (push) Skipped
ci / patches-apply (push) Successful in 1m2s
ci / mcdc (push) Successful in 29s
ci / bench (push) Successful in 12s
ci / mcdc (pull_request) Successful in 11s
ci / prune-artifacts (pull_request) Skipped
ci / kernel-build (pull_request) Skipped
ci / kernel-build (push) Skipped
ci / quality (push) Successful in 27s
ci / badges (push) Skipped
ci / qemu-tools (pull_request) Successful in 1m9s
ci / patches-apply (pull_request) Successful in 57s
ci / test (pull_request) Successful in 26s
ci / bench (pull_request) Successful in 16s
ci / quality (pull_request) Successful in 1m29s
ci / kernel-symbols (pull_request) Successful in 6m50s
ci / qemu-tools (push) Successful in 2m15s
ci / kernel-symbols (push) Successful in 4m42s
ci / badges (pull_request) Skipped
A panel runs one mosquitto on /run/warden/bus/bus.sock (flare-edge S10bus) and every daemon and the UI talk over it; the rig had no broker, so the Rust warden-modbus and the UI's bus client could not run there (flare-edge #1754, the #1050 QEMU half). Stage-2 init now starts the broker before the payload daemons when the payload carries a static mosquitto, with the panel's paths: the socket under sock/ with the bus.sock link, and a fresh 0400 credential file per bus user under cred/. The rig broker takes any user and loads no plugin (the rig is a test instrument; a static broker loads none). A payload without a broker boots as before. qemu/tests/init-rig-bus-test.sh covers no broker, a listening broker (layout, modes, config), a broker that exits or never listens, bad user names and the init order, under sh and busybox sh; with WARDEN_TEST_MOSQUITTO_DIR a real mosquitto carries a message between two users logged in by credential file. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KerYPVh72hhNgKi3wS5ijG |
||
|
|
13cd0c63be |
Merge pull request 'qemu: name the cause when warden-ui stops answering a flow' (#26) from rb/ln-stall-diag into rebuild
ci / test (push) Successful in 17s
ci / bench (push) Successful in 16s
ci / kernel-build (push) Skipped
ci / patches-apply (push) Successful in 1m0s
ci / mcdc (push) Successful in 35s
ci / quality (push) Successful in 2m33s
ci / badges (push) Skipped
ci / prune-artifacts (push) Skipped
ci / qemu-tools (push) Successful in 2m16s
ci / kernel-symbols (push) Successful in 2m42s
|
||
|
|
44b96074ed |
qemu, build: bound the busybox and kernel fetches
ci / kernel-symbols (push) Successful in 7m23s
ci / bench (pull_request) Successful in 31s
ci / mcdc (pull_request) Successful in 38s
ci / patches-apply (pull_request) Successful in 59s
ci / kernel-symbols (pull_request) Successful in 5m20s
ci / bench (push) Successful in 34s
ci / patches-apply (push) Successful in 1m6s
ci / qemu-tools (push) Successful in 2m37s
ci / prune-artifacts (push) Skipped
ci / kernel-build (push) Skipped
ci / prune-artifacts (pull_request) Skipped
ci / kernel-build (pull_request) Skipped
ci / qemu-tools (pull_request) Successful in 2m46s
ci / test (push) Successful in 40s
ci / mcdc (push) Successful in 33s
ci / test (pull_request) Successful in 43s
ci / quality (push) Successful in 1m56s
ci / badges (push) Skipped
ci / quality (pull_request) Successful in 1m27s
ci / badges (pull_request) Skipped
qemu_get_busybox and fetch-kernel-tarball.sh ran curl with no connect timeout, stall limit or total cap. A server that answered and then went silent held the flare-edge QEMU UI gate build job until its 30 minute timeout, with no retry (flare-edge #1588, run 7391 job 63953). - qemu/lib.sh: each attempt gives up below 1 KiB/s for 20 s, or after 60 s in all; curl retries once, the 3-attempt loop stays. Limits are overridable through BB_FETCH_* for the tests. - build/fetch-kernel-tarball.sh: 20 s connect timeout, abort below 10 KiB/s for 30 s, 600 s cap. The download lands in a temp file and is renamed on success, so a failed fetch no longer leaves a partial tarball that the next run takes as present and rejects on its sha256. - Tests: busybox-fetch.sh serves a stalling local HTTP endpoint to the real curl (hung for the full 60 s guard before, fails in about 9 s after); new tests/fetch-kernel-tarball suite (bounded argv, no partial file, refetch after a failure, reuse of a matching tarball; 6 of 9 checks red before). Both wired into CI and shellcheck. Refs blueflare/flare-edge#1588 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KerYPVh72hhNgKi3wS5ijG |
||
|
|
b7be6f7fbe |
qemu: name the cause when warden-ui stops answering a flow
ci / patches-apply (pull_request) Successful in 52s
ci / mcdc (push) Successful in 32s
ci / test (push) Successful in 24s
ci / kernel-build (pull_request) Skipped
ci / bench (push) Successful in 14s
ci / qemu-tools (push) Successful in 2m29s
ci / prune-artifacts (push) Skipped
ci / test (pull_request) Successful in 24s
ci / quality (push) Successful in 1m52s
ci / mcdc (pull_request) Successful in 31s
ci / bench (pull_request) Successful in 18s
ci / kernel-build (push) Skipped
ci / patches-apply (push) Successful in 52s
ci / badges (push) Skipped
ci / kernel-symbols (push) Successful in 5m55s
ci / qemu-tools (pull_request) Successful in 2m6s
ci / prune-artifacts (pull_request) Skipped
ci / quality (pull_request) Successful in 1m38s
ci / badges (pull_request) Skipped
ci / kernel-symbols (pull_request) Successful in 6m17s
flare-edge #1528: on the lenovo QEMU runner warden-ui stopped answering for 30 to 60 s at a time (bridge no-reply, presses not consumed) and then recovered. Re-run jobs lose their failed-flow artifacts, so nothing showed whether the host starved the VM, the guest CPU was saturated, the guest waited on I/O, or warden-ui was blocked in an idle guest. qmp.py drive() now probes the first three such failures of a run: over 2 s it samples host load and PSI, the VM's vCPU thread CPU (query-cpus-fast thread-id), the guest /proc/stat and every guest process's stat line, and appends one line to the step's detail (verdict, numbers, top guest processes, processes in D state). The detail reaches the job log, so the answer survives a re-run. The control bridge answers the new `@procs` command itself, so the probe works while the UI is stuck. Tests: test_qmp_drive.py StallProbe (parsers, verdicts, CPU deltas, the vCPU thread sampler, a bounded probe on no-reply steps and none on a plain mismatch); ctl-bridge-test.sh checks `@procs` with no UI. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KerYPVh72hhNgKi3wS5ijG |
||
|
|
b94fd156b4 |
qemu: control bridge waits out a slow UI and never hands on a late reply
ci / test (push) Successful in 2m34s
ci / mcdc (push) Successful in 48s
ci / bench (push) Successful in 25s
ci / qemu-tools (push) Successful in 4m5s
ci / patches-apply (push) Successful in 2m26s
ci / quality (push) Successful in 1m36s
ci / prune-artifacts (pull_request) Skipped
ci / kernel-build (pull_request) Skipped
ci / prune-artifacts (push) Skipped
ci / kernel-build (push) Skipped
ci / kernel-symbols (push) Successful in 7m19s
ci / badges (push) Skipped
ci / mcdc (pull_request) Successful in 56s
ci / bench (pull_request) Successful in 17s
ci / test (pull_request) Successful in 2m29s
ci / patches-apply (pull_request) Successful in 1m25s
ci / qemu-tools (pull_request) Successful in 4m54s
ci / quality (pull_request) Successful in 2m16s
ci / badges (pull_request) Skipped
ci / kernel-symbols (pull_request) Successful in 5m57s
The bridge waited 5 s for warden-ui's reply. On the lenovo QEMU host a page build outran it: the bridge answered an empty reply, and the UI's late reply then landed after the next command's remove and was read as that command's answer (flare-edge#1448: "page is ''", a nav answered with the previous hit). The loop moves to warden_ctl_bridge in etc/warden-lib.sh so a host test reaches it. The wait is 30 s (WARDEN_CTL_WAIT_S); a timeout answers "bridge: no reply from warden-ui ...", which qmp.py raises as a rig fault, and the next command first drains the late reply. Replies slower than 5 s are logged on the console with their time. qmp.py's control socket timeout is 90 s so it outlasts the bridge's wait. Tests: qemu/tests/ctl-bridge-test.sh (new, in CI), test_qmp_drive.py. Refs flare-edge#1448 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KerYPVh72hhNgKi3wS5ijG |
||
|
|
be4ad86230 |
qemu: power-signal test waits for the trap install (#22)
ci / mcdc (pull_request) Successful in 16s
ci / test (push) Successful in 10s
ci / mcdc (push) Successful in 17s
ci / bench (push) Successful in 5s
ci / qemu-tools (push) Successful in 50s
ci / patches-apply (push) Successful in 24s
ci / prune-artifacts (push) Skipped
ci / kernel-build (push) Skipped
ci / kernel-symbols (push) Successful in 2m40s
ci / test (pull_request) Successful in 9s
ci / quality (push) Successful in 34s
ci / badges (push) Skipped
ci / bench (pull_request) Successful in 7s
ci / qemu-tools (pull_request) Successful in 54s
ci / prune-artifacts (pull_request) Skipped
ci / patches-apply (pull_request) Successful in 27s
ci / kernel-symbols (pull_request) Successful in 2m30s
ci / kernel-build (pull_request) Skipped
ci / quality (pull_request) Successful in 44s
ci / badges (pull_request) Skipped
init-power-signals-test.sh slept a fixed 0.5 s before sending each signal. On a loaded runner the shell had not installed its traps yet, so SIGTERM took its default action and the case failed with nothing written. Each case now polls /proc/<pid>/status until SigCgt has the signal's bit (10 s hang backstop, WARDEN_TEST_TRAP_WAIT_S), and fails clearly if the handler never appears. Regression: a case whose handler install is held back 1.5 s (fails on the old fixed sleep), plus a check that the wait gives up on a shell without a handler. Fixes #22 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KerYPVh72hhNgKi3wS5ijG |
||
|
|
6f931bf3ad |
qemu: input consumption wait is a hang backstop (flare-edge#1138)
ci / bench (push) Successful in 8s
ci / qemu-tools (push) Successful in 57s
ci / patches-apply (push) Successful in 23s
ci / test (push) Successful in 12s
ci / mcdc (push) Successful in 21s
ci / prune-artifacts (push) Skipped
ci / kernel-build (push) Skipped
ci / quality (push) Successful in 55s
ci / kernel-symbols (push) Successful in 2m45s
ci / kernel-symbols (pull_request) Successful in 2m17s
ci / badges (push) Skipped
ci / qemu-tools (pull_request) Successful in 55s
ci / patches-apply (pull_request) Successful in 24s
ci / prune-artifacts (pull_request) Skipped
ci / kernel-build (pull_request) Skipped
ci / quality (pull_request) Successful in 28s
ci / badges (pull_request) Skipped
ci / test (pull_request) Successful in 11s
ci / bench (pull_request) Successful in 6s
ci / mcdc (pull_request) Successful in 13s
The runner waited 2 s for the guest to count an injected press or release. On a loaded runner the release that opens the drawer took longer, so navigation/drawer-drag-release-policy failed both attempts although the UI handled the swipe. The wait is now a 20 s hang backstop; a wait over 2 s still passes and puts "slow guest: input consumed after N s" in the step's detail. Regression: test_swipe_release_counted_late_on_a_loaded_guest_passes (release counted 2.5 s after the drag; fails with the 2 s bound), plus a prompt-release case and a never-counted case bounded by the backstop. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KerYPVh72hhNgKi3wS5ijG |
||
|
|
445b2082f5 |
qemu: check the kernel contract at boot and run a staged script (warden.run)
ci / test (push) Canceled after 0s
ci / mcdc (push) Canceled after 0s
ci / bench (push) Canceled after 0s
ci / qemu-tools (push) Canceled after 0s
ci / kernel-symbols (push) Canceled after 0s
ci / patches-apply (push) Canceled after 0s
ci / prune-artifacts (push) Canceled after 0s
ci / kernel-build (push) Canceled after 0s
ci / quality (push) Canceled after 0s
ci / badges (push) Canceled after 0s
init verifies build/required-symbols.txt against the guest's /proc/config.gz, the cgroup v2 controllers and PSI and prints markers; boot-smoke.sh fails when a marker is missing. mkinitramfs.sh stages the list and merges EXTRA_DIR; run.sh --append passes warden.run=<path>, which init runs before powering off (used by the flare-edge M0 limit tests). README notes the symbol lists. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Cxh2piVufTWbzKTmUafTkk |
||
|
|
65a6800228 |
qemu: seed installed RS485 profiles through SEED_DIR
ci / patches-apply (push) Successful in 21s
ci / qemu-tools (push) Successful in 49s
ci / prune-artifacts (push) Skipped
ci / kernel-build (push) Skipped
ci / quality (push) Successful in 29s
ci / badges (push) Skipped
ci / patches-apply (pull_request) Successful in 19s
ci / qemu-tools (pull_request) Successful in 46s
ci / bench (push) Successful in 6s
ci / test (pull_request) Successful in 13s
ci / mcdc (pull_request) Successful in 14s
ci / bench (pull_request) Successful in 6s
ci / prune-artifacts (pull_request) Skipped
ci / kernel-build (pull_request) Skipped
ci / quality (pull_request) Successful in 28s
ci / badges (pull_request) Skipped
ci / test (push) Successful in 15s
ci / mcdc (push) Successful in 12s
A flow can now boot the rig with a .w485p profile already installed: SEED_DIR may hold profiles/rs485/<slug>.w485p (plain files, lower-case slug names, nothing else under profiles/), copied to /userdata/warden/profiles/rs485/ where warden-modbus keeps them. Every other subdirectory, symlink or name still fails closed. Needed for flare-edge#387 (a flow whose undos stay pending needs the profile installed at boot; the rig cannot reboot within a flow). seed-dir.sh scenarios 7 and 8 cover the allowed path and five refused ones. Refs blueflare/flare-edge#387. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01441BzdGcvQmXkiN2qDjfZg |
||
|
|
a828667b0f |
qemu: start warden-modbus before warden-automation in the rig init
ci / quality (push) Successful in 40s
ci / badges (push) Skipped
ci / mcdc (pull_request) Successful in 17s
ci / qemu-tools (pull_request) Successful in 47s
ci / test (pull_request) Successful in 19s
ci / bench (pull_request) Successful in 8s
ci / patches-apply (pull_request) Successful in 21s
ci / test (push) Successful in 17s
ci / prune-artifacts (pull_request) Skipped
ci / kernel-build (pull_request) Skipped
ci / quality (pull_request) Successful in 39s
ci / badges (pull_request) Skipped
ci / mcdc (push) Successful in 19s
ci / bench (push) Successful in 9s
ci / patches-apply (push) Successful in 22s
ci / qemu-tools (push) Successful in 46s
ci / prune-artifacts (push) Skipped
ci / kernel-build (push) Skipped
flare-edge#348 moves the panel's warden-modbus to S21modbus and warden-automation to S22automation, right after S20linkmount, so a held relay closes about 9 s sooner at boot. An automation's device command goes through warden-modbus (flare-edge#331), so modbus starts first. The rig's init starts the same daemons in the panel's S-number order and listed automation before modbus (S93, S94); it now matches the panel. init-daemon-order-test.sh reads the start loop and pins the order; it fails on the old list. Wired into CI. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01441BzdGcvQmXkiN2qDjfZg |
||
|
|
6576a4a506 |
qemu: a reboot tap may lose the control channel; expect_reboot looks back one step
ci / test (pull_request) Successful in 13s
ci / mcdc (pull_request) Successful in 13s
ci / bench (pull_request) Successful in 6s
ci / qemu-tools (pull_request) Successful in 40s
ci / patches-apply (push) Successful in 15s
ci / qemu-tools (push) Successful in 42s
ci / prune-artifacts (push) Skipped
ci / kernel-build (push) Skipped
ci / prune-artifacts (pull_request) Skipped
ci / kernel-build (pull_request) Skipped
ci / patches-apply (pull_request) Successful in 15s
ci / test (push) Successful in 12s
ci / quality (pull_request) Successful in 28s
ci / badges (pull_request) Skipped
ci / mcdc (push) Successful in 13s
ci / bench (push) Successful in 6s
ci / quality (push) Successful in 1m5s
ci / badges (push) Skipped
A tap whose outcome is a reboot races init tearing warden-ui down: the control channel can close while the tap's press/release counts are still polled, which made the tap FATAL, and a fast guest can print its restart line before expect_reboot starts, which expect_reboot then ignored. flare-edge's Reboot flow passed about half its rig runs (flare-edge#233). drive() now tells each step the next command and the console size when the previous step began. A tap followed by expect_reboot that loses the channel after its press went out is ok; expect_reboot reads the console from the start of the step before it. Anything earlier still does not count. Tests: RebootTapRace (3 cases) in test_qmp_drive.py; the old driver fails the main one. Rig: settings/system-reboot-restarts 4/4 sequential passes, each through the channel-close path (next: 2/4). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01441BzdGcvQmXkiN2qDjfZg |
||
|
|
07db1b9ec0 |
qemu: rig init honours reboot, poweroff and halt
ci / test (push) Successful in 13s
ci / bench (push) Successful in 5s
ci / mcdc (push) Successful in 15s
ci / patches-apply (push) Successful in 22s
ci / qemu-tools (push) Successful in 46s
ci / qemu-tools (pull_request) Successful in 42s
ci / prune-artifacts (pull_request) Skipped
ci / kernel-build (pull_request) Skipped
ci / prune-artifacts (push) Skipped
ci / kernel-build (push) Skipped
ci / quality (push) Successful in 37s
ci / badges (push) Skipped
ci / test (pull_request) Successful in 13s
ci / mcdc (pull_request) Successful in 11s
ci / bench (pull_request) Successful in 5s
ci / patches-apply (pull_request) Successful in 16s
ci / quality (pull_request) Successful in 27s
ci / badges (pull_request) Skipped
The stage-2 init is a busybox sh script running as PID 1. Busybox reboot, poweroff and halt only signal PID 1 (TERM, USR2, USR1), and the kernel drops a signal PID 1 has no handler for, so a plain reboot did nothing on the rig while a panel's busybox init honours it. Settings > System > Reboot hit exactly that (flare-edge#96). warden_trap_power_signals performs the -f action after a sync, and warden_idle_forever idles with sleep & wait so the trap runs at once instead of after an hour-long foreground sleep. Test: qemu/tests/init-power-signals-test.sh runs the real helpers in sh with stub commands and sends each signal; it fails without the traps and with a foreground sleep, and cannot hang on failure. Fixes #5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01441BzdGcvQmXkiN2qDjfZg |
||
|
|
b30621e372 |
Clear the shellcheck findings that would fail qemu-tools
ci / patches-apply (pull_request) Successful in 20s
ci / qemu-tools (pull_request) Successful in 40s
ci / prune-artifacts (pull_request) Skipped
ci / quality (pull_request) Failing after 13s
ci / badges (pull_request) Skipped
ci / bench (pull_request) Successful in 5s
ci / mcdc (pull_request) Successful in 15s
ci / kernel-build (pull_request) Skipped
ci / test (pull_request) Successful in 11s
CI has not run on this repository since the move to Gitea (Actions was off), and 13 shellcheck findings accumulated in the files the qemu-tools job lints, so that job would fail the moment Actions is enabled. - test-ui-drive-rs485.sh: eight `cond && pass || fail` checks become if/then/else, so a pass() that returned non-zero could never also record a failure. - ui-drive.sh and mk-bootimg.sh: four `[ A ] && [ B ] || die` guards get explicit braces; the behaviour is unchanged. - fetch-vendor.sh: the unused fourth read field is `_desc`; it still has to be read so the loop's other fields are split correctly. Every qemu-tools step passes locally, including all four rs485 cases. Closes #2 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01441BzdGcvQmXkiN2qDjfZg |
||
|
|
5fd6d2da5b |
qemu: provision a real U-Boot env and add expect_reboot
The rig's env partition was left zeroed, so flared could never clear bootcount there. It treats that as "intentional reboot bookkeeping not durable", so every factory reset on the rig wiped the store, was then refused, and never rebooted (flare-edge#62). mkimage.sh now writes a valid 32 KiB Rockchip ENVF image (bootcount=0, LE CRC32 over the rest), the same format flared/src/envf.rs and flare-edge tools/envf.py read; tools/envf.py parses it with a matching CRC. An accepted reset then reboots the guest, which ends the VM under -no-reboot. qmp.py gains expect_reboot TIMEOUT_S for an action whose correct outcome is a reboot: it passes only when the console shows the kernel's orderly "reboot: Restarting system" (written after the step began) and QEMU is gone, and fails on a kernel panic, on an exit without that line, and on a VM still running at the deadline. The console is read after the liveness check so the guest's last lines are not missed. Six drive tests cover it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01441BzdGcvQmXkiN2qDjfZg |
||
|
|
ac8658d1d5 |
qemu: add wait_stat verb for polling stat checks
assert_stat samples a stat field once. warden-ui's fps counter is a rolling one-second window, so a single sample right after a page opens can read 0 even though the UI is live (flare-edge #44). Add wait_stat FIELD OP VALUE TIMEOUT, the same polling pattern as wait_hit/wait_json, built on a shared eval_stat() that assert_stat now uses too. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SMRwnkPp1upR6QFWCZouE7 |
||
|
|
cdf491caa9 | Retry pinned BusyBox fetches (#554) | ||
|
|
2efe36f582 | Wait for QEMU input releases (#546) | ||
|
|
55660b7c01 | Observe QEMU swipe presses (#546) | ||
|
|
7e0089826b | Harden QEMU input and credentials (#516 #519) | ||
|
|
2b6e8a2098 |
qemu and build: review fixes across the rig driver, boot script, and fetch helpers
Bounded waits and validated arguments in run.sh and ui-drive.sh, a seeded settings directory and root-only staged rootfs permissions with their own tests, qmp.py and imgtools.py hardening, the fetch scripts checking what they download, and ASCII typography throughout. Each fix carries its test under qemu/tests or tests/. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01N3G6m9Aw5RyVY4ZowtKzEj |
||
|
|
bda6c6c633 |
qemu: two tests the review pass left on disk
tests/scripts/fullscreen-toggle-tracks-real-state.txt pins the debug channel's `fullscreen toggle` deciding from the dashboard's real state rather than a private flag that `home` and a real tap left stale (rig: 14 ok). tests/test-ui-drive-rs485.sh runs offline with a fake run.sh and socat and proves ui-drive.sh --rs485-devices fails closed when the socket, pty or control socket never appears, dumps mbsim.log on failure, and kills a simulator that ignores SIGTERM. README lists both. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01N3G6m9Aw5RyVY4ZowtKzEj |
||
|
|
8805b6106c |
qemu: review pass over the rig driver and boot script
Four review passes with fixes between them (flare-edge's flow-framework review, 2026-09-09). qmp.py: drive() split out of a 330-line dispatcher, every verb guarded so a raising verb records a fatal row instead of ending the run, the shot path sanitised, the rs485 and wait verbs judged through shared helpers; imgtools.py: a bench subcommand for phash/structural timings and a colour probe that samples instead of scanning the frame; ui-drive.sh: the boot poll no longer walks every pixel per tick and the simulator's control socket path is passed as one word. Offline tests: 8. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01N3G6m9Aw5RyVY4ZowtKzEj |
||
|
|
48be35dc7b |
qemu: rs485 silence|restore takes a simulated device off the bus mid-run
ui-drive.sh --rs485-devices fixed the roster for the whole boot, so no script could show the guest noticing a device go quiet. mbsim.py now serves a control socket (flare-edge --control); ui-drive.sh opens it next to the pty and hands its path to qmp.py drive (--rs485-control), whose new verb `rs485 silence|restore ADDR` sends one command and judges the reply. A run without a simulated bus records the step as fatal rather than a silent pass. Rig: unit 5 silenced reads online=false after 65 s in the status json, restored reads online=true after 64 s (flare-edge #184). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01N3G6m9Aw5RyVY4ZowtKzEj |
||
|
|
cab6c25c7e |
qemu: wait_hit and wait_region poll a settling page
A hit or region check fired once, so a check one second after `nav` raced a page still laying itself out (flare-edge #175). wait_hit X Y CLASS TIMEOUT_S [box=...] [TEXT] and wait_region NAME TOLERANCE TIMEOUT_S run the same judgement every 0.5 s until it holds or the deadline passes, and report how long they waited. The assert_hit judgement moves into judge_hit so both verbs mean the same thing by a match; a missing reference or foreign tolerance stays fatal on the first answer, since waiting cannot fix either. Offline tests cover both verbs and the timeout. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01N3G6m9Aw5RyVY4ZowtKzEj |
||
|
|
40de48092f |
qemu: regression script for home leaving fullscreen
tests/scripts/home-leaves-fullscreen.txt taps the dashboard into fullscreen, proves the rail gear's pixel now resolves to the 720x720 canvas, sends `home` and proves the gear's own box is back; then the same from another page. The `home` verb used to reach Dashboard/Dashboard without leaving fullscreen, which is the state a hardware wake tap leaves behind (flare-edge #176). Runs green on the rig: 20 ok, 0 failed. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01N3G6m9Aw5RyVY4ZowtKzEj |
||
|
|
e60d47846b |
qemu: simulated Modbus devices on the rig's RS485 bus
ui-drive.sh --rs485-devices ADDR:SLUG[,...] attaches the VM's RS485 UART to a socket, turns it into a pty with socat and serves the named corpus profiles on it with flare-edge tools/modbus-sim/mbsim.py, so warden-modbus in the guest discovers and identifies devices as it would real controllers. Verified: unit 5 as smartgen-hgm6100n4g appears in the status json as SmartGen HGM6110N, online, 8 ms, and RS485/Devices lists it. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01N3G6m9Aw5RyVY4ZowtKzEj |
||
|
|
a512d56650 |
qemu: scroll and home verbs in the driver
scroll X Y DY and home are judged by the channel's own ack, like nav and wake: the deterministic stand-in for a swipe that only brings a control into view (flare-edge #174), and the fresh-boot state a live panel needs before each flow (flare-edge #173). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01N3G6m9Aw5RyVY4ZowtKzEj |
||
|
|
bd5c5af9db |
qemu: structural hash relative to the background, taps that land on the pixel
imgtools.structural() marked a cell occupied when its grey exceeded an absolute 10/255, and the WardenOS page background is grey 16: every cell of every region read occupied and no structural check could ever fail (#19). Occupancy is now grey deviating from the crop's own median by more than DEVIATION_THRESHOLD, or edge energy above EDGE_THRESHOLD. Measured on real captures: a switch knob left/right differs in 240 of 256 cells (was 0), a dark card reads its icon and text and nothing else. Every committed reference is recaptured with flare-edge tools/flow-run-all.sh --capture. qmp.py to_axis() truncated the pixel-to-axis conversion and LVGL's evdev calibration truncates on the way back, so many pixels landed one short (130 -> 5924 -> 129) and a tap could miss the control hit had just confirmed at that pixel (#21). It now rounds up to the smallest axis value that truncates to the requested pixel; test_qmp_drive.py asserts the round trip for every pixel at three panel sizes. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01N3G6m9Aw5RyVY4ZowtKzEj |
||
|
|
e6f936ee8d |
qemu: one image and initramfs per ui-drive run
mkinitramfs.sh, mkimage.sh and run.sh all read $OUT, and ui-drive.sh left it at the shared default, so two concurrent runs built and booted the same qemu/out/disk.img and wrote their userdata into it: a VM seeded with role=1 read back client because the unseeded run next to it had rebuilt the image (#20). Each run now builds and boots its own image under $TMPDIR (real disk; /tmp is a tmpfs on the dev box and the run refuses to start with under 1 GB free there), keeps the pinned busybox shared and read-only through BUSYBOX, and removes the image on exit. Verified: a seeded router-mode flow, the unseeded client-mode flow and a third flow booted at once, 25/25, 25/25 and 10/10, each reading its own role. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01N3G6m9Aw5RyVY4ZowtKzEj |
||
|
|
eb16a301c0 |
qemu: wake verb, idle stat, and no fbcon cursor in the framebuffer
- tests/qmp.py: `wake` is a judged verb (the reply must be the channel's own ack) and `assert_stat` knows `idle` (0 awake, 1 dimmed, 2 asleep). warden-ui's sleep.c swallows the touch that wakes a dimmed or blanked panel, so every compiled flow script now opens with wake (flare-edge #148); tests cover both. - run.sh: vt.global_cursor_default=0. fbcon shares the virtio-gpu framebuffer with warden-ui and its cursor blinked an 8x2 block onto the top-left corner in some boots and not others, which made a structural pixel reference fail by one cell (#18). The panel has no fbcon on its display, so this only makes the rig match it. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013aHKWzT5EF86RFKRMtAv9n |
||
|
|
86a9544dcc |
qemu: json/stat/region channels, seeding, driver tests
- rootfs/sbin/init: the control bridge answers `@cat PATH` locally so the driver can read /tmp/warden-web-status.json out of the guest. That file has no trailing newline; the bridge adds one so the sentinel stays on its own line and the line-based reader never blocks. - tests/qmp.py: wait_json/assert_json (dotted paths, eq/ne/contains/ len_eq/len_ge/gt/lt), assert_stat off the FIFO's stats reply, capture_region, assert_region NAME [TOLERANCE] and assert_ocr. A tolerance other than the captured one, a reference box that does not fit the screendump, a missing reference or a missing tesseract is FATAL for that step and the run continues (flare-edge #147). - tests/imgtools.py: P6 reader, crop, perceptual and structural hashes, compare, with a self-test. - tests/test_qmp_drive.py: drive() with QMP and the control channel faked, pinning the per-step ok/fail/fatal contract. - mkimage.sh SEED_DIR and ui-drive.sh --seed/--refs: settings fixtures staged into userdata before warden-ui starts, and a reference store handed to the driver. - ci: the driver tests and the imgtools self-test run in qemu-tools. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013aHKWzT5EF86RFKRMtAv9n |
||
|
|
8a57057053 |
Bridge warden-ui's debug channel out of the qemu VM
The rig could drive the UI and detect one outcome: the process died. Nothing could ask the UI what page it was on or what a tap would land on, because that channel is a FIFO inside the guest and the initramfs is busybox-only with no sshd. Scenarios therefore asserted nothing and screenshots went unread. run.sh --ctl exposes a second pci-serial port as a unix socket, the same device the RS485 bridge already rides, listed first so it is always ttyS0. It also puts warden.ctl on the kernel command line, and init bridges only when that marker is present: a VM launched with --rs485 alone has a ttyS0 too, and that one is the Modbus wire. The bridge relays one command line in and the FIFO's reply out, then a sentinel so the reader needs no timeout. qmp.py gains the channel verbs (nav, page, stats, hit, assert_page, assert_hit), records every step to results.jsonl as ok/fail/fatal, continues past an assertion mismatch so one run reports every broken expectation, and checks the console after EVERY step for the stage-2 init's EXITED line so a crash is pinned to the step that caused it. assert_hit matches the widget's bounding box: an icon has no usable caption and two list rows share a class, but the geometry the UI itself resolved is exact. The vocabulary is what tools/warden-ctl already speaks over SSH to a real panel, so a script that runs here runs there. Verified end to end on the rig (11/11 verbs round-tripped) and against the bench panel, where the same commands returned byte-identical results. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013aHKWzT5EF86RFKRMtAv9n |
||
|
|
f245917570 |
qemu: drive scripted UI scenarios
ui-shot.sh proves touch reaches the UI in one tap. Verifying a UI change needs a SEQUENCE -- swipe through the app rows, open a submenu, tap a tab, bring up the keyboard -- and booting per step costs about a minute under TCG, so: - qmp.py gains a `drive` mode: one connection, one boot, a script of tap/swipe/fling/shot/sleep steps in PANEL PIXELS rather than the raw 0..32767 tablet axis. Swipes interpolate their motion, because LVGL decides a gesture from the movement between indev polls and a press-then-release with nothing in between is a click, not a scroll. - ui-drive.sh runs such a script against a booted VM and collects the screenshots. It also FAILS on a UI that died mid-script. warden-ui crashing leaves its last frame in the framebuffer, so screendumps keep returning a plausible picture of a program that no longer exists; stage-2 init now announces the exit and its status on the console, and ui-drive.sh greps for that after the run. This is what caught the SIGSEGV behind flare-edge#125. Stage-2 init also mounts devpts. The UI's Terminal page opens a PTY, so without it that page could only ever report "no PTY available" -- it rendered, which made a screenshot scenario look fine while the one thing the page does was untestable. tests/scripts/nav-stress.txt is the first committed drive script: the navigation sequence that reproduces flare-edge#125. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01T2D2KtdgwbhbF6Mo64eUrn |
||
|
|
42fb386f60 |
docs: ASCII typography and style normalization across all repo text
Replace every em dash with real punctuation (rewrites, not hyphen swaps) in docs, code comments, scripts, configs, and the port records; convert en dashes, curly quotes, ellipsis glyphs, arrows, and section signs to ASCII; drop machine-writing tell phrases from living docs. ADR titles now use a colon. The M2 bring-up DTS model string carried an em dash into the patch series and its record echoes; fixed at both, and the full series re-verified to apply cleanly onto pristine 6.18.46. One comment in freshness.h deliberately names the em dash glyph the UI renders as the unknown mark; that is data, kept as prose naming it. Verified: cargo tests (sim, config-lint, rs485-bridge), shellcheck, both driver MC/DC harnesses, patches-apply. |
||
|
|
9dcf1486cb |
Merge pull request #8 from blueflare-energy/ota-full-apply
Full OTA apply scenario: write rootfs_b, flip AvbABData, boot the applied slot |
||
|
|
7ab07a35d3 |
qemu: real-image milestone — boot an actual flare-edge build in the VM
mkimage gains --rootfs-image/--oem-image (raw ext4 matched pair placed into slot A, size-checked fail-closed; slot B keeps the skeleton as a known-good fallback), and stage-1 rc now hands the live devtmpfs to the new root across switch_root — busybox switch_root moves nothing, our skeleton init remounted defensively, but a REAL image's getty opens /dev/console immediately and looped on ENOENT without it. Verified with the 2026-08-24 flare-edge build (rootfs 192M + oem 26M): the image's own rcS chain runs on the 6.18 virt kernel, real daemons start (warden-modbus confirmed running via root shell; the shipped 0.2.4 flared reproduces flare-edge#106 exactly, and S99hciinit reports the issue-#4 btlpm symptom — the VM doubles as a faithful reproducer of known field bugs), and a getty answers on the console. qemu/tests/real-image-boot.sh asserts switch_root + daemon starts + login prompt, credential-free. REAL-IMAGE-BOOT-PASS. Regression sweep after the shared-path changes: OTA-APPLY-PASS, PORTAL-SCENARIO-PASS, UI-SHOT-PASS, boot smoke OK. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018HUayid7W5w7jBdb9Rrj1K |
||
|
|
d63c2117c1 |
qemu: full OTA apply scenario — write rootfs_b, flip AvbABData, boot it
Closes the loop every prior harness stopped short of, entirely off-hardware: the real flared (WARDEN_HARD_RESET-gated build) pulls a real signed tier-1 .wfw whose payload is a BOOTABLE rootfs stamped 0.0.2, verifies it, writes /dev/block/by-name/rootfs_b inside disk.img, and flips the AvbABData (slot B: priority 15, 3 tries, unsuccessful — the exact pre-first-boot arming state, round-tripped through a portal check-in). The harness then boots slot _b and asserts the applied version + marker are what runs. OTA-APPLY-PASS verified end to end. - mkimage: the misc partition now carries REAL provisioned AvbABData (bytes mirror flare-edge's provisioning defaults) — slotctl fail-closes on bad AB magic before writing, which a zeroed misc tripped. - run.sh --allow-apply / cmdline warden.fwapply: per-boot opt-in that makes stage-2 init export WARDEN_FW_ALLOW_APPLY=1; never the default. - stage-2 init also exports WARDEN_HARD_RESET=0 (the CRU poke is fatal on virt, same class as the HPMCU probe); the harness performs the reboot. - ADR-0006 boundary documented in the scenario and README: BCB slot CHOICE and the physical reset remain emulated. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018HUayid7W5w7jBdb9Rrj1K |
||
|
|
1d7dec167e |
clock diagnostics for issue #3: probe, VM sanity scenario, fix plan
The qemu/ device sim answered the first question off-board: the same kernel family under -M virt gives musl vDSO rate ratio 0.99963 — the generic 6.18 armv7 vDSO is correct, so the board symptom is RV1106 register state (CNTFRQ/CNTVOFF, firmware-owned, secure-world boot chain). - qemu/tests/clockprobe: interval-based musl probe separating RATE error (CNTFRQ) from boot OFFSET (CNTVOFF) — the original single absolute sample cannot distinguish them. - qemu/tests/clock-sanity.sh: VM regression guard asserting the vDSO rate within 1% (PASSES: 1.00026); cross-builds the probe and stages it as payload itself. - kernel/rv1106-enablement/timer/PLAN.md: the DT fix (arm,cpu-registers-not-fw-configured + measured clock-frequency on the board dts) gated on the two bench measurements; c8a3 is currently physically dark, needs hands at the bench. - clockprobe joins the CI test loop. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018HUayid7W5w7jBdb9Rrj1K |
||
|
|
f5c2cc9a42 |
review: iteration-3 fixes (convergence pass)
- ci-cd.md phrasing made time-invariant (true before and after the visibility flip; the prior wording asserted a state not yet real). - ui-shot: liveness check before the tap QMP call too — the commit-message claim of "before every QMP call" is now actually true. - busybox fetcher checks its pin before downloading, mirroring the kernel-tarball fetcher's ordering. - Fragment disable-arm: absence of a deps-gated symbol is a valid disable outcome; only "still set" is fatal (the iteration-2 symmetrization overcorrected). Negative-tested both directions under set -e. Iteration 3 produced four findings, none blocking, all applied — the recursive review is converged. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018HUayid7W5w7jBdb9Rrj1K |
||
|
|
973a414f07 |
review: iteration-2 fixes (fragment assertion, evidence paths, hardening)
- build-kernel.sh fragment assertion: survives a missing trailing newline (the read footgun, reproduced) and treats an absent symbol on a disable line as FATAL, symmetric with the enable arm. - fetch-kernel-tarball.sh checks the pin before downloading; both fetchers add --retry-connrefused. - mkimage rejects '.'/'..' state keys. - ui-shot: VM liveness checked before every QMP call, console.log preserved as evidence on every failure path, repaint deadline widened to 90s with the contended-runner rationale documented. - rs485-bridge: overflow discards back off one gap and rate-limit their log line, mirroring the accept-loop fix; clippy nit fixed. - .gitignore ignores *.elf/*.map so the untracked artifacts cannot silently return; CI shellcheck glob now covers build/ and the rootfs boot scripts (directives added for the deliberate in-guest source paths). - Docs: NPU parity row matches its sibling verification docs; line-pinned audit cross-references unpinned; CROSS_COMPILE documented in the build header; payload README lists warden-ui; ci-cd tense settled. Verified: guards negative-tested (bad state keys, no-newline fragment); boot smoke, portal scenario, ui-shot all PASS; 53 tests green; shellcheck clean across the widened glob; clippy zero. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018HUayid7W5w7jBdb9Rrj1K |
||
|
|
2756de0b46 |
review: iteration-1 fixes across CI, bridge, VM harness, and docs
CI/pipeline: - KERNEL_TARBALL passed as a YAML env literal '~' was never tilde-expanded and would have failed every hosted kernel-build dispatch; the path is now exported from the shell. Verified reproducible before the fix. - Every job gets timeout-minutes; boot smoke uses timeout -k so a wedged qemu is SIGKILLed instead of holding the job. - Tarball fetch + fail-closed sha256 verification deduplicated into build/fetch-kernel-tarball.sh (with curl retries), used by build-kernel.sh and both CI jobs. busybox fetch gains retries too. - ccache layer for kernel-build (cache keyed on defconfig+patches) recovers the incremental-compile speed the ephemeral-runner move cost. - build-kernel.sh now asserts every fragment option survived olddefconfig — merge_config -m pastes text and Kconfig silently drops unmet symbols. rs485-bridge: - pending-buffer cap (2x max RTU ADU) instead of unbounded growth; explicit accept-loop error handling with backoff instead of .flatten(); per-arm inline bounds instead of the string-keyed lookup whose default would have mis-bounded a future get-input; control-socket cleanup errors surfaced; flag-shaped values rejected in arg parsing; doc example uses a private mktemp dir. Test timing margins widened for contended runners (gap 25->120ms, 60x margin on the split-frame test). VM harness: - stage-1/stage-2 boot scripts share one validated slot parser and one by-name populator (qemu/rootfs/etc/warden-lib.sh) — the duplicated parser had already diverged on validation; userdata/oem mount failures now fail fast with a greppable sentinel; udhcpc fallback keys off the interface actually having an address; switch_root applet guarded. - boot-smoke delegates the qemu invocation to run.sh (machine shape lives in ONE place); run.sh port 0 disables a hostfwd. - mkimage: unknown partition names fail at build time; DISK_END is a max, not last-entry; --state keys validated as filenames. - portal-scenario: mock readiness is asserted (no silent fall-through), hostfwd port collisions retried, mount-failure sentinel fails fast. - ui-shot: fixed sleeps replaced with bounded screendump polling; the repaint assertion is real and documented as such. qmp.py loses its module-global and gains argv validation. Docs/scrub: bench-host paths and the site AP name removed from six more port docs and two evidence tables; path-bearing build artifacts (.elf, .map) untracked (the 154-byte firmware .bin is path-free and stays); ADR-0003 marked visibility-superseded by ADR-0007; stale section cross-reference fixed; flare-edge noted as private for outside readers; stale root-level review report removed per the new workspace rule. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018HUayid7W5w7jBdb9Rrj1K |
||
|
|
13b7d063a2 |
qemu: display + touch scenario, ADR-0006, docs
Phase 4+5 of the device sim: - Display + touch verified end-to-end: virtio-gpu at 720x720 (fbdev emulation) renders the real WardenOS dashboard from the static LVGL fbdev+evdev UI build (flare-edge qemu-vm-support tools/build-ui-vm.sh); QMP input-send-event taps the Metrics tab and qemu/tests/ui-shot.sh asserts the repaint from screendumps. Two load-bearing QEMU flags found and documented: -global virtio-mmio.force-legacy=false (gpu/input are VERSION_1-only) and the 200ms press hold (an instantaneous press+release lands inside one LVGL indev poll and never clicks). - qemu/tests/qmp.py: minimal QMP client (screendump, tap, quit). - stage-2 init starts warden-ui when present and fb0 exists. - docs/decisions/0006-qemu-device-sim.md: virt-not-custom-board, the enters-at-kernel boundary, fragment policy, naming, consequences. - docs/architecture.md: new section 7 (device emulation), order-of-work item 7; modbus cross-reference to the bridge. - qemu/README.md: emulated-vs-not table, scenarios, gotchas, host/runner requirements. docs/ci-cd.md: runner needs one-time qemu-system-arm install (fail-closed smoke until then, [maintainer]-gated). Repo README updated. Final sweep on this commit: shellcheck clean, bridge 7/7 tests, boot smoke PASS, portal scenario PASS (check-in + fw pull + signed .wfw download), ui-shot PASS (touch navigates to Metrics) — all under the final flags. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018HUayid7W5w7jBdb9Rrj1K |
||
|
|
c7e06514ad |
qemu: RS485 bridge to sim, portal E2E scenario, CI wiring
Phase 3 of the device sim, all verified on QEMU 10.0.11: - qemu/rs485-bridge/: std-only crate bridging a QEMU serial chardev (unix socket) to warden_sim::ModbusSlave — gap-based RTU framing (CRC failures degrade to real-slave silence), line-protocol control socket for register seeding and fault injection (drop/exception/clear), bounds-checked so a scenario typo answers err instead of panicking the bus. 7 unit tests, bench in the sim_bench pattern. Verified end-to-end: guest master frame on /dev/ttyS4 (pci-serial) answered from the sim slave, CRC-correct. - virt machine gains highmem=off: the 32-bit non-LPAE kernel cannot reach virt's default 40-bit PCIe ECAM (pci-host-generic EOVERFLOW); with it the full PCI set probes (16550A ttyS0, i6300esb). - Watchdog scenario verified: guest arms /dev/watchdog, no petting, i6300esb resets the VM ~30s later (first environment where this arm is testable). - qemu/tests/portal-scenario.sh: the real static-musl warden-flared inside the VM against flare-edge's mock portal on the host — authenticated check-in, firmware desired-state pull, and download of a real signed tier-1 .wfw offer, asserted from the portal log. Found and filed flare-edge#106 (fatal SIGBUS in the HPMCU boot-loaded probe on non-RV1106 memory maps); runs against a flared built from the qemu-vm-support fix branch. - stage-2 init: WARDEN_FLARE_INSECURE=1 + WARDEN_HPMCU=0 (documented VM deviations), firmware-version stamp, newline-terminated state seeds. - CI: rs485-bridge joins the test loop and bench job; new qemu-tools job (shellcheck + initramfs + disk image on hosted runners); kernel-build gains a fail-closed qemu boot-smoke step. All qemu scripts shellcheck-clean. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018HUayid7W5w7jBdb9Rrj1K |
||
|
|
bf3c93cf85 |
qemu: device-sim bringup — boot smoke, A/B disk harness, virt kernel variant
The third simulator (deliberately not named "sim"): a QEMU -M virt VM that boots the real 6.18.46 kernel and enters at -kernel zImage — everything below (BootROM/idblock/U-Boot/real BCB A/B selection) is closed blobs + mask ROM and is explicitly out of scope. - qemu/mkinitramfs.sh: pinned static busybox (sha256 fail-closed) + rootfs/ - qemu/mkimage.sh: unprivileged sparse disk image with the device's canonical 12-partition blkdevparts A/B layout (vda == mmcblk0 mapping) - qemu/rootfs/: stage-1 init (by-name symlinks from PARTNAME uevents, whole-token warden.slot= parse, switch_root) + stage-2 init (userdata/oem mounts, slirp networking, payload daemon start) - qemu/run.sh: runner with --slot/--rtc/--watchdog/--rs485/--qmp/--display - qemu/configs/virt.fragment + WARDEN_KCONFIG_FRAGMENT hook in build/build-kernel.sh (canonical RV1106 build untouched when unset): adds PCI, pci-serial, i6300esb watchdog, WireGuard, virtio-gpu/input - qemu/tests/boot-smoke.sh: sentinel-asserting boot test Verified on QEMU 10.0.11: canonical zImage boots -M virt unmodified (the feared DEBUG_UNCOMPRESS decompressor hang does not exist in 6.18); full stack boots both slots; 12 by-name symlinks; userdata persists across reboot; -rtc base=2021-01-01 reproduces the no-RTC wrong-clock class. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018HUayid7W5w7jBdb9Rrj1K |