Repository navigation
Run a machine's hided as a node of a core on another machine - #898
Merged
Merged
Conversation
… through it A node that dials its core arrives on a local stream its attach role hands the core, so the link reader is shared by SSH channels and local streams and binds pane authority to the same link identity whichever side dialed. Protocol 27 adds core-opened Herdr streams that the node bridges to its own Herdr socket, capped at 32 per link with 64 chunks waiting per stream.
A machine whose node dials this core is registered as an inbound device keyed by its node id: the core never dials it, pushes no kit and asks no consent, takes the link the node brought once, and refuses a node that is this machine, a device it dials, or one whose earlier link still stands. Retry and consent on its row are refused with a reason.
…ach socket The core binds a private attach socket recorded in its state folder. `hided attach` on the core's machine pipes an SSH exec channel to it and answers no_core when no core runs there. After a one-line handshake that refuses another build, the core's own machine, a dialed device or a node already linked, the stream becomes the node's link. The node role reads core-placement.json and keeps that link with a 2-60 s backoff, answering the core's calls with its own Herdr bridged through the link and a heartbeat the attach role watches. HIDE_MACHINE_ID lets a fixture run two machines on one host.
A hided whose state folder records its core elsewhere runs the node role: no core, its link kept by NodeRole, and its own loopback /ws. Each screen's core traffic goes to the core over one relay per screen (/relay, admitted only by the grant bound to the node's link); terminals come from the node's own hub. The node's panes are drawn from its own terminals without the link, and every other pane from one terminals relay fed by a capped tap on the core's output. A node withholds its pane output from the link until the core says a screen of its own draws it (Mirror control). Screens opened while the link is down are held and their frames dropped; screens attached when it ends are closed once.
The fixture variable that names another machine is a documented input in hide_platform::host::VARIABLES and in hided's environment registry, with its format and the machine id an absent value falls back to.
The first window of the core's own machine tells every node to send its pane output up and the last one to close tells it to stop. The e2e types into a core pane from the node's screen over the terminals relay and sees the node's pane on a core window once one opens.
A node whose core cannot be reached closes its screens with 1012 core_link_lost, holds new ones without delivering their keys, and dials again as soon as the core machine's SSH port greets it again. After a sleep or a network address change a waiting node dials at once and a live link must answer an SSH ping within three seconds or is dialed again.
A daemon in the node role attaches its host once the first attempt to reach its core ended: live, no core running or unreachable all open the window, and a core of another build answers other_build, which the desktop host shows as it does for a local daemon of another build.
A pane on the screen machine reaches its core's Workspace through the node's pane service, as a device pane does. The screen machine's node also proves a caller in no pane by its working directory, and the core binds it to that node's own registered checkout only on a link the node dialed; a device the core dialed still proves pane callers only. While the link is down the node's callers are refused hide_unavailable at once.
Every screen of the core says the grid it draws each pane at; the pane runs at the grid of the screen that last sent it keys, a click or an attachment, and at the latest grid while none has. A screen that does not size a pane views it at the grid it runs at, so the pane's node never waits for frames at a grid no resize will bring. The screen machine's windows send their views with their other events and tell the core once a second that they type into a pane whose keys stay on their machine. One screen sizes its panes exactly as before.
When a screen machine's node dialed this core and is connected, the operator works there, so an undelivered letter's or an unanswered warning's Herdr toast goes to that machine's Herdr through its link; with no linked node it goes to this machine's own Herdr as before. The failure record names the machine whose Herdr was asked.
The screen machine's node keeps the checkout roots its core opened on it over the link, and its screens' file reads under those roots are served by its own daemon with the core's reader, under the same root checks; a path under no such root goes to the core as any device's read does. The screen's end record counts the reads served there.
The screen machine's hided ended by SIGTERM or SIGKILL leaves no attach role on the core's machine and no open SSH connection, and a node that stops answering while its connection stays open is let go by its attach role once it falls silent.
The screen machine's hided now lives while a screen is open or its Herdr server answers, and ends after the idle window otherwise, instead of running forever; both daemons share one idle watch.
A local stream now says whether its peer runs as this process's account: the peer's user id on Unix, and always on Windows, whose pipes admit only their owner. The core's attach socket, already in a folder only this account can open, refuses and logs any other peer.
…rver The core no longer keeps lock files: each worker asks the node on the machine that runs its Herdr server (Call::LabelLock), which holds an flock beside the server's socket for that worker while its link lives. The core's own node answers inline; a linked node's ask runs on its own thread so the session-sync thread never blocks. Device locks under the core's state folder are gone.
They need the same CLI binaries, pinned Herdr and loopback SSH. The documented local command now uses nextest, since cargo test takes one filter.
… that falls behind The SSH client stops reading the whole connection while one channel's buffer is full, so a screen on the screen machine that stopped reading held up every other screen, the panes and the link. Each screen relay now reads its core on a task of its own into a backlog of at most 4 MiB; past it the backlog is dropped, the relay closed, and the screen drawn again from a fresh snapshot once it reads.
File reads and folder listings of a device's checkout run beside the screen that asked; a linked node's screens hold one slot of 64 each while they run, and past it a new one is refused with relay_busy and logged.
…no content The link's start, end and retries carry the node and core, a refused caller carries its node and reason, and nothing typed, drawn or read reaches either daemon's logs.
…uides ARCHITECTURE gains the roles, the placement record, what crosses between the screen machine and the core, the pane size rule, the outage and return, and the two resident processes; the resident ledger gains the link watch, the heartbeat and the relay check; UI_BEHAVIOR says what a node that dials in looks like on the rail and in its own window.
…'s panes as its own hide connect adds the node to the page's hash in the node role, from the node daemon's health. The web reads it for what only the screen's own machine can do: reveal and open with an app, a terminal path's lookup and open, and a page's browser partition; without it the screen's machine is the core's, as before.
…e link's SSH connection A node whose core runs on another machine now serves /browser-route to its desktop host with the core's route registry: the View's source comes from the core over the relay port on the live grant (/relay/browser-source), a page of the node's machine loads as it is, and a loopback page of the core's machine goes through a local forward on the link's own SSH connection. A file: page of the core's machine and pages of other devices are refused with a reason. The registry takes its sources and ways through PageSources, so the core and the node share its caps, reservation and reaper.
…runs elsewhere The core reads the TCP listeners of a node that dials it through that node's link, on the coordinator's own 5 s window, and attributes them to that device's panes only. This machine's listeners are no longer attributed to a device's panes. The Open server action is available for a Workspace of the machine the window runs on.
The node role stages every upload its screens send on its own machine. A commit for one of its own panes tells the core only the staged paths (terminal_attachment with staged_on, accepted only from that node's relay), and the core pastes them without reading or copying, holding the keys typed behind the paste as before. A commit for any other pane sends the upload on to the core as the screen sent it, and the node keeps no copy.
The core's coordinator for a node that dials it measures that node's project in front of the Overview, or the one a web Overview names, through the node's link, and puts the sizes on that device's project rows only. The node's own screen asks for its project's size as it does for a local project.
…itory name The node's worktree read answers its repository's origin URL from the repository's own configuration. The core names the GitHub repository from it, and the node's coordinator runs the same allow-listed gh command lines on the core's own node with GH_REPO set to that name, so a checkout on the screen machine gets its pull request as a local one does. Answers stay keyed to the node, so its paths never match a project of the core's machine.
The start diagnostic is written behind the daemon's work, and a node tells the core of a pane's typing at most once a second, so both checks raced under a parallel run.
A node that dials the core sleeps its panes' agents as the core's own machine does: the pane menu offers Sleep agent, its coordinator runs the minute decision for its panes, the end and the wake run on its Herdr connection and link, and its Herdr bringing a tab forward is a visit that wakes what sleeps there. A device the core dials still does not sleep, and a sleep that closes its pane stays on the core's machine.
A held line the terminals relay took and then failed to write, or was cut off writing when the relay ended, was gone with no word to the screen, and a key into this machine's pane while the link was down was taken and lost. Both now reach the screen as the key that was not sent.
…l only a dial that never reached SSH unreachable A refused node woke on every change of the address set, and macOS link-local addresses churn on their own, so it redialed every 2 s instead of backing off. A sleep or network move now wakes only a wait on an unreachable dial or a lost link, and link-local addresses are no move. Every attach error read as unreachable; now only a TCP dial that never reached the SSH server does.
…ution included The probe resolved the core machine's name with the system resolver, which has no bound and hangs when the network is down, on the watch thread the role's end joins. The name is now resolved on a thread of its own the probe waits for only until its deadline, one resolution at a time.
…hat a tap keeps The core's terminals relay awaited each send inside its select loop, so a large message over a slow forward stopped it reading the node's keys and the link's end. The writer is now its own task, as on the node side. A tap decides from its state whether it keeps a chunk before encoding it, and output takes one reference to the tap list rather than a copy.
…ver's port valid_repository refused acme/.github; only . and .. are path steps. An origin on a GitHub Enterprise Server's HTTPS port lost the port, which gh needs to reach its API; an SSH port is still left out, since it is not the API's.
…ever reaching SSH A connection taken and reset before the SSH greeting, as by a port forward with nothing behind it, read as having reached the server, so the node waited out its backoff instead of probing the port. The server is reached once it presents its host key, as the port probe counts it by the greeting.
key-echo.mjs took t0 on the driver's clock and t1 on the page's, and the offset between the two changed per run (+75, -21 and -22 ms seen), so a 5 ms comparison could not tell a build's cost from the instrument. The keydown is now stamped on the page by a capture-phase listener, a negative or keydown-less sample is refused, and the driver-clock sample and its measured offset stay beside it as a cross-check that summarize.py reports.
…ts close A writer that panicked left the relay polling the finished task again, which panics in tokio and skipped removing the tap. The relay now records that the writer finished, aborts it when the relay is dropped, removes the tap before the close frame, and gives that frame a handback's time.
Not-sent notices went one per held line through a 64-slot broadcast; a lagging screen ignored the lag and lost them, and every notice said the key waited too long, even for a link that ended or a write cut off. Each live screen connection now has a count and a set of causes woken once, and a burst of any size reaches it as one error frame.
…e to fix A reset or timeout in the key exchange, a channel that failed, and a handshake cut off or left unanswered all ended as Ended, which no move woke, so a laptop waking mid-dial waited out the backoff. They are now a Transport failure a move wakes. A host key known_hosts refused gets its own operation, so it stays with sign-in, alias and unreadable answers as what the operator must fix.
…es now The watch reset its port record on the look after a probe answered, so an unreachable wait whose port answers probed every other look. The record now holds for the phase it was probed in and starts over only on a phase change or a move. The module, PROBE_WITHIN and probes_port docs say what the watch does after the round 1 changes.
The first resolved address could spend the whole probe deadline, so a dead IPv6 address listed first starved a live IPv4 one. Each address now gets an even share of the time left.
On Windows a stream's close cancels its pending I/O and can wait on it, up to about 200 ms a stream, and close, stop and a refused open did that while holding the lock every write and the control lane take. The entries are now taken out under the lock and closed after it.
is_repository and valid_repository disagreed on a part starting with '-', which the first took and the second refused as a possible flag. is_repository is now valid_repository in two parts.
Redraws wait in the same held lines as keys, so one that expired, was cleared with its link or was cut off told the screen a key was not sent. A held line now knows whether it is input; a dropped redraw is only logged, since the screen's next view asks again.
…sends The second forget of a sent pane removed every queued item for it, including the Forget the first had queued, and queued nothing since the pane was no longer marked sent, so the node's hub kept the pane. Only the pane's output is dropped now.
screen_node read a failed health probe, or a node id the filter refused, as a daemon that is its own core, so connect, status and open gave a node's screen the core's address without &node=. Both are now errors: connect answers no_response with the detail, and status and open fail.
… the control lane A forward the operator must fix was a transport failure, which woke a waiting node on every move; it is now classified like the dial. The control lane's doc said each request finishes at once; a link write to an end that stops reading holds its worker until the write deadline.
Starting the record over at every phase change dropped the silent probes of the previous wait, so a port that answered at the first look after a retry never woke the node, and B9's return waited out a 16 s backoff. The record now spans the outage's waits and dials, and starts over when the outage ends or the machine moves.
… open The journey opened a page right after creating the core's checkout, and the core registers it from Herdr's events on its own time, so the first open could answer checkout_not_registered (#912). It now waits for an answer other than that before asserting there is no window.
…ady read The address made a second /health request only to learn the role, and a daemon that had just answered could miss it under load, so connect and status answered no_response where they answered ok before. The health found with the daemon is carried to the address; a node id the filter refuses is still an error.
yansfil
added a commit
that referenced
this pull request
Oct 12, 2026
Related: core-host-node 5단계(core-host-node-move). 선행 PR #898(4단계, 다른 기기 core의 node로 도는 hided), #836(3단계). 관련 이슈 #950, #951, #875. #966은 이 브랜치 위에서 D-29(이동 뒤 node 프로젝트의 Issues, New issue, worktree 정리)를 채웁니다. Follow-up은 #963(리뷰에서 남긴 항목, 번호는 그 이슈와 같음. main merge의 리뷰 4라운드에서 50-53), #964(node 창이 같은 Mac을 화면마다 다르게 부름. 그래프와 시작 시트 포함), #974(gh 로그아웃 때 Local 프로젝트의 이슈 출처), #976(Project Memory 2라운드. SessionStart payload 지연과 `hide memory` 요청 schema)에서 추적합니다. Fixes #962: 실패한 pull 여정은 journal이 rolled_back이 된 뒤 node 역할을 기한 안에서 기다립니다(rollback은 node 역할을 켜기 전에 journal을 씁니다). `remove_staging`은 파일 아래의 경로를 이미 없는 것으로 보아, 그 rollback이 `rollback.unclean` 없이 깨끗하게 끝납니다(다음 이동의 staging은 그 파일에서 실패하고 이름을 댑니다). Fixes #986: hided는 끝나기 전에 diagnostic 기록 큐를 비웁니다(`diagnostics::drain`, 1초 안에서). 이 프로세스가 연 writer를 모두, 다시 설치되어 교체된 것까지 기다리고, 그 시간을 넘긴 writer는 stderr에 `diagnostics.drain_timed_out` 한 줄로 남깁니다. main의 모든 종료(0, 2)와 멈춤을 확인하지 못한 종료(3) 앞에서 비우며, main 밖으로 나가는 panic과 SIGKILL은 다루지 않습니다. ## Summary 설정 > 기기에서 연결된 기기의 ⋯ 메뉴 `core를 이 기기로 옮기기…`로 core(상태와 기록)를 그 기기로 옮기고, 그 기기 node 창의 `되돌리기`로 이 Mac에 다시 가져옵니다. 옮기기 전에 대상 기기를 확인하고(연결, 다른 node, 대상 상태 폴더, Herdr, 신원, 빌드, gh와 Hide AI 로그인, GUI 세션, 잠자기), 하나라도 실패하면 아무것도 바꾸지 않습니다. core는 어느 순간에도 하나만 돕니다: 원래 core를 멈추고, 복사본을 놓고, 대상 core를 pending으로 켠 뒤 이 Mac의 node가 붙어야 확정하며, 그 전의 실패는 원래 core로 되돌립니다. core가 멈추면 그 기기의 터미널 세션도 함께 닫혀, 새 core가 같은 pane을 다시 엽니다. 창은 새로고침 없이 이동을 따라가고(W1 띠: 다섯 단계, 입력 잠김) 새 core에 다시 붙습니다. 대상 기기에서는 login item이 core를 켜 두고, 앱이 더 새로우면 core 기기를 업데이트합니다(B10). 상대 기기가 링크를 받은 뒤 답하지 않으면 운영자가 `그만 기다리기`로(되돌리기에서는 `여기로 가져오기`) 기다림을 끝낼 수 있습니다.  옮기는 동안 창 위 띠가 단계와 입력 잠김을 보이고, 상대가 답하지 않으면 끝에 `그만 기다리기`가 붙습니다. ## Review - **판단해 주세요 (main merge, b70d00a, cf6c98e, 9596ea1)**: #985의 이 기기 전용 Memory 검사(D-22, B16)를 inbound linked node에도 열었습니다(B14, Q20). 다이얼한 기기는 여전히 `memory_device_unsupported`입니다. 그대로 두면 이동 뒤 MacBook에서 Memory 탭, hide memory, 분석이 사라지기 때문입니다. 다이얼한 기기의 거절이 남은 곳: `herdr-core/src/runtime/hosts.rs`(`linked_node`가 `dialed_device`로 답하고 `memory_nodes`, `memory_scope`가 그것을 씀), `herdr-core/src/runtime/project_memory.rs`(`prepare_memory`, `memory_folder`), `herdr-core/src/runtime/memory_analysis.rs`(`receipt_batches`). 이를 고정하는 테스트: `hide_memory_answers_only_a_caller_on_this_machine_in_the_checkout_it_named`(다이얼한 기기의 호출이 `memory_device_unsupported`), `a_project_only_a_device_lists_is_kept_on_that_device_not_unregistered`(다이얼한 기기의 Project 탭이 unavailable), `memory_is_answered_for_this_machine_and_a_linked_node_only`(hook 범위, 분석이 걷는 기기, receipt 묶음에서 다이얼한 기기가 빠짐). #985의 나머지는 그 설계대로 node를 거칩니다. SessionStart는 receipt 없는 index를, 프롬프트는 이미 받은 카드를 뺀 카드와 receipt를 받고, hook은 working folder를 보내지 않습니다(#985가 경로 순위를 없앰). 30분 쉼 분석은 node의 세션을 그 링크로 읽고, 링크가 끊긴 node의 닫힌 세션은 다시 닿을 때까지 기다립니다. 저장소 올리기는 Project의 기기에서 agent를 시작하고 그 기기의 PR 목록을 봅니다. 분석 provider는 core 기기에서 부릅니다. merge를 따로 본 코드 리뷰 4라운드(fad7437)가 이 규칙을 #985의 모든 자리에서 확인했고, 그 지적으로 8b89e76c6이 node pane의 `hide memory show`를 그 node 세션의 receipt로 남기고(다음 프롬프트가 그 카드를 다시 받지 않음), 다이얼한 기기의 세션을 분석 대기열에 넣지 않으며, 다이얼한 기기 Project의 Memory 문구(네 언어)와 주석 둘을 고쳤습니다. Memory 저장소(schema 8)는 이동에서 파일째 옮겨지고, 이동은 schema 버전을 보지 않고 SQLite 무결성만 확인합니다. main이 없앤 Sessions 모드(`sessions_mode_by_project`)는 이동의 rekey 목록과 journey에서도 뺐습니다. - **운영자 결정 (B18 mini 키 에코, 2026-10-12)**: 이 측정에서 B18의 mini p95는 기준을 넘지 못했고, 운영자가 이를 네트워크의 것으로 받아들여 merge하기로 했습니다(답: Accept as network). 유선 재측정은 merge 조건이 아닙니다. 옮긴 뒤 mini pane p95 +2.8 ms(18.7->21.5), 20 ms 넘는 키 6->19개/250, 원인 hop: net_down(터미널 relay forward, SSH 위) 3/7, herdr_echo 2/7. Nagle을 끈 재측정에서도 같은 크기(약 85 ms)의 멈춤이 남았고 기기 배치에도 2/150 나타나, hide가 여는 소켓 아래(SSH 연결, 네트워크)의 멈춤으로 봅니다. 그래도 remote-core 배치에서 더 자주 보였습니다(두 측정 합 13/300 대 2/300). 두 기계 모두 Wi-Fi(같은 AP)로 이어져 있고, 같은 크기(약 85 ms)의 멈춤은 Wi-Fi 절전이 다음 비콘(약 100 ms)까지 프레임을 잡아 두는 모양과 맞습니다. 이 가설은 운영자의 전원이나 네트워크 설정을 바꿔야 확인할 수 있어 확인하지 않았습니다. p50은 같습니다(16.6 대 16.8). 다섯 세트 모두 b520d6e 기기 배치(A)와 이 PR의 remote-core 배치(D)를 번갈아 쟀고, 운영자 결정으로 load 8 이상에서 측정했습니다. 배제한 것: 1 ms 넘는 잠금, 키 옆의 relay 프레임과 link 데이터, hide 소켓의 Nagle(Evidence의 hop 측정). - **운영자 결정 (node pane의 hook 시간, 2026-10-12)**: MacBook pane의 hook이 core일 때(되돌린 뒤)보다 node일 때(옮긴 뒤) p50으로 SessionStart +131 ms(36/46 -> 167/195, p50/p95), 프롬프트 +112 ms(33/36 -> 145/176), 질문 가드 +51 ms(27/31 -> 78/163) 깁니다. 같은 빌드입니다. 운영자가 이를 그대로 받아들였습니다(답: Accept as is). 비용은 링크 왕복입니다: SessionStart는 `hide` 자식 2개와 왕복 약 3번(`hide-agent-hooks/src/workspace_context.rs:31`, `:37`, core의 신원 확인 `hided/src/pane_auth.rs:430`), 프롬프트는 자식 2개(`hook-inner`와 `hide inbox --hook`, `hide-agent-hooks/src/delivery.rs:126`)와 왕복 약 3번, 가드는 자식 1개(`hide-agent-hooks/src/spawn_guard.rs:1005`)입니다. 프롬프트마다 약 110 ms가 더해지며 D-12의 2 s 예산 안입니다. 줄이는 일은 #963 14번(F21)에 남깁니다. 오늘의 기기 pane(mini, 기기 배치)은 SessionStart가 20 ms로 빠르지만, 그 pane의 세션은 Workspace 부분 없이 시작해(출력 1,080 bytes, core와 node pane은 2,683-3,347 bytes) 같은 일을 빨리 하는 것이 아니라 일이 적은 것입니다. - **정해진 순서**: 이동 뒤 MacBook의 프로젝트는 모두 node 프로젝트가 되고, 4단계의 node 경계 때문에 Issues(GitHub와 Local. Local 데이터는 core와 함께 옮겨져 새 core의 저장에도 남고, 되돌리면 번호 그대로 이 Mac의 것으로 돌아오지만, 옮겨진 동안 읽는 행이 없습니다), New issue, worktree 정리가 없습니다. 운영자가 정한 대로 D-29는 고치지 않고, 이를 채우는 별도 PR #966이 운영자의 실제 이동 전에 들어갑니다. - **판단해 주세요**: node 프로젝트의 PR 행은 Overview를 열 때 최대 5분 묵은 값일 수 있습니다. - **판단해 주세요**: B10 - 다시 붙기는 업데이트가 성공한 뒤나 core 기기가 업데이트된 뒤에만 성립하고, 서로 다른 빌드 사이에서는 성립하지 않습니다. - **판단해 주세요**: Memory는 편지와 같은 방식으로, pane credential을 거쳐 daemon에 닿습니다. 일회성 HIDE_STATE_DIR로 시작한 daemon은 그 변수가 없는 pane에서는 찾을 수 없으며, #958 이후의 main과 같습니다. locator는 별도 PR로 돌아옵니다. - **판단해 주세요**: Q17은 이동 뒤에도 Factory가 같게 동작하도록 하는 최소한입니다. 저장소 단위 Factory와 worker 기기 선택은 #875에 남습니다. - **판단해 주세요**: B13 - 예약 뒤 링크와 함께 잃은 벨은 세 번 중 한 번을 씁니다(실패한 호출이 이미 쳤을 수 있음). 편지는 agent의 다음 턴에 그대로 전해집니다. - **판단해 주세요**: B15 - gh 행은 `<기기>에서 실행하세요 gh auth login`과 복사를 주고, Hide AI는 기기 이름만 말합니다. agent별 로그인 명령은 제품이 검증한 것이 없어 만들지 않았습니다. - **판단해 주세요**: B1 차이 - 창의 이 기기 이름은 #972의 시스템별 이름(This Mac, This PC, This computer, 번역됨)이고, node 창도 자기 기기를 그 이름으로 부릅니다(B2). main은 core 기기만 그렇게 불렀습니다. Overview와 설정 칩이 같은 Mac을 호스트 이름으로 부르는 것은 #964에 남습니다. - **판단해 주세요**: 그만 기다리기의 문구와 위험 한 줄(아래 이미지). 되돌릴 수 없고, 상대가 끊기기만 했다면 이 Mac이 닿을 때까지 그쪽 core가 계속 돕니다. - **판단해 주세요**: 여기로 가져오기는 복사본으로 이 Mac core를 켜고, 상대 core는 retire될 때까지 시작이 막혀 core가 둘이 되지 않습니다. - **판단해 주세요**: 대상의 상태 폴더가 심링크 뒤에 있으면 확인 행 '{기기}의 이전 core 기록'이 경로 이름과 함께 실패합니다(툴팁에 경로). 행 이름이 이 경우를 설명하지 않지만 설치가 만드는 경우가 아니어서 두었고, #963 49번이 실제 경로를 따라 옮기면서 이 거절을 없앱니다. - **조심해서 볼 파일 (ownership, runtime 수명)**: `hided/src/core.rs`, `hide-node/src/terminal/mod.rs` - core가 멈추면 그 기기의 터미널 세션을 닫고(d2fdc6a), 역할이 바뀐 뒤 새 core가 같은 pane을 엽니다. `CoreHandle::shutdown`은 owner thread와 local service를 한 값(`Running`)으로 쥐어 shutdown과 Drop 중 먼저 온 쪽만 끝냅니다(ba3d6ee). 세션 worker는 시작 전에 수를 세어, close가 그보다 먼저 돌아도 기다리고 그 뒤로는 열리지 않습니다(80bb2b4). - **조심해서 볼 파일 (failure path, ownership: core 하나)**: `hided/src/supervisor.rs`, `hided/src/supervisor/move_back.rs` - 이동과 되돌리기, 재개, 포기의 순서. - **조심해서 볼 파일 (failure path)**: `hided/src/core_move/` (`driver`, `target`, `gate`, `control`, `abandoned`) - 상대 기기 단계와 lease, 포기 기록. 포기는 그것을 내놓은 기다림만 끝냅니다(11a65f8). - **조심해서 볼 파일 (failure path)**: `herdr-core/src/node_migration/copy.rs`, `reown.rs` - 상대가 이름 짓는 경로와 rekey. SQLite 확인의 경로는 UTF-8이 아니면 거절하고 ASCII 밖 바이트를 escape합니다(693bfad). - **조심해서 볼 파일 (high-frequency path)**: `hided/src/server.rs`, `hided/src/lib.rs` - role 종료 때 core 소켓을 1012로 닫기. - **조심해서 볼 파일 (snapshot wire)**: 링크 변경 - `core_link` alias(c7f906e), node held screen의 `core_move` 전달과 처리(`hided/src/node_daemon/screen.rs` `hold()`), 창의 `web/src/ws.ts`(그리지 않은 창은 이동이 진행 중이거나 node가 잡고 있을 때만 붙들기, a9618e4). - **조심해서 볼 파일 (gate 변경)**: `scripts/check-core-touches-no-machine.py` STORES 항목 네 개(이유 포함), workstation identity를 피한 테스트 경로 두 파일. `a_core_that_gives_its_copy_back_forgets_its_login_item`이 `#[cfg(unix)]`가 되었고, Windows는 login agent 계약의 not-supported 테스트가 고정합니다. - **비용 검토**: 상시 작업은 포기 기록이 있는 동안만 도는 task 하나(상한 8개, 1분까지 늘어나는 재시도)와 core 기기의 login item입니다. 고빈도 경로에는 core 소켓당 role 종료 watch 하나가 더해집니다. - **질문**: node에서 잠들지 못하는 agent(Pi, OpenCode, Grok, Omp, Cursor)의 Factory worker는 Factory가 멈춰도 pane에 남습니다. 그대로 둘까요, follow-up으로 둘까요? - **질문**: B14 - 다이얼한 SSH 기기의 Sessions 문구("Sessions on {device} are not available here…")는 연결된 node가 있는 core를 설명하지 않습니다. 문구와 디자인 프레임을 바꿀까요? <details><summary>Review 세부: 번들과 다른 점, 바뀐 기존 동작, 결함 둘</summary> 승인된 디자인 번들과 다른 점: - 번들 장면의 기기 탭에는 설정 창 틀이 없고, 제품은 설정 안에 그립니다. - Light의 대화상자 뒤 배경은 제품의 옅은 wash를 씁니다. - 확인 항목이 번들의 4개가 아니라 9개입니다. - 문구는 '이 Mac을 덮어도'입니다. 시스템은 그 기기가 MacBook인지 알 수 없습니다. - node 창의 core 행은 플랫폼만 보입니다. - 사이드바는 제품의 사이드바입니다. - W5(연결 끊김 띠)는 번들에 없어 W3을 따라 그렸습니다(B16이 요구). - W4는 Dark로만 그립니다. 호스트 상태 페이지(`desktop/static/status.css`)는 daemon에서 운영자 테마를 읽을 수 없습니다. 번들 final-4는 Light도 그립니다. - W4의 빌드 줄에 번들의 짧은 빌드 해시가 없습니다. native QA가 찾은 결함 하나(c0fe9e6): 이동이 성공한 뒤 창이 멈춘 core의 소켓에 남아 이동의 `done` 뒤로 아무것도 받지 못했습니다. role이 끝나면 core 소켓을 모두 1012 `role_ended`로 닫고, move screen을 core(되돌리기에서는 node)가 멈추기 전에 띄웁니다. 옛 순서를 심으면 앞으로와 되돌리기 검사가 각각 3/3 실패합니다. 같은 종류의 결함 하나 더(a4a8d13): 이동이 잡은 창은 모든 이벤트를 버려 `그만 기다리기`가 move screen에 닿지 않았습니다. 이제 `core_move`만 보내고 나머지는 버립니다. 단위 테스트(가짜 dispatch)와 journey(raw renderer)로는 보이지 않았고 native 실행에서 찾았습니다. 바뀐 기존 동작: - 재시작이 저장된 pane이나 checkout을 찾지 못하면 이제 Herdr가 focus한 pane과 그 checkout으로 엽니다. 이동만이 아니라 모든 재시작입니다. Herdr의 focus가 모든 checkout 밖이면 catalog 첫 항목 그대로입니다. - rekey가 `core-state.json`에 한 번 쓰는 `focus_from_herdr`를 남깁니다. 첫 세션이 쓰고 다음 저장이 지우며, 옛 빌드는 무시합니다. - Agent 영역이 오늘의 inbound node(3, 4단계의 원격 core 기기)에서도 이 기기의 Workspace처럼 나뉘고 옮겨지고 크기가 바뀝니다. - 다이얼한 기기의 split 이유 문구가 SSH 기기를 말합니다(en, ko, zh, ja). - B13 - 다이얼한 SSH 기기로 가는 편지도 그 기기가 닿을 수 있는 동안만 기다립니다(벽시계 60분이 아님). 계속 떨어져 있으면 열린 편지 1024개 상한까지 쌓입니다. - B13 - 플랜은 링크와 함께 잃은 벨이 attempt를 쓰지 않는다고 했으나 PRD가 요구하지 않아 지금 동작(한 번 씀)을 두었습니다. - B14 - 프롬프트 앞 8 KiB가 hook에서 core로(node에서는 링크로) 갑니다. 검색 입력으로만 쓰고 로그에 남기지 않습니다(journey가 두 기기의 로그를 찾음). 전에는 SHA-256만 떠났습니다. - B14 - Project는 hook의 cwd가 아니라 호출 pane의 checkout이 정합니다. hook은 cwd를 보내지 않습니다. - #985 - hook이 core에 묻는 요청의 wire 이름은 `memory_hook`입니다(main의 `memory`는 `hide memory` 명령). - #975 - 데스크톱 창의 agent 알림(`agent_notice`)은 이동 frame 옆으로 갑니다. 상태 페이지는 빌드 줄(`#builds`) 아래에 Copy diagnostics를 둡니다. - B14 - SessionStart의 payload 대기가 75 ms에서 프롬프트 hook과 같은 500 ms가 되었습니다. - B14, Q20 - core가 다이얼하는 기기는 Memory가 없습니다(`memory_unavailable`). - B14 - 오른쪽 패널의 Sessions와 Memory, 이름 붙은 Project의 Sessions가 이 기기와 다이얼해 들어온 node에서는 Project의 node를 거쳐 읽힙니다. 링크가 끊긴 node는 "{device} is not connected."로 답합니다. - B16 - node의 연결 끊기가 `core-placement.json`에 남아 재시작 뒤에도 유지됩니다. 배치 기록 변경은 모두 `placement::update`(프로세스 잠금 하나)로 갑니다. - 이동 대화상자는 Connection이나 GuiSession 확인이 실패하면 통과 수를 보이지 않습니다(뒤 확인이 돌지 않았을 수 있음). - Q13 - 다른 빌드의 번들 `hide connect`는 login item이 돌리는 core를 멈추지 않습니다. 더 새 앱은 `core-update`로 업데이트하고, 더 옛 앱은 `core_newer`를 받습니다. - login agent는 `hide-platform`의 OS 중립 계약 뒤에 있습니다. launchctl 자체가 실패하면 로그에 'launchctl did not answer: ...'가 남습니다(화면에는 닿지 않음). 계약과 링크: - link protocol은 28 그대로입니다. 대상 확인은 SSH `inspect` 단계에서 하고, attach socket의 `Release` 줄과 hello의 `move_intent`는 attach 빌드 거절과 이동의 Build 확인이 지킵니다. `VerifyOutcome::Lost` 추가도 같은 빌드끼리만 잇는 규칙(B10 option C)에 기댑니다. - `contracts/hided-ws.schema.json` - `core_move` frame과 이벤트(`abandon` 포함), `core_link`의 `disconnected` 단계, `alias`. 더하기만 했습니다. - 상대 기기가 이름 짓는 파일 이름은 `copy::carried`(옮기는 저장소 아래의 상대 경로)로만 읽고, verify와 place는 `node.json`이 이 기기와 `--target`을 가리키지 않는 사본을 거절합니다. - 대상의 gh와 Hide AI 확인은 계정의 GUI 세션에서 login item의 환경으로 한 번 도는 job입니다. 되돌리기는 받는 쪽의 Ai, Gh, GuiSession, Sleep을 확인하지 않습니다. - 이동이 잡은 창이 새로고침되어 core를 그리기 전이면, 상대 기기를 이동 기록의 SSH 별칭으로 부릅니다(`core_move`의 `alias`). core_link의 alias와 같은 규칙입니다. - 그만 기다리기(F6, 운영자 결정으로 이 PR에 들어간 4번째 변경)는 상대에 이 Mac의 빌드를 먼저 설치하고 단계를 돌립니다(다른 빌드의 단계는 답이 거절되기 전에 이미 움직임). 상대가 다른 이동을 하고 있다고 답해도 기록을 끝냅니다. AttachSent 뒤의 영구 원인도 그 원인과 함께 기다림으로 보이고, 출구가 그만 기다리기입니다. - 알려진 한계: 이동은 `factory.sqlite3`를 rekey하고, 다시 읽히지 않는 schema-1 사본 `factory.v1.sqlite3`는 rekey하지 않습니다. 바뀐 기존 테스트: - `delivery/ledger.rs`, `mailbox.rs`의 `Letter::reserve_bell` 호출과 `watch.rs`의 편지 리터럴: 서명에 ledger 시계가 더해졌고(빈 값은 예전처럼 벽시계), 확인하는 내용은 그대로입니다. - `node_migration` legacy와 reown fixture에 `node_clocks`가 더해졌습니다. - `held_letter_notice`의 한 테스트에 페어링된 core의 serve 기록이 더해졌습니다(B17은 core가 노출된 곳에서 페어링한 휴대폰에만 보냄). - `hide-agent-hooks`의 opencode helper, `windows_hook_command`, `hook_deadline`: Memory를 core에 묻는 요청으로 확인합니다. `plugin/helper.rs`의 단위 테스트는 지웠고, Pi와 omp의 host id, 첫 프롬프트의 index와 카드 요청은 `tests/it/opencode_helper.rs`가 확인합니다. herdr-core의 receipt 테스트는 core의 답(`memory_hook::answer`)을 묻고, 두 번째 경로를 지키던 테스트 하나는 그 경로와 함께 지웠습니다. - `web/src/addProject.test.ts`, `web/src/screenMachine.test.ts`: 첫 host와 창의 기기가 시스템별 이름("This Mac", "This PC")입니다. - `design/review-targets.json`: 이 브랜치의 `ready`를 main의 `readySelector`로 맞췄습니다. - `.config/nextest.toml`과 테스트 support: `support::run::finish`가 이 브랜치의 journey와 core_move fixture도 끝냅니다. fixture sshd의 채널 128개 상한은 도는 채널만 셉니다. </details> ## Evidence - **확인한 것 (main merge, 로컬)**: fad7437(origin/main b70d00a3c와 cf6c98e19를 merge)에서 `verify-cargo.sh nextest --workspace` 4274/4274(89 skip), lint, hakari가 통과합니다. 2a247c7(9596ea1 #988을 더 merge, Rust 변경 없음)에서 `verify-web.sh`(web, desktop, typecheck), fmt check, design contract가 통과하고, web 단위 테스트는 플랫폼을 Linux와 Windows로 바꿔도 1440/1440입니다. core_move journey 40/40(647a626), remote_core journey 24/24(647a626, Memory journey에서 node의 index와 `hide memory show m1`, 답 35 ms와 36 ms)를 thread 3개로 돌렸습니다. - **확인한 것 (CI 실패와 수정)**: 647a626 CI(run 38197395136)의 fmt 실패는 fad7437eb에서, web 테스트 5개 실패는 cd6b590d3에서 고쳤습니다. 테스트가 이 창의 기기 이름(#972의 시스템별 이름)을 실행 기기의 navigator에서 읽어 Linux runner에서 'This computer'가 되었고, 이제 그 테스트들은 Mac을 고정합니다. - **확인한 것 (리뷰 4라운드 수정, 8b89e76)**: 새 테스트 둘이 고친 코드를 빼면 실패하고 넣으면 통과합니다(node pane의 reader가 이 기기 세션으로 가고, 다이얼한 기기의 닫힌 세션이 대기열에 들어감). herdr-core, hided, hide-agent-hooks, hide-memory nextest 2886/2886, lint, `verify-web.sh`, remote_core journey 24/24. - **리뷰 4라운드에서 follow-up으로 넘긴 것**: #963 50-53(링크가 끊긴 node Project의 Memory 탭이 `Unreadable`로 보이고 다시 닿아도 다시 읽지 않음, node Project의 Memory 켜기가 core의 hook 진단을 봄, hook stdin의 `write_all`에 기한이 없어 Windows 8 KiB 프롬프트에서 설 수 있음, `copy::unplace`가 pending core가 만든 store를 되돌려 재시도가 같은 verify 거절을 만날 수 있음), #964(node 창의 그래프 `THIS_DEVICE` 경로와 시작 시트 `localDevice`가 core 기기를 '이 Mac'으로 부름. a97f18ed3에도 있었음), #976(SessionStart payload가 500 ms를 넘으면 진단 없이 Memory가 빠짐, `memory` 요청 type의 schema 정의 없음). - **확인한 것 (CI, 8b89e76)**: verify run 38200872088에서 22개 check가 통과했고(계획된 skip 하나), rust workspace, remote mailbox, windows check, os contract(macOS)에 TRY나 FLAKY 줄이 없습니다. `premerge-check.py 961`이 main 2766ca98f에 대해 통과합니다. - **로컬 실행의 메모 (main merge)**: fad7437eb의 `nextest --workspace` 첫 실행에서 `hide-node` `a_flooding_pane_holds_back_neither_another_panes_keys_nor_its_frames`가 load 18에서 한 번 실패하고 혼자서 5/5 통과했습니다(이 브랜치는 hide-node를 바꾸지 않음). 처음에 journey를 모두 한꺼번에 띄운 실행은 fixture가 디스크를 채워 실패했고, 지금 기록은 thread 3개 실행입니다. - **확인한 것 (CI, merge 전)**: a97f18e(#986 수정, origin/main 59d1a297c를 merge한 ba52e3d 위)에서 모든 lane이 green입니다(verify run 38173557286). 실제 launchd(login agent가 kill 뒤 다시 켜지고 성공 뒤에는 켜지지 않으며 제거로 끝남, 일회성 job)는 같은 head의 os-contract(macOS) lane이 증명합니다(job 114571114198, 2/2). - **확인한 것 (로컬, merge 범위)**: `verify-cargo.sh nextest --workspace` 4217/4217(89 skip), web 1398 통과(1 skip), desktop 165 통과(4 skip), lint와 typecheck. - **확인한 것 (리뷰 3라운드 여섯 수정)**: 각 수정의 테스트가 고친 코드를 빼면 실패하고 넣으면 통과합니다(terminal close와 worker, 비 ASCII 경로, 포기의 대상 기다림, 창의 붙들기, copy.sent 한 번, shutdown 한 번). 고친 crate의 테스트와 해당 journey 7/7. - **확인한 것 (journey)**: core_move와 remote_core journey(remote mailbox lane), 각 수정에 결함을 심어 실패를 확인(아래 접힌 블록). 읽기 전용 close 결함은 앞으로와 되돌리기 journey가 심은 결함으로 실패합니다. 기다림 없는 close를 심은 journey는 10/10 통과했고, 그 기다림은 단위 테스트가 고정합니다. - **확인한 것 (native)**: 후보 dev 창(Electron, fixture의 격리 Herdr와 sshd)으로 이동, 되돌리기, W1-W4, B15, 그만 기다리기를 Light와 Dark로 캡처. - **확인한 것 (mini 격리 seat, 3b96704)**: 실제 이동, 키 에코, B22, 되돌리기, hook. 운영자 결정으로 load 8 이상에서 측정했고, 각 행에 MacBook의 전원과 두 기기의 load를 적었습니다(아래 표). mini의 호스트 이름은 `<mini host>`로 가렸습니다(#964). - **확인한 것 (B18 MacBook)**: 두 arm이 같은 전원(AC)이었던 f2, f3 짝에서 cand - b520d6eb가 idle p50 +0.80 / -0.20, p95 +0.30 / -0.30, driven p50 +0.10 / +0.10, p95 -0.30 / +0.20 ms로 모두 +5 ms 기준 안입니다. - **확인한 것 (B18 mini)**: 다섯 세트의 p50은 같습니다. p95는 넘지 못했고, 운영자가 2026-10-12에 네트워크의 것으로 받아들였습니다(Review. 두 번의 hop 측정과 배제한 것은 아래 접힌 블록). - **확인한 것 (seat 빌드 뒤의 변경)**: seat는 3b96704a1에서 돌았습니다. 그 뒤의 커밋은 리뷰 3라운드 여섯 수정과 main merge입니다. 그중 키 경로에 닿는 것은 세션 worker 시작(80bb2b4)과 창의 붙들기(a9618e4)이고, ba52e3d87에 시각 기록만 더한 빌드의 hop 측정에서 키 에코가 seat와 같은 범위였습니다(기기 배치 16.8/18.6, remote-core 16.8/20.0, p50/p95, 150키씩). - **확인한 것 (#986, 원인)**: CI의 첫 시도는 hang guard가 아니라 테스트 자신의 30초 기다림(`start.held` 기록, `core_move.rs:2478`)에서 실패했습니다. 은퇴한 기기의 `hided core-login`은 0으로 끝났지만, 큐에 남은 `start.held`를 writer가 쓰기 전에 프로세스가 끝나 기록이 사라졌습니다. - **확인한 것 (#986, 수치)**: 고치기 전 held start 600번 중 3번이 `core.jsonl`에서 기록을 잃었고(stderr에는 남음), 고친 뒤는 load 없이 200번, load 옆에서 200번 모두 0번입니다. 기다리지 않는 drain을 심으면 새 단위 테스트가 20/20 실패하고, 고친 테스트는 50/50 통과합니다. journey는 load 옆에서 고치기 전 20/20, 고친 뒤 20/20 통과(로컬에서는 고치기 전에도 재현되지 않았습니다). - **확인하지 못한 것**: 운영자의 실제 이동(D-17, 이 작업 범위 밖), 유선 연결에서의 B18 mini 재측정, B7과 B14의 멈춘 core 분기와 B26(구성상 성립과 단위 테스트까지). desktop e2e의 `@needs-focus`와 Windows check는 로컬에서 돌리지 않음(CI green). - **merge 뒤 운영자가 할 일**: Issues를 채우는 PR(#966)이 들어간 뒤 실제 이동을 하고, mini의 launchd job이 core를 처음 켜는지 확인합니다. - **생성물**: `web/src/generated/hided-ws.ts`(계약에서 생성), `design/hide-ui.lib.pen` 토큰 두 개(`scripts/gen-pen.mjs`, main 대비 8줄). <details><summary>seat 측정 (mini 격리 seat, 3b96704)</summary> seat: mini의 격리 sshd(새 포트), 격리 HOME, 상태 폴더, Herdr, `/tmp` 아래 절대 경로. 운영자의 Herdr, gateway, LaunchAgent, 상주 daemon, node와 helper는 건드리지 않았고, 매 seat 전후 mini 계정의 지문이 운영자 앱의 변화를 빼고 같았습니다. 바이너리(shasum 앞 16자): cand 3b96704 hided dd6bd6e843563742, hide d5659195391c021e, hide-agent-hooks a5f0580065cf7b2b. b520d6e hided 0cc6ddb16e81a6a1, hide 885f6d6ad727911a, hide-agent-hooks 2c23e057b4f68c5e, hide-host-helper 1f1765bcbbbf8b2c. main f0d6fba hided f88c163a950dbe2f, hide 2b8969755fa635e2, hide-agent-hooks 84092eef3d6b37f5. mini에 설치된 helper는 seat의 바이너리보다 각각 약 18 KB 큽니다(설치의 서명). 다섯 세트와 hop 측정의 기기 배치 실행은 모두 `host.ready`를 남겼습니다. 이동: - 앞으로(moved-7): done 4,023 ms(checks 624, stop 1,675, copy 1,340 for 126,555 B, start 164, link 199), MacBook load 6.77, 전원 battery. - 옮긴 뒤: MacBook pane idle 16.9/17.9, driven 15.9/17.4, mini(core) pane 16.6/18.9(p50/p95 ms), 음수 0, 10,000키 정확. - B22: 링크를 끊자 띠가 바로 "reconnecting", 3 s 뒤 "Cannot reach the core on `<mini host>` · reconnecting". 끊긴 동안 친 표시 키 12개는 어느 pane에도 닿지 않았고, sshd를 되살리자 2,324 ms에 다시 붙어 pane, 붙은 상태, 보기, 탭, URL이 같았습니다. - 되돌리기: done 2,364 ms(checks 478, stop 914, copy 657 for 130,909 B, start 266). mini core가 끝나고 mini는 node serve로 돕니다. - 되돌린 뒤: mini pane 16.4/18.5(load 37.32에서 100.7 ms 한 표본 포함), MacBook pane 16.5/17.6(load 21.39). - 옛 세션: 이동마다 core의 터미널 세션 다섯이 사라지고 새 core 아래에 다섯이 새로 생겼으며 겹치지 않았습니다. - 옮기는 저장소 크기(운영자 상태 폴더, stat만): 27.4 MB(가장 큰 것 delivery-ledger.json 6.3 MB, links.sqlite3 8.7 MB + wal 4.4 MB). B18 MacBook pane 짝(cand - b520d6e, idle과 driven, p50/p95): | 짝 | 시각(KST) | MacBook 전원 | 판정에 씀 | |---|---|---|---| | f1 | 21:11-21:23 | 첫 실행 불명, 나머지 AC | 참고(#966 로컬 작업과 겹침: 21:10:47-21:17:39) | | f2 | 21:23-21:36 | AC | 예 | | f3 | 21:36-21:48 | AC | 예 | | f4 | 21:48-22:01 | 짝 안에서 전원이 바뀜 | 따로 세지 않음 | dfc9118df의 짝 1-3과 f1-f4의 mini 행은 "기기 helper 없는 기준(host.failed)"이라 판정에 쓰지 않았습니다. B18 mini pane, 다섯 세트(23:49-00:41, 모두 AC, MacBook load 8 이상 20개 실행 중 17개): | arm | p50 | p90 | p95 | p99 | 20 ms 넘는 키 | |---|---|---|---|---|---| | A b520d6e 기기 배치 | 16.6 | 18.2 | 18.7 | 22.4 | 6 | | B main f0d6fba 기기 배치 | 16.4 | 18.4 | 18.9 | 92.1 | 8 | | C 이 PR 기기 배치 | 16.8 | 18.8 | 19.8 | 360.0 | 12 | | D 이 PR remote-core | 16.8 | 19.3 | 21.5 | 97.3 | 19 | 250키씩, nearest rank. C의 p50이 B보다 다섯 세트 모두 높습니다(중앙값 +0.5 ms). 판정 규칙으로는 잡음 안이고, 기기 경로에서 코드 원인을 찾지 못한 관찰입니다. hop 측정(ba52e3d87에 시각 기록만 더한 로컬 빌드, 두 번, 각 세트 3개 CD DC CD, 모두 AC). C는 이 PR의 기기 배치, D는 remote-core 배치입니다. 첫 번째(01:27-01:49, MacBook load 5.2-12.1, mini 2.4-4.3), p50/p95 ms, 150키씩: | 구간 | C | D | |---|---|---| | MacBook 안(입력, 전송, 출력) | 0.20/0.31, 0.03/0.05, 0.04/0.07 | 0.19/0.38, 0.02/0.05, 0.02/0.05 | | MacBook에서 mini로 (±2.7-3.1) | 2.93/4.85 | 3.10/7.52 | | mini 안(PTY 쓰기, 되보내기) | 0.06/0.08, 0.06/0.09 | 0.07/0.12, 0.11/0.17 | | PTY 쓰기에서 Herdr 프레임까지 | 10.17/12.34 | 9.18/11.85 | | mini에서 MacBook으로 (±2.7-3.1) | 2.93/3.49 | 3.09/4.77 | 1 ms 넘게 잠금을 쥔 곳은 두 arm 모두 없었고(mini core의 ingest 최대 0.84 ms), node 세션 이벤트는 두 arm 모두 초당 약 1개입니다. 느린 키 옆에 relay된 화면 프레임(0/7 대 1/143)이나 link 데이터(0/7 대 3/143)는 없었습니다. 두 번째(02:06-02:29, MacBook load 6.9-10.8, mini 1.9-2.9): SSH 소켓, forward의 로컬 소켓, relay 양 끝의 Nagle을 껐습니다. 키가 russh에 닿기까지는 바로였고(node 전송에서 forward 읽기 p95 0.13 ms, forward 읽기에서 채널 쓰기 최대 0.03 ms), 멈춤은 그 뒤에 남았습니다. 세트 하나(q3-D) 동안 두 기계의 시계 차가 150 ms 움직여, 멈춤은 시계 차가 필요 없는 링크 왕복(각 기계 자기 시계의 구간 차)으로 셌습니다: | | C 멈춤 | D 멈춤 | C 20 ms 넘는 키 | D 20 ms 넘는 키 | |---|---|---|---|---| | 첫 번째(Nagle 켜짐) | 0/150 | 3/150 | 0/150 | 7/150 | | 두 번째(Nagle 꺼짐) | 2/150 | 10/150 | 7/150 | 15/150 | 멈춤은 두 arm, 두 방향 모두 79-92 ms로 크기가 같습니다. mini의 PTY 쓰기에서 Herdr 프레임까지가 15 ms를 넘은 키는 첫 번째 C 0, D 2, 두 번째 C 1, D 3입니다. hook(50번, 앞 5번 제외, p50/p95 ms, 600번 중 실패 0). 모든 hook 행은 battery에서 쟀습니다(22:16-23:03). 그래서 행끼리 같은 조건입니다: | 배치 | pane | SessionStart | 프롬프트 | 질문 가드 | 그 기기 load | |---|---|---|---|---|---| | main f0d6fba, 기기 배치 | MacBook(core) | 51/85 | 63/102 | 45/58 | 11.3 | | main f0d6fba, 기기 배치 | mini(기기) | 20/21 | 13/17 | 8/11 | 2.3 | | 이 PR, 기기 배치 | MacBook(core) | 36/77 | 32/35 | 27/33 | 7.8 | | 이 PR, 기기 배치 | mini(기기) | 21/22 | 13/16 | 8/13 | 2.5 | | 이 PR, 옮긴 뒤 | MacBook(node) | 167/195 | 145/176 | 78/163 | 11.1 | | 이 PR, 옮긴 뒤 | mini(core) | 37/42 | 32/35 | 26/30 | 3.0 | | 이 PR, 되돌린 뒤 | MacBook(core) | 36/46 | 33/36 | 27/31 | 15.1 | | 이 PR, 되돌린 뒤 | mini(node) | 173/426 | 135/179 | 83/171 | 2.2 | | b520d6e (참고) | MacBook(core) | 37/69 | 30/39 | 11/14(이 빌드는 가드 질의 없음) | 6.6 | b520d6e 행의 hide-agent-hooks는 2c23e057입니다(전에 쓴 2a38c874와 빌드 명령이 다름). </details> <details><summary>추가 증거</summary> 결함을 심어 실패를 본 증명(고친 코드를 빼면 실패하고, 넣으면 통과): - 그만 기다리기, 앞으로: 상대가 옛 빌드인 채 다시 닿으면 이 Mac 빌드를 설치하고 core를 멈춰 core가 하나로 끝남(J1). 연결 때 abandon 단계가 없거나 설치를 빼면 "the peer's core stopped, leaving one core"에서 실패. - 그만 기다리기, pending core: 상대의 pending core가 멈추고 정리됨(J2). 기다림 밖의 포기는 `move_not_waiting`, 두 번째 요청은 busy(control 단위 테스트). 끝난 제안의 포기는 같은 이동의 다음 기다림을 끝내지 않음(intent만 맞추는 코드를 심으면 실패). - 여기로 가져오기: 이 Mac이 바로 core가 되고, 상대는 `stopped_for`로 시작이 막혔다가(시작 시도는 core 없이 0으로 끝남) 닿으면 retire되고 기록이 지워짐(J3). supervisor의 hold를 빼면 gate의 거절(exit 2)에서, 두 hold를 모두 빼면 상대에서 core가 켜져 실패. - 이동이 잡은 창의 전송: `web/src/ws.test.ts`가 `core_move`는 보내고 다른 이벤트는 버리는지, 그리지 않은 창을 이동이나 node가 잡을 때만 붙드는지 확인. - 확정 전 알 수 없는 답을 '확정 안 됨'으로 읽기, 영구 거절을 끝없이 재시도하기, 요청이 lease를 다시 늘리기, 잘못된 SSH 별칭이 daemon 시작을 막기: 각 수정에 심은 결함이 해당 테스트를 실패시킴. - 상대가 이름 짓는 경로(F1): 적대적인 상대 두 journey(복사 밖 파일 요청, manifest의 복사 밖 파일)가 옛 복사 코드를 심으면 실패. 이름이 ASCII 밖인 폴더 아래의 복사가 SQLite 확인을 통과(옛 URI를 심으면 실패). - 멈추지 않는 core: 20 s 뒤 exit 3, login item이 다시 켜고 저널이 되돌림(`a_core_that_will_not_stop_is_restarted_unchanged`). 상한을 풀면 exit를 기다리다 시간 초과. - 터미널 세션 수명: close가 worker 시작보다 먼저 돌아도 기다리고 그 뒤로 아무것도 열리지 않음(hold를 spawn 뒤로 심으면 실패). - Memory 경로(B14): node와 core의 agent가 core 하나의 Memory를 읽음. node의 답 28 ms, core의 답 19 ms(debug 빌드, fixture, merge 전). Project를 core의 node로 정하는 결함을 심으면 실패. merge 뒤 node의 SessionStart는 receipt 없는 index(`m1 ...`)를 받고, node의 `hide memory show m1`이 node의 Project 카드를 보입니다. - B16 연결 끊기: 링크 thread가 플래그를 무시하는 결함을 심으면 `node_link(..., "disconnected")`에서 실패. - 심링크 뒤의 대상 상태 폴더: core를 멈추기 전의 확인이 경로 이름과 함께 실패. native 캡처(후보 dev 창, 비공개 user data, 모든 상태 경로가 fixture 안, 격리 Herdr와 sshd):                     측정과 메모: - 배치에서 대상 core의 Started까지 p50 308 ms, 최대 508 ms. 남은 pending lease 최소 89 s. - 그만 기다리기 native 실행: 원래 core 로그가 `move.abandoned`, `abandon.failed`(상대의 handover 잠금을 잡아 둔 동안 busy), 잠금을 놓은 뒤 4 s 안에 `abandon.ended`(answer `ended`) 순서이고 기록 파일이 지워짐. - 로컬 flake(이 변경 아님): 이동 journey 52개를 한꺼번에 띄운 부하에서 `core_move::a_failing_check_changes_nothing`이 test renderer의 2 s 첫 snapshot 읽기에서 EAGAIN으로 한 번 실패(main의 support 코드). 혼자서는 통과. - remote mailbox lane의 journey(remote_delivery, held_letter_notice, remote_core, core_move)는 thread 수를 낮춰 돌립니다. 전체 병렬에 실패 fixture가 쌓이면 디스크가 차서 `target/debug/hide`가 잘린 적이 있습니다. - 같은 lane에서 `a_resumed_move_whose_alias_cannot_be_read_waits_for_its_peer`가 부하 아래 한 번 실패했습니다. 제품의 30 s 링크 대기 뒤에야 쓰이는 기록을 테스트도 30 s만 기다린 경쟁이었고, 이제 링크 대기에 준비 상한을 더해 기다립니다. - 격리 core마다 delivery `ledger.load_failed`(validation)가 남았고 b520d6e 기준에서도 같습니다(환경, 이동과 무관). </details> ## Breaking change - `contracts/hide-cli.json`의 Letter에 `intake_from`이 더해져 CLI 계약 digest가 바뀝니다. 더하기만 했지만, 옛 digest에 고정한 도구는 갱신할 때까지 거절합니다. <details><summary>Verification record</summary> - PRD: core-host-node-move(로컬 계약), 위험 high - base: origin/main 9596ea1(merge한 main), head: 8b89e76 (리뷰 4라운드 수정; main merge 99cc1b7, 647a626, 2a247c7, 그 앞 a97f18e #986 수정; seat 빌드 3b96704, hop 측정 빌드 ba52e3d + 시각 기록과 그 위의 Nagle 끔, 로컬 전용이며 지움) - CI: 8b89e76 22개 check 통과(verify run 38200872088, 계획된 skip 하나, TRY나 FLAKY 없음), premerge-check는 main 2766ca98f에 대해 통과. 2a247c7 22개 check 통과(647a626 run 38197395136은 fmt와 web 테스트로 실패, 고침). merge 전 a97f18e 모든 lane green(verify run 38173557286), os-contract(macOS) job 114571114198의 실제 launchd 테스트 2/2 - 로컬 실행: fad7437eb에서 `verify-cargo.sh nextest --workspace` 4274 통과(89 skip), lint, hakari; 2a247c79f에서 `verify-web.sh`, fmt check, design contract, Linux와 Windows 플랫폼의 web 단위 테스트; core_move 40/40과 remote_core 24/24(647a626, `--test-threads 3`) - 리뷰: 구조, 코드, 보안, 충실도 리뷰(06211c9)와 코드 리뷰 2, 3라운드의 Fix now는 이 브랜치에서 반영, 남은 것은 #963 </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: core-host-node 4단계 (core-host-node-remote-core). 선행 PR #836 (3단계, node가 가진 터미널 길).
Closes #912
Summary
core 위치 기록(
<state>/core-placement.json)이 있는 기기의 hided는 자기 core를 켜지 않고 node 역할로 돌며, 그 기록이 가리키는 기기의 core에 SSH 연결 하나로 붙습니다.화면은 지금처럼 자기 기기의 hided
/ws에만 붙고, node가 화면의 core 트래픽을 그 연결로 중계하며 자기 pane의 키, 출력, 파일, 페이지는 자기 기기 안에서 처리합니다.core 쪽은
hided attach가 그 기기에서 이미 도는 core에 연결을 이어 주기만 하고, core를 켜지 않습니다.core에 닿지 못하면 창은 지금의 reconnecting 표시를 보이고 입력을 받지 않으며, SSH가 다시 닿으면 10초 안에 그대로 이어집니다.
이 기록은 5단계의 옮기기와 검증 fixture만 쓰므로, 합쳐져도 운영자 경로에서 보이는 것은 바뀌지 않습니다.
main에도 닿는 수정 하나: pane bootstrap listener가 끝날 때 자기
/tmp비공개 폴더까지 지워, 멈춘 hided가 폴더를 남기지 않습니다(SIGKILL로 죽은 경우는 여전히 남음).CI gate 하나도 바꿉니다: cargo-nextest pin을 0.9.143에서 0.9.146으로 올렸습니다. 0.9.145 전의 nextest는 macOS에서 함께 띄운 테스트가 옆 테스트의 출력 pipe를 물려받게 해, 아무것도 남기지 않은 테스트를 LEAK으로 표시했습니다(nextest-rs/nextest#3553).
.config/nextest.toml은 그보다 오래된 로컬 nextest에 경고만 합니다.측정 도구도 하나 고칩니다:
scripts/web-shell-measure/key-echo.mjs는 키를 보낸 시각을 측정 프로세스(Node)의 시계로, 화면에 그려진 시각을 page의 시계로 읽어, 두 시계 사이의 실행마다 다른 차이(+75, -21, -22 ms를 봄)가 그대로 키-에코 값에 들어갔습니다. 이제 page에 심은 capture 단계 keydown listener로 두 시각을 모두 page 시계로 읽고, 음수 sample은 세지 않고 실행을 멈추며, Node 시계 값과 두 시계 차이는 교차 확인으로 함께 남깁니다(summarize.py가 trial마다 보고).Review
codexdaemon)는 M의 Herdr API를 얻지 못합니다. NodeId가 C 자신의 node이거나 C가 dial하는 SSH device인 inbound 링크는 거절하고, 살아 있는 node의 NodeId로 온 두 번째 링크는 앞 링크에 3초 Hello를 먼저 묻습니다(아래 재접속 줄). attach socket은 비공개 0700 폴더의 hide-platform ipc이고 같은 계정의 peer만 받습니다. C 계정의 프로세스는 이미 core의 화면 token을 읽을 수 있어 core의 신뢰 경계 안에 있습니다.hide agent spawn --machine <M>으로 M에 agent를 띄울 수 있습니다. 의도로 둘지, 운영자 허락 뒤로 막을지.browser_relay_limit으로 거절합니다. C나 device의 호출자는 core가 링크 stream(링크당 4개, 넘으면browser_relay_limit과link_stream.cap_reached진단)으로 같은 relay에 중계하며, capability URL은 받지 않습니다(browser_control_elsewhere). 링크가 끝나면 M이 ticket을 버리고 relay를 4011browser_relay_gateway_lost로 끝내며 gateway에 새POST /revoke를 보냅니다(세 번까지 묻고 실패하면revoke.failed진단, 데스크톱의 기존 lease가 마지막 안전망). 창 선택 순서(호출자 기기의 창, core 창, 하나뿐인 node 창, 같은 종류가 여럿이면browser_control_ambiguous)가 맞는지 봐 주세요. 이 순서 때문에 자기 창을 알리지 않은 M 호출자는 core 창이 있으면 그쪽으로 가고, 그때 CDP는 링크를 건넙니다.hide browser open과connect답은 바뀌지 않습니다. node 창은 node 링크로 붙은 기기만 알리므로 SSH device 구성에서는 node 창이 없고, 창 선택이 core 창으로 가서 main과 같은 이 Mac loopback URL을 답합니다.browser_control_elsewhere는 core에 창이 없고 node 창이 하나뿐일 때, 즉 core를 다른 기기에 둔 새 구성에서만 나옵니다. 그때도hide browser open은 열기를 성공으로 답하고browser_control: {state: "unavailable", reason, next_action}을 붙입니다(hided/src/cli.rsbrowser_open, e2e가 reason과 next_action을 확인).LinkOpen{end},link_data/link_closed)을 같은 28 안에 넣었습니다. main의 27 빌드가 설치한 device helper는 hello에서 거절되고(only_the_audited_previous_helper_protocol_is_admitted가 27을 거절함을 확인), 이 빌드가 가진 helper가 digest 비교로 다시 설치됩니다.wake-<pane>으로 깨어남, device PR 행에 issue 연결 없음.originURL이 C의gh로그인으로 읽을 저장소를 정합니다. 처음 본 저장소 고정이나 호스트 제한은 넣지 않았습니다.label-generators/*.lock은 지우지 않음), SSH device workspace는 로컬 listener를 잡지 않으며, SSH device node는 무시하는Mirror줄을 받습니다. 기존 테스트 하나(pane_auth::tests::long_state_directory_keeps_a_short_private_bootstrap_socket)는 listener가 자기 비공개 폴더까지 지우게 바뀐 동작(조기 리뷰 L4)에 맞춰, 폴더를 직접 지우던 줄을 폴더가 사라졌는지 확인하는 줄로 고쳤습니다.InvalidRequest를 더는 '서버 없음'으로 읽지 않습니다. 이에 맞춰labels/generator.rs의 기존 assertion 네 곳을 고쳤습니다. 업그레이드 중 옛 빌드와 새 빌드가 잠깐 서로 다른 lock 파일을 잡을 수 있고, 옛label-generators/*.lock파일은 남습니다.hided/tests/it/support/remote_delivery/mod.rs는 설치 직후 device의 CLI를 한 번 실행합니다(macOS가 새 실행 파일의 첫 실행을 검사하는 시간이 hook 예산 1.25초 안에 들어가 spawn journey가 첫 시도에 떨어지던 문제, docs/TESTING.md 규칙 8)..config/nextest.toml에remote_core::용 240초 hang guard를 remote mailbox와 같게 추가했습니다(제품 경계 30-60초를 기다리는 journey가 있어서).hided/src/mobile/pane.rs를 거쳐 Herdr에 바로 가고 core의 attach set이나Event::Key를 지나지 않으므로 크기를 정하지 않습니다. 오늘의 동작 그대로입니다..config/nextest.toml의nextest-version을required가 아니라recommended로 둔 것은, 합쳐진 뒤 이 Mac의 Homebrew 0.9.143으로 도는 로컬 실행을 모두 거절하지 않기 위해서입니다. 오래된 nextest의 거짓 LEAK은 통과한 테스트에 표시만 남깁니다.hided/tests/it/support/remote_delivery/mod.rs의 fixture 계정은 운영자의GIT_변수를 넘기지 않고GIT_CONFIG_NOSYSTEM=1을 둡니다. main의remote_delivery,held_letter_noticejourney도 같은 계정을 씁니다.remote_corejourney의git은 모두 그 계정의 git(Herdr::git_init,environment.command)으로 돌아, 운영자의 서명 설정과 agent가 fixture에 닿지 않습니다.This Mac으로, 맥북 자신을 맥북의 호스트 이름과Remote로 보입니다(native QA에서 확인, 캡처는 실행 기록에만 둠). PRD는 화면 기기의 창이 어느 기기를 This Mac이라 부를지 정하지 않았고, 이 단계에서 core 위치 기록은 fixture만 쓰므로 바꾸지 않았습니다. 5단계에서 core를 옮길 때 이 이름을 core 기준으로 둘지 화면 기기 기준으로 둘지 정해 주세요.screen_fell_behind로 닫히고 shell은 첫 재시도(1초)에 다시 붙습니다. 그 순간 reconnecting 표시가 보입니다. 1012/1013은 WebSocket 전송 종료 코드라/wsschema의 closeCode(4001-4004)는 그대로 두었습니다.host_unavailable로 거절하고, M의 localhost에서 대신 열지 않습니다(docs/BROWSER_DISPLAYS.md).hided/src/attach.rs- 붙기 역할, supersede, relay grant 수명, accept 재시도 (failure path).hided/src/node_daemon.rs,hided/src/node_daemon/screen.rs,hided/src/node_daemon/terminals.rs- 화면 relay, 끊긴 동안 hold, core pane 키 보관 64 KiB/3초 (high-frequency path, failure path). 마지막 커밋(94b9a44)은 이 파일과server.rs의 relay 부분을node_daemon/과server/relay_routes.rs로 옮긴 순수 이동입니다.hide-node/src/ssh/host.rs,hide-node/src/ssh/link_streams.rs- link control lane과 Herdr stream 닫기, 거절된 local link의 stream 정리, 링크당 close worker 하나와 close 알림 대기열 36개(넘으면link_stream.close_unsent진단, node가 5초 안에 답하지 않으면link_stream.close_unanswered) (failure path).herdr-core/src/runtime/inbound.rs,herdr-core/src/labels/generator.rs- runtime mutex 아래의 inbound 등록과 상한, label lock 역할.hided/src/relay.rs,hided/src/server.rs- core 쪽 relay tap과 화면 relay 상한 (high-frequency path, snapshot wire).hided/src/node_browser.rs,hided/src/browser_control.rs,hide-host/src/link_bridge.rs- node의 gateway 등록, ticket과 relay, 링크 종료 때 revoke, core의 창 선택, 링크 stream 끝(Herdr와 browser relay) (ownership, failure path).nodes_full), node당 화면 relay 6개, relay 요청 64개, 화면당 4 MiB 뒤 1013 resync, core pane 키 보관 64 KiB/3초.LinkOrigin { Dialed { ssh_alias }, Inbound }하나로 두고 runtime의 inbound 분기를 그 정책 메서드로 바꿨습니다(저장 형식ssh_alias/inbound: true는 그대로, 둘 다 있거나 둘 다 없는 항목은device_registration.unreadable진단과 함께 버림). dial 전용 메서드는DialedTransport로 나눠 inbound에 빈 identity와 helper_path가 없습니다. 링크 종료는RemoteHost의 watch로 알리고 1초 폴링 네 곳을 지웠습니다. 재접속 분기와 health의core_link_reason은LinkFailureenum이 정하고, frame 종류는 serde로 읽어 키 순서에 기대지 않습니다. 화면 이벤트는 한 번만 parse합니다. node의 Boundary roots는 요청마다가 아니라 core가 root를 열 때 바뀝니다. backoff는hided/src/backoff.rs하나를 씁니다. 동작이 바뀐 넷(close worker, 재접속 분기, attach 결과, roots)은 바꾸기 전 코드에서 실패하는 테스트를 두었습니다. 그 밖에 바뀐 동작 둘: relay, 중계된 화면, relay grant가 링크 종료 뒤 1초 안이 아니라 바로 끝납니다. inbound 기기에 연결 테스트를 누르면 예전의 실패한 테스트 행 대신device.test_inbound오류(그 기기 쪽에서 테스트하라는 안내)가 나오고 테스트 행은 생기지 않습니다(herdr-core단위 테스트가 확인). frame과 화면 이벤트의 종류를 serde로 읽으므로 frame마다 앞 32 byte가 아니라 전체를 한 번 훑습니다. 측정(B5, B21)은 기준 안이었습니다.no_core, 기록은 있으나 core가 답하지 않음core_not_answering, 기록을 믿을 수 없음record_untrusted. 화면에는 차이가 없습니다.hide connect는other_build만 따로 답하고 나머지는 모두 ok로 창을 열며, 창은 같은 reconnecting 표시를 보입니다. node는 셋 모두 같은 backoff(2초에서 60초)로 다시 붙습니다. core 프로세스가 죽어 기록이 남은 경우는 이제no_core가 아니라core_not_answering이어서, 이를 확인하는 e2e(a_screen_whose_core_is_not_running_attaches_and_waits_for_it)의 기대값을 바꿨습니다. 같은 e2e가 이제 core를 다시 켜고(죽은 core의 attach socket은 그대로 둠) 화면에서 아무것도 하지 않아도 node 링크가 live가 되는지 확인합니다. node가core_not_answering뒤에 다시 붙지 않도록 결함을 심으면 이 테스트가 실패합니다. 오래된 기록(Stale)은 CLI 코드invalid_bootstrap_socket_record를 그대로 씁니다.Runtime에 기기별로 따로 붙은 HashMap 여섯 개(ports, disk, github 등)를DeviceFacts하나로 모으고 정리 경로를 하나로 합치는 일은 이 PR에서 하지 않았고, 후속 이슈 #900으로 남깁니다.other_build,nodes_full,dialed_device같은 core 거절은 60초까지 늘어난 backoff를 그대로 지킵니다. link-local 주소(IPv4 169.254/16, IPv6 fe80::/10)는 macOS의 awdl0, llw0이 스스로 바꾸므로 주소 변화로 세지 않습니다.ssh: ...이유로 끝나고 port probe를 하지 않습니다. fixture의 꺼진 sshd처럼 TCP를 받고 바로 끊는 경우는 key를 보이기 전이라 '닿지 못함'입니다.core-resolve, 한 번에 하나)에서 돌고 probe 전체가 1초에 묶여, 네트워크가 끊긴 동안 node를 끝내도 resolver 시간 제한만큼 기다리지 않습니다.Interrupted는 링크를 끝내지 않고 다시 읽습니다..으로 시작해도(acme/.github) 받고.,..만 거절합니다.https://remote의 포트는 GHES host에 남기고, ssh/git remote의 포트는 버립니다.establish와accept_inbound_node전에 accepted를 씁니다. 흔한 거절(own_node,dialed_device,already_linked,nodes_full,other_build,grants_full)은 그 전에 답합니다. 그 사이 경쟁 구간의 거절이나 실패한establish는 node에 stream 종료로만 닿고, 이유는 core의 로그에 남습니다.spawn_blocking하나를 씁니다(BlockingWriter도 같음). B5-B7과 B21은 기준 안이었고, 오래 사는 writer 하나로 바꾸는 일은 후속으로 둡니다.node_silent로 끝내고, 어떤 끝이든 exit 0입니다.writer_ended로 끝나며, relay가 drop되면 writer도 끝납니다. relay가 끝나면 tap을 먼저 빼고, close frame은 100 ms까지만 기다립니다.remote-host-key)을 가집니다.is_repository는valid_repository를 두 부분으로 쓰므로,-로 시작하는 owner나 이름을 이제 거절합니다.terminals.redraw_dropped)에만 남깁니다(화면의 다음 view가 다시 묻습니다). 키와 붙여넣기만 알립니다.hide connect,hide status --json,hide open은 daemon을 찾을 때 읽은/health에서 역할과 node를 읽어 주소를 만듭니다. 두 번째 health 요청이 없으므로 방금 답한 daemon이 부하에서 그 요청을 놓쳐 실패하는 일이 없습니다. node가 이 빌드가 받지 않는 기기 id를 대면 주소를 내주지 않고connect는no_response와 이유로 답하며(데스크톱은 이미 이 이유를 실패로 보임), 전처럼 node 화면을 core 화면 주소(&node=없음)로 열지 않습니다.LinkWrite는 control lane에서 돕니다. 읽지 않는 peer로 가는 쓰기는 그 worker를WRITE_TIMEOUT(5초)까지 잡은 뒤 stream을 끝내므로, 그런 stream 넷이 한 번의 5초 동안 lane을 잡을 수 있습니다. 상한이 있고 예전 socket write timeout과 같으며, 막히지 않는 대기열은 후속입니다.is_control문서를 그렇게 고쳤습니다.Evidence
remote_delivery,held_letter_notice,remote_core,terminal_children, 26개)를 cargo-nextest 0.9.146으로 이 Mac에서 통과, LEAK 0, FLAKY 0, 재시도 0. 같은 head에서 sasu verify(verify-cargo.sh test,lint) 통과, CI의 모든 check 통과(Linux remote mailbox 포함). f56fb5eac는 b875f51c4에 H5의 health 재사용(hided/src/cli.rs만)을 더한 head입니다.a_writer_that_dies_ends_the_relay_without_a_second_poll), node가 받지 않는 Close가 relay를 붙잡지 않음(a_close_the_node_does_not_take_never_holds_the_relay), 보내지 못한 키는 화면마다 원인과 함께 한 번 알림(a_burst_of_unsent_keys_is_one_notice_per_screen_with_its_cause), 버린 redraw는 키로 알리지 않음(a_dropped_redraw_is_never_told_as_an_unsent_key), transport 실패는 움직임에 깨고 고쳐야 할 실패는 깨지 않음(a_move_wakes_a_transport_failure_but_not_what_must_be_fixed,a_forward_that_must_be_fixed_does_not_wake_on_a_move), 답하는 port는 한 장애에 한 번만 probe(the_watch_probes_an_answering_port_once_per_outage,a_port_that_comes_back_between_two_unreachable_waits_wakes_the_node), 조용한 첫 주소가 다음 주소의 몫을 남김(a_silent_first_address_leaves_the_next_its_share_of_the_probe), 두 번 잊은 pane도 한 번 잊힘(a_pane_forgotten_twice_before_a_send_is_still_forgotten_once), 저장소 이름 검사(an_owner_and_name_is_what_the_repository_validator_takes_without_a_host), daemon 주소는 이미 답한 health에서 나옴(a_daemon_s_address_comes_from_the_health_it_answered, port에 아무도 없어도 주소가 나오므로 두 번째 요청을 하던 방식에서는 실패). G8(stream close를 lock 밖에서)은 Windows에서만 차이가 나 테스트를 두지 않았습니다. c337a6263에서 lane의 B9(a_node_that_loses_its_core_holds_its_screens_and_returns_as_it_was)가 두 시도 모두 실패했습니다. G3가 phase가 바뀔 때마다 probe 기록을 지워 앞선 기다림의 조용한 probe를 잃은 탓이었고, 63c9a714b에서 기록을 한 장애 동안 유지한 뒤 B9 단독 5/5, lane 26/26으로 통과했습니다. 측정 harness의 요약 테스트(scripts/tests/test_measure_echo_summary.py)도 시계 값을 빼면 실패합니다.a_key_the_relay_took_and_did_not_send_is_told_to_its_screen), core 거절 중에는 잠/주소 변화가 기다림을 줄이지 않음(a_sleep_or_network_move_cuts_short_only_a_wait_a_move_can_change), link-local 주소 변화는 무시(link_local_addresses_coming_and_going_are_no_network_move), SSH에 닿기 전의 dial만 '닿지 못함'(only_a_dial_that_never_reached_ssh_is_unreachable), 멈춘 resolver가 probe를 기한까지만 잡음(a_resolver_that_hangs_holds_the_probe_only_until_its_deadline, 옛 방식은 30초), node가 받지 않는 쓰기가 core relay의 키 읽기를 막지 않음(a_send_the_node_does_not_take_never_stops_the_relay_reading_its_keys), 저장소 이름과 포트(gh.rs단위 사례). tap 결정 순서(F6)와Interrupted재시도(F9)는 caller가 볼 수 있는 차이가 없어 테스트를 두지 않았습니다. dial 분류를 처음 TCP 연결 단계로만 두었을 때 lane의a_node_that_loses_its_core_holds_its_screens_and_returns_as_it_was가 실패했고(fixture의 꺼진 sshd는 TCP를 받고 바로 끊음), host key를 보이기 전까지를 '닿지 못함'으로 넓혀 통과했습니다.link_streams테스트 6개 실패). 이제 stream마다 writer thread가 쓰고, 링크의 control lane은 chunk마다 최대 5초 기다린 뒤 stream을 끝내며, 그 shutdown이 막힌 write를 풉니다. 새 테스트(link_bridge::tests::a_write_to_an_end_that_stops_reading_ends_the_stream_at_its_deadline)는 옛 방식을 심으면 이 Mac에서도 실패합니다(호출자가 10초 묶임).hide_platform::ipc계약에 'shutdown이 막힌 write를 푼다'를 더하고 세 OS에서 도는 contract 테스트로 고정했습니다.remote_core::a_node_screen_reads_its_own_checkouts_files_without_the_core였고, 이 브랜치가 더하지 않은held_letter_notice도 표시된 적이 있습니다. 모든 descriptor를 보는 감시로 보니, 0.9.143에서는 다른 테스트 프로세스와 그 자식(herdr, hided, git, sh)이 실행 중인 테스트의 stdout pipe를 fd 28로 쥔 경우가 9번 있었고, 그 실행에서 LEAK이 난 테스트의 pipe를 다른 테스트가 13.9초 뒤까지 쥐었습니다. 0.9.146에서 같은 감시를 두 번 돌리니 테스트가 도는 동안 남이 그 pipe를 쥔 경우는 0번이었습니다. 테스트가 끝난 뒤 같은 pipe 주소를 쥔 프로세스는 두 버전 모두에서 보였는데, 0.9.146에서는 LEAK이 없어 다시 쓰인 주소로 읽었습니다. 판정은 실행 중 횟수와 lane 실행에 기댑니다. 0.9.146으로 lane 전체를 bcd5fa820에서 3회, 6037a4b, 3481d53, 6e3c6887a에서 각 1회 돌려 모두 LEAK 0. 같은 head에서 0.9.143으로 한 번 돌린 대조 실행도 LEAK 0이었습니다(간헐적).scripts/ci-flaky-report.py를 0.9.146이 쓴 JUnit에 돌렸습니다(scratch crate,retries = 1, 1초 slow-timeout,gh는 stub): retry로 통과한 테스트와 slow-timeout으로 끝난 뒤 통과한 테스트(test timeout)를 각각 이름으로 접수하고, 두 번 실패한 테스트는Failed testannotation만 쓰며, 깨끗한 실행은 아무것도 접수하지 않습니다. 0.9.143의 JUnit과 요소, 속성 구조가 같았습니다(다른 것은 메시지 속 thread id뿐).remote_core::a_node_checkouts_pull_request_is_read_with_the_cores_login_by_repository_name의 첫 시도 실패(Couldn't find key in agent?)는 fixture의git commit이 운영자의 전역 git 설정(서명)을 읽은 탓이었고, 계정의 git으로 바꾼 뒤 재발하지 않았습니다.hide-platform/src/host.rs와 그 테스트 둘로, 양쪽이 따로 더한 항목을 모두 남김)에서scripts/check-hide-full.sh, cli, remote mailbox lane(remote_delivery,held_letter_notice,remote_core,terminal_children, ignored 포함 26개), os-contract, web build, web e2e 250개, desktop e2eremote-workspace.spec.ts(@needs-focus 제외)와remote-browser-agent.spec.ts(사설 sshd 뒤) 모두 통과.hide-node,hide-node-link,hide-host,hide-kitnextest 511개 통과.remote_core::a_node_window_s_page_is_driven_from_its_machine_off_the_link_and_from_the_core_through_it가 node pane과 core pane에서 실제hide를 실행합니다. node pane의 open/snapshot/click 동안 core가 연 browser relay stream 0개, node relay가 실은 byte = gateway가 받은 byte, core relay 기록 0개. core pane은 같은 창을 링크로 snapshot/click. 창의 page action은 다른 페이지가 차지한 영역을 되돌리고, 알리지 않은 pid는 409. 링크가 끝나기 전 capability가 붙고, 끝난 뒤 revoke로 거절되며, node pane은hide_unavailable. revoke를 빼는 결함을 심으면 이 테스트가 실패합니다.no_core) 죽이면(core_not_answering) 둘 다 같은 reconnecting 줄이 보이며, core를 다시 켜면 node의 다음 재시도에 다시 붙습니다. 맥북 pane에echo node-한글-ok를 보내 에코가 그려지고, 그 pane의 agent를 재우면 잠든 pane(Wake agent)이 그려집니다. 화면에 넣은 입력은 node/ws의 화면 이벤트와 창의 accessibility press 하나뿐이었습니다(한글 IME 조합 자체는 native로 보지 못함)./tmp/hcr아래의 격리된 HOME, 상태 폴더, Herdr, 절대 경로, 연결마다 앞선 device guard를 지켰습니다. 실제 계정의 fingerprint를 전후로 비교했고(Observer도 따로 비교), 바뀐 것은 운영자 앱 업데이트뿐이었습니다: helper가 05:40에 4ea27f28에서 13707c1f로 바뀌었고 설치된 0.1.0-main.3ee6c5bd hided와 byte가 같으며,codexdaemon이 스스로 업데이트했습니다. 마지막 mini 실행 뒤/tmp/hcr전체(87 MB, 이 fixture가 만든 것만)를 지우고 최종 fingerprint를 찍었습니다. 첫 fingerprint와 비교해 바뀐 것은 아래의 운영자 앱 업데이트와 운영자 Herdr 로그뿐이고, 22842 port와/tmp/hcr아래 프로세스는 남지 않았습니다. 한 시계 측정 두 세트의 전후 차이는 운영자 Herdr server가 스스로 쓴 로그와 이 측정의 ssh 세션뿐이었습니다. 운영자의 node, helper, Herdr server는 건드리지 않았고 남은 fixture 프로세스는 없습니다.remote_core::a_node_that_loses_its_core_holds_its_screens_and_returns_as_it_was가 사설 sshd를 멈췄다 다시 켜고, 붙잡아 둔 화면이 SSH가 답한 뒤 10초 안에 다시 붙는지 확인합니다. remote mailbox job이 Linux CI에서 돌립니다.remote-workspace.spec.ts의 stalled-handshake 블록(HIDE_E2E_SSH_PID가 있을 때만 돎)은 현재 main 3ee6c5bd5에서도 같은 방식으로 실패합니다:remote-workspace.spec.ts:709Expected: "pending"/Received: "completed". 이 브랜치(595d304)도 같은 줄에서 같은 값으로 실패합니다. 최종 lane은 이 블록을 빼고 돌렸습니다.windows checkCI lane이 확인).browser_control_busy로 오는 것, 링크가 끝날 때 진행 중이던 relay가 4011로 끝나는 것은 unit test로만 확인했습니다. 3 MiB가 넘는 CDP frame이 링크를 건너는 경우는 시험하지 않았습니다.Verification record
verify-cargo.sh test210 s,lint6 s); earlier PASS on 63c9a71, c337a62, 5525f4b, f07116c, 6e3c688 and 595d304.Interruptedretried), F10 (shared testwait), F11 (doc comment), F12 (dot-leading repository names, HTTPS port). F2, F7 and F13 are Review lines above.hidedlib test would break the Windows build) fixed in 1f523d3; Fidelity F1-F3 (this body's diagnostic name, placeholders, unlisted behavior changes) fixed here; Fidelity F3's untesteddevice.test_inboundnow has a test (1f523d3). Follow-ups left: a close notice dropped past the 36-notice queue keeps that stream until the link ends; a stored registration with both or neither of alias and inbound is dropped on load; a screen frame with a duplicatedkindkey skips the node's routing and goes to the core as an ordinary event; the per-frame serde scan cost; a node of an older build reads a newer core's attach outcome as a parse error.nextest-version), fixture git drops the operator'sGIT_variables and system config, every remote_coregit initruns as its account, and the restarted core's attach-record wait (earlier review V1) now waits for the new core's own record. Left: the 0.9.145 floor is stated in the install script, the nextest config and TESTING.md, and thenextest-versionkey sits under the file's header comment. Security follow-ups: the nextest download has no sha256 check (unchanged by this PR), and the fixture account forwards the operator environment minus a denylist.remote_deliveryjourneys never callremove_run_dir, so each lane run keeps about 900 MB of run folders.