Repository navigation
refactor: keep the start deadline apart from the settle wait - #2169
Merged
Merged
Conversation
…er takes_input once
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: #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
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로 옮겼습니다.start_changes_at이 내는 순간도 전과 같은 두 개(안정 대기 끝, 기한)입니다.Evidence
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는 그대로임을 확인하도록 고쳤습니다.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에서 확인합니다.START_WITHIN은 Windows CI 계약 레인에서만 컴파일됩니다.