Skip to content

fix: remove old pane holder folders at node start and report refused answers - #1963

Merged
yansfil merged 12 commits into
mainfrom
fix/pane-holder-prune
Nov 1, 2026
Merged

yansfil merged 12 commits into
mainfrom
fix/pane-holder-prune

Conversation

@yansfil

@yansfil yansfil commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

Closes with-hide/hide-private#409

Summary

The pane holder's fidelity check found that the old version folders were never cleaned up. This fixes that and six smaller gaps from the same check.
All of it sits behind the development switch HIDE_DEV_PANE_HOLDER=1 except the Windows device Herdr copy cleanup (item 5).

  • A node with the switch on removes the holder version folders of other builds that nothing runs from, once each time it starts, after it has found its holders again; what it could not remove and more than eight folders left go to its diagnostic log (B20).
  • A program whose answers wait past 64 KiB has them refused with a reason: the holder logs it and tells a node that accepts the new notices capability, which logs it with the pane id; a node that does not accept it is sent nothing and the protocol version stays 1 (B14).
  • A device's pinned Herdr copy on Windows is kept while any process holds a file in it, and kept when that cannot be told.
    The deletion started in feat: keep pane records and reconcile them with the holders that run #1927, which taught process::running to read Windows' process table; its description named running on Windows but not this effect, so it was not intended.
  • The idle holder test reads a thread that ends during its watch as work, not as a NotFound crash; the flood-close and self-exit tests can no longer pass without proving the end.
  • The "Zig not found" message names the Zig version the pins need, and docs/BUILD.md says the Mac mini's vt (macos) job prepares its own Zig.

스크린샷 없음: no screen changes; everything here is a daemon, holder, kit or test change.

Review

  • 판단해 주세요: the answer refusal is reported as a capability-gated Notice message, not a new protocol version or a closed connection, because the connection did nothing wrong and the pane runs on.
  • 조심해서 볼 파일: hide-holder/src/holder.rs - failure path: Answers::send now takes a mutex per parse that has answers, and refusals go through the holder's event loop to the connection.
  • 조심해서 볼 파일: hide-holder-protocol/src/lib.rs - wire: new kind 0x92 and capability notices; an unknown notice reason reads as Other, never as a broken frame.
  • 조심해서 볼 파일: hide-host/src/kit.rs - failure path on Windows devices: a copy whose files cannot all be asked is now kept; a kept copy and a failed removal each log one kit.herdr_copy_* line on the node's error stream.
  • 조심해서 볼 파일: hide-node/src/terminal/holder.rs - ownership: the prune runs on the recover thread after recover, so the folders of holders the reconcile ended go in the same start.
  • 비용 검토: the prune runs once per node start on the existing background thread and waits at most 30 s for starts; notices are at most two per run of refusals, never per answer, and a writer that falls behind holds at most one notice per reason (folded, counts added).

Evidence

  • 확인한 것: scripts/verify-cargo.sh lint && scripts/verify-cargo.sh test on macOS at 4cd7b70 with HERDR_* removed: 7031 passed, 0 failed, 158 ignored.
  • 확인한 것: prune (B20) - node::a_starting_node_removes_the_old_version_folders_nothing_runs_from: of three folders the unused older one goes, the one a v0 holder runs from and the current one stay, pane_holder.folders_pruned says removed 1, in use 1, failed 0.
  • 확인한 것: queues (B14) - queues.rs: 17 x 64 KiB input closes with input_queue_full and the pane runs on; 6000 OSC 11 questions are refused with answer_queue_full, a node accepting notices gets refused then resumed, a v1 node accepting only screen gets nothing and keeps its connection.
  • 확인한 것: node notice - node::a_node_logs_the_answers_its_holder_refused_with_the_pane_and_keeps_the_session logs pane_holder.answers_refused with pane id q1 and the session keeps drawing.
  • 확인한 것: restart lane (run 41273266602) - in all 21 cells (7 agent CLIs x Linux, macOS, Windows) the real switch-on holder_node logged pane_holder.folders_pruned removing the planted older folder v0-0000000000000000, with no failure, and every cell passed.
  • 확인한 것: holder::tests::refusals_and_resumptions_a_writer_has_not_sent_fold_into_one_of_each: 1000 refuse/resume pairs leave 2 queued notices with summed counts, newest reason last.
  • 확인한 것: lifecycle and idle tests now fail on holder.pty_close_unconfirmed, a failed holder.ended, or a self-exit before the program and its first child were seen running (on Windows the child keeps starting grandchildren, so only those two are asserted); idle reads a thread that ended as work, not a NotFound panic.
  • 확인한 것: kit::tests::an_older_herdr_copy_stays_while_a_process_runs_it_and_goes_once_none_does now runs on every system, and the Windows check lane runs it.
  • 확인한 것: the Zig-missing message names the pinned version, and scripts/check-vt-build-refusals.sh asserts it.
  • 확인한 것: CI run 41273266602 green, including vt and holder restart on all three systems and windows check.
  • 확인하지 못한 것: the kit.herdr_copy_kept and kit.herdr_copy_remove_failed records have no test of their own; the kept/removed behavior they report is covered by the kit test on every system.
  • 확인하지 못한 것: check-vt-build-refusals.sh was not run locally (it builds hide-vt twice without Zig); the CI vt job runs it.
Verification record

@yansfil
yansfil merged commit 5f495c9 into main Nov 1, 2026
93 checks passed
@yansfil
yansfil deleted the fix/pane-holder-prune branch November 1, 2026 05:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant