Repository navigation
perf(listener): leave activity time out of the session fingerprint - #37
Merged
Merged
Conversation
lastActivityAt and stateChangedAt move on every terminal output, so fingerprinting them sent a listener.sessions report on almost every 5 s cycle, and the server rewrote the device record each time. The server no longer compares them; the times now ride the next report that changes something else, or the 120 s heartbeat.
|
🎉 This PR is included in version 0.1.19 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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
listener.sessions보고 지문에서lastActivityAt·stateChangedAt를 뺐다. 두 값은 터미널 출력마다 바뀐다. 그래서 5초 주기마다 보고가 나갔고, 서버는 그때마다 약 10 KB 기기 레코드를 다시 썼다. 서버도 이 두 값을 더는 비교하지 않는다(hwipit/hwip#705). 시각 값은 다른 필드가 바뀐 다음 보고나 120초 heartbeat 에 실려 간다.Changes
src/listener.ts:sessionsFingerprint에서 두 필드를 뺐다. 왜 빼는지 JSDoc 에 적었다.src/listener.test.ts: 활동 시각만 바뀌면 지문이 그대로인지 확인하는 테스트를 추가했다.How to Test
Evidence
Tests 1 failed | 166 skipped (167)listener.test.ts통과. 전체 스위트는Tests 8 failed | 5668 passed | 1 skipped (5677)이다. 8건 실패는 모두src/http-proxy.test.ts에서 난다. origin/main 에서도 똑같이 8건 실패하고, sandbox 밖에서 돌려도 같다. 이 PR 과 무관한 기존 실패다.Risks
parentName·inProcess가 없는데, 서버 비교 목록에는 둘 다 있다.Merge danger
Auto-decided
🤖 Generated with Claude Code