Skip to content

서명 없는 Windows·Linux 앱 패키지와 CI smoke - #346

Merged
yansfil merged 5 commits into
mainfrom
release/win-linux-packages
Oct 3, 2026
Merged

yansfil merged 5 commits into
mainfrom
release/win-linux-packages

Conversation

@yansfil

@yansfil yansfil commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Related: with-hide/hide-private#103 (batch 7, 항목 4)

Summary

pnpm --dir desktop package가 macOS hide.app만 만들던 것을, 실행한 시스템의 패키지를 만들도록 넓혔습니다.
Windows x64는 폴더를 zip으로, Linux x64는 폴더를 tar.gz로 묶고 각각 .sha256을 붙입니다. 둘 다 서명하지 않습니다(운영자 결정 2026-10-03). macOS는 지금처럼 ad-hoc 서명입니다.
새 package.yml이 windows-latest와 ubuntu-latest에서 각 패키지를 만들고, 압축을 풀어 창 없이 띄워 봅니다(smoke-package.mjs). release는 이 워크플로를 불러 세 패키지를 한 draft에 올립니다.
smoke를 준비하다 Windows에서 hide connect가 성공할 수 없던 원인 세 가지를 고쳤습니다: hided.exe가 아니라 hided를 찾았고, /health를 /usr/bin/curl로 물었고, detach한 hided가 CLI의 stdout 파이프를 상속해 호출자(데스크톱 앱)가 출력 끝을 영영 못 보게 됩니다.

ok checksum / unpack / bundled files / herdr --version / hide-host-helper-<os>-x86_64 --version
ok hide-agent-hooks doctor --json / Electron runs the bundled hcoord as Node
ok hide connect starts the bundled daemon / the daemon answers /health / serves the web shell it embeds / hide stop ends it

Review

  • 판단해 주세요: 형식은 같은 도구(@electron/packager) 그대로 zip(Windows)과 tar.gz(Linux)입니다. 설치 프로그램(NSIS/MSIX)이나 AppImage/deb는 다른 도구가 필요하고, 서명 없이 얻는 것이 없어 뒤로 미뤘습니다. tar.gz는 실행 비트를 보존합니다.
  • 판단해 주세요: package.yml은 PR에서는 패키지에 들어가는 경로(desktop/scripts/**, desktop/package.json, desktop/resources/**, Herdr pin과 fetch 스크립트, verify-cargo.sh, 워크플로 자신)를 바꿀 때만 돌고 verify에 넣지 않았습니다. 콜드 release 빌드라 windows check의 몇 배가 들고, 일부 PR에서만 도는 검사는 required가 될 수 없습니다. 패키지는 7일간 artifact로 남아 실기 확인에 쓸 수 있습니다.
  • 판단해 주세요: Linux에서 마지막 창을 닫으면 앱이 종료됩니다(macOS만 창 없이 남음). 관례대로 두고 INSTALL과 ARCHITECTURE에 적었습니다. hided는 어느 쪽이든 계속 돕니다.
  • 조심해서 볼 파일: hided/src/cli.rs - failure path. hide connect/status의 health 확인이 curl fork에서 이미 링크된 ureq(프록시 없음, 1초)로 바뀌었습니다.
  • 조심해서 볼 파일: hide-platform/src/process.rs - ownership. Windows detach가 이 프로세스의 표준 핸들 상속 플래그를 끕니다(프로세스 전역 상태). 이후 Stdio::inherit 자식은 std가 상속 가능한 사본을 넘기므로 영향 없습니다. 실패는 io::Result로 올라가 start_failed가 됩니다.
  • 조심해서 볼 파일: hide-kit/src/local.rs - 화면 문구. macOS 밖에서는 This machine 행이 "Hide installs its kit only from its macOS app, so it installs nothing on this machine"을 보여 줍니다(이전 문구는 "설치된 앱으로 열라"는 거짓 안내).
  • 조심해서 볼 파일: desktop/scripts/package.mjs - macOS 경로를 공유합니다. 로컬에서 macOS 패키지를 한 번 만들어 서명, RunAsNode 확인, 아이콘, Resources 목록이 그대로인 것을 봤습니다.
  • 조심해서 볼 파일: .github/workflows/release.yml - 태그 없이는 돌릴 수 없습니다. 각 패키지가 artifact가 되고 draft 잡 하나가 체크섬 3개를 확인한 뒤 draft를 하나 만듭니다.
  • 질문: Windows/Linux 패키지는 kit(hide 링크, 훅, hcoord)을 설치하지 않습니다. hide_kit::bundled_kit_dir가 hide.app/Contents/Resources만 알아보기 때문입니다. 같은 이유로 새 버전이 이전 버전의 hided를 교체하지 않고 거절하므로, INSTALL에 업데이트 전 resources/hide stop을 적었습니다. Electron 폴더 구조를 알아보게 할지는 Run only the bundled Herdr and derive the API contract from the pinned binary #3(Windows 훅 명령)이 들어온 뒤 정하는 게 맞아 보입니다. 어떻게 할까요?
  • 원칙: Stamp the app version from the release tag instead of a plist literal #2 가장 단순한 형식(새 도구 없음). Run only the bundled Herdr and derive the API contract from the pinned binary #3 창 없이 시작까지 증명된 패키지를 먼저, kit/설치기/서명은 그 위에. Ship hide's own Herdr runtime and pin the app to it #4 다른 아키텍처는 거절, 빠진 파일은 이름으로 실패. Bump swift-actions/setup-swift from 2.4.0 to 3 #7 기존 packager, 시스템 tar, 이미 있는 ureq. Generate typed Herdr contracts for session synchronization #12 새 테스트와 smoke 모두 심은 버그로 수익을 확인. Commit the herdr-typed-live-remote PRD behind PR #13 #14 smoke와 테스트는 시작한 데몬을 모든 경로에서 멈춤.
  • hcoord는 macOS와 같은 resources/hcoord/dist로 넣었습니다. #3이 hide-kit/src/hcoord.rs에 Windows 런처를 넣어도 패키지 내용은 바뀌지 않고, kit이 Windows 패키지에서 켜질 때 런처가 쓰입니다.

Evidence

  • 확인한 것: 새 connect_stop 테스트가 macOS에서 통과. hided 이름에 .exe를 붙이는 버그를 심으면 start_failed, health 확인을 깨면 no_response로 실패.
  • 확인한 것: 새 OS contract 테스트(detach한 자식이 부모 출력을 붙잡지 않음)가 macOS에서 통과. 자식에 stdout을 상속시키는 버그를 심으면 15초 뒤 실패. Windows에서의 결과는 아래 CI.
  • 확인한 것: smoke 스크립트를 로컬 debug 바이너리로 만든 Linux 구조의 가짜 tar.gz에 돌려 11개 확인 모두 통과. hided를 시작 못 하는 파일로 바꾸면 hide connect 단계에서 이름을 달고 실패.
  • 확인한 것: HIDE_VERSION=0.0.0-local.1 pnpm --dir desktop package로 macOS 패키지 생성(서명 검증 통과), 확인 후 출력과 target/release 삭제. /Applications/hide.app은 건드리지 않음.
  • 확인한 것: verify-cargo.sh lint, 워크스페이스 테스트 57 suite, desktop lint/typecheck/test, script suite, pin single-source 검사.
  • 확인한 것: 첫 push(head 5ff03f0d)에서 verify run 37123328975 전부 green. windows check에서 connect_stop 통과(0.4초), os contract (windows)에서 새 detach contract 통과.
  • 확인한 것: package run 37123328851 green. Windows: release 빌드 14m51s, 잡 17분, zip artifact 약 200 MB. Linux: 빌드 7m28s, 잡 9분, tar.gz 약 164 MB. 두 runner 모두 smoke 11개 확인 통과(hide connect -> /health -> 내장 셸 -> hide stop 포함).
  • 리뷰(별도 subagent): Fix now 4건 모두 반영 - Windows 핸들 상속(위), smoke가 timeout으로 죽인 hide의 출력을 받아들이던 것, 사실과 다른 kit 안내 문구, Windows에서 WSL bash가 잡힐 수 있는 소스 빌드(문서에 Git Bash 명시). 경로 필터 보강, CARGO_BIN_EXE_hide, stop 실패가 원래 오류를 가리던 것도 반영.
  • 확인하지 못한 것: Windows agent hook: 각 런타임이 Windows에서 실행하는 형태로 hook 항목을 씁니다 #344, Windows 데스크톱 호스트: 페이지와 wire 철자로 주고받고, 설치 폴더와 셸을 추측하지 않기 #345 위로 rebase한 head ff1730f5에서 verify의 web e2e linux 2/6이 두 번(재실행 포함) 실패. cmdk.spec.ts:394(프로젝트 3개, catalog.root_unresolved)와 재실행 때 new-tab.spec.ts:71. 둘 다 main 39000d6a와 직전 head에서는 통과했고, 이 PR이 닿지 않는 경로라 #288에 기록. package는 이 head에서도 green(run 37125618484).
  • 확인하지 못한 것: 실제 Windows/Linux 기기에서 창을 띄운 적 없음(SmartScreen 화면, chrome-sandbox 메시지, Herdr 서버 자동 시작 포함). release 워크플로는 태그가 없어 실행하지 않음.
  • 확인하지 못한 것: Windows 데스크톱 호스트의 경로/PATH 처리는 Stamp the app version from the release tag instead of a plist literal #2(별도 PR) 몫이라 이 패키지에 반영되지 않음.

Refs with-hide/hide-private#103

@yansfil
yansfil force-pushed the release/win-linux-packages branch from 5ff03f0 to faba733 Compare October 3, 2026 12:56
`hide connect` looked for `hided` beside its own file and asked the
daemon's `/health` through `/usr/bin/curl`. On Windows the daemon is
`hided.exe` and there is no `/usr/bin/curl`, so the desktop app's first
step could only end in `start_failed` or `no_response` there.

The CLI now looks for the daemon with the system's executable suffix and
asks `/health` in process with the HTTP client hided already links, with
no proxy and the same one-second bound. A new test starts, reads and stops
the daemon through the CLI on every system, and the Windows lane runs it.
`pnpm --dir desktop package` built only hide.app. It now builds the
package of the system it runs on: on Windows x64 a folder with the
release binaries as `.exe`, the pinned Windows Herdr with its ConPTY
runtime beside it, hcoord and the notices, archived as a zip with the
system's tar; on Linux x64 the same with the pinned Linux Herdr, archived
as a tar.gz so the executable bits survive. Each comes with a `.sha256`.
Neither is signed (operator decision 2026-10-03); macOS stays ad-hoc
signed and unchanged.

The Electron runtime check now runs on every system, a machine of another
architecture than the pinned Herdr asset is refused, and the Windows
executable gets the app icon from a new hide.ico derived from the same
mark. INSTALL says how to install each package, that SmartScreen warns
and how to pass it, the Linux sandbox step, and what the packages do not
do yet; the architecture and build guides say that closing the last
window quits the app on Windows and Linux.
A new `package.yml` builds the Windows x64 package on windows-latest and
the Linux x64 one on ubuntu-latest, then `smoke-package.mjs` checks each
archive against its checksum, unpacks it (Windows with Expand-Archive, as
a user's Extract All does) and, with a private home and state folder,
runs the bundled Herdr, the device and hook helpers, hcoord through
Electron's Node, and `hide connect`, `/health`, the embedded shell and
`hide stop`. No Windows machine is at hand, so this is the closest check
a package gets before one is.

A release calls it beside the macOS job, every package becomes a run
artifact, and one job drafts one release with all six files after
checking their checksums. A pull request runs it only when it changes
what goes into a package; it is not part of `verify`.
Windows hands a child every inheritable handle of its parent, and a
process's standard handles are inheritable whenever its own parent
passed them in. So the `hided` that `hide connect` detaches would hold
the CLI's output pipe for its whole life, and the desktop app, reading
that output, would wait for an end that never comes until its connect
timeout.

`detach` now makes the starter's standard handles uninheritable first on
Windows and reports a failure to do so. A new OS contract test has a
short-lived parent detach a sleeping child and checks that the parent's
output ends when the parent exits; planting an inherited stdout makes it
fail. The connect test bounds every CLI run instead of waiting on it.
This machine's row in Settings > Devices told a Windows or Linux user
that the daemon was not running from the installed app and to open it,
which is false for a package they did open. Outside macOS the reason now
says that only the macOS app installs the kit.

The smoke check no longer accepts the output of a `hide` it had to kill,
reports a failed stop without hiding an earlier failure, and the package
workflow also runs when the toolchain resolver, `hided/build.rs` or the
release workflow changes. INSTALL says to build from Git Bash on
Windows, what the Linux build and runtime need, and which devices a
package's helper serves.
@yansfil
yansfil force-pushed the release/win-linux-packages branch from faba733 to ff1730f Compare October 3, 2026 13:16
@yansfil

yansfil commented Oct 3, 2026

Copy link
Copy Markdown
Contributor Author

머지 준비 완료 ff1730f
독립 리뷰 Fix now 4건 반영, verify run 37125618658 attempt 3 green(attempt 1·2의 cmdk.spec.ts:394 실패와 main 비교는 with-hide/hide-private#104), package run 37125618484 green, 보고서 섹션 추가. Review에 운영자 질문 하나: Windows·Linux 패키지가 kit(hide 링크, hook, hcoord)을 설치할지.

@yansfil
yansfil merged commit b3c90f6 into main Oct 3, 2026
59 of 63 checks passed
@yansfil
yansfil deleted the release/win-linux-packages branch October 3, 2026 14:11
yansfil added a commit that referenced this pull request Oct 30, 2026
… at the pin before blaming a release (#1862)

Closes with-hide/hide-private#358

## Summary

#1816 (Memory aging) broke the agent journey's `guidance_memory` cell,
but its pull request never ran the journey, and the nightly agent canary
then filed five agent releases for Hide's own break (hide-private#341,
#343-#346).
Two fixes:

- **Pull request CI runs the journey for product code.** A change to any
crate's product code (`src/` outside test modules, `build.rs`,
`Cargo.toml`) now plans the keyless `agent-journey` lane, which costs
about 4.4 min on Linux plus 0.4 min on Windows. Every crate builds into
a program the journey runs. The stand-in now also judges
`guidance_memory`: it answers from the Memory index its start hook
printed, using the fake model's own rule.
- **The canary tells a release's break from Hide's.** When an agent's
latest release misses a cell, the canary reruns that agent alone at its
pinned version, on the same commit and only on the systems where it
failed. If the pin passes, the issue goes against the release. If the
pin fails too, one issue goes against Hide. With no pinned measurement
the agent is marked `unknown` and nobody is blamed.

스크린샷 없음: CI 계획과 canary 스크립트만 바꾸며 화면이 없습니다.

## Review

- **판단해 주세요**: crate 변경 PR마다 job 2개(Linux 약 4.4분, Windows forms 약 0.4분)가
늘어납니다. herdr-core 변경은 18 -> 20 jobs입니다. Windows forms는 스크립트만 시험하므로 crate
변경에서 빼는 것도 가능하지만, plan 출력 계약을 늘리지 않으려고 lane 하나로 두었습니다.
- **조심해서 볼 파일**:
- `web/e2e/shims/live-check.h`: stand-in이 이제 부팅 5초를 start hook보다 먼저
기다립니다. 바로 실행되던 SessionStart hook은 Hide가 pane을 연결하기 전에
`pane_not_connected`로 거부되어 Memory를 받지 못했습니다(아래 질문).
- `scripts/agent-canary-record.py`: 놓친 셀이 누구 탓인지 가르는 부분(`verdicts`)입니다.
`install` 실패는 릴리스 탓, pin도 같은 셀을 놓치면 Hide 탓, pinned 측정이 없거나 pinned 설치가
실패하면 `unknown`입니다.
- `.github/workflows/agent-canary.yml`: `reruns` -> `pinned` -> `record`
흐름입니다. pinned 재실행이 cancelled면 record를 건너뛰고 다음 날 다시 잽니다.
- **따로 남긴 것**: Hide가 pane을 연결하기 전에 SessionStart hook이 돌면 그 세션은 Memory
index 없이 시작합니다. with-hide/hide-private#365로 남겼고, 이 PR은 고치지 않습니다.

## Evidence

- **확인한 것**: stand-in 여정 Linux, workflow_dispatch로 실행했습니다.
- 이 브랜치: run 40992711843 green이고, `guidance_memory`가 Claude Code와 Codex
모두 pass입니다.
- #1852의 seed를 1970으로 되돌린 브랜치: run 40992748014 red이고, Codex가
`guidance_memory` fail입니다. hided.log에 `cards.aged … "archived":[1]`가
남았습니다. 즉 이 PR의 라우팅이었다면 #1816은 PR CI에서 빨갛게 떴을 것입니다.
- **확인한 것**: fake model 여정을 `agents=codex`로 Linux에서 실행했습니다(run
40991943778 green, 약 5분). report의 `selected`는 `["codex"]`이고, Codex 12개 셀
모두 pass, 다른 agent는 `not measured`입니다. `--agents`가 붙은 lane 판정도 통과했습니다.
- **확인한 것**: 스크립트 suite 729개 테스트 OK(policy lane과 같은 명령)입니다. 새 테스트:
- `test_the_product_code_the_journey_runs_plans_the_journey_lane`(test
모듈은 제외)
  - canary의 release / Hide / unknown 판정과 재실행 대상
  - `--agents` lane 판정
  - "모든 miss를 릴리스 탓"으로 되돌리는 결함을 심으면 Hide 판정 테스트가 실패하는 것을 확인했습니다.
- **확인하지 못한 것**: canary workflow 전체(`reruns` -> `pinned` -> `record`)는
실행하지 않았습니다. 브랜치에서 돌리면 hide-private의 실제 support record와 issue를 다시 쓰기
때문이며, 첫 실행은 main 병합 후의 일일 canary입니다. 각 조각(reusable workflow의 `agents`,
`report-name` 입력과 record 판정)은 위 실행과 단위 테스트로만 확인했습니다. macOS stand-in과
Windows forms는 이 PR의 CI가 돌립니다.
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