Skip to content

Verify native Windows listener attribution and cleanup - #368

Merged
yansfil merged 18 commits into
mainfrom
ci/platform-completion
Oct 4, 2026
Merged

yansfil merged 18 commits into
mainfrom
ci/platform-completion

Conversation

@yansfil

@yansfil yansfil commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Related: with-hide/hide-private#103; merged prerequisites #372, #376 and #383.

Summary

The Windows required lane now runs the existing listener-attribution and checkout-in-use tests.
A native read failure reaches verify with its actual reason, alongside the browser smoke result.
CONTRIBUTING.md lists both commands.

Review

  • .github/workflows/pr.yml: both tests run and either failure keeps the Windows job red.
  • CONTRIBUTING.md: the Windows gate description matches the executed commands.
  • Runtime, listeners, fixtures and smoke specs use merged main; no timeout, retry or quarantine policy changes.

Evidence

  • Local workspace check, both listener tests, web/desktop types and lint, desktop units and CI script tests passed.
  • Current-head Windows smoke and required verify remain in progress in CI.
  • Local listener proof is on macOS; native Windows and GUI behavior are not inferred from it.
Verification record
  • Base: 316fa7d4be8c6bd80bd31ce5e5af572ebf92356b; head: e5595408620a076176352a6c5c69e494b8a063d4.
  • verify-cargo.sh check --workspace --all-targets: passed.
  • Both existing core listener tests: one passed each, no skips.
  • verify-web.sh: web and desktop typecheck/lint passed; desktop units 99 passed, 3 existing skips.
  • CI Python tests: 9 passed.
  • Main listener/fixture/smoke/focus preservation: 12 matching blobs.
  • Owned command groups reaped; cold check 128.485s, cold listener compile/run 105.689s, warm alias test 0.538s.
  • Windows required job: in progress.

@yansfil

yansfil commented Oct 4, 2026

Copy link
Copy Markdown
Contributor Author

원본 dfb89515를 통합하고 최신 main 문서 충돌의 양쪽 내용을 보존해 9bf3fb21까지 push했습니다. 원본의 hide-platform/herdr-core 로컬 1,293 PASS·기존 7 ignored 유지; 필수 verify CI 대기, Claude 표시 실패는 #372 담당이며 추가 GUI QA는 미실행입니다.

@yansfil

yansfil commented Oct 4, 2026

Copy link
Copy Markdown
Contributor Author

원본 Windows Clippy 수정 dc4bb8e2를 그대로 merge해 a547a24b까지 push했습니다. 변경은 IPv4/IPv6 행 루프 두 줄뿐이며, Windows 검증은 새 CI 확인 대기입니다.

yansfil added a commit that referenced this pull request Oct 4, 2026
Related: #303, #370. Depends on #368.

## Summary

- Preserve bounded input evidence when the desktop drag test loses
terminal-command characters.
- Announce Windows interactive fixture readiness after console setup,
before reading input.
- Integrate the original Windows S2 command and Explorer wire-path
fixture corrections.
- The four-file diagnostic unit remains unchanged; inherited fixtures
and workflows retain their source owners.

## Review

- `terminal-input-observation.ts`: canonical key fields, exact-once
sends, caps and owned cleanup.
- Capture assumes private panes and synthetic input; the alphabet filter
is not general secret redaction.
- `agent-tab-groups.spec.ts`: original drag, typing, Enter and both
five-second polls are preserved.
- `herdr-fixture.ts`: provider/auth replies bypass readiness; short or
failed readiness writes return failure.
- S2/S3/S7 retain their original committed corrections; shell input
assertions and compiler deadlines are unchanged.
- Cost: each observed send adds bounded synchronous decoding/recording
after the original send; timing may change.
- No extra notifier fan-out or input queue; caps are 1,024 records, 64
KiB retained input and 2 MiB JSON.
- The test owns passive listeners and its send wrapper, restores them on
finish and exports once during teardown.
- Mode 0600 does not establish Windows ACL privacy; judge the
private-fixture boundary and timing limitation.

## Evidence

- Independent source-only review cleared the exact four-file unit; all
four blobs match in the pushed union.
- Separate source-only review cleared the original single-command S2
change; native output remains unproven.
- Retained web/desktop typecheck and lint passed before integration;
original S2 light checks also passed.
- The bounded VM probe passed canonical keys, exact-once return/throw,
filtering, schema markers and cleanup.
- The first VM setup failure remains recorded; the corrected probe
passed and all owned processes ended.
- Previous desktop CI passed 42 required cases, with five existing
skips; the optional case also passed.
- Previous Linux shards passed; unchanged Windows shell input/echo
passed with exact ASCII/Korean received bytes.
- Previous Windows CI remains RED: 8 failed/4 passed, including
compiler, S2, disk and file-path failures.
- [Fresh required CI][fresh-ci] is pending for the pushed integration;
its results are not yet acceptance evidence.
- [Retained Windows artifacts][windows-artifact] contain the screenshot
and received-byte logs.
- Earlier pre-input launch failures, original missing-character failures
and local CLI INCOMPLETE remain unclosed.
- Green required CI against current main and the existing final
integration review remain merge prerequisites.

[fresh-ci]:
https://github.com/modakbul-gongbang/hide/actions/runs/37173363587
[windows-artifact]:
https://github.com/modakbul-gongbang/hide/actions/runs/37170103627/artifacts/11291506525
@yansfil yansfil changed the title Require Windows platform smoke and full three-OS nightly checks Verify native Windows listener attribution and cleanup Oct 4, 2026
@yansfil

yansfil commented Oct 4, 2026

Copy link
Copy Markdown
Contributor Author

origin/main 316fa7d4를 merge하고 listeners·fixture 중복을 main 기준으로 정리해 e5595408까지 push했습니다. workspace cargo check·listener 검사 2개·web/desktop 타입/린트·desktop 단위 99개(기존 skip 3개)·CI 스크립트 9개 PASS; 시간 제한·재시도·skip 정책 변경 없이 새 Windows/verify CI 진행 중이며 기존 smoke 실패 세 건의 통과는 아직 확인 전입니다.

@yansfil
yansfil merged commit 69a1a25 into main Oct 4, 2026
21 checks passed
@yansfil
yansfil deleted the ci/platform-completion branch October 4, 2026 11:25
yansfil added a commit that referenced this pull request Oct 4, 2026
## Summary

Every PR ran Rust, the unit suites on three OSes and the full E2E, even
a docs-only PR.
The median time for the required checks to finish was 32.45 min (Orca
16.22, Paseo 20.65).
Now a `plan` job reads the changed paths (`HEAD^1..HEAD` of the PR merge
commit) and plans only the lanes the change needs.
The same plan sets each job's `if:` and is what `verify` checks the
results against.

- `verify` passes only when every **planned** lane is `success` and
every **unplanned** lane is `skipped`. A planned lane that was skipped,
failed or cancelled fails `verify`, and so does a `needs` entry the plan
doesn't know or a failed plan.
- The Windows browser `@platform` smoke moves out of `windows check`
into its own `windows e2e` lane, which calls `web-e2e.yml` the same way
nightly does. Compile, unit tests and the OS contract stay in `windows
check`.
- `checks` is split into `policy` (on every plan), `web checks`,
`desktop checks` and `hcoord`.
- A main push, a comparison that fails (base missing, not a merge
commit, diff parse failure, `cargo metadata` failure) and any
unclassified path all run **every** lane.
- Main pushes no longer cancel each other (`cancel-in-progress` is now
PR-only). `design-contract.yml` also cancels only the same PR's previous
run.
- The rules live in one place, `scripts/ci-plan.py`; the table in
`docs/TESTING.md`, "Which lanes a pull request runs", explains them.

## Review

- **판단해 주세요**: whether it is acceptable that **main's full run is the
safety net** for a lane wrongly left out. A wrongly skipped lane
surfaces as a failure on main after the merge, not on the PR.
- **판단해 주세요**: whether to keep the Windows smoke now skipping `@flaky`
tests, as macOS already did. No `@platform` test is tagged `@flaky`
today, so the behavior is the same for now.
- **판단해 주세요**: web code shared with the desktop host (`SHARED_WEB`) also
runs the desktop lanes and the macOS/Windows `@platform` lanes. That is
broader than the brief's "desktop 연결까지"; I chose it because terminal,
input and shortcut changes are Windows-impacting.
- **조심해서 볼 파일**: `scripts/ci-plan.py` `READERS` and `SHARED_WEB`. These
two hand-kept lists are where a lane can be dropped wrongly (the failure
path). Review found five omissions from tests reading files across
folders and they are fixed (below).
- **조심해서 볼 파일**: the `verify` job in `.github/workflows/pr.yml` and
`aggregate()`. This is the merge gate itself.
- **질문**: `site/`, `tools/`, `spikes/`, `.github/*.md` and `agents/prd`
currently fall under "unknown path → everything". Should a follow-up
narrow them?

## Evidence

**Plan replay over the last 20 merged PRs.** Each row runs the
classifier on the merge commit's `^1..` diff:

| PR | 경로 수 | 계획 | 생략되는 lane | Rust crate |
| --- | ---: | --- | --- | --- |
| #389 | 7 | 전체 (`scripts/web-shell-measure/run.sh`) | - | 전체 |
| #388 | 6 | 부분 | desktop-checks, hcoord, os-contract, windows-check,
windows-e2e, macOS-e2e, desktop-e2e | herdr-core |
| #385 | 125 | 전체 (`.github/pull_request_template.md`) | - | 전체 |
| #387 | 70 | 전체 (`contracts/hided-ws.schema.json`) | - | 전체 |
| #386 | 61 | 전체 (`contracts/hided-ws.schema.json`) | - | 전체 |
| #368 | 2 | 전체 (`.github/workflows/pr.yml`) | - | 전체 |
| #372 | 23 | 전체 (`.github/workflows/nightly.yml`) | - | 전체 |
| #382 | 3 | 부분 | web-checks, desktop-checks, hcoord | herdr-core,
hide-host, hided |
| #383 | 1 | 부분 | rust, desktop-checks, hcoord, os-contract,
windows-check, desktop-e2e | - |
| #384 | 8 | 부분 | web-checks, desktop-checks, hcoord, os-contract,
windows-check, windows-e2e, web-e2e, macOS-e2e, desktop-e2e | herdr-core
|
| #380 | 2 | 부분 | web-checks, desktop-checks, hcoord | herdr-core, hided
|
| #381 | 1 | 부분 | rust, desktop-checks, hcoord, os-contract,
windows-check, desktop-e2e | - |
| #378 | 58 | 전체 (`.github/workflows/nightly.yml`) | - | 전체 |
| #377 | 11 | 부분 | hcoord | herdr-core, hided |
| #361 | 91 | 전체 (`agents/prd/three-column-panel/prd.md`) | - | 전체 |
| #376 | 7 | 부분 | web-checks, desktop-checks, hcoord | herdr-core,
hide-agent-hooks, hide-ai, hide-herdr-client, hide-host, hide-kit,
hide-memory, hide-platform, hide-session, hided |
| #367 | 27 | 부분 | hcoord | herdr-core, hide-host, hided |
| #375 | 2 | 부분 | web-checks, desktop-checks, hcoord | herdr-core,
hide-agent-hooks, hide-host, hide-kit, hide-memory, hided |
| #366 | 8 | 전체 (`.github/workflows/release.yml`) | - | 전체 |
| #362 | 153 | 전체 (`agents/prd/overview-request-view/prd.md`) | - | 전체 |

- **줄어드는 lane**:
- 11 of 20 PRs would run a partial plan; 9 run everything because they
touch `.github/`, `contracts/`, `scripts/` or `agents/`.
- A docs-only PR (#384) runs no E2E, Windows or macOS lane. It still
runs `rust -p herdr-core`, because a herdr-core test reads the root
`AGENTS.md`.
- A web display change (#388) runs no Windows, macOS, desktop or
OS-contract lane.
- A Rust crate change tests only that crate and its reverse
dependencies, from `cargo metadata`. For example #380 tests `herdr-core`
and `hided` only.
- **확인한 것**:
  - `scripts/tests/test_ci_plan.py` passes 19 cases. They cover:
    - Docs-only, which excludes Rust and E2E.
    - A pure web display change, which excludes the Windows smoke.
    - `hide-platform`, which includes Windows and the OS contract.
- Shared web, a `@platform` spec, `desktop/src/main` and leaf-crate
reverse dependencies.
    - Every `READERS` entry.
- Unknown paths, lockfiles and workflows, a type change, an empty diff,
a missing base, a non-merge HEAD and a missing crate graph, which all
run everything.
- The aggregate rejecting a skipped, failed or cancelled planned lane,
an unplanned lane that ran, a missing or extra `needs` entry, a failed
plan and an empty plan.
- The full `python3 -m unittest discover -s scripts/tests` suite passes
(108). That includes the check that every gate a workflow runs is a
tracked script.
- actionlint passes on every workflow. `check-herdr-pin-single-source`,
`check-hide-design-enforcement`, `check-no-workstation-identity`,
`check-harness-ignore-anchor` and `verify-cargo.sh fmt-check` all pass.
- Running `plan` on #388 produced the expected `GITHUB_OUTPUT` (`lanes`,
`full`, `rust-packages`) and the job-summary table.
- Running `aggregate` with a fake `needs` passed when the results
matched the plan and failed when a planned lane was skipped.
- **리뷰 반영**: a code review and a fidelity review against the brief found
these, now fixed:
- Tests read files across folders, so these changes now plan the lanes
that read them: the root `AGENTS.md` (herdr-core test), `web/src` and
`hided/src` (herdr-core structure tests), `wirePath.ts` (imported by web
e2e) and `design/tokens.json` (read by web tests).
  - Every crate change now runs `windows check`.
  - Main pushes no longer cancel each other.
  - `docs/PERFORMANCE_TESTING.md` no longer describes the old lanes.
- **CI ([run
37214808511](https://github.com/modakbul-gongbang/hide/actions/runs/37214808511))**:
- The plan was full (the change touches `.github/` and `scripts/`), and
every lane ran, including the separate `windows e2e`. All passed.
- The first attempt failed in Linux web e2e shard 2/6 on
`home.spec.ts:82` (the location bar read `Home/hde-…` instead of
`Home/~/hide`). This PR touches no web or test code. `verify` reported
exactly `web-e2e: planned, expected success, got failure`.
  - One rerun of the failed jobs passed, and `verify` is green.
- The `home.spec` failure is a flaky-test candidate; it belongs to the
main-green work, not this PR.
- **확인하지 못한 것**:
- Partial plans have never run on Actions. A docs-only or web-only PR
has not been tried; the first one after the merge will show it.
- The cold-cache time of the `windows e2e` lane is unmeasured. It uses
the same path as the nightly Windows lane.
- Main runs now queue instead of cancelling, but GitHub keeps only one
pending run per group. If three merges land in a row, the middle merge's
full run can be dropped.
- **안전망과 위험**: a lane that should have run but was skipped is the risk.
Main's full run catches it after the merge; the fix is then a rule in
`scripts/ci-plan.py` plus a test case.

Does not include: a failure ledger or history, a quarantine registry,
cache changes, a `max-parallel` experiment, or the `package.yml` `paths`
trigger (all out of scope).
If this and the main-green PR overlap in `pr.yml`, whichever merges
later rebases.
yansfil added a commit that referenced this pull request Oct 30, 2026
…ts for letters (#1866)

Closes with-hide/hide-private#366
Related: PRD `agents/prd/mission-worker-sleep/prd.md`

## Summary

- 자고 있는 에이전트에게 보낸 편지가 이제 거절되지 않고 받아집니다. `request`, `block` 편지는 에이전트를
깨우고, `report`, `progress` 편지는 깰 때까지 기다립니다.
- 편지로 깨우기는 한 번에 4개까지만 돕니다. 깨우기에 실패하면 그 편지는 전달 실패가 되고, 보낸 쪽은 Hide가 보낸 안내
편지를 받습니다. 깨우기를 기다리는 동안은 편지의 1시간 기한이 멈춥니다.
- 편지 하나는 받는 에이전트를 한 번만 깨웁니다. 이미 울렸거나 한 번 깨운 `request`/`block`은 다음 잠에서 다시
깨우지 않고, 그 잠 동안 기한이 흐릅니다. 그래서 아무도 읽지 않는 편지가 재우기와 깨우기를 되풀이시키지 않습니다.
- 미션 노드가 끝나면 그 노드의 일꾼과 검사자가 쉬는 대로 잠듭니다. Conductor는 재우지 않고, 화면에 떠 있거나 일하는
중이면 다음 분에 다시 봅니다.
- 새 명령 `hide agent sleep <id> [--actor <id>]`: 에이전트 자신이나 부모가 재울 수 있고, 안
되면 이유와 다음 행동을 돌려줍니다.

## Review

- **판단해 주세요**: 깨운 뒤 벨은 그 에이전트에게 한 번 울리고, 가장 오래된 편지가 앞에 섭니다. 실측에서는 먼저 온
report가 "· and 1 more"로 request를 함께 알렸고, request 자신의 `bell_sent`는 false로
남습니다. 기존 벨 설계 그대로입니다.
- **질문**: 편지로 깨운 뒤에는 깨운 request가 아니라 가장 오래된 편지(실측에서는 report)가 벨 앞에 서서,
request는 "and 1 more"로만 보입니다. 깨운 request가 벨 앞에 서야 할까요? 바꾼다면 이 PR이 아닌 후속
작업입니다.
- **판단해 주세요**: "한 번만 깨운다"와 "이미 울린 request/block은 잠든 동안에도 기한이 흐른다"는 PRD
D-13/B3 문장에 없는 예외입니다. PRD는 고치지 않고 이 판단을 여기서 받습니다.
- **판단해 주세요**: 편지로 깨워도 안 읽은 완료 표시가 사라집니다(깨우기는 한 번 본 것으로 셉니다). PRD
Risks에서 받아들인 동작입니다.
- **판단해 주세요**: 미션 재우기 표시, 깨운 편지 목록, 보낸 쪽 안내 편지는 메모리에만 있습니다. 재시작하면 재우기는
시간 규칙으로 돌아가고, 편지마다 한 번 더 깨울 수 있고, 안내 편지는 잃을 수 있습니다.
- **조심해서 볼 파일**: `herdr-core/src/runtime/agent_sleep/letters.rs` -
runtime mutex 안의 깨우기 큐, 한 번만 깨우기, 실패 경로, 안내 편지 스레드의 drop guard.
- **조심해서 볼 파일**: `herdr-core/src/delivery/ledger.rs`, `worker.rs` - 저장소
스레드가 매 패스 읽는 잠든 수신자와 기한 멈춤 규칙(`Sleeper::pausing`), 깬 뒤 기한
재계산(`resume_woken`).
- **조심해서 볼 파일**: `herdr-core/src/runtime/agent_sleep/missions.rs` - 끝이
실제로 내려앉을 때만 표시를 쓰는 규칙, 거절되면 다음 분에 재시도.
- **비용 검토**: 코디네이터 틱은 dirty 플래그 하나만 봅니다. 잠든 에이전트도 빚진 일도 없으면 바로 돌아갑니다. 큐는
잠든 에이전트 수, 실패와 깨운 편지 목록은 원장의 대기 편지 수에 묶입니다.
- **기능과 무관한 커밋**: 3b4ce7b `test: prove
timed_out_gh_and_its_pipe_holding_helper_are_terminated ...` - 셸의 pid
대신, 파이프가 닫힌 것으로 gh와 도우미 종료를 증명합니다.

## Evidence

- **확인한 것 (실제 Herdr)**: 새 e2e `web/e2e/mission-worker-sleep.spec.ts`가 고정
버전 Herdr와 격리된 hided, Claude 대역(fixture shim)에서 최종 빌드 기준 7번 통과(약 2.6분씩).
한 번의 실패는 스펙의 세션 읽기 경합이었고 poll로 고쳤습니다.
- **확인한 것 (실제 Herdr)**: 부모의 `hide agent sleep` -> ending, 다시 물으면 asleep.
잠든 일꾼에게 report는 pending으로 받아지고 아무도 깨우지 않음. request가 resume으로 깨워 같은 세션으로
복귀. 운영자 pane의 포커스와 Herdr 포커스 유지.
- **확인한 것 (실제 Herdr)**: 깬 뒤 벨 한 번이 request를 함께 알림. 수면 72시간 설정에서 일하는 노드는
아무도 재우지 않고, dropped로 바꾸면 일꾼이 trigger mission으로 잠듦. 아직 pending인 request는
다시 깨우지 않음(편지 깨우기 정확히 1번).
- **확인한 것**: 전체 로컬 실행 두 번(a334711)에서 `herdr-core` lib 테스트 3501개 통과. 이후
집중 실행: mission_worker_sleep, delivery::ledger, delivery::worker 49개,
`hided` guide·cli 93개, clippy `-D warnings`.
- **확인한 것**: 회귀 테스트
`a_request_wakes_its_recipient_once_and_a_rung_one_not_at_all`은 고치기 전
코드에서 실패하는 것을 확인했습니다. 기한 규칙의 ledger 테스트는 새 함수에 대한 것이라 고치기 전에는 컴파일되지 않습니다.
- **확인하지 못한 것**: 로컬 S1(`verify-cargo.sh test` 전체)은 운영자 승인으로 뺐습니다. 부하
15~30에서 이 브랜치 밖의 시간 제한 테스트만 실패했습니다: with-hide/hide-private#332, #338,
#368. 전체 테스트는 PR CI가 맡습니다.
- **확인하지 못한 것**: 진짜 Claude·Codex 에이전트, 창을 닫는 종류(Grok, OpenCode, Pi,
omp)의 처음부터 끝까지, 재시작, 5개 이상 동시 종료, Windows와 Linux 실기기.

<details><summary>Verification record</summary>

- PRD: `agents/prd/mission-worker-sleep/prd.md` (sha256
f1bdebeb7591b90674dc3e7894f0ce76b0bfefe836577c415473403a1e09cd81)
- Base a891332 → head bed6646, verified 2026-10-30T06:14:08.025Z: PASS
- Verification report:
`agents/runs/mission-worker-sleep/verification-report.json` and
`agents/runs/mission-worker-sleep/verification-report.md`; source
fingerprint
430b6550a3424e9d73cb409cb3b68d651fe29dd6f9488fd5286baf6d75f12c3e
- Suites:
  - S1: EXCLUDED `bash scripts/verify-cargo.sh test`
  - S2: GREEN `bash scripts/verify-cargo.sh lint` (exit 0)
- Reviews:
- Fidelity: 030a638 PASS, Fix now 1 (busy checkout failed a dormant
letter wake) fixed in a334711; a334711 PASS; c355b7e PASS, Fix now
2 (spec did not assert the request pending; header claimed B12) fixed in
68f3ea8.
- Code: 030a638 needs changes, Fix now 2 + Medium 1 fixed in
a334711; a334711 approve; 3b4ce7b (test only) approve; c355b7e
approve, residual gap (a once-woken letter paused forever while asleep)
fixed in 4167873; 68f3ea8 approve, Fix now 1 (rung report lost its
B3 pause) fixed in bed6646, confirmed closed.
- Follow-up improvements: tests for the pane-closing sleep route (B1,
B2, B4), the sender note thread, the mission four-sleep cap; one mark
per agent across two nodes; PRD D-13/B3 wording for the once-per-letter
exception; a runtime test of wake, awake, sleep again, wake.
- Evidence: none registered separately.
- Changed paths: 32 (see Files changed)
- Delivery: mode pr, branch `gen-prd/mission-worker-sleep`, base `main`

</details>
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