Repository navigation
Factory 일꾼이 정해진 시간 안에 수락된 일꾼으로 바뀌지 않는 경우가 있다 - #872
Merged
Merged
Conversation
A worker whose agent has not shown its session within the 5 seconds one ask waits was asked again only after 30 seconds, so a slow start was accepted 35 seconds or more after its pane existed. A start younger than 30 seconds is now asked on the next tick; an older one, more likely behind a trust or login prompt, keeps the 30 second ask.
The starter thread logs the stage and reason of a start that made no accepted worker, once per reason, with how long it waited when it finally did; a refused start logs its reason. A woken worker whose letters are held logs what it waits on and when they went out.
yansfil
added a commit
that referenced
this pull request
Oct 9, 2026
…output cap (#891) ## Summary CI가 초록인데 Factory Task가 `검증 중`에서 끝나지 않던 원인을 고칩니다 (운영 Factory의 T-1 #872, T-2 #873). check-runs 읽기가 run 전체(하나에 약 3.5 KB)를 받았고, node는 명령 출력을 64 KiB까지만 남깁니다. check run이 20개인 PR은 답이 약 71 KB라 잘렸고, 잘린 JSON은 파싱에 실패했습니다. CI poll은 신호 없는 오류를 `pending`으로 읽었고, 2초 tick마다 다시 물었습니다. - 읽기는 `gh api --paginate ... --jq '.check_runs[] | {name, status, conclusion, html_url}'`로 run마다 한 줄(약 180 B)만 받습니다. - 결정을 못 낸 읽기는 오류를 포함해 30초 간격으로만 다시 묻습니다. - 읽지 못한 답은 새 poll 결과 `Unread`입니다. 아무것도 결정하지 않고 실패로 세지 않으며, 한 run에서 세 번째면 Task에 notice를 남깁니다. - restart가 검증을 다시 시작할 때 앞에 남은 미완료 attempt를 `cancelled`로 닫습니다 (T-2처럼 `running`이 둘 남은 기록). - 작은 결함: `hide factory config`의 답에 `settable`(`disk_floor_gb` 같이 `--set`이 받는 키와 단위)을 더하고, 모르는 키는 그 키와 받는 키 전체를 말하며 거절합니다. ``` commit fc92b0a (#873) 전체 답 71100 B -> 투영 3507 B, 20줄, verify completed/success commit dd0c5c5 (#872) 전체 답 70760 B -> 투영 3507 B, 20줄, verify completed/success ``` ## Review - **판단해 주세요**: 읽지 못한 답이 세 번이면 notice(확인만). Task를 멈추지 않는 것이 맞는지. 다시 읽히면 그대로 끝납니다. - **판단해 주세요**: config 답은 저장 레코드(`config`, ms/bytes)를 그대로 두고 `settable`을 덧붙였습니다. web 설정 화면이 `config.disk_floor_bytes`를 읽어 이름을 바꾸지 않았습니다. - **조심해서 볼 파일**: `hide-factory/src/project.rs` - failure path. 오류도 `ci_pending` 간격을 타므로 main check의 오류 다음 30초는 `Pending`으로 답합니다. - **조심해서 볼 파일**: `hide-node-link/src/factory.rs` - node가 만드는 `gh` 명령 줄. 이전 node가 답한 전체 JSON 한 줄은 run이 아니어서 `Unread`로 읽힙니다 (잘못된 pass가 아님). - **비용 검토**: tick당 일이 줄었습니다. 막힌 Task 하나가 2초마다 71 KB를 받던 것이 30초마다 3.5 KB입니다. run이 100개를 넘으면 한 읽기에 page가 늘어납니다. ## Evidence - **확인한 것**: 운영 기록(읽기 전용)에서 두 Task가 `verify.started` 뒤 `verify.finished` 없이 7시간, 두 PR의 required `verify`는 success. - **확인한 것**: 실제 `gh`로 위 두 commit의 전체 답이 64 KiB를 넘고, 새 명령의 답은 3507 B로 `verify` success를 담는 것. - **확인한 것**: `github::a_commit_with_many_check_runs_passes_on_its_named_check` - node의 64 KiB 자르기를 흉내 낸 fake gh에서 3.5 KB run 20개가 `Passed`. - **확인한 것**: `engine::an_unread_verification_answer_is_asked_again_and_told_to_a_person`, `engine::a_task_stuck_verifying_with_two_unfinished_attempts_concludes_after_a_restart`, `github::an_unreadable_check_answer_is_unread_and_asked_again_at_its_pace`, `engine::config_prints_each_setting_under_the_key_set_takes_and_names_a_refused_key`. - **확인한 것**: `verify-cargo.sh lint`, `hakari`, workspace nextest, `scripts/tests` 319개, `check-core-touches-no-machine`, `check-no-attribution`, `check-no-workstation-identity` 통과. - **확인하지 못한 것**: 격리 HOME과 Herdr, 연습 저장소로 Factory 전체를 돌린 live check는 하지 않았습니다. check run 20개 이상인 연습 GitHub 저장소가 없어서, 실제 `gh` 답과 fake 경로로 나눠 확인했습니다. - **확인하지 못한 것**: 운영 T-1, T-2는 이 build가 설치되어 hided가 다시 시작해야 끝납니다 (restart가 검증을 다시 시작하고 새 읽기가 `Passed`). 설치는 하지 않았습니다. - **확인하지 못한 것**: `contracts/hide-cli.json`에는 factory 명령이 없어 바꿀 것이 없었습니다. - **후속**: 같은 64 KiB 자르기는 다른 읽기에도 걸립니다. JSON 읽기(`LabelledIssues` 200개 본문 등)는 `external.failed`로 드러나지만, `git diff --name-only`(risk path)는 잘려도 조용합니다. 이슈로 따로 남기는 게 좋겠습니다.
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.
목표
What happened
Factory 질문 차단(PR #786) 작업 중 세 번, Factory 일꾼 pane이 정해진 시간 안에 수락된 일꾼(accepted worker)으로 바뀌지 않았습니다.
세 경우 모두 원인을 좁히지 못한 채 머지됐습니다.
사용자 쪽 영향은, 되살린 일꾼이나 막 띄운 일꾼이 한동안 일꾼으로 인정받지 못해 Factory 질문 차단 같은 일꾼 전용 동작이 늦게 걸리거나 걸리지 않을 수 있다는 점입니다.
What you expected
정상 경로로 띄운 일꾼과 되살린 일꾼 모두, 문서에 적힌 재시도 간격 안에 수락된 일꾼으로 바뀝니다.
바뀌지 않으면 그 이유가 진단 로그에 남습니다.
Steps to reproduce
부하가 높은 기기에서
web/e2e의 Factory 질문 spec을 반복 실행하는 것도 재현 후보입니다.Versions
Diagnostics
#786 Review와 Evidence에 세 관찰이 적혀 있습니다.
P9 코드 리뷰는 늦게 도착한 native 보고와 stable intent 수락 경로가 되살리기 실패와 같은 원인일 수 있는지 살폈지만 결론을 내지 못했습니다.
완료 조건
결정 기록
Closes #801