Repository navigation
State the link swap contract Linux keeps and test the link name there - #533
Merged
Merged
Conversation
A Linux path walk that follows a symbolic link while rename replaces it can answer not found; reading the name itself never does. The follow test stays on macOS and Windows, and a name test runs on every system.
HyunjunJeon
pushed a commit
to HyunjunJeon/hide
that referenced
this pull request
Nov 9, 2026
…ore (with-hide#2149) Closes with-hide/hide-private#561 Closes with-hide/hide-private#495 Closes with-hide/hide-private#564 Closes with-hide/hide-private#605 ## Summary e2e 픽스처가 두 번째 에이전트를 너무 일찍 시작해서, 코어가 "다른 시작이 아직 진행 중"이라며 거절하고 픽스처는 30초를 기다리다 실패했습니다. 코어는 시작 하나가 끝나기 전에는 새 시작을 받지 않는데, 첫 에이전트의 행은 그 시작이 끝나기 전에 먼저 보입니다. 이제 테스트는 행이 아니라 코어가 그 시작에 준 답(시작 패널이 읽는 것과 같은 영수증, `task_operation`)을 기다렸다가 다음 시작을 보냅니다. 거절되면 30초를 기다리지 않고 코어의 이유로 바로 실패합니다. 화면 변경 없음: 테스트 코드와 문서만 바뀝니다. ## Review - **조심해서 볼 파일**: `web/e2e/daemon-actions.ts` `startAgentInCheckout` - 코어의 task slot 규칙(`herdr-core/src/runtime/session.rs:3994-4003`)을 그대로 읽는지, `started` 외의 답은 모두 실패로 끝나는지. - **조심해서 볼 파일**: `web/e2e/engine-fixture.ts` - 첫 시작이 끝난 뒤에야 두 번째 시작(또는 family의 spawn)이 나갑니다. 기다림은 코어 신호뿐이고 timeout·sleep·retry는 늘리지 않았습니다. - **원인이 다른 것**: with-hide#444 with-hide#445 with-hide#459 with-hide#479 with-hide#496 은 픽스처가 아니라 spec 안의 기다림에서 실패하고 로그에 거절이 없어 이 PR에서 다루지 않습니다. - **Herdr 레인에서만 난 것**: with-hide#260 with-hide#489 with-hide#502 with-hide#510 with-hide#511 with-hide#519 with-hide#533 은 `*-herdr-*` 레인에서만 났고 그 레인은 #2069로 지워졌습니다. #2069와 아래 반복 run을 적은 댓글로 닫습니다. - **열어 두는 것**: with-hide#490 with-hide#492 with-hide#523 with-hide#529 with-hide#532(`agent_pane_required`)는 이 PR이 끝내지 않습니다. 원인은 with-hide/hide-private#630에서 따로 다룹니다. ## Evidence - **확인한 것**: own engine으로 바뀐 뒤 "second fixture agent" 실패 6건 중 5건(#561 x2, with-hide#495, with-hide#564, with-hide#605; Linux·Windows)의 setup snapshot과 hided 로그를 봤습니다. 모두 두 번째 시작의 request id로 `task_operation.busy` 거절이 남아 있습니다. 나머지 1건(#561, run 42076071271)은 로그를 받지 않았고 오류 줄만 같습니다. - **확인한 것**: 실패 로그 순서는 tab.create 완료 -> busy 거절 -> 첫 시작의 `agent.started`, 통과한 실행은 tab.create 몇 ms 뒤 `agent.started` -> 두 번째 시작입니다. - **확인한 것**: `web`·`desktop` typecheck, lint(e2e 크기 검사 포함) 통과. - **확인한 것**: a79a97b, run 42202678411의 Linux 전체 e2e(6 shard)와 Windows `@platform` e2e를 3번 돌렸습니다. 닫는 11개 제목은 매번 통과했고 재시도도 없었습니다. - attempt 1: Linux 6/6, Windows 1/1 통과. 재시도 후 통과: `desk-lane` "Desk is off on a new install"(Linux 4/6), with-hide#444 close-subtree(Linux 6/6) - attempt 2: Linux 6/6, Windows 1/1 통과, 재시도 없음 - attempt 3: Linux 6/6, Windows 1/1 통과. 재시도 후 통과: `desk-lane` 같은 테스트(Linux 4/6) - **범위 밖**: #444가 attempt 1에서 재시도 후 통과한 것과 `desk-lane`이 두 번 재시도 후 통과한 것은 픽스처 원인이 아닙니다. 이 노드 범위 밖이고 따로 묶여 있습니다. - **확인하지 못한 것**: 로컬 e2e는 돌리지 않았습니다(Rust debug 빌드 디스크 부족). macOS 웹 e2e는 PR CI에 없어 반복하지 않았고, 이 묶음의 21개 이슈 중 macOS에서 난 것은 없습니다.
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.
Refs #521
Summary
Linux에서 이름이 바뀌는 symlink를 거쳐 여는 reader가 순간 "not found"를 볼 수 있다는 사실에 맞춰 link 교체 계약 문서와 test를 고칩니다. 제품 동작은 바꾸지 않습니다.
replace_link는 옆에 link를 만들고rename으로 덮어씁니다. Linux에서current/hide처럼 link를 거치는 경로 해석이 그rename과 겹치면 NotFound를 돌려줍니다. 옛 target은 지워지지 않고(test는 두 version을 한 번 만들고 지우지 않음,replace_link는 실패할 때 자기 임시 link만 지움), reader는open한 번으로 읽으므로 test나replace_link의 문제가 아닙니다.readlink와lstat로 이름을 보는 reader는 NotFound를 보지 않았습니다.hide-platform/tests/fs.rs: 교체 test를 계약별로 나눴습니다. 모든 system에서 도는a_link_that_is_replaced_is_never_missing_while_a_reader_looks_at_it(이름을readlink로 읽음, 두 version 중 하나여야 함)와, macOS와 Windows에서만 도는 기존a_link_that_is_replaced_never_leads_nowhere_while_a_reader_follows_it(거쳐 열기)입니다. 기대값은 바꾸지 않았습니다.hide-platform/src/fs/link.rs,hide-host/src/kit.rs,docs/ARCHITECTURE.md: 이름은 비지 않고, 거쳐 열기는 macOS와 Windows에서는 옛 target이나 새 target을 찾지만 Linux에서는 순간 "not found"일 수 있다고 적었습니다.Review
<root>/current(point_current)나 kit의 CLI link를 다시 가리키는 순간 그 경로로 시작하는 실행은 드물게 "없음"을 볼 수 있습니다. 이 PR은 계약을 사실에 맞추기만 하고 제품은 바꾸지 않습니다. 가능한 해결(link를readlink로 읽고 target을 직접 열기)은 운영자 결정 거리로 남깁니다. 긴 link 본문(slow symlink)은 피하는 방법이 아닙니다(아래 Evidence).hide-platform/tests/fs.rs- 이름 test가 Windows에서 junction을 읽으면 절대 경로가 오므로 마지막 이름만 비교합니다. Windows CI에서 처음 도는 단정입니다.Evidence
/tmp는 ext4)에서 main을 그대로 반복했습니다: 단독 81/77123,yes4개 부하 아래 10/25885, 4개 병렬 103/152859 실패. 모두fs.rs:1159의 NotFound였습니다.readlink: 0/102684lstat: 0/102652yes6개 부하 아래 두 교체 test를 500회 반복, 0 실패.cargo fmt --check,hide-platform과hide-hostclippy(-D warnings) 통과.