Repository navigation
끝난 편지가 새 편지를 막지 않게: 보관 1일과 가득 찼을 때 가장 오래된 끝난 편지 삭제 - #1100
Merged
Merged
Conversation
…so history never refuses a new letter A full 5000-letter total refused every send with capacity although almost all of it was finished history kept for 30 days. Finished letters now stay one day after they finish, and a full total drops the finished letter that finished first instead of refusing; only open letters hold the cap. A capacity refusal now writes a letter.capacity_refused diagnostic with the cap that fired.
yansfil
added a commit
that referenced
this pull request
Oct 14, 2026
Closes #495 ## Summary 사이드바에서 checkout 행을 누른 직후 Overview를 열면, 코어가 그 checkout 전환에 답하는 순간 Overview 레이어가 닫혔습니다. 행 클릭은 전환이 끝날 때까지 "열리는 중"을 기억하고, 끝나면 화면을 Workspace로 되돌리는데, 그 되돌림이 그 사이에 운영자가 연 Overview까지 닫았기 때문입니다. macOS에서는 코어 답이 다음 클릭보다 먼저 와서 드러나지 않았고, Linux CI runner에서는 순서가 자주 뒤집혀 main의 `s2` Overview 왕복 테스트가 90초 timeout으로 실패했습니다 (run 38533163219, 그리고 #1100/#1094/#1098의 Linux shard). 이제 이미 Workspace가 앞에 있으면 전환 완료는 기다리던 열기만 지우고 화면은 건드리지 않습니다. All projects나 Overview 화면에서 연 경우는 전과 같이 Workspace가 앞으로 옵니다. ## Review - **판단해 주세요**: 행 클릭 뒤 운영자가 연 레이어는 운영자 것이므로 전환 완료가 닫지 않는다는 해석. `docs/UI_BEHAVIOR.md` 사이드바 checkout 행 절에 한 문장으로 적었습니다. - **조심해서 볼 파일**: `web/src/App.tsx` - 열기 완료 effect의 failure path. `landed` 분기만 바뀌었고 `cancelled`와 refusal 경로는 그대로입니다. ## Evidence - **확인한 것**: `bash scripts/verify-web.sh web typecheck/lint/test/build` 통과 (176 files, 1558 tests). `web/e2e/s2.spec.ts`와 `web/e2e/overview-modal.spec.ts` 12개 모두 macOS 로컬에서 `--retries=0`으로 통과. 이 PR의 CI Linux shard가 같은 `s2` 테스트를 다시 돌립니다. - **확인하지 못한 것**: Linux에서의 재현은 로컬로 못 했습니다 (macOS에서는 코어 답이 항상 먼저 옵니다). 원인은 CI 아티팩트의 page snapshot (Overview 버튼에 `aria-current` 없음, 레이어 없음)과 코드 경로 (`openWorkspace` -> `beginOpening` -> landed -> `setScreen` -> `overviewOpen: false`)로 추적했습니다. 로컬 e2e의 `hided`/`hide`는 이 PR이 바꾸지 않은 main(ba166d8)의 debug 빌드를 복사해 썼습니다.
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.
Summary
모든
hide request send가 약 7시간 동안capacity로 거절됐습니다. 원장이 5000통 상한에 차 있었고 그중 4998통이 이미 끝난 편지(30일 보관)였기 때문입니다.이제 끝난 편지는 끝난 지 하루 뒤에 사라지고, 총량이 가득 차면 가장 먼저 끝난 편지를 지워 새 편지에 자리를 줍니다. 열린 편지는 절대 지우지 않습니다.
거절은 열린 편지가 1024통일 때, 본문이 16 KiB를 넘을 때뿐이고, 이제 어느 상한이 걸렸는지 진단 로그에
letter.capacity_refused로 남습니다(본문은 남기지 않음).Review
herdr-core/src/delivery/mailbox.rs-send가 가득 찬 총량에서 가장 먼저 끝난 편지를 지움(끝난 시각 순, 같으면 먼저 보낸 것).herdr-core/src/delivery/watch.rs- 경고 편지가 같은send를 쓰므로, 가득 찬 상태에서는 실패 시 편지 목록 전체를 되돌리고 바이트 크기를 다시 계산합니다.herdr-core/src/delivery/worker.rs- 유휴 정리가 이제Letter::retained로 판정합니다. 시작 직후 첫 정리가 하루 넘은 끝난 편지를 스스로 지웁니다.reply_to, 에스컬레이션, 감시 경고는 원장에 있는 편지만 읽고, 기존 정리가 이미 같은 방식으로 지워 왔습니다. 노드 시계는 열린 편지만 따릅니다.total거절은 열린 편지 상한(1024)이 먼저 걸려서 정상 원장에서는 닿지 않는 방어선입니다.Evidence
verify-cargo.sh lint통과,verify-cargo.sh test --no-fail-fast전체 통과(herdr-core 2244개 포함).capacity로 거절되고 로그에 상한 종류와 개수만 남는지.~/.hide/state/delivery-ledger.json과 설치된 앱에서의 동작(설치는 운영자가 합니다). 첫test실행에서hided테스트 하나(serve_preserves_kit_protocol_alongside_activity)가 프로세스 생성EAGAIN으로 한 번 실패했고, 단독 재실행과--no-fail-fast전체 재실행은 통과했습니다.Breaking change