Skip to content

Log every refusal the core records; pin the cause of the lost device registration - #771

Merged
yansfil merged 8 commits into
mainfrom
fix/remote-device-registration
Oct 8, 2026
Merged

yansfil merged 8 commits into
mainfrom
fix/remote-device-registration

Conversation

@yansfil

@yansfil yansfil commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Closes #770
Closes #766

Summary

Linux CI의 timed out waiting for connected private SSH device는 제품 결함이 아니라 fixture가 이벤트를 잃은 것입니다.
fixture의 설정용 WebSocket이 register_device를 보낸 뒤 데몬의 snapshot 프레임을 읽지 않은 채 소켓을 닫았고, 커널이 연결을 reset하면서 데몬이 아직 읽지 않은 이벤트가 사라졌습니다.
거절도 오류도 없이 사라져서 status.last_error는 null, device_registrations는 [], device.registered 로그는 없었습니다.
이벤트 수신(Pong)을 기다린 뒤 닫는 수정은 fff5df116으로 이미 main에 들어 있습니다. 이 PR은 그 원인을 증명하고, 같은 일이 다시 조용히 지나가지 않게 합니다.

  • core가 기록하는 모든 거절을 error.reported로 로그에 남깁니다(last_error는 다음 이벤트가 지웁니다).
  • 원인을 docs/TESTING.md에, 로그 규칙을 docs/ARCHITECTURE.md에 적었습니다.

Review

  • 조심해서 볼 파일: herdr-core/src/runtime.rs - set_error가 이제 진단 로그를 씁니다. runtime lock 안이지만 diagnostic!는 크기 제한 큐에 넣기만 하는 논블로킹 경로이고, 오류는 드문 경로입니다.
  • 판단해 주세요: 로그 메시지에 포함되는 문구(경로, id)가 허용 범위인지. 기존 push_diagnostic와 같은 수준입니다.

Evidence

  • 확인한 것: 원인. 수정 전 fixture(수신 대기를 임시로 뺌)를 Linux 러너 16대에서 3회씩 재시도 없이 돌려 48회 중 27회 실패했고, 실패 메시지는 last_error=null remote=[]에 기기는 "This Mac" 하나였습니다. 즉 거절이 아니라 유실입니다.
  • 확인한 것: 수정 후(현재 main의 fixture) 같은 레인을 재시도 없이 52회(순차 20회 + 러너 16대 x 2회) 돌려 0회 실패했습니다. 기록된 실패 시각은 모두 fff5df116(10:44 KST) 이전입니다.
  • 확인한 것: a_refused_device_registration_is_logged_with_its_reason가 중복 등록 거절이 error.reported로 남는지 확인합니다. herdr-core lib 1725개 통과.
  • 확인하지 못한 것: macOS에서의 같은 반복 실행(nightly가 맡습니다). 임시 증거 커밋은 이 PR의 최종 head에서 되돌렸습니다.

@yansfil yansfil changed the title Fix the remote device registration that never applies on Linux Log every refusal the core records; pin the cause of the lost device registration Oct 8, 2026
@yansfil
yansfil merged commit 0a257a8 into main Oct 8, 2026
20 checks passed
@yansfil
yansfil deleted the fix/remote-device-registration branch October 8, 2026 06:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant