Repository navigation
Carry an inode to the shell as text so a trash names the item exactly - #546
Merged
Merged
Conversation
The browser reads a JSON number as a double, which rounds a 64-bit file id past 2^53 (an NTFS id once its sequence number reaches 32). The trash then sent the rounded id back and the host refused the folder as changed while its prompt was open. Listings now carry the inode as decimal text and the trash event reads it back as text.
yansfil
added a commit
that referenced
this pull request
Nov 5, 2026
…ast (#2080) Closes with-hide/hide-private#546 Closes with-hide/hide-private#394 ## Summary PR의 CI 표시와 미션 노드의 `ci` 줄이 같은 머리 커밋에서 취소된 실행을 실패로 읽었고(#546), 대체 실행이 아직 작업을 만들기 전이면 통과로 읽었습니다(#394). 이제 GitHub Actions는 작업(job) 줄이 아니라 워크플로 실행 단위로 판정합니다: 그 머리 커밋에서 마지막으로 끝난 실행이 결과를 정하고, 취소된 실행은 빠지며, 대체 실행이 대기 중이거나 도는 동안은 열린 채(pending), 대체 실행이 없으면 실패입니다. 열린 PR 목록, 머지 직후 재확인, 백그라운드 폴링 세 경로가 모두 같은 규칙(`herdr-core/src/github/runs.rs`)을 씁니다. PR 카드의 체크 개수, 실패한 체크 이름, 도는 체크 수도 같은 규칙으로 정한 실행의 job만 셉니다(초록 표시 옆 '1 failed' 모순 제거). 미션 `ci` 줄의 재실행 한도(D-15)는 이제 '노드를 작업으로 되돌리기'를 머리 커밋당 한 번만 막고, 그 뒤에도 마지막으로 끝난 실행을 읽습니다. 사람이나 지휘자가 다시 돌려 초록이 되면 건너뛰기 없이 pass입니다. ```text #2077 머리 a03caa1 (실제 응답) verify run A attempt 2 CANCELLED 16:41 <- 판정에서 뺌 (작업 줄의 closing `verify`는 FAILURE로 남아 있음) verify run B attempt 4 SUCCESS 18:31 <- 마지막으로 끝난 실행 = 판정 before: Failed after: Passing ``` 스크린샷 없음: web/src는 snapshot.ts의 미션 줄 타입에 선택 필드(`sent_back`) 하나만 추가했고 화면을 그리는 코드는 그대로라 보이는 변화가 없습니다. ## Review - **판단해 주세요**: 어떤 실행이 PR을 판정하나 - `pull_request*`·`push` 이벤트만. 같은 커밋의 `workflow_dispatch`(nightly, agent journey)는 GitHub 자신의 PR rollup처럼 뺐습니다. - **판단해 주세요**: 실행 조회가 실패하면 모든 열린 PR이 `Unknown`(표시 없음 + 저장소·head가 담긴 진단 로그)입니다. 대기 중인 실행이 없다는 걸 모르니 pass도 '체크 없음'도 아닙니다. 나머지 읽기는 그대로 섭니다. - **조심해서 볼 파일**: `herdr-core/src/github.rs` `judge_head_runs` - failure path. 저장소 이름을 읽은 뒤 열린 머리들을 50개 단위 GraphQL 한 번씩 더 묻습니다(읽기 스레드, 락 밖). - **조심해서 볼 파일**: `hide-node-link/src/gh.rs` - 원격 노드 허용 목록에 고정 질의 `HideHeadRuns` 추가, check-runs jq는 `github-actions` 앱의 실행을 뺍니다. - **비용 검토**: 프로젝트 읽기마다 GraphQL 1회(열린 머리 50개당), 폴링은 check-runs 태그가 바뀐 머리마다 1회 추가. 커밋당 suite 100개 상한, 넘으면 `Unknown` + `checks.runs_capped`. - **판단해 주세요**: job을 실행에 묶는 열쇠는 GitHub가 job에 주는 주소의 실행 번호(`…/actions/runs/<run>/job/<job>`)입니다. 번호를 못 읽은 job은 판정 실행에 속한다고 증명되지 않으니 세지 않습니다. - **조심해서 볼 파일**: `herdr-core/src/mission_criteria.rs` `read_ci`·`shown` - `ci` 줄의 pass/fail은 기록된 head에만 유효합니다. PR 읽기가 다른 head를 말하면 체크 상태(Unknown 포함)와 상관없이 줄은 open이고, 판정(shown/met)도 PR의 현재 head를 봅니다. 재실행 뒤 실패는 노드를 머리당 한 번만 되돌립니다(새 저장 필드 `sent_back`, 예전 기록은 복원 때 옮김). ## Evidence - **확인한 것**: 두 번째 커밋 전 새 시험 2개가 실패(카드: 5개 중 2개 실패로 셈, 기대 3개 모두 통과 / 소진된 ci 줄이 뒤의 pass를 무시). 고친 뒤 통과. D-15 요구가 바뀌어 `a_failed_ci_rerun_reads_no_more_runs_on_that_head`를 새 규칙으로 고침. - **확인한 것**: 고치기 전 새 core 시험 4개 중 3개가 실패(취소 뒤 성공 → `Failed`, 취소 뒤 대체 실행 진행/대기 → `Failed`, #394 대기 실행 → `Passing`)하고, 고친 뒤 통과. - **확인한 것**: 시험 입력은 실제 `gh api` 응답 모양에서 땄습니다: #2077·#2075·#1910의 rollup, check suite, run attempt. rollup은 실행마다 같은 이름의 작업을 모두 주고, `gh pr list`는 100개에서 자릅니다(#2053). - **확인한 것**: 실제 GraphQL `HideHeadRuns`를 #2077·#2075 머리에 보내 응답 모양 확인, 바뀐 jq는 두 머리에서 `none`(Actions 외 체크 없음). - **확인한 것**: `scripts/verify-cargo.sh test` 워크스페이스 lib 전부 통과(herdr-core 4080, hide-node-link 79, hided 584), clippy `-D warnings`(herdr-core, hide-node-link), `fmt-check`. - **확인하지 못한 것**: 실제 앱에서 미션 지도의 줄 변화는 보지 않았습니다(진행 중인 mission-25와 운영자 앱을 건드리지 않음). web e2e와 web typecheck(`snapshot.ts`에 선택 필드 하나 추가)는 로컬에서 돌리지 않았고, hide-holder 통합 시험은 이 worktree에 시험용 xterm이 설치되지 않아 로컬에서 실패(코드 무관), 그 fake `gh`는 새 질의에 엉뚱한 답을 하지만 Actions 작업이 없는 rollup이라 표시가 바뀌지 않는 경로입니다. CI가 확인합니다.
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 #537
Summary
Windows의 Explorer에서 휴지통이 "prompt가 열린 동안 바뀜"으로 거절되던 제품 버그를 고칩니다. 원인은 폴더 metadata가 아니라 inode가 browser를 거쳐 오는 길이었습니다.
item_inode)만 비교합니다. 하위 이동으로 폴더의 file id는 바뀌지 않습니다.inode: destInode)은 Node의stat().ino도 같은 double이라 같은 값으로 반올림되어 통과했고, 거절된 폴더가 남아 다음 줄에서 실패했습니다(s3.spec.ts:809).explorer.path_trash_failed: dest changed while the prompt was open이 있습니다.contracts/hided-ws.schema.json: listing entry의inode를 10진 문자열로 바꿨습니다.herdr-core의inode_text가 그 문자열의 직렬화와 해석을 한 곳에서 맡습니다.boundary::Entry, SSH 기기server.rs)은 같은Entry직렬화를 씁니다.path_trashpayload는 문자열을 읽고, 숫자는 받지 않습니다.inode타입은string입니다. 값을 그대로 돌려보낼 뿐이라 계산은 없습니다.s3.spec.ts는stat(..., { bigint: true }).ino의 문자열과 비교합니다.docs/ARCHITECTURE.md의 trash 문장에 이유를 적었습니다.Review
hided/src/server.rs- SSH 기기 listing이 손으로 쓴 JSON 대신boundary::Entry를 씁니다.herdr-core/src/runtime/events.rs-PathTrashPayload.inode의 해석이 바뀝니다.Evidence
boundary::wire_tests::an_inode_past_what_a_browser_number_holds_reaches_the_shell_exact는 수정 전left: Number(9007199254740993) right: String("9007199254740993")로 실패했고, 수정 후 통과합니다.inode_text의 2^53+1 왕복, 숫자와 잘못된 문자열 거절handshake26개 통과,herdr-core와hidedclippy(-D warnings) 통과9007199254740993은 number로는...992, 문자열로는 그대로입니다.s3반복. 이 PR의 Windows lane에서s3의 Explorer test(@platform)가 돕니다.