Skip to content

fix: preserve each Windows fixture build stage budget - #2053

Merged
yansfil merged 5 commits into
mainfrom
fix/windows-fixture-compile-budget
Nov 21, 2026
Merged

yansfil merged 5 commits into
mainfrom
fix/windows-fixture-compile-budget

Conversation

@yansfil

@yansfil yansfil commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Closes with-hide/hide-private#393
Related: #2753, #2724

Summary

Problem

Windows verification can stop before any product test runs because compiling a fixture spends the time needed to link it.
Give each first-build stage its own bound and reuse finished fixture programs only when their complete source and runner image match.

Same for the user: product behavior and agent-start assertions are unchanged.

Decide

Review the first-build bounds and exact cache key.

Not verified

Evidence
  • Main failed during fixture setup: compile 29.001 s and planning 0.531 s left the linker only 30.466 s of a shared minute.
  • The compiler regression models a 55-second compile, 2-second plan and 40-second link. Independent stage bounds admit this work; the former shared minute stops linking.
  • Source-matched finished programs are cached against their full source, build, supervisor, runner and image key, with no partial restore.
  • Compiler image reads and internal C compilation time are recorded without attributing the delay to an unmeasured component.
  • Failed Windows e2e attempts reuse existing process-usage diagnostics before socket diagnostics. Cumulative CPU provides context, not proof of the process responsible for a stall.
  • Unchanged start journey repeated on Windows passed its 10 requested repetitions. The proposed start-fixture deadline split was withdrawn; no start deadline or assertion changes remain.
Tests
  • Layer: process-supervisor and compiler-budget unit contracts, exercised by web and desktop setup on Windows CI.
  • Catches: cold compilation cannot spend the linker's independent budget; failed and timed-out child processes remain owned and cleaned up.
  • Repeat: Windows focused unit repeat run 44846432646 passed on the prior head; final-head CI is pending.
  • Waits: first Windows compiler stages have independent 90/15/60-second bounds. Later compiles and Unix retain 60 seconds. Product-test deadlines are unchanged.
Risky files
  • web/e2e/shims/build.ts: first compiler ownership, stage bounds, trace validation and cleanup.
  • .github/actions/fixture-shims/action.yml: exact cache invalidation and finished-program reuse.
  • web/e2e/windows-sockets-reporter.ts: failure-only process diagnostics reuse the existing bounded helper; passing attempts run nothing.
Verification record
  • Base: 41f666ff10437bcdf40c0b4be8edd280c69e7283; head: 7662d816a2.
  • Focused web units: 10 passed, 1 Windows-only skipped locally on macOS.
  • Web lint, desktop typecheck and desktop lint: PASS.
  • Timed-wait policy and diff whitespace check: PASS.
  • Final-head independent review: the two previous blocking findings are closed; no serious or ordinary findings remain. The deadline split is fully absent.
  • Windows check runs web and desktop units, whose setup builds web/.e2e-shims, before the cache post-save.
  • Final grouped local units hit one existing 10-second subprocess deadline under host load (14.5 load, about 1 GB free); the unchanged test passed alone in 348 ms. Both logs are retained.
  • Mutation check: reinstating a shared remaining-minute budget at the link stage makes the regression fail with only 3,000 ms remaining; restoring the final implementation passes. The tracked tree is restored exactly.
  • Final-head Windows e2e shard 3 passed 29 tests and desktop e2e passed 25, both with no flaky retry; their cold compile, trace and link stages completed successfully. Web e2e saved the exact source-matched cache.
  • Final-head Windows check passed: web units 3,232 passed; desktop units 338 passed, 9 skipped. The check built fixture programs and reused them in the desktop suite.
  • Final-head full verify run 44847122816: PASS, including Windows check, web e2e, desktop e2e and packaged update journey.
  • This directly repairs the fixture-compiler failure in the latest completed main run 44797207758. Main run 44848643326 containing fix: distinguish startup activity from completed turns #2753 is still running; its status is not presented as a pass.

yansfil added a commit that referenced this pull request Nov 5, 2026
…ast (#2080)

Closes with-hide/hide-private#546
Closes with-hide/hide-private#394

## Summary

PR의 CI 표시와 미션 노드의 `ci` 줄이 같은 머리 커밋에서 취소된 실행을 실패로 읽었고(#546), 대체 실행이 아직
작업을 만들기 전이면 통과로 읽었습니다(#394).
이제 GitHub Actions는 작업(job) 줄이 아니라 워크플로 실행 단위로 판정합니다: 그 머리 커밋에서 마지막으로 끝난
실행이 결과를 정하고, 취소된 실행은 빠지며, 대체 실행이 대기 중이거나 도는 동안은 열린 채(pending), 대체 실행이
없으면 실패입니다.
열린 PR 목록, 머지 직후 재확인, 백그라운드 폴링 세 경로가 모두 같은
규칙(`herdr-core/src/github/runs.rs`)을 씁니다.
PR 카드의 체크 개수, 실패한 체크 이름, 도는 체크 수도 같은 규칙으로 정한 실행의 job만 셉니다(초록 표시 옆 '1
failed' 모순 제거).
미션 `ci` 줄의 재실행 한도(D-15)는 이제 '노드를 작업으로 되돌리기'를 머리 커밋당 한 번만 막고, 그 뒤에도 마지막으로
끝난 실행을 읽습니다. 사람이나 지휘자가 다시 돌려 초록이 되면 건너뛰기 없이 pass입니다.

```text
#2077 머리 a03caa1 (실제 응답)
verify run A  attempt 2  CANCELLED  16:41   <- 판정에서 뺌 (작업 줄의 closing `verify`는 FAILURE로 남아 있음)
verify run B  attempt 4  SUCCESS    18:31   <- 마지막으로 끝난 실행 = 판정
before: Failed   after: Passing
```

스크린샷 없음: web/src는 snapshot.ts의 미션 줄 타입에 선택 필드(`sent_back`) 하나만 추가했고 화면을
그리는 코드는 그대로라 보이는 변화가 없습니다.

## Review

- **판단해 주세요**: 어떤 실행이 PR을 판정하나 - `pull_request*`·`push` 이벤트만. 같은 커밋의
`workflow_dispatch`(nightly, agent journey)는 GitHub 자신의 PR rollup처럼
뺐습니다.
- **판단해 주세요**: 실행 조회가 실패하면 모든 열린 PR이 `Unknown`(표시 없음 + 저장소·head가 담긴 진단
로그)입니다. 대기 중인 실행이 없다는 걸 모르니 pass도 '체크 없음'도 아닙니다. 나머지 읽기는 그대로 섭니다.
- **조심해서 볼 파일**: `herdr-core/src/github.rs` `judge_head_runs` - failure
path. 저장소 이름을 읽은 뒤 열린 머리들을 50개 단위 GraphQL 한 번씩 더 묻습니다(읽기 스레드, 락 밖).
- **조심해서 볼 파일**: `hide-node-link/src/gh.rs` - 원격 노드 허용 목록에 고정 질의
`HideHeadRuns` 추가, check-runs jq는 `github-actions` 앱의 실행을 뺍니다.
- **비용 검토**: 프로젝트 읽기마다 GraphQL 1회(열린 머리 50개당), 폴링은 check-runs 태그가 바뀐
머리마다 1회 추가. 커밋당 suite 100개 상한, 넘으면 `Unknown` + `checks.runs_capped`.
- **판단해 주세요**: job을 실행에 묶는 열쇠는 GitHub가 job에 주는 주소의 실행
번호(`…/actions/runs/<run>/job/<job>`)입니다. 번호를 못 읽은 job은 판정 실행에 속한다고 증명되지
않으니 세지 않습니다.
- **조심해서 볼 파일**: `herdr-core/src/mission_criteria.rs` `read_ci`·`shown`
- `ci` 줄의 pass/fail은 기록된 head에만 유효합니다. PR 읽기가 다른 head를 말하면 체크 상태(Unknown
포함)와 상관없이 줄은 open이고, 판정(shown/met)도 PR의 현재 head를 봅니다. 재실행 뒤 실패는 노드를 머리당
한 번만 되돌립니다(새 저장 필드 `sent_back`, 예전 기록은 복원 때 옮김).

## Evidence

- **확인한 것**: 두 번째 커밋 전 새 시험 2개가 실패(카드: 5개 중 2개 실패로 셈, 기대 3개 모두 통과 / 소진된
ci 줄이 뒤의 pass를 무시). 고친 뒤 통과. D-15 요구가 바뀌어
`a_failed_ci_rerun_reads_no_more_runs_on_that_head`를 새 규칙으로 고침.
- **확인한 것**: 고치기 전 새 core 시험 4개 중 3개가 실패(취소 뒤 성공 → `Failed`, 취소 뒤 대체 실행
진행/대기 → `Failed`, #394 대기 실행 → `Passing`)하고, 고친 뒤 통과.
- **확인한 것**: 시험 입력은 실제 `gh api` 응답 모양에서 땄습니다: #2077·#2075·#1910의 rollup,
check suite, run attempt. rollup은 실행마다 같은 이름의 작업을 모두 주고, `gh pr list`는
100개에서 자릅니다(#2053).
- **확인한 것**: 실제 GraphQL `HideHeadRuns`를 #2077·#2075 머리에 보내 응답 모양 확인, 바뀐
jq는 두 머리에서 `none`(Actions 외 체크 없음).
- **확인한 것**: `scripts/verify-cargo.sh test` 워크스페이스 lib 전부 통과(herdr-core
4080, hide-node-link 79, hided 584), clippy `-D warnings`(herdr-core,
hide-node-link), `fmt-check`.
- **확인하지 못한 것**: 실제 앱에서 미션 지도의 줄 변화는 보지 않았습니다(진행 중인 mission-25와 운영자 앱을
건드리지 않음). web e2e와 web typecheck(`snapshot.ts`에 선택 필드 하나 추가)는 로컬에서 돌리지
않았고, hide-holder 통합 시험은 이 worktree에 시험용 xterm이 설치되지 않아 로컬에서 실패(코드 무관), 그
fake `gh`는 새 질의에 엉뚱한 답을 하지만 Actions 작업이 없는 rollup이라 표시가 바뀌지 않는 경로입니다.
CI가 확인합니다.
@yansfil yansfil changed the title fix: preserve each Windows fixture build stage budget fix: preserve Windows fixture and start verification budgets Nov 21, 2026
@yansfil yansfil changed the title fix: preserve Windows fixture and start verification budgets fix: preserve each Windows fixture build stage budget Nov 21, 2026
@yansfil
yansfil added this pull request to the merge queue Nov 21, 2026
Merged via the queue into main with commit ca55538 Nov 21, 2026
97 checks passed
@yansfil
yansfil deleted the fix/windows-fixture-compile-budget branch November 21, 2026 01:40
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