Repository navigation
health: 응답 시각을 timestamp 로도 내보낸다 - #43
Merged
Merged
Conversation
/api/health 가 생태계 health 규약이 요구하는 timestamp 를 빠뜨리고 있었다.
값 자체는 이미 ts 로 있었으므로 새로 만들 것은 없고, 이름만 하나 더 붙인다.
한 번 계산한 instant 를 now 로 올려 ts 와 timestamp 에 같이 넣는다.
new Date() 를 두 번 부르면 tick 을 사이에 두고 갈라져 같은 응답이
두 개의 생성 시각을 주장할 수 있다.
ts 는 그대로 둔다 — 기존 소비자가 읽는 이름이다. 순수 추가이므로
기존 필드는 하나도 지우거나 옮기지 않았고, status 값("fail")과
?strict=1 의 503 동작도 건드리지 않았다.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
무엇이 바뀌었나
/api/health가 생태계 health 규약(HEALTH_CONTRACT.md v1)이 요구하는timestamp를 빠뜨리고 있었다. 값 자체는 이미ts로 존재했으므로 새 신호를 만들 필요는 없었고, 이름만 하나 더 붙였다.app/api/health/route.ts에서 instant 를const now로 한 번만 계산해ts와timestamp에 같은 값을 넣는다.new Date()를 두 번 부르면 tick 을 사이에 두고 갈라져 같은 응답이 두 개의 생성 시각을 주장할 수 있다.payload (before → after):
status와service는 이미 규약을 만족하고 있었다.검증
tsc --noEmit— exit 0next build— exit 0, 전 라우트 빌드 성공node --import tsx --test tests/*.test.ts— 28 pass / 0 fail일부러 건드리지 않은 것
ts유지. 기존 소비자가 읽는 이름이라 지우지 않았다. 순수 추가이므로 기존 필드는 하나도 삭제·개명·재배치하지 않았다.status: "fail"유지. 규약 enum 은ok|degraded|down이라"fail"은 off-enum 이지만, 문서화된 소비자 두 곳(app/developers/page.tsx,app/llms.txt/route.ts:42)이 이 payload 를 그대로 보여준다. 이번 rollout 은 순수 추가로 두고 enum 정규화는 별도로 다룬다.?strict=1의 503 유지.scripts/deploy.sh의DEPLOY_STRICT_URL게이트가 HTTP 코드로 알람하므로 그대로 둔다.배포 영향
payload 에 키 하나가 추가될 뿐이고 HTTP status code 동작은 변화 없음. 기존 소비자는 영향받지 않는다.
🤖 Generated with Claude Code