Skip to content

Wait for the saved Agent tab before restarting in the view bookmarks test - #506

Merged
yansfil merged 1 commit into
mainfrom
fix/flaky-494
Oct 5, 2026
Merged

yansfil merged 1 commit into
mainfrom
fix/flaky-494

Conversation

@yansfil

@yansfil yansfil commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Refs #494

Summary

view-bookmarks.spec.ts의 재시작 전 대기가 이미 끝난 저장으로 만족되던 것을 고칩니다. 제품 코드는 바꾸지 않습니다.

  • 원인: 재시작 직전 test는 workspace-views.json에 view_bookmarks가 있기만 기다렸습니다. 앞선 저장이 이미 그 조건을 채웁니다. Windows에서 fixture의 restart()는 hided를 바로 끝내므로(child.kill(), Windows에는 SIGTERM이 없음) 마지막 탭 클릭(85행, tab 2)의 저장이 아직 디스크에 없을 수 있고, 재시작한 daemon은 그 전 저장(tab 1 앞)을 복원합니다. 실패 단언(93행 tab 2 aria-selected)과 맞습니다.
  • 근거: 실패 run(37283186177, Windows)의 wire 기록에서 마지막 agent_layout 전송과 소켓 종료가 약 65 ms 차이입니다. 통과한 retry에서는 재시작 뒤 tab 2가 선택돼 있었습니다.
  • 수정: 재시작 전에 저장된 Agent layout의 active area 앞 탭이 tab 2가 될 때까지 기다립니다. s6.spec.ts의 savedFront가 File Views에 같은 이유로 쓰는 방식입니다.

Review

  • 판단해 주세요: Windows의 hide stop도 process::terminate로 바로 끝내므로, 운영자가 Windows에서 재시작하면 직전 UI 상태 저장이 빠질 수 있습니다. 이 PR은 test의 대기만 고칩니다. 제품 쪽(Windows 정상 종료 경로)은 별도 결정이 필요합니다.
  • 조심해서 볼 파일: web/e2e/view-bookmarks.spec.ts - savedAgentTabs가 저장 파일의 agent_layout 트리(root의 area/split, active_area)를 읽습니다. 파일 형식이 바뀌면 이 helper도 같이 바뀌어야 합니다.

Evidence

  • 확인한 것: 로컬 macOS에서 CPU 부하(yes 4개) 아래 이 spec 8/8 통과. web lint(e2e 크기 예산 포함)와 typecheck 통과.
  • 확인하지 못한 것: Windows에서의 반복. 로컬은 macOS라 SIGTERM으로 저장이 끝난 뒤 종료되므로 실패를 재현할 수 없고, 이 test는 @platform이 아니라 PR의 Windows e2e에서 돌지 않습니다. 실패도 nightly Windows lane(dispatch)에서 났습니다. 머지 뒤 nightly Windows에서 봅니다.
  • 확인하지 못한 것: 실패 run의 hided 로그와 저장 파일. flaky로 끝난 job은 artifact를 올리지 않아서 저장 시점은 wire 기록의 시간 차로만 추정했습니다.

…test

The test waited for any save that held view_bookmarks before restarting
the daemon, which an earlier save already satisfied. On Windows the
fixture's restart ends hided outright, so the save of the last tab click
could still be pending and the restarted daemon restored the tab before
it. The test now waits until the saved Agent layout has the tab the
restart is expected to restore, as s6's savedFront does for File Views.
@yansfil
yansfil added this pull request to the merge queue Oct 5, 2026
Merged via the queue into main with commit 5c5fe88 Oct 5, 2026
21 checks passed
@yansfil
yansfil deleted the fix/flaky-494 branch October 5, 2026 12:40
yansfil added a commit that referenced this pull request Oct 5, 2026
## Summary

`merge_group.base_sha` is main only for the first group in the queue;
every later group starts from the commit of the group queued ahead of
it.
The plan job logs and the queue refs show it: #504's group was based on
356c5db (#503's group commit, before #503 reached main), and #506's ref
is `gh-readonly-queue/main/pr-506-6d32c697...`, #505's group commit.
So a group plans its own pull request's changes on the tree the groups
ahead make, not every queued change, as #500's docs, comments and test
story said.
This corrects them and states why that is enough; the planner itself
does not change.

## Review

- **판단해 주세요**: the safety argument now in docs/TESTING.md: each group's
run checks its own lanes on a tree that already holds every group ahead,
so a lane is checked by the run of the last group that touched its
inputs, on the same inputs as the final tree; it assumes the path rules
are right, as a pull request's plan does. The queue merges a group only
when every group ahead passed (ALLGREEN), and rebuilds the groups behind
a failed one on a new base.
- **조심해서 볼 파일**: `scripts/tests/test_ci_plan.py`: the merge queue test
is renamed to
`test_a_merge_group_plans_its_own_change_on_the_groups_ahead` and builds
group commits the way the queue does (the pull request merged onto main
or onto the group ahead), including a group rebuilt on main after the
one ahead fails.

## Evidence

- **확인한 것**: plan job logs of the queue runs
[37305523083](https://github.com/modakbul-gongbang/hide/actions/runs/37305523083)
(#504, `BASE: 356c5db...`) and
[37306383723](https://github.com/modakbul-gongbang/hide/actions/runs/37306383723)
(#506, `BASE: 6d32c69...`); #506's run planned 18 lane jobs and no
macOS job, its own change only, while #505's run on 6d32c69 ran the
macOS lanes.
- **확인한 것**: `scripts/tests/test_ci_plan.py` 35 pass; `actionlint` is
clean on `pr.yml`.
- **확인하지 못한 것**: nothing runs differently, so there is no before and
after timing.
HyunjunJeon pushed a commit to HyunjunJeon/hide that referenced this pull request Nov 12, 2026
…ith-hide#2376)

Closes with-hide/hide-private#682
Closes with-hide/hide-private#247
Refs with-hide/hide-private#506
Refs with-hide/hide-private#508

## Summary

재시작 직후 에이전트가 잠시 목록에 없어도 방금 읽은 기록을 지켜, 곧바로 잠들지 않게 합니다.
열린 화면은 이전 읽기를 끝내고 주소의 새 토큰으로 다시 연결하며, 재시작 헬퍼는 복원된 작업 화면까지 확인합니다.
초안 복원 테스트는 파일의 편집을 막지 않고 저장만 실패시키도록 준비 상태를 고칩니다.
스크린샷 없음: 화면 구성 변경 없이 재시작 상태 보존과 연결 및 테스트 준비를 수정합니다.

## Review

- **판단해 주세요**: #506은 재시작 전 프로젝트 펼치기와 최근 순서 저장, #508은 저장값 확인 실패라 원인 미확정으로
남깁니다.
- **조심해서 볼 파일**: `hide-core/src/agent_sleep.rs`, `runtime/session.rs` -
기록 제거의 근거는 에이전트 목록 대신 실제 패널 존재입니다.
- **조심해서 볼 파일**: `web/src/ws.ts`, `web/e2e/hided-fixture.ts` - 교체된 연결의
종료와 복원 스냅샷 경계를 확인해 주세요.
- **조심해서 볼 파일**: `web/e2e/s3.spec.ts` - 파일이 읽기 전용이면 초안 복원이 거절되는 것이 맞아 부모
폴더에서 저장을 막습니다.
- **비용 검토**: 로컬과 기기의 기존 패널 집합을 수면·읽음 처리에 공유하며, 새 I/O나 알림은 추가하지 않습니다.
  새 상주 작업이나 타이머는 없으며, 토큰 변경은 연결 하나를 교체하고 재시작 확인 연결은 성공과 실패 모두 닫습니다.

## Evidence

- **확인한 것**: [CI 반복
실행](https://github.com/with-hide/hide/actions/runs/42814375516)에서 Linux
5개 각 20회와 Windows 설정 20회, 총 120회 통과했습니다.
- **확인한 것**: 로컬 e2e 5개, 연결 12개, 읽음 2개와 원격 상태 19개가 통과했습니다.
- **확인한 것**: 교체 전 읽기는 종료되고 늦은 이전 close는 새 읽기를 취소하지 않습니다. 이 회귀는 보완 전
실패했습니다.
- **확인한 것**: 웹 빌드와 린트, 데스크톱 타입 검사, 디자인 계약, 임시 설정 복구 뒤 정책 검사 4개가 통과했습니다.
- **확인 중**: 임시 반복 설정을 되돌린 최종 커밋의 일반 CI를 확인합니다.
- **확인하지 못한 것**: with-hide#506/#508의 역사적 실패 원인, 실제 설치 앱과 실제 사용자 세션의 재시작은 검증하지
않았습니다.

<details><summary>Verification record</summary>

최종 head: a30c900 (전체 SHA는 PR head).
반복 head: 5cda980, `--repeat-each 20
--retries 0`.
Linux 작업 129826169356, 129826169372, 129826169446, 129826169452,
129826169502는 각 20개 통과입니다.
Windows 작업 129823965048은 20개 통과입니다.
반복 작업은 모두 완료됐고 비대상 작업은 임시 라우팅 검사, 타입 의존성 및 외부 설치에서 실패했으며 최종 push로 나머지가
취소됐습니다.
이후 타입 경계 수정, 임시 설정 되돌림, 이전 읽기 종료와 원격 패널 집합 공유를 더했습니다.
후속 회귀 검사는 보완 전 실패, 보완 후 통과이며 일반 CI는 별도로 확인합니다.
인계 run 42801285805의 S6는 실패 작업 재실행에도 실패했고, 읽기 전용 문서의 초안 복원을 막던 준비 문제를
수정했습니다.

</details>
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