Repository navigation
feat: fetch every device kit by one rule from the core's own release - #2130
Merged
Merged
Conversation
The device kit contract (contracts/device-kits.json) names the four platforms, their programs, headers and the Windows runtime files, and the platforms refused before install. A core fetches the format 4 manifest from its own v<VERSION> release, refuses one that names another version, commit or build order, checks ELF, Mach-O and PE headers and folder entries, and keeps every kit within one 1024 MiB cache budget. No app carries the manifest any more.
…f a device kit The remote mailbox lane also runs on an ubuntu-24.04-arm runner, planned for the device link's crates, its device test and the device kit contract, and with every lane on main's push run and the nightly. The nextest installer takes the runner processor's release. The release asset gate now requires a kit for every platform in contracts/device-kits.json and checks each kit's own file names. A core takes a device's kit only from a manifest naming every platform, so a release with the Linux kits alone is refused with its reason until the release producers make the macOS and Windows kits. The build, install, architecture, testing and contract guides describe the one lookup rule, the release fetch, the cache budget and the refused platforms.
…ar needs The GNU tar on a Windows runner read the archive's absolute D: path as a remote host and failed the two stage tests in windows check.
A plain cargo build --release carries the crate's version, the commit and build order 0, and counted as a published release, so it asked GitHub for a release that does not exist. It now names the developer folder like any local build. The archive test now puts a link and a folder in a program's place with that program's name and size, so only the entry type check refuses them.
Contributor
Author
|
구조 점검 판정: desktop/scripts/device-helpers.mjs의 readUstar/stageDeviceKit이 hide-node/src/ssh/kit/archive.rs와 같은 키트 규칙을 한 벌 더 가진 파편화는 이 PR에서 수락하고 with-hide/hide-private#610에서 하나로 모읍니다(로컬 빌드로 N3 전에 기기를 시험할 길이 필요해서). 이 PR이 머지되면 release-kits(N3)가 들어올 때까지 릴리스 자산 검사가 실패하므로, N3를 다음 릴리스 전에 따라 넣습니다. |
…to the pin The Windows kit's runtime in contracts/device-kits.json restated the ConPTY files contracts/conpty.json pins, with nothing holding the two together, and two more copies decided what a Windows device got: a core sent its whole holder-conpty folder from its own build, and a core whose files carry no mode named a program by its own .exe rule. A pin that renamed or added a file passed the pull request and broke first in a release's kit, and a Windows device could get other files from a Windows core than from a Mac core. Now a core sends a device exactly the runtime files its kit names, refusing a folder short of one by its name, and marks a program by that device's kit. hide-node's contract test holds the Windows runtime to the pinned files and the file list beside them, and a change to the pin runs it. The app's own ConPTY check reads the pin too.
yansfil
enabled auto-merge
November 6, 2026 02:29
HyunjunJeon
pushed a commit
to HyunjunJeon/hide
that referenced
this pull request
Nov 9, 2026
…ease candidate (with-hide#2138) Related: with-hide/hide-private#501 (N3 release-kits), base with-hide#2130 (N2), companion with-hide/hide-private#625 (N4 publisher-mac-kit) ## Summary 릴리스 후보가 Windows 기기용 묶음을 만들지 않아서, Mac이나 Linux 코어가 릴리스로 Windows PC를 기기로 붙일 수 없었습니다. 이제 후보 실행의 `device bundles` 작업이 Linux 두 묶음 옆에 Windows x64 묶음을 만듭니다. Windows 묶음은 Windows 앱이 싣는 바로 그 바이트(`compile (windows)` 산출물)와 고정된 ConPTY로 만들고, Windows를 두 번 빌드하지 않습니다. 묶음 목록(`device-bundles.json`)은 공개 쪽이 만들지 않습니다. 비공개 배포 쪽이 서명된 Mac 묶음을 더해 네 묶음의 목록을 씁니다(with-hide#625). Mac 패키지는 더 이상 묶음을 릴리스 폴더에 복사하지 않습니다. 스크린샷 없음: 화면을 바꾸지 않는 릴리스 스크립트와 workflow 변경입니다. ## Review - **판단해 주세요**: receipt schema 5는 `device_helpers`를 없애고 `device_kits`(목록 항목 그대로: asset, sha256, size, files)로 바꿉니다. 배포 쪽은 이 항목을 목록에 그대로 옮깁니다. - **조심해서 볼 파일**: - `.github/workflows/package.yml` - `device bundles`가 이제 `compile (windows)`를 기다리고, `package (macos)`는 묶음을 기다리지 않음. 후보는 main과 다른 `package.yml`을 가진 source를 거부하므로(`release-candidate.yml:75`) rc는 이 PR과 #625가 모두 들어간 뒤에. - `.github/workflows/release-candidate.yml` - receipt 작업이 묶음과 그 원본 빌드(두 Linux helper, Windows compile)를 함께 받아, 묶음 안 프로그램이 기록된 빌드와 같은 바이트인지 main의 검사기로 확인. - `desktop/scripts/device-helpers.mjs` - `makeDeviceKit`, `readDeviceKit`, `writeDeviceManifest`를 #625가 공개 checkout에서 import해서 씀. 이름과 인자 순서가 계약. - `desktop/scripts/package.mjs` - 릴리스 Mac 패키지의 묶음 복사를 지움(engineering principle 1). - **질문**: #2130이 먼저 머지되면 이 PR과 #625가 들어갈 때까지 모든 릴리스가 자산 게이트에서 거부됩니다(의도된 실패). 셋을 연달아 머지해 주세요. ## Evidence - **확인한 것**: - `device-helpers.test.mjs` 20개: 후보 묶음 3개(목록 없음), Windows 묶음이 compile 산출물 바이트와 ConPTY 8개 파일을 담음, 다른 identity·바뀐 바이너리·ConPTY 없음 거부, 4개 항목으로 쓴 format 4 목록을 `readDeviceKit`·`stageDeviceKit`가 받아들임, 모자란 목록·바뀐 archive·다른 버전 이름 거부. - `release-candidate.test.mjs` 13개: schema 5 receipt가 세 묶음의 항목을 기록, 다른 버전·추가 archive·기록과 다른 Windows 빌드 거부, 한 번만 채움. - `test_release_candidate.py`, `test_release_assets.py`, `test_ci_plan.py` 121개 통과; 자산 게이트는 여전히 20개 파일과 태그의 identity를 가진 format 4 목록을 요구하고, 모자란 묶음 메시지에서 N3 언급을 뺌. - 로컬에서 실제 `device-helpers.mjs bundle`을 가짜 프로그램 바이트 + 실제 `fetch-conpty.py`로 돌려 세 archive를 만들고, Windows archive가 `.exe` 4개와 `holder-conpty/` 4개를 담는 것을 `tar -tzvf`로 확인. - `scripts/check-device-kits-single-source.py` 통과, desktop eslint 통과. - **확인하지 못한 것**: - 실제 릴리스 후보 실행: 이 PR에서 돌릴 수 없음. 이 PR의 `package` 레인 `device bundles` 작업 산출물이 c1의 CI 증거이고, 첫 실제 후보 실행이 남은 증거입니다. - receipt 작업(`release-candidate.yml`)은 dispatch로만 돌아서 CI에서 실행되지 않음; 단위 테스트로만 확인. - 실제 기기로 Mac/Linux 코어에서 Windows 기기 연결: N5(rc 뒤)의 몫. - 로컬 전체 `unittest discover`에서 부하(load 146) 때 `test_ci_verification_entrypoints`, `test_agent_live_protection`이 subprocess timeout으로 실패했고 단독 재실행에서 71개 통과. <details><summary>Verification record</summary> base `feat/device-kit-contract` 2c6f4bd, head 7881f05. `node --test scripts/tests/*.test.mjs` 55 pass; `vitest run scripts` (desktop) 31 pass; `pytest scripts/tests/test_release_candidate.py test_release_assets.py test_ci_plan.py` 121 pass. </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.
Closes with-hide/hide-private#501
Related: with-hide/hide-private#501 N2 (
kit-contract); N3 (릴리스가 네 키트를 만들어 목록에 넣는 일)이 이 PR 다음입니다.Summary
기기에 보내는 프로그램 묶음(기기 키트)의 플랫폼 목록이 코어 코드, 패키지 스크립트, 앱 안의 목록 파일에 따로 적혀 있었습니다.
그래서 Mac 앱과 Windows 앱이 각자 목록을 들고 다녔고, Windows 코어가 Mac 기기를 받는 것처럼 새 조합을 같은 방식으로 받을 수 없었습니다.
이제 플랫폼은
contracts/device-kits.json한 곳에만 적습니다.모든 코어가 같은 규칙으로 자기 버전의 릴리스에서 목록을 받아 자기 빌드와 맞는지 확인하고, 네 플랫폼을 같은 코드로 검사합니다. 앱은 목록을 싣지 않습니다.
목록에 없는 플랫폼(Windows ARM PC, Intel Mac)은 설치 전에 이유와 함께 거절하고, Linux ARM64 기기 연결을 CI(
ubuntu-24.04-arm)에서 돌립니다.Review
hide-node/src/ssh/kit/cache.rs- failure path: 잠금, staging 정리, 축출, 다른 빌드의 칸 교체. connection worker에서만 돌고 runtime mutex 밖입니다.hide-node/src/ssh/kit/manifest.rs- 컴파일된 VERSION/COMMIT/ORDER와 다른 목록은 아카이브를 받기 전에 거절합니다.hide-node/src/ssh/kit/archive.rs- 압축 해제 상한과 tar 항목 거절(링크, 폴더, 중복, 목록에 없는 이름, 크기).hide-node/src/ssh/kit/select.rs- 한 규칙: 개발자 파일, 자기 플랫폼의 자기 프로그램, 그다음 릴리스 키트. 어느 경로든 Windows 기기는 계약이 적은 ConPTY 파일만 받습니다.hide-node/src/ssh/kit/contract.rs- Windows 키트의 ConPTY 파일을contracts/conpty.json핀에 묶는 테스트. 핀이 바뀌면 PR에서 이 테스트가 돕니다(scripts/ci-plan.py).desktop/scripts/package.mjs,.github/workflows/package.yml- 앱에 목록이 실리지 않고, Windows 패키지는 키트를 기다리지 않습니다. Windows 앱의 ConPTY 파일 확인도 핀을 읽습니다.scripts/ci-plan.py-remote-mailbox-arm레인과 계약 파일의 계획.scripts/check-release-assets.mjs- 계약의 모든 플랫폼 키트(20개 자산)를 요구하고, 모자라면 N3를 이유로 거절합니다.Evidence
verify-cargo.sh lint: fmt와 워크스페이스 전체 clippy(--all-targets -D warnings) 통과.stage이름과 거절) 통과.release-kits를 말하며 실패하는 테스트 포함, Python 27개와 JS 26개 통과.remote-mailbox-arm은hide-node,hide-node-link, 기기 테스트, 계약에만 잡히고herdr-core같은 변경에는 안 잡힘(test_ci_plan.py).check-device-kits-single-source.py는 지금 통과하고, 일부러 넣은 플랫폼 이름은 잡아냄.remote mailbox arm64(ubuntu-24.04-arm이미지): 메일박스, 노드 계약, 시스템 ssh, 엔진 기기 테스트 32개 통과(device_own_engine포함). 캐시 없이 6분 18초(빌드 3분 40초).windows check(stage 테스트 포함)와package (windows)통과.cargo build --release)는 릴리스를 찾지 않고 개발자 폴더를 알려 줍니다(테스트 추가).archive.rs의is_file을 지우면 이 테스트가 실패하는 것을 확인했습니다.hide명령으로의 stage, 두 기기 동시 연결 때의 busy 실패, 릴리스 주소를 테스트에서 바꿀 수 없는 점,payload_for에서 릴리스 키트까지 가는 테스트.node_contract,system_ssh,device_own_engine(sshd가 필요한 ignored 테스트)은 로컬에서 돌리지 않았고, CI의 두 메일박스 레인이 돌렸습니다.test_web_shard_discovers_twice_and_prepares_phone_once1개가 맥미니의 bash 3.2에서 실패합니다(빈 배열 오류). 이 PR이 건드리지 않은 스크립트이고 CI는 Linux bash로 돌립니다.Verification record