Repository navigation
test(live): stage 2 — full kernel shell in a real desktop window (stacked on #147) - #171
Merged
Merged
Conversation
…indow Adds 'tools/e2e.py termwindow', the stage-2 acceptance that #147/#169 made possible: the shipped pagh-desktop + pagh-terminal pair runs on the real fbdev/evdev/PDP path, and the window itself is kernel-shell session 1 (/dev/vtfb1 pixels + /dev/vtinput1 keys), so every command is the kernel shell's own code, not a userspace imitation. The compositor is started from /mnt/etc/autorun — the shipped desktop-autorun recipe. That is not cosmetic: the launch-target spec contains '{socket}', and typing shifted braces through QMP left a stuck modifier under TCG, so the next 'c' reached the guest as a real ^C. With autorun, the only keys on the wire are the commands under test. Per command the mode records one PNG (what a human sees) and one '[DIAG] window session=1 command=…/done=…' serial pair (the kernel's own evidence that the line reached and returned from session-shell). It fails if any kernel-shell output appears on serial — that would mean the command executed in the boot shell instead — reads the nano buffers back out of the ext2 image with debugfs, and uses the kernel's 'stuck in syscall read' watchdog line to know when the Linux editor is ready for keys. Covered: df, ps, ps -ef, id, id -un, groups, ls -la /mnt, disk list, clear, help, kernel nano (edit/Ctrl+S/Ctrl+Q), ppkg update, ppkg install nano fastfetch ncurses-base, bare fastfetch (PATH fallback without lxrun) and lxrun nano (Ctrl+O/Enter/Ctrl+X). A 256 MiB volume is created because the 64 MiB desktop image cannot hold ppkg install. Known gap, reported rather than papered over: the Linux (ncurses) nano opens and renders, and an earlier run saved its file (read back from ext2), but in later runs the editor parked in read(2) without receiving the Ctrl+O/Enter/Ctrl+X chords — termios/raw-mode, i.e. the named stage-3 PTY/job-control work, not window routing. Docs: tools/README.md bullet + terminal-session.md §7.
ccclosed
force-pushed
the
feat/term-full-shell-live
branch
from
November 22, 2026 06:44
89ae604 to
e612807
Compare
… root) Live evidence from the rebased branch: Debian nano prints 'Error in /etc/nanorc on line 252: Error reading /usr/share/nano/*.nanorc' and exits before reading a key — the package's rc files reference absolute /usr paths, while in this OS the Debian tree lives under /mnt (same prefix fact as PYTHONHOME/TERMINFO, but there is no env var for nano's rc dir). The acceptance now starts it with -I (ignore rc files): user rc config is not the editor path being measured, and without it the TUI never reaches its input loop at all. Also keeps the earlier negative control: if the editor dies, the text typed into the window lands on the shell prompt and the mode fails on the DIAG line for that text.
…dow acceptance Resolve the two conflicts by taking dev's versions of the tooling and re-adding only what #171 still owns on top: * tools/e2e.py — dev's file (termux stage-4 mode included) + the 'termwindow' mode re-inserted on top of its helpers. _desktop_bins and _desktop_prepare_disk are reused; the latter gains the optional size_mb argument (64 MiB default keeps every existing mode unchanged), because ppkg install needs a 256 MiB volume. * docs/terminal-session.md — dev's rewritten §6 kept; a short §7 documents the live acceptance and points at §6.10 (no alternate screen/DEC modes) instead of claiming ncurses interactivity. * tools/README.md — dev's text kept, mode table lists termux and termwindow, the termwindow bullet matches what the mode now does (ncurses-base, -I, unverified ncurses interactivity). * tools/qemu_shot.py — unchanged addition: dev does not have chord support, and the mode needs 'ctrl-s'/'ctrl-o' via HMP. The Linux (ncurses) nano step is now recorded as info_check (unverified) when the editor reaches read(2) but never accepts the chords: that is the named §6.10 limitation of drivers::vt, not a stage-2 window-session claim.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Status: merged up to date with
dev(f1453f55), all checks greengit merge origin/dev(not a rebase: dev and the branch had diverged). Twoconflicts, both resolved by keeping dev's tooling and re-adding only what #171
still owns:
tools/e2e.py— dev's file kept (it now carries thetermuxstage-4 mode);the
termwindowmode is re-inserted on top of its helpers._desktop_binsisreused, and
_desktop_prepare_diskgains an optionalsize_mbargument(default 64 MiB, so
desktop/termuxare byte-identical in behaviour) becauseppkg installneeds a 256 MiB volume.docs/terminal-session.md— dev's rewritten honest-limits section kept; a short§7 documents the live acceptance instead of duplicating dev's text.
tools/README.md— dev's text kept, mode table now liststermuxandtermwindow, the bullet matches what the mode does.tools/qemu_shot.py— unchanged addition: dev does not have chord support,and the mode needs
ctrl-s/ctrl-o/ctrl-xthrough one HMPsendkeyword(mixing QMP
send-keywith HMP left a stuck modifier under TCG).Diff against
dev: only test tooling and docs, 4 files, +473/−5 — nothing inthe kernel or the client, nothing in the ISO.
Why it is still needed
devhase2e.py desktop(compositor ABI + real Files/Terminal windows) andtermux(stage-4 window UX/lifecycle: history, editing, selection, 20close/reopen cycles, two-window isolation). Neither asserts the kernel command
surface inside the window — that is what this mode does, and with #172 (PTY/job
control) it now passes end to end.
Live result on
f1453f55— PASS (538 s)python3 tools/e2e.py termwindowwith the shippedpagh-desktop+pagh-terminal, compositor started through/mnt/etc/autorun(the shippeddesktop-autorunrecipe; typing a{socket}command via QMP left a stuckmodifier under TCG). Per command: one PNG + one
[DIAG] window session=1 command=…/done=…serial pair.PASS list: autorun launch, compositor selfcheck, real
pagh-terminalwindow,df,ps,ps -ef,id,id -un,groups,ls -la /mnt,disk list,clear,help, kernelnano(buffer read back from ext2:QTERM-NANO-OK),ppkg update(68829 pkgs),ppkg install nano fastfetch ncurses-base(realDebian .debs over verified TLS), bare
fastfetch(PATH fallback #158; logo andfields in
termwindow-19b),sync, andlxrun nano -I— the real ncurseseditor now takes the keys (Ctrl+O prompt, then Ctrl+X) and its file is read back
from ext2:
QTERM-LINUX-NANO-OK.The mode also fails if any kernel-shell command output appears on serial (that
would mean the command ran in the boot shell) — serial stays clean.
-Iis needed because Debian's/etc/nanorcincludes/usr/share/nano/*.nanorcby absolute path while the tree lives under
/mnt; it is user rc config, not theeditor path under test. If the editor ever stalls again, the mode records that
step as
unverified(pointing atterminal-session.md§6.10, the namedalternate-screen limitation) instead of silently passing.
Gates (head
a00f0544, dev basef1453f55)fmt OK · build debug OK (linked) · build release OK (linked) · host tests
881 passed / 0 failed · check_safety OK (7 critical files) · check_agents_md OK ·
CI on this SHA: success. Version not bumped, nothing merged by me.
Evidence:
/home/oleg/.cache/pagh-agent-notes/qterm2-live/(
serial_termwindow-devf1453.log,e2e-termwindow-devf1453.log,termwindow-*.png).