Repository navigation
feat: let a node start, adopt and attach pane holders behind a development switch - #1934
Merged
Merged
Conversation
…pment switch HIDE_DEV_PANE_HOLDER=1 lets the local node start panes in holders, attach them through its terminal service beside Herdr sessions, end them, and find them again when it starts: 64 attached, the rest kept running, panes that ended meanwhile reported with their recorded reason. A takeover by another node ends the session for good, and a holder older than the oldest supported version is reported and left running. Off, the node opens Herdr sessions only and starts no holder.
… record's version A same-size resize was a redraw for a Herdr session but nothing for a holder, so a holder pane froze behind the frame guard; the writer now has a redraw that a holder sends as Redraw. Refused opens are retried unless their reason is final, recovery reports each pane once and past-cap panes as attach_limit, the switch is registered in the daemon's env and fails a device node's start on a bad value, and asks carry the version the pane's record names.
…me's text On Windows the holder's diffed frames need not carry a printed line as contiguous text, so the test reads the program's answer from the holder and checks that frames reach the screen after it.
cmd expands %B% when it reads a line, before the line's set runs, so the second word typed into one shell printed the first again; the line now escapes the dash instead, and the test again checks that the printed line is drawn after each redraw.
yansfil
added a commit
that referenced
this pull request
Nov 1, 2026
…st Herdr (#1952) Related: engine bundle 2 (pane holder), the last of #1917, #1918, #1927, #1929, #1934; with-hide/hide-private#405 ## Summary This shows that a pane keeps running, untouched, when the node that holds it is killed and a new one takes it back, with every supported agent's real CLI on macOS, Linux and Windows, and measures the holder path against Herdr's. A new lane restarts the node under each pinned CLI: 21 cells on three systems. Measured on macOS against Herdr v0.9.5, the holder path is faster and within every agreed bound; one fix was needed, so a holder now gives freed heap memory back once its screen is still. One Windows Antigravity cell failed once in ten runs: agy read the holder's answer to its color question as keys. The cause and the product question are in hide-private#405; until it closes, the lane shows that cell but does not fail on it, whatever the cause of that cell's failure. The lane, the measurement and the probe end everything they start, by pid and start time, however a run ends. 스크린샷 없음: 화면 변경이 없습니다(개발 스위치 아래의 노드, CI 레인, 측정 스크립트, 문서). ## Review - **판단해 주세요**: the holder answers color questions (OSC 10/11) from the theme whether or not a screen is attached, while Herdr with no client answers none; that difference is what made agy open its editor once (hide-private#405). Should a holder answer only while a screen is attached? - **판단해 주세요**: the memory bounds are a decision of this mission, not the PRD's 3 MB per holder: one holder idle at most 4 MiB, attached or not, and 6 MiB (4 MiB and the parser's 2 MiB scrollback) once a flood has settled. 3 MB was below a holder's own floor (about 2.8 MB before it draws anything; 3.47 MB idle with a screen attached, its connection's buffers included) and had not counted the scrollback. Figures before the change are under the tables. - **조심해서 볼 파일**: - `hide-holder/src/holder.rs` (`next_job`, `return_freed`) - the high-frequency path: the writer waits once for 1 s after its last fragment, then gives freed pages back and waits with no bound; a connection's first return and one after 1 MiB of output are logged (`holder.memory_returned`), so a pane redrawing a line every second does not fill its log. Nothing is added to the PTY reader or the encoder but the pane's count of bytes fed. - `scripts/holder_owned.py` - the one end for every process the lane, the measurement and the probe start: children as started, holders by their pane records, everything under them by one look at the process table; one failing end does not stop the others, and the folder goes only once nothing runs. `scripts/tests/test_holder_owned.py` holds it after a node restart that fails and after SIGTERM. - `scripts/holder-restart-check.py` (`KNOWN_FAILURES`) - the Windows Antigravity cell, keyed `antigravity` as the contract names it, is shown as a known failure and not counted while hide-private#405 is open, unless it leaves a process running; the other 20 cells block. The mark hides every failure of that cell, not only #405's cause, so its reason in the report is what tells a new one apart; a key naming no agent of the contract stops the run, and `scripts/tests/test_holder_restart_known_failures.py` holds the mark, the pass and the fail. A CLI off its pin fails its cell, and the holder's identity is checked against the process table. - `hide-node/src/terminal/holder.rs`, `hided/src/core.rs` - `Holders::start_local` takes the holder folders only with the switch on (`Option<HolderFolders>`). - `.github/workflows/holder-restart.yml`, `scripts/ci-plan.py` - the lane on three systems; the five extra Antigravity runs are gone. - **비용 검토**: per output, a byte count; per burst, one wake and one heap walk (`malloc_zone_pressure_relief`, glibc `malloc_trim`, `HeapCompact`) a second after the last fragment; an idle holder wakes 0 times in 60 s. The lane job took 2.7 to 6.1 minutes per system (runs 41234750464, 41237366181: build 78 to 90 s, cells 24 to 39 s, color probe about 80 s); the `holder_node` example adds 17 to 44 s per system. ## Evidence - **확인한 것**: - Restart lane on three systems, CI run 41250820500 on this head: 21/21 cells pass with every CLI at its pin and nothing left running (table below). - The comparison after a restart is text only: the first full frame, drawn on two xterms, is compared line by line with the holder's own read, with the cursor; colors and attributes are `screen.rs`'s to check, not the lane's. - Measurement, macOS release builds, 120x40: five alternating pairs at 1, 64, 100 and 128 panes, re-analyzed (not re-measured): six pairs that saw a build process in some phase are dropped and listed, 3 or 4 pairs are kept per count at load 1.5 to 15.1, and all 45 bounds pass (verdict table below). - Slow consumer, re-measured: three pairs at 64 panes with only one pane's connection slowed (holder: a proxy on its socket reading 10 ms of every 40; Herdr: its session client stopped 30 ms of every 40). The slow pane drew 44 to 48 frames of a 75 MB flood against about 460 unslowed; the echo pane's p50 stayed 0.19 to 0.24 ms against Herdr's 0.7 to 2.1; CPU 0.07 times Herdr's; the node's own memory grew 0.04 to 0.11 MiB on either path, so its deliveries queue did not grow. - One holder flooded 300 MB with no screen attached: 2.72 MiB before, 5.16 MiB after, under 6 MiB. - The 71 and 72 wakes in the 2.5 s after attach in two 128-pane rounds (64 in the other three): three 128-pane rounds on this head woke exactly 64 times, one per attached holder, with the 64 unattached at 0; the 60 s idle windows were 0 in every round. - The idle and memory tests wait on state (the holder's logged return, then the kernel's count standing still), never a fixed settle; `memory.rs` waits for the return logged after the flood's last line and holds the 6 MiB budget on Linux and Windows in every build, and on macOS that the holder is within the budget or its return brought it down (local debug, five runs: 7.20 to 9.14 MiB at the flood's end, 5.86 to 6.75 MiB after; a CI runner: 5.08 MiB at the end, 5.09 after), the release measurement judging the bound there; a unit test shows a full 2 MiB scrollback drops its oldest rows first and keeps its size. - Cleanup: `test_holder_owned.py` passes and fails when pane records are ignored; a measurement round stopped by SIGTERM left no process and no folder; `test_holder_perf_close.py` holds that a round's own failure is raised with what its close left beside it. - **확인하지 못한 것**: - The Electron item is reproduced, not run: no packaged app runs in CI. The test builds the same job flags, and the lane starts its node through Node's spawn; the Electron binary itself was not used. - Windows Antigravity: 1 failure in 10 runs (20c9452), cause not proven. The probe measured one answer per question and 1.5 ms (max 4.3 ms) on Windows. Its Herdr side is a private v0.9.5 server with one pane started by `herdr pane run` and no client attached; whether Herdr answers while a screen is attached was not measured (hide-private#405). - The holder's 4 MiB fragment cap was not reached by the measurement (a 120x40 frame is about 6 KB); the unit tests split a larger screen. - The extra 7 to 8 wakes of two battery rounds are not attributed: that run kept no per-holder count, and the final build did not repeat them. - Freed-memory return on Windows has no effect: an 8 MB flood leaves 3.81 MiB kept and 4.20 MiB given back; on Linux glibc leaves nothing to give (2.96 against 2.95 MiB). Only macOS gains. - Linux and Windows have no Herdr comparison in numbers; CI holds their boundaries (wakeups, the memory budget, input exactness, caps) only. <details><summary>21 cells (agent x system), this head</summary> Run 41250820500 (40248e9). Each cell: result (first turn / reattach / second turn, s); every CLI matched its pin and no cell left a process running. | agent | CLI (pin) | Linux | macOS | Windows | |---|---|---|---|---| | claude-code | 2.1.302 | pass (0.7 / 0.01 / 0.3) | pass (1.5 / 0.07 / 0.4) | pass (2.4 / 0.08 / 0.3) | | codex | 0.163.0 | pass (2.2 / 0.01 / 0.3) | pass (3.1 / 0.04 / 0.4) | pass (1.3 / 0.09 / 0.4) | | grok | 1.0.52 | pass (0.4 / 0.01 / 0.3) | pass (1.6 / 0.02 / 0.4) | pass (2.9 / 0.11 / 0.3) | | opencode | 2.0.29 | pass (2.0 / 0.01 / 0.5) | pass (1.7 / 0.03 / 0.5) | pass (3.3 / 0.09 / 0.5) | | pi | 1.0.4 | pass (0.6 / 0.01 / 0.3) | pass (0.6 / 0.02 / 0.3) | pass (0.9 / 0.08 / 0.3) | | omp | 18.7.0 | pass (1.6 / 0.01 / 0.3) | pass (1.5 / 0.02 / 0.4) | pass (3.8 / 0.09 / 0.8) | | antigravity | 1.4.8 | pass (0.6 / 0.01 / 0.3) | pass (0.7 / 0.06 / 0.4) | pass (1.0 / 0.11 / 0.3) | Windows Antigravity, five more runs in the same job at 080c2f6 (that step is gone from the workflow; this is its record): pass, pass, pass, pass, pass. Through 080c2f6: 1 failure in 10 runs (20c9452, hide-private#405); it passed at 2fca9dc and on this head. </details> <details><summary>Measurement tables (macOS; dropped pairs listed first)</summary> **Dropped pairs (a build process in some phase of either round)** | panes | pair | build processes seen (path phase: count) | |---|---|---| | 1 | 5 | holder start: 2; holder idle_unattached: 3; herdr end: 2; herdr idle_attached: 3; herdr latency_alone: 2; herdr reattach: 2 | | 64 | 1 | herdr idle_attached: 4; herdr latency_alone: 4 | | 64 | 5 | holder start: 3; holder idle_unattached: 3; herdr idle_unattached: 3 | | 100 | 2 | herdr idle_unattached: 2; herdr idle_attached: 3 | | 128 | 4 | herdr start: 3 | | 128 | 5 | herdr idle_unattached: 3; herdr idle_attached: 3; herdr latency_alone: 3; herdr flood_one: 8; herdr flood_eight: 2 | Kept pairs: 1 panes [1, 2, 3, 4], 64 panes [2, 3, 4], 100 panes [1, 3, 4, 5], 128 panes [1, 2, 3] **Latency, key to frame at the node: each kept pair (ms; load min-max of both rounds)** | panes | phase | pair | load | holder p50 | Herdr p50 | holder p95 | Herdr p95 | p50 ratio | p95 ratio | |---|---|---|---|---|---|---|---|---|---| | 1 | latency_alone | 1 | 2.0-7.8 | 0.26 | 19.49 | 0.65 | 21.21 | 0.01 | 0.03 | | 1 | latency_alone | 2 | 1.7-4.5 | 0.40 | 19.99 | 0.79 | 22.20 | 0.02 | 0.04 | | 1 | latency_alone | 3 | 2.7-8.8 | 0.33 | 19.87 | 0.69 | 22.46 | 0.02 | 0.03 | | 1 | latency_alone | 4 | 2.4-6.3 | 0.41 | 20.11 | 0.96 | 22.51 | 0.02 | 0.04 | | 1 | reattach | 1 | 2.0-7.8 | 0.26 | 19.97 | 0.71 | 23.64 | 0.01 | 0.03 | | 1 | reattach | 2 | 1.7-4.5 | 0.29 | 20.44 | 1.06 | 22.58 | 0.01 | 0.05 | | 1 | reattach | 3 | 2.7-8.8 | 0.37 | 19.61 | 0.82 | 21.46 | 0.02 | 0.04 | | 1 | reattach | 4 | 2.4-6.3 | 0.36 | 19.43 | 1.10 | 22.60 | 0.02 | 0.05 | | 64 | latency_alone | 2 | 1.6-15.1 | 0.24 | 3.50 | 1.22 | 3.67 | 0.07 | 0.33 | | 64 | latency_alone | 3 | 1.5-5.3 | 0.41 | 1.15 | 0.89 | 1.28 | 0.35 | 0.70 | | 64 | latency_alone | 4 | 2.2-8.8 | 0.39 | 0.68 | 0.98 | 0.76 | 0.57 | 1.29 | | 64 | flood_one | 2 | 1.6-15.1 | 0.18 | 3.58 | 0.73 | 19.03 | 0.05 | 0.04 | | 64 | flood_one | 3 | 1.5-5.3 | 0.18 | 1.20 | 0.76 | 18.82 | 0.15 | 0.04 | | 64 | flood_one | 4 | 2.2-8.8 | 0.14 | 0.72 | 0.57 | 19.59 | 0.19 | 0.03 | | 64 | flood_eight | 2 | 1.6-15.1 | 0.21 | 13.80 | 0.98 | 83.13 | 0.02 | 0.01 | | 64 | flood_eight | 3 | 1.5-5.3 | 0.23 | 14.19 | 0.94 | 76.56 | 0.02 | 0.01 | | 64 | flood_eight | 4 | 2.2-8.8 | 0.22 | 0.99 | 0.75 | 83.91 | 0.22 | 0.01 | | 64 | reattach | 2 | 1.6-15.1 | 0.42 | 3.07 | 0.75 | 3.34 | 0.14 | 0.22 | | 64 | reattach | 3 | 1.5-5.3 | 0.26 | 2.22 | 0.76 | 2.46 | 0.12 | 0.31 | | 64 | reattach | 4 | 2.2-8.8 | 0.23 | 1.21 | 0.66 | 31.46 | 0.19 | 0.02 | | 100 | latency_alone | 1 | 2.3-8.8 | 0.27 | 1.66 | 0.81 | 1.81 | 0.16 | 0.45 | | 100 | latency_alone | 3 | 2.2-6.1 | 0.33 | 1.19 | 0.83 | 1.71 | 0.28 | 0.49 | | 100 | latency_alone | 4 | 2.2-7.1 | 0.30 | 1.28 | 0.70 | 1.61 | 0.23 | 0.44 | | 100 | latency_alone | 5 | 3.1-11.2 | 0.30 | 1.72 | 0.75 | 1.98 | 0.18 | 0.38 | | 100 | flood_one | 1 | 2.3-8.8 | 0.16 | 1.77 | 0.55 | 19.13 | 0.09 | 0.03 | | 100 | flood_one | 3 | 2.2-6.1 | 0.16 | 1.23 | 0.57 | 19.07 | 0.13 | 0.03 | | 100 | flood_one | 4 | 2.2-7.1 | 0.13 | 1.32 | 0.58 | 20.58 | 0.10 | 0.03 | | 100 | flood_one | 5 | 3.1-11.2 | 0.14 | 1.92 | 0.89 | 20.38 | 0.07 | 0.04 | | 100 | flood_eight | 1 | 2.3-8.8 | 0.22 | 14.61 | 0.81 | 76.61 | 0.01 | 0.01 | | 100 | flood_eight | 3 | 2.2-6.1 | 0.21 | 12.94 | 0.89 | 77.33 | 0.02 | 0.01 | | 100 | flood_eight | 4 | 2.2-7.1 | 0.25 | 5.77 | 1.05 | 83.54 | 0.04 | 0.01 | | 100 | flood_eight | 5 | 3.1-11.2 | 0.23 | 3.69 | 0.98 | 88.61 | 0.06 | 0.01 | | 100 | reattach | 1 | 2.3-8.8 | 0.33 | 1.25 | 0.63 | 14.91 | 0.26 | 0.04 | | 100 | reattach | 3 | 2.2-6.1 | 0.33 | 0.73 | 0.94 | 0.84 | 0.45 | 1.12 | | 100 | reattach | 4 | 2.2-7.1 | 0.44 | 1.36 | 0.89 | 44.42 | 0.32 | 0.02 | | 100 | reattach | 5 | 3.1-11.2 | 0.23 | 0.75 | 0.72 | 0.85 | 0.31 | 0.84 | | 128 | latency_alone | 1 | 2.4-14.1 | 0.40 | 1.74 | 0.97 | 1.92 | 0.23 | 0.50 | | 128 | latency_alone | 2 | 3.7-10.3 | 0.23 | 2.17 | 0.99 | 2.35 | 0.11 | 0.42 | | 128 | latency_alone | 3 | 4.0-14.6 | 0.29 | 0.79 | 0.65 | 0.96 | 0.36 | 0.68 | | 128 | flood_one | 1 | 2.4-14.1 | 0.16 | 1.84 | 0.72 | 19.25 | 0.09 | 0.04 | | 128 | flood_one | 2 | 3.7-10.3 | 0.15 | 2.31 | 1.51 | 18.83 | 0.06 | 0.08 | | 128 | flood_one | 3 | 4.0-14.6 | 0.15 | 0.82 | 0.61 | 20.84 | 0.18 | 0.03 | | 128 | flood_eight | 1 | 2.4-14.1 | 0.23 | 3.81 | 0.98 | 82.28 | 0.06 | 0.01 | | 128 | flood_eight | 2 | 3.7-10.3 | 0.21 | 14.65 | 1.05 | 78.88 | 0.01 | 0.01 | | 128 | flood_eight | 3 | 4.0-14.6 | 0.23 | 4.70 | 0.96 | 84.66 | 0.05 | 0.01 | | 128 | reattach | 1 | 2.4-14.1 | 0.29 | 1.72 | 1.00 | 2.01 | 0.17 | 0.50 | | 128 | reattach | 2 | 3.7-10.3 | 0.28 | 0.80 | 0.77 | 0.89 | 0.35 | 0.86 | | 128 | reattach | 3 | 4.0-14.6 | 0.31 | 2.77 | 1.58 | 3.06 | 0.11 | 0.52 | **Latency bound: median over kept pairs of holder - (1.1 x Herdr + 0.5 ms)** | panes | phase | pairs | p50 margin | p95 margin | pairs within (p50, p95) | verdict | |---|---|---|---|---|---|---| | 1 | latency_alone | 4 | -22.05 | -24.22 | 4/4, 4/4 | pass | | 1 | reattach | 4 | -21.96 | -24.27 | 4/4, 4/4 | pass | | 64 | latency_alone | 3 | -1.35 | -1.02 | 3/3, 3/3 | pass | | 64 | flood_one | 3 | -1.64 | -20.70 | 3/3, 3/3 | pass | | 64 | flood_eight | 3 | -15.47 | -90.97 | 3/3, 3/3 | pass | | 64 | reattach | 3 | -2.67 | -3.42 | 3/3, 3/3 | pass | | 100 | latency_alone | 4 | -1.83 | -1.63 | 4/4, 4/4 | pass | | 100 | flood_one | 4 | -2.06 | -21.51 | 4/4, 4/4 | pass | | 100 | flood_eight | 4 | -10.56 | -88.01 | 4/4, 4/4 | pass | | 100 | reattach | 4 | -1.32 | -8.49 | 4/4, 4/4 | pass | | 128 | latency_alone | 3 | -2.01 | -1.65 | 3/3, 3/3 | pass | | 128 | flood_one | 3 | -2.37 | -20.95 | 3/3, 3/3 | pass | | 128 | flood_eight | 3 | -5.44 | -90.02 | 3/3, 3/3 | pass | | 128 | reattach | 3 | -2.11 | -1.71 | 3/3, 3/3 | pass | **Flood CPU (user+sys s of the path's processes): each kept pair** | panes | phase | pair | load | holder CPU | Herdr CPU | ratio | |---|---|---|---|---|---|---| | 64 | flood_one | 2 | 1.6-15.1 | 2.03 | 10.53 | 0.19 | | 64 | flood_one | 3 | 1.5-5.3 | 1.95 | 10.61 | 0.18 | | 64 | flood_one | 4 | 2.2-8.8 | 2.01 | 10.56 | 0.19 | | 64 | flood_eight | 2 | 1.6-15.1 | 51.93 | 59.64 | 0.87 | | 64 | flood_eight | 3 | 1.5-5.3 | 54.77 | 58.35 | 0.94 | | 64 | flood_eight | 4 | 2.2-8.8 | 55.23 | 59.87 | 0.92 | | 100 | flood_one | 1 | 2.3-8.8 | 1.99 | 10.67 | 0.19 | | 100 | flood_one | 3 | 2.2-6.1 | 2.00 | 10.69 | 0.19 | | 100 | flood_one | 4 | 2.2-7.1 | 1.99 | 10.85 | 0.18 | | 100 | flood_one | 5 | 3.1-11.2 | 1.91 | 11.02 | 0.17 | | 100 | flood_eight | 1 | 2.3-8.8 | 55.57 | 55.55 | 1.00 | | 100 | flood_eight | 3 | 2.2-6.1 | 55.37 | 58.68 | 0.94 | | 100 | flood_eight | 4 | 2.2-7.1 | 48.57 | 38.32 | 1.27 | | 100 | flood_eight | 5 | 3.1-11.2 | 49.35 | 46.80 | 1.05 | | 128 | flood_one | 1 | 2.4-14.1 | 1.99 | 10.68 | 0.19 | | 128 | flood_one | 2 | 3.7-10.3 | 2.11 | 10.70 | 0.20 | | 128 | flood_one | 3 | 4.0-14.6 | 1.97 | 11.02 | 0.18 | | 128 | flood_eight | 1 | 2.4-14.1 | 54.08 | 57.65 | 0.94 | | 128 | flood_eight | 2 | 3.7-10.3 | 47.68 | 58.38 | 0.82 | | 128 | flood_eight | 3 | 4.0-14.6 | 51.09 | 50.80 | 1.01 | **Loss, wakeups and memory in every kept round** | panes | rounds | input exact | lost on screen | idle holder wakeups (max) | one holder idle max MiB | one holder after a flood max MiB | 64 attached: holder / Herdr | |---|---|---|---|---|---|---|---| | 1 | 8 | 8/8 | 0 | 0 | 2.92 | - | - | | 64 | 6 | 6/6 | 0 | 0 | 3.17 | 5.91 | 0.73 (pairs 0.71, 0.74, 0.73) | | 100 | 8 | 8/8 | 0 | 0 | 3.00 | 5.91 | - | | 128 | 6 | 6/6 | 0 | 0 | 3.28 | 5.88 | - | **Slow consumer at 64 panes: one pane's connection read 10 ms of every 40 (holder: proxy on its socket; Herdr: its session client stopped 30 ms of 40)** | pair | load | holder p50 / p95 ms | Herdr p50 / p95 ms | holder CPU / Herdr CPU s | ratio | flooded holder after, still MiB | node before / after / still MiB (holder) | node before / after / still MiB (Herdr) | wall s holder / Herdr | |---|---|---|---|---|---|---|---|---|---| | 1 | 4.6-8.9 | 0.24 / 1.31 | 0.70 / 17.43 | 0.53 / 7.42 | 0.07 | 5.63, 5.63 | 6.44 / 6.55 / 6.55 | 6.36 / 6.48 / 6.48 | 9.5 / 10.0 | | 2 | 4.4-8.3 | 0.22 / 0.99 | 2.09 / 14.38 | 0.52 / 7.25 | 0.07 | 4.94, 4.94 | 6.59 / 6.63 / 6.63 | 6.44 / 6.58 / 6.58 | 9.5 / 10.1 | | 3 | 4.1-13.2 | 0.19 / 1.51 | 1.66 / 22.43 | 0.52 / 7.54 | 0.07 | 4.95, 4.95 | 6.64 / 6.74 / 6.74 | 6.33 / 6.55 / 6.55 | 9.5 / 10.3 | **One unattached holder flooded 300 MB: before 2.72 MiB, right after 5.16 MiB, still 2.5 s 5.16 MiB** **Verdicts** | bound | verdict | figure | |---|---|---| | latency latency_alone at 1 | pass | p50 -22.05 ms, p95 -24.22 ms | | latency reattach at 1 | pass | p50 -21.96 ms, p95 -24.27 ms | | latency latency_alone at 64 | pass | p50 -1.35 ms, p95 -1.02 ms | | latency flood_one at 64 | pass | p50 -1.64 ms, p95 -20.70 ms | | latency flood_eight at 64 | pass | p50 -15.47 ms, p95 -90.97 ms | | latency reattach at 64 | pass | p50 -2.67 ms, p95 -3.42 ms | | latency latency_alone at 100 | pass | p50 -1.83 ms, p95 -1.63 ms | | latency flood_one at 100 | pass | p50 -2.06 ms, p95 -21.51 ms | | latency flood_eight at 100 | pass | p50 -10.56 ms, p95 -88.01 ms | | latency reattach at 100 | pass | p50 -1.32 ms, p95 -8.49 ms | | latency latency_alone at 128 | pass | p50 -2.01 ms, p95 -1.65 ms | | latency flood_one at 128 | pass | p50 -2.37 ms, p95 -20.95 ms | | latency flood_eight at 128 | pass | p50 -5.44 ms, p95 -90.02 ms | | latency reattach at 128 | pass | p50 -2.11 ms, p95 -1.71 ms | | flood CPU flood_one at 64 | pass | median ratio 0.19 over 3 pairs | | flood CPU flood_eight at 64 | pass | median ratio 0.92 over 3 pairs | | flood CPU flood_one at 100 | pass | median ratio 0.19 over 4 pairs | | flood CPU flood_eight at 100 | pass | median ratio 1.03 over 4 pairs | | flood CPU flood_one at 128 | pass | median ratio 0.19 over 3 pairs | | flood CPU flood_eight at 128 | pass | median ratio 0.94 over 3 pairs | | loss at 1 | pass | 8/8 exact, 0 lost on screen | | idle wakeups at 1 | pass | max 0 | | memory idle <= 4 MiB at 1 | pass | max 2.92 MiB | | memory: 64 attached panes' holders <= 1.5 x Herdr's | pass | median 0.73 | | loss at 64 | pass | 6/6 exact, 0 lost on screen | | idle wakeups at 64 | pass | max 0 | | memory idle <= 4 MiB at 64 | pass | max 3.17 MiB | | memory after a flood <= 6 MiB at 64 | pass | max 5.91 MiB | | loss at 100 | pass | 8/8 exact, 0 lost on screen | | idle wakeups at 100 | pass | max 0 | | memory idle <= 4 MiB at 100 | pass | max 3.00 MiB | | memory after a flood <= 6 MiB at 100 | pass | max 5.91 MiB | | loss at 128 | pass | 6/6 exact, 0 lost on screen | | idle wakeups at 128 | pass | max 0 | | memory idle <= 4 MiB at 128 | pass | max 3.28 MiB | | memory after a flood <= 6 MiB at 128 | pass | max 5.88 MiB | | slow consumer pair 1: input exact, none lost | pass | | | slow consumer pair 1: flooded holder <= 6 MiB once still | pass | 5.63 MiB | | slow consumer pair 2: input exact, none lost | pass | | | slow consumer pair 2: flooded holder <= 6 MiB once still | pass | 4.94 MiB | | slow consumer pair 3: input exact, none lost | pass | | | slow consumer pair 3: flooded holder <= 6 MiB once still | pass | 4.95 MiB | | slow consumer latency | pass | p50 margin -2.14 ms, p95 -18.36 ms | | slow consumer flood CPU | pass | median ratio 0.07 | | unattached holder after a flood <= 6 MiB | pass | 5.16 MiB | 45 of 45 pass **Before the freed-memory return** (pair 1 of the first battery, same method): one holder idle 3.06 MB unattached and 3.47 MB attached at 64 panes (bound then 3 MB); after a 300 MB flood 8.2 MB, and 8.4 to 8.9 MB after 0.46 to 1.5 GB on one holder. </details> <details><summary>Method</summary> `scripts/holder-perf.py` (docs/PERFORMANCE_TESTING.md, The pane holder's path): the node is hide-node's `holder_node` example built through `Holders::start_local`; the Herdr path is a private server of the pinned v0.9.5 (HOME, XDG folders, HERDR_SESSION, HERDR_CONFIG_PATH and HERDR_SOCKET_PATH its own) attached through the node's Herdr sessions, the holder path the same node with `HIDE_DEV_PANE_HOLDER=1`, both at 120x40 running `/bin/sh` on the same Mac in alternating rounds. Latency is a 12-letter token typed through the node's `key` until a frame showing it reaches the node's screen sink, 200 tokens 40 ms apart on an extra echo pane, alone, beside one pane flooding 300 MB, beside eight panes flooding 75 MB each, and beside one 75 MB flood whose connection alone is read slowly; memory is `phys_footprint`, wakeups `pkg_idle_wkups + interrupt_wkups`, CPU user+sys from `proc_pid_rusage`; the echo's log is compared token for token with what was typed. Each phase records the load and the build processes running; a pair either of whose rounds saw a build process is dropped. Release binaries ran from a folder of their own, with no cargo running in this worktree during a round. </details> <details><summary>Verification record</summary> - Head: 23d54df (`test: pass a macOS holder within its budget or one its return brought down`), main merged at 61c5e93. - CI: run 41258509161 on 23d54df, `verify` success, `vt` and the holder restart lane success on Linux, macOS and Windows. The 21-cell table is from run 41250820500 on 40248e9 (21/21, none marked known failure); 41247368773 on 2fca9dc was 21/21 too. - Local check at 23d54df: `scripts/verify-cargo.sh lint` and `test`, 55 test binaries, 7014 passed, 0 failed, with `HERDR_*` and `HIDE_*` unset; `python3 -m unittest discover scripts/tests` OK (21 skipped). - `memory.rs` on macOS debug, five local runs: 7.20 to 9.14 MiB at the flood's end, 5.86 to 6.75 MiB after its return; the macOS runner at 61c5e93 read 5.08 MiB at the flood's end and 5.09 after (job 124704224457), within the budget, which the check now passes. - Measurement: re-analysis of the earlier battery (no new rounds) with `analyze.py`, 45/45 bounds pass; slow consumer and unattached flood re-measured with release binaries copied out of the worktree. - Run artifacts stay local, under the mission's run folder, not in this repository. </details>
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.
Related: 엔진 교체 묶음 2의 다섯 번째 PR. 선행 #1917, #1918, #1927, #1929 (모두 main에 있음).
Summary
보관 프로그램(pane holder)은 지금까지 혼자서만 시험됐고, hide-node가 그것을 띄우고 다시 찾아 붙는 길이 없었습니다.
이 PR은 개발 스위치
HIDE_DEV_PANE_HOLDER=1이 켜진 로컬 노드가 pane을 보관 프로그램으로 시작·끝내고, 지금 터미널 서비스로 화면을 붙이게 합니다.노드가 다시 뜨면 기록으로 살아 있는 보관 프로그램을 찾아 64개에 화면을 붙이고, 나머지는 살려 둔 채
attach_limit으로 보고하며, 없던 동안 끝난 pane은 기록된 이유로 pane마다 한 번 보고합니다.다른 노드가 인계하면 재시도하지 않고, 가장 오래된 지원 버전보다 오래된 보관 프로그램은 끝내지 않고 "지원하지 않는 버전"으로 보고합니다.
스위치가 꺼져 있으면 지금 Herdr 세션 길 그대로이고 보관 프로그램을 하나도 띄우지 않습니다.
스크린샷 없음: 화면 변경 없음 (앱은 이 묶음에서 보관 프로그램 pane을 보여 주지 않음).
Review
pane_holder.device_node_unsupported)를 남기고 Herdr 길로 돕니다. OwnedChild 작업 묶음에 BREAKAWAY_OK를 더하는 일과 그 계약 시험은 묶음 3에서 기기 kit과 함께 넣습니다(Conductor 결정).hide-node/src/terminal/session.rs- Herdr 길이 지나는 곳. 세션의 읽기·쓰기를 transport trait으로 나눴고, Herdr transport는 같은 NDJSON 줄을 같은 순서로 씁니다(아래 Evidence의 기존 시험).hide-node/src/terminal/mod.rs- failure path. 닫힘이 문자열 대신 구조화된 category를 받고,taken_over·program_exited·terminated·unsupported_holder_version은 재시도하지 않습니다(final_close). Herdr 닫힘은 지금처럼closed_category로 읽습니다.hide-kit/src/panes.rs- 끝내기 연결이 Closed 없이 EOF로 끊기면 보관 프로그램이 살아 있는 동안 20초 안에서 다시 붙어 terminate를 보냅니다. 시작 요청에 테마(필수, 시작 키에는 미포함)를 실어--theme으로 넘기고, ready 줄의job=을pane_holder.started에 남깁니다.keeps_own_size, 경로 복제 없이contains_key)만 늘었습니다. redraw는 쓰개 명령 하나로 resize와 같은 값을 치릅니다. 키 입력은 잠금 아래에서 base64 줄을 만들던 것이 바이트 복사로 바뀌고 인코딩은 쓰개 스레드로 옮겨졌습니다.hide-node/src/terminal/holder.rs- 같은 크기 resize는 보관 프로그램에 보내지 않으므로, 서비스가 전체 화면을 다시 달라고 하던 곳(redraw, 같은 크기 view, frame 유실)은SessionWriter::redraw로 묻습니다. Herdr는 지금처럼 같은 크기 resize 줄을 쓰고, 보관 프로그램은ClientMessage::Redraw를 받습니다.hide-holder-protocol/src/lib.rs-ask가 버전을 받고, 노드는 pane 기록의protocol로 묻습니다. 줄의 바이트는 같습니다(v1 fixture 통과).hided/src/env.rs-HIDE_DEV_PANE_HOLDER를 등록해 데몬 점검이 잘못된 값을 다른 키와 함께 보고합니다. 기기 노드는 잘못된 값이면 터미널 시작이 실패하고,1이면 진단 로그를 남기고 Herdr 길로 돕니다.Evidence
hide-holder/tests/it/node.rs7개 통과.print_node가 Windows에서set B=<word>& call echo %B%-node를 쳤는데, cmd는 줄을 읽을 때%B%를 먼저 펼치고 그다음에set을 실행합니다. 그래서 한 셸에서 두 번째 단어를 치면 앞 단어가 다시 찍힙니다("viewed" 대신 "redrawn-node"). 근거: d2c291c(run 41207004565)에서는 첫 단어 "redrawn"이 화면에 그려지고 두 번째 "viewed"만 실패했고, d3e18c813에서는 보관 프로그램 읽기에도 "viewed-node"가 끝내 없었습니다. 한 셸에 두 단어를 찍는 시험은 이것이 처음입니다. 이제 줄은echo <word>^-node(캐럿이 친 줄에 그 글자가 생기지 않게 함)이고, 실패하면 pane 글자를 함께 보여 줍니다. d3e18c813에서 잠깐 느슨하게 바꾼 확인(frame 수만 봄)은 되돌렸습니다. 보관 프로그램 쓰개의 redraw를 같은 크기 resize로 되돌리면 이 시험이 "a full frame after the ask never happened"로 실패함을 확인.terminated.node역할 프로세스가 66개 pane을 띄운 뒤 kill. 새 노드가 65개를 찾아 이름순 64개에 첫 전체 frame, 65번째는unavailable/attach_limit으로 보고되고 붙지 않고 살아 있음, 노드가 없던 동안 찍힌 줄이 첫 전체 frame에 있음, 끝난 pane은program_exited로 한 번만 보고, 모든 holder·program pid와 시작 시각이 이전과 같음. 66개 시작 4.1초, 다시 찾아 64개 그리기 0.14초(전체 5.2초).taken_over,retry_decision: none, 7초 동안 다시 뺏지 않음. 인계 뒤 첫 노드가 친 줄은 셸에 닿지 않음.fixture_v1.rs)에 기록으로 붙어 화면·입력·크기·redraw·기록 버전으로 읽기·끝내기, 모르는 kind 0개, hello는 버전 1을 포함. protocol 0 기록은unsupported_holder_version으로 보고되고 프로세스와 버전 폴더가 남음.terminal/tests.rs,device_tests.rs)은 한 줄도 바꾸지 않고 통과. hide-node + hide-kit 417개 통과.session.rs자체 단위 시험은 쓰개 명령 타입이 바뀐 세 줄만 고쳤고 단언은 그대로.scripts/verify-cargo.sh lint통과,scripts/verify-cargo.sh test6,890개 통과 0개 실패(macOS),cargo hakari변경 없음,check-engine-boundary.py통과.scripts/verify-cargo.sh lint통과. hide-holder, hide-holder-protocol, hide-node, hide-kit, hided 1,182개 통과(macOS).hidedenv 시험이HIDE_DEV_PANE_HOLDER=yes를 다른 잘못된 키와 함께 보고함을 확인.check-engine-boundary.py통과.node::6개 모두 통과. 66개 pane 강제 종료 시험은 Linux 3.7초, macOS 10.0초, Windows 10.9초. rust workspace, windows check, os contract 3 OS, verify 통과.Verification record