Repository navigation
fix: type a dropped brief again once its agent reads keys and report one that never lands - #2159
Merged
Merged
Conversation
HyunjunJeon
pushed a commit
to HyunjunJeon/hide
that referenced
this pull request
Nov 9, 2026
…de#2169) Related: with-hide#2159 ## Summary 에이전트가 시작할 때 Hide는 시계 하나로 두 가지를 정했습니다. 시작이 끝나야 하는 120초 기한과, 입력하기 전 화면이 안정되기를 기다리는 3초입니다. 에이전트가 키를 받거나 질문에 답하면 이 시계가 처음으로 돌아갔고, 120초 기한도 함께 밀렸습니다. 그래서 줄 편집을 1초마다 켰다 껐다 하는 프로그램은 시작이 영영 끝나지 않았습니다(편지는 `launch_pending`으로 계속 붙잡힘). 이제 시계가 둘입니다. 120초 기한은 시작 시각에 고정되고 아무것도 그것을 옮기지 않습니다(Herdr v0.9.5의 `Pending { ready_after, deadline }`과 같은 분리). 3초 안정 대기는 지금처럼 키를 받을 때와 질문에 답할 때 다시 시작합니다. "지금 키를 읽나"는 `PaneAgent::takes_input(now)` 하나가 답하고, 편지, `agent.prompt`, fork가 기다리는 상태가 모두 이것을 씁니다. 120초는 `AGENT_START_DEADLINE` 한 상수에서 나옵니다. ## Review - **판단해 주세요**: 질문에 답해도 이제 기한이 다시 시작하지 않습니다. 기한이 지난 뒤 답하면 시작은 바로 끝나고, 다음 화면이 그려지는 3초 동안 편지가 보는 이유가 `launch_pending`이 아니라 `not_ready`가 됩니다(둘 다 편지를 붙잡으므로 결과는 같음). - **판단해 주세요**: 기한이 지나도 계속 줄 편집을 켰다 끄는 프로그램은 `not_ready`로 남습니다(전에는 `launch_pending`으로 영원히). 키를 받은 지 3초가 안 된 프로그램에는 기한 뒤에도 치지 않습니다. - **조심해서 볼 파일**: `herdr-core/src/engine/own/agents.rs` - `Live::started`/`Live::settles_from`, `launch_pending`, `takes_input`, `readiness`, `start_changes_at`. engine/core 소유 경계에서 시작이 끝나는 순간을 정하는 곳입니다. - **조심해서 볼 파일**: `herdr-core/src/engine/answers.rs` - `Readiness::Unreported`와 `Readiness::of`를 지웠습니다. 자체 엔진은 모든 에이전트에 두 값을 다 보냈으므로 production에서는 이미 쓰이지 않았고, Herdr 모양 테스트 fixture 변환은 `engine/fake.rs`로 옮겼습니다. - **비용 검토**: 고빈도 경로 변화 없음. holder 사실 하나마다 하던 비교 그대로이고, `start_changes_at`이 내는 순간도 전과 같은 두 개(안정 대기 끝, 기한)입니다. ## Evidence - **확인한 것**: 첫 커밋 e2122e063의 시험(`a_program_toggling_line_editing_every_second_finishes_starting_at_its_deadline`)은 main에서 실패(`the start ends at its deadline`), 다음 커밋에서 통과. 1초마다 120번 토글해도 기한 전에는 시작 중, 기한에는 끝, 기한 뒤 키를 받으면 3초 뒤에 Ready가 됩니다. - **확인한 것**: 새 시험 `a_question_answered_past_the_deadline_settles_before_input`. 기존 시험은 키 받기와 질문 답이 안정 대기만 다시 시작하고 `started`는 그대로임을 확인하도록 고쳤습니다. - **확인한 것**: macOS에서 `GIT_CONFIG_GLOBAL=/dev/null bash scripts/verify-cargo.sh nextest -p herdr-core`: 3947개 중 3945개 통과, `verify-cargo.sh clippy -p herdr-core --all-targets` 경고 없음, `fmt-check` 통과. - **확인하지 못한 것**: `worktree_control::tests::a_process_that_has_ended_is_not_waited_for`와 `..._never_the_systems_pids` 두 개가 이 Mac에서 실패합니다(`process 4294967294 could not be read: invalid input parameter`). 시험만 더한 첫 커밋(main + 시험)에서도 똑같이 실패하므로 이 변경과는 무관합니다. CI에서 확인합니다. - **확인하지 못한 것**: 실제 에이전트로 해 본 실행(isolated candidate)은 하지 않았습니다. 바뀐 것은 시계 판단뿐이고 위 단위 시험과 엔진 수준 시험이 그것을 다룹니다. Windows `START_WITHIN`은 Windows 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.
Closes with-hide/hide-private#587
Related: #2114, #2144
Summary
막 시작한 에이전트에 Hide가 친 브리프가 입력창에 닿지 않으면, 누가 그 화면에 답하기 전에는 다시 치지 않았고, 끝까지 안 닿아도 실패로 알리지 않았습니다.
이제 세 경우를 처리합니다.
[Pasted ~18 lines]), 빠진 Enter만 누릅니다.input.undelivered로그를 남깁니다. 알림 첫 두 줄:(한 번의 시도는 다시 치기이거나, 입력창에 남은 브리프에 누른 Enter입니다.)
Review
typed_at과 비교). 그 사이 상태가 바뀌었는데 아무도 답하지 않았으면 예전처럼 기다립니다(moved_unanswered).📄 #1)에 줄 수가 없어 표시를 선언하지 않았습니다. 붙여넣기를 글 그대로 보여 주는 에이전트(Codex CLI)는 필요 없습니다.herdr-core/src/delivery/typed.rs-retype_due/unmoved_since_typing. 받은 글을 두 번 넣지 않는 조건이 여기 있습니다(working을 읽었거나 상태가 움직이면 다시 치지 않음, 기록 출처가 없는 에이전트는 예전처럼 다시 치지 않음).hide-agent-adapter/src/composer.rs-Composer::holds가 붙여넣기 표시를 읽습니다. 입력창 영역에 그 표시 한 줄만 있고 줄 수가 맞을 때만 참입니다.herdr-core/src/runtime/typed_input.rs- runtime mutex 안에서 실패 판단과 로그 한 번(plans.input_undelivered, 열린 입력 수로 상한). I/O 없음.agents.rs의Live::started는 건드리지 않았습니다. 새 시계 없음. 작업 첫 프롬프트(type_first_prompt)와 편지 알림 벨은 그대로입니다(편지는 자기 마감 상태가 실패를 알립니다).Evidence
[Pasted ~18 lines], 로그에input.retype_held composer_not_empty가 두 번 찍혔습니다. 그 화면 캡처를 픽스처로 넣었고 새 판단은 Enter를 누릅니다.a_brief_a_starting_agent_dropped_is_typed_again_and_one_it_holds_as_a_paste_gets_its_enter(가짜 엔진, 실제 ledger store)에서 빈 입력창(Codex CLI)은prompt_agent1번으로 다시 치고, 붙여넣기 표시(Claude Code)는send_keysEnter 1번만 누릅니다(타이핑 0번). 고치기 전 조건으로 되돌리면Err("moved_unanswered")로 실패합니다.input.undelivered1번은a_brief_whose_typings_are_spent_tells_its_parent_it_failed_and_logs_it_once로 확인했습니다. 붙여넣기 표시는 다섯 에이전트 캡처로 맞는 줄 수만 참, 다른 줄 수는 거짓입니다.cargo test -p herdr-core -p hide-agent-adapter전부 통과(herdr-core 3932, adapter 8 + 41),clippy -D warnings,fmt-check, attribution과 workstation identity 검사 통과.composer_not_empty로 기다릴 뿐 잘못 치지는 않습니다.verify-cargo.sh test가 워크스페이스 전체를 돌릴 때 hide-holder 테스트가 실패했습니다. test xterm이 설치되지 않은 환경 문제이고 이 PR은 그 crate를 건드리지 않습니다.Verification record
9fd114863, head:c427f0b52hided.logspawn-48 / panehD:p2; run 42076471627 agy spawn-84는 외부 편집기가 글을 받은 경우라 범위 밖.