Repository navigation
Keep the doorbell tests' passes the only doorbell - #841
Merged
Merged
Conversation
The doorbell tests drive Doorbell::pass at chosen times and count what Herdr was asked and typed, but Worker::spawn also started the production doorbell, which passes every 250 ms on the real clock against the same runtime and fake Herdr. A test that ran past its first 250 ms on a slower runner saw that doorbell's question or bell as well (issues 809, 814, 831: two bells, one extra agent.get). Worker::store now starts the ledger store alone, and Worker::spawn is the store plus its doorbell and watch producers, as the core runs it. The doorbell tests start the store, so their passes are the only ones. Closes #809 Closes #814 Closes #831
This was referenced Oct 8, 2026
yansfil
added a commit
that referenced
this pull request
Oct 8, 2026
Closes #798 Closes #802 ## Summary - #841 이후 doorbell 테스트는 doorbell·watch loop 없이 delivery store만 띄웁니다. #802도 같은 원인이었고 #841로 고쳐졌습니다. - 그 상태를 지키는 장치가 없었습니다. producer가 다시 붙으면 느린 러너에서 가끔 질문이나 bell이 하나 더 생기는 것으로만 드러납니다. - fixture가 띄운 worker에 timed producer가 없음을 assert합니다. 두 번째 poller가 돌아오면 doorbell 테스트가 이유와 함께 한꺼번에 실패합니다. ## Evidence - **확인한 것**: fixture를 `Worker::spawn`으로 되돌리면 fixture를 쓰는 5개가 모두 `a second doorbell would race the test's passes`로 실패합니다. `Worker::store`에서는 11개 모두 통과합니다. - **확인한 것**: #802의 테스트는 #841 PR 검증 때 600 ms 멈춤을 넣은 main worker에서 CI와 같은 `2 != 1`로 실패했고, #841에서는 통과했습니다. - **확인한 것**: doorbell 테스트 11개를 로컬 macOS에서 부하 없이 200번 연속 실행해 모두 통과했습니다. - **확인한 것**: `verify-cargo.sh lint` 통과. - **확인하지 못한 것**: 부하를 건 반복 실행은 하지 않았습니다(공유 머신에 인위적 부하를 걸지 않음). 시간 의존 경로가 없어져 부하와 무관하다는 근거는 위의 멈춤 재현입니다.
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.
Closes #809
Closes #814
Closes #831
Summary
Doorbell::pass를 정한 시각에 직접 돌리고 Herdr에 묻고 입력한 횟수를 셉니다.Worker::spawn이 실제 doorbell도 함께 띄워, 같은 runtime과 fake Herdr에 실제 시계로 250 ms마다 pass를 돌렸습니다.agent.get1번 더).Worker::store는 ledger store만 띄우고,Worker::spawn은 store에 doorbell과 watch producer를 더한 것입니다. 제품 경로는 그대로spawn입니다.Review
herdr-core/src/delivery/worker.rs- 제품 worker의 thread 구성. producer 둘과 종료 순서(Drop)는 그대로입니다.Evidence
15 != 14,2 != 1,3 != 1, 11개 중 4개 실패).verify-cargo.sh lint,test-scoped통과(herdr-core lib 1817개 포함).