Repository navigation
fix: deliver letters during ongoing work - #2038
Merged
Merged
Conversation
The send test compared millisecond input times, and a fixture built in the same millisecond as a fast successful send read no change. The input generation the send's fence uses moves exactly once per completed write.
A mission answer held on a possible draft was never released: the doorbell read the composer only for a letter's recipient, so an emptied composer kept the operator's answer waiting until the Conductor's next submission. The answer now shares the letter's draft release and its last checks before typing (clear_to_type), and the Conductor's composer read is kept between passes like a recipient's.
Related: #2038 (base: this PR sits on its composer guard) ## Summary 미션 판단에 운영자가 답해도, Conductor 입력창에 무언가를 쳤다가 지운 적이 있으면 답이 영원히 들어가지 않았습니다. 편지는 이럴 때 실제 입력창을 읽어 비었으면 보류를 풀지만, 미션 답은 읽지 않고 기다리기만 했기 때문입니다. 또 미션 답은 입력 직전 확인도 빠져 있어, 반대로 사람이 쓰고 있던 글 위에 답이 입력될 수 있었습니다. 이제 미션 답도 편지와 같은 두 단계를 거칩니다: 보내지 않은 글로 잡히면 입력창을 읽어 보류를 풀고, 입력 직전에 입력창이 비었는지 한 번 더 확인합니다. 실제 사례(2026-11-04): `mission-29`의 "이대로 승인" 답이 `mission.answer_held reason=draft`로 몇 시간 동안 멈춰 있었습니다. Codex 입력창은 비어 있었습니다. ## Review - **조심해서 볼 파일**: `herdr-core/src/delivery/doorbell.rs` - failure path. 입력 직전 확인을 `clear_to_type` 하나로 모아 편지 bell(`deliver`)과 미션 답(`type_answer`)이 같이 씁니다. 강제 편지의 deferral만 호출하는 쪽에 남깁니다. - **조심해서 볼 파일**: 같은 파일의 `pass` - 미션 답 목록을 pass 앞에서 한 번 읽어, Conductor pane의 입력창 읽기 기록도 편지 수신자처럼 pass 사이에 유지합니다. 이게 없으면 글이 남아 있는 입력창을 250 ms마다 다시 읽습니다. - **비용 검토**: 미션 답 하나당 Herdr 호출이 보내지 않은 글 한 번에 화면 읽기 1회, 입력 직전 1회 늘어납니다. 편지와 같은 pass 예산(8회) 안에서 쓰고, 열린 미션 답 수로 상한이 정해집니다. ## Evidence - **확인한 것**: 새 테스트 2개를 doorbell의 FakeHerdr fixture에서 돌림. 지운 글로 잡힌 답은 빈 입력창을 읽은 뒤 1번 입력되고, 글이 남은 입력창은 1번만 읽고 계속 보류됩니다. 기록상 글이 없어도 입력창에 글이 보이면 답이 입력되지 않고, 비면 입력됩니다. - **확인한 것**: 수정을 되돌리면 두 테스트가 모두 실패합니다(답 0번 입력, 글 위에 1번 입력). 읽기 기록 유지를 되돌리면 같은 draft를 4번 다시 읽어 실패합니다. - **확인한 것**: `verify-cargo.sh nextest -p herdr-core` 3942개 통과, `verify-cargo.sh lint`(fmt + clippy) 통과, `check-no-workstation-identity.sh` 통과. - **확인하지 못한 것**: 설치된 앱의 실제 Codex Conductor에서는 재현하지 않았습니다(설치본은 이 브랜치가 아님). 같은 Codex 0.166.0 입력창 판단은 #2038과 기존 composer check가 이미 다룹니다.
yansfil
added a commit
that referenced
this pull request
Nov 3, 2026
## Summary - Windows에서 시작 안내의 탭이 입력 과정에서 달라져, 답변이 있어도 수신 확인이 빠지던 문제를 고칩니다. - 실패할 때 종료 원인과 출력을 남기고, 시작한 자식 프로세스가 끝난 뒤 다음 작업으로 넘어갑니다. ## Review - **판단해 주세요**: 저장한 원문과 엄격한 수신 확인을 유지하면서 모든 전달 경로의 탭을 기존 확인 규칙과 같은 4공백으로 바꿉니다. - **조심해서 볼 파일**: `web/e2e/shims/spawn-provider.c` - Windows Job 구성원의 실제 종료와 Linux 입양 자식 회수, 정리 실패 시 중단. - **조심해서 볼 파일**: `scripts/agent_journey/controller*.py` - 종료 상태와 명령 ID의 일치, 부분 출력 보존, 실패 후 재사용 차단. - **조심해서 볼 파일**: `hide-agent-hooks/src/delivery.rs`, `herdr-core/src/delivery/ladder.rs`, `herdr-core/src/start_prompt.rs` - 입력을 보내는 시점과 수신 확인의 같은 정규화 규칙. - **조심해서 볼 파일**: `hide-agent-hooks/tests/it/agy_hooks.rs` - 정상 입력과 EOF를 시작 전에 준비하고, 입력이 오지 않는 실제 파이프에서는 기존 ask 응답과 외부 호출 없음을 확인합니다. - **병렬 변경**: 전달 경계와 controller가 겹치는 열린 PR은 병합 직전에 충돌과 계약을 다시 확인해 주세요. - **비용 검토**: 입력마다 한 번 검사하고 탭이 있을 때만 문자열을 만듭니다. 새 상시 작업이나 알림은 없습니다. ## Evidence - **확인한 것**: macOS에서 Python 13개와 실제 C 프로세스 경계 6개, fmt 및 engine/core 경계 검사가 통과했습니다. - **확인한 것**: hooks/core 테스트 4,361개 통과·24개 제외·실패 0개이며, all-targets clippy도 통과했습니다. - **확인한 것**: 독립 소스 리뷰와 후속 검토에서 미해결 Fix now는 없습니다. - **확인한 것**: 이전 커밋의 별도 [Windows OMP 검증](https://github.com/with-hide/hide/actions/runs/41637497094)은 고정 CLI·가짜 모델로 13개 통과, 시작 안내를 한 번에 수신 확인했습니다. - **확인하지 못한 것**: [첫 PR CI](https://github.com/with-hide/hide/actions/runs/41637445522)는 Linux 정리 확인에서 실패했습니다. 수정 후 CI는 대기 중이며, 원래 빈 응답 실패의 원인은 미확정입니다. - **확인하지 못한 것**: 최신 커밋의 Windows 전체 여정, 실제 로그인, 전체 출시 후보 및 설치 검증은 별도 범위입니다. <details><summary>Verification record</summary> - PRD: `agents/prd/windows-journey-verified/PRD.md` (sha256 b4a2a9638af3be87eb85e90509da336c8bb556402730ef911af0239d89eb5f3b) - Base 1fbe27d → head 33860e7, verified 2026-11-03T13:34:59.532Z: PASS - Verification report: `agents/runs/windows-journey-verified/verification-report.json` and `agents/runs/windows-journey-verified/verification-report.md`; source fingerprint d97a26238316b11abaaf41ff83ed1cdbce7da2489f4696873b8ed15484984962 - Suites: - S1: GREEN `python3 agents/runs/windows-journey/verify-fixtures.py` (exit 0) - S2: GREEN `bash scripts/verify-cargo.sh test-scoped --jobs 2 --no-fail-fast -p hide-agent-hooks -p herdr-core` (exit 0) - S3: GREEN `bash scripts/verify-cargo.sh clippy --jobs 2 -p hide-agent-hooks -p herdr-core --all-targets -- -D warnings` (exit 0) - Independent full source review: head `32fc1ef36b890a90070e309a85aa0467f6c575f7`; no open Fix now. F1 (Windows process-object settlement) and F2 (job cap below the sum of steps) closed in `f7890a2c38e28d6ee77c708e2fbd25b894bc4ec2`. - Independent follow-up source reviews: exact `954b5da` output delta, `3dbf353a` Linux subreaper delta, `7a9e401a` AGY fixture delta and `33860e7483e2a48aafc606ff51b43dcc1ad2b7df` cast removal; no new Fix now or follow-up improvements. Previous closures retained; reviewers ran no build, tests or CI. - Final same-head Fidelity/Code follow-up: `33860e7483e2a48aafc606ff51b43dcc1ad2b7df`, current report and all 12 registered evidence digests checked; no new Fix now or follow-up. This continued the existing independent source reviews; no new native reviewer pair or runtime execution was performed. Advisory `agentReview: NOT_RUN` remains unchanged. - First official local `32fc1ef3` FAIL: Python 13 pass, actual C 5 pass / 1 fail because short partial stdout was absent before watchdog exit; Rust 4360 pass / 24 ignored and clippy pass. Preserved separately from the later `954b5da` PASS. - First PR CI `41637445522` attempt 1 at `954b5da`: Linux C boundary 4 pass / 2 cleanup failures, then the aggregate verify failed. Other executed jobs passed, including Windows C boundary 6, Windows forms 21 and Windows packaging. Original logs and selected outcomes remain; no original Linux process table was captured. - First local `3dbf353a` FAIL: S1 and clippy passed; Rust 4359 pass / 24 ignored / 1 fail, AGY direct start expected deny but observed ask. Original cause remains unconfirmed; the fixture now prepares finite input before starting the hook. - First local `7a9e401a` FAIL: S1 passed and Rust 4361 pass / 24 ignored; clippy rejected the redundant PIPE_BUF cast. The final commit removes that cast, and the current three-suite PASS is a separate execution. - Historical Windows candidate `41606803918` attempt 1 had an unreadable empty answer; the permitted failed-only attempt 2 passed that cell and failed OMP launch_brief intake confirmation. No third retry was run. The historical empty-answer cause remains unconfirmed. - Parent-owned Windows OMP run `41637497094` attempt 1, exact `954b5dafa649ef819035511f17ca5190bd3dac52`: fixed CLI with fake model, 13 pass / 2 N/A, exit 0, launch_brief input attempts 1 and confirmed_at 1793709929150, one answer and cleanup confirmed. Report sha256 `6cfdc0c8e7d0253f8e67ca6c6961ae9e5acb89474b8f17c629fb6dcf51682672`; not final-head, provider-login or full-candidate proof. - Earlier focused adverse results (absent driver results and the job-budget mismatch) remain preserved separately; no gate expectation, retry count or missing-result classification was relaxed. - Current local run used `lockf -k /tmp/hide-premerge.lock`, jobs 2 and this worktree's warm target. Final executable scan and exact-verifier scan found no remaining process, and the immediate same-lock probe passed. The independent PID/birth sample ran after completion and captured no live process; historical PID/birth coverage is unverified. - Placement at main `8038c40238b5fc2adce487a43238645ff1078d4a`: Stay as you are. Overlaps #2038 and #2017 do not justify stacking; after either lands, merge main once if the repository tool requires it. - Evidence: 12 registered (12 file); paths are local to the run directory - agents/runs/windows-journey/verify-fixtures.py - agents/runs/windows-journey/original-evidence.json - agents/runs/release-windows-review/report.md - agents/runs/release-output-review/report.md - agents/runs/windows-journey/first-final-failure.json - agents/runs/release-output-review/linux-subreaper-report.md - agents/runs/windows-journey/linux-first-selected.json - agents/runs/windows-journey/first-3db-selected.json - agents/runs/release-output-review/agy-fixture-report.md - agents/runs/windows-journey/first-7a9e-selected.json - agents/runs/release-output-review/pipe-cast-report.md - agents/runs/windows-journey/windows-omp-954b-parent-summary.json - Changed paths: 14 (see Files changed) - Delivery: mode pr, branch `fix/release-windows-journey`, base `main` </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.
Related: PRD
agents/prd/live-letter-delivery-pr/PRD.mdSummary
Review
지금 전달도 실제 글이 있으면 기다리며, 사용자의 초안을 함께 제출하지 않습니다.herdr-core/src/delivery/{composer,doorbell}.rs- 판독 전후 입력·상태·세션 경합과 예약 순서.herdr-core/src/delivery/ladder.rs,hide-node-link/src/protocol.rs- 제거한 큐 경로와 이전 영수증 호환.web/e2e/shims/{claude-shim.c,live-check.h,spawn-provider.c},hided/tests/it/support/remote_delivery/mod.rs- 현재 입력창 선언과의 일치, 시작·명령 완료 후 다시 그리기.herdr-core/src/runtime/pane_command.rs- 보낸 입력을 밀리초 시각 대신 입력 세대로 셉니다. 같은 밀리초에 끝나면 실패하던 기존 시험입니다.Evidence
Verification record
agents/prd/live-letter-delivery-pr/PRD.md(sha256 43d1eb68774198e671182f2db194577910cfd75c175f92f73d3d925db7a1b830)agents/runs/live-letter-delivery-pr/verification-report.jsonandagents/runs/live-letter-delivery-pr/verification-report.md; source fingerprint ae570e3d97cb66cbc52a5a485f01681682677529afe12facd536b4e7356fe691bash scripts/verify-cargo.sh test-scoped -p herdr-core -p hide-agent-adapter -p hide-host -p hide-node-link -p hided --lib --tests(exit 0)bash agents/runs/live-letter-delivery/pr-static.sh(exit 0)983ef1eceand delta PASS on9c9a91153(docs) andb64e67129(fixtures); follow-up PASS on4d2d47577(test-only: the input check counts generations, not milliseconds). No open Fix now. Follow-up: the refused-key assertion in the same file still reads milliseconds (equality only, cannot flake).983ef1ece;9c9a91153/b64e67129deltas PASS;4d2d47577changes one test and no behavior, covered by the Code follow-up.fix/live-letter-delivery, basemain