refactor(orphan): separate reaper test responsibilities - #36
Merged
Conversation
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.
변경 내용
claim-lease-guard상태 머신으로 추출변경 배경
기존
orphan-service.test.ts는 safety, concurrency, timeout, PREFIX integration이 한 파일에 결합되어 있었다. 이번 변경은 LOC 감소가 아니라 기존 24 declarations / 25 expanded cases의 의미를 모두 보존하면서 각 invariant의 소유 레이어를 명확히 하는 데 목적이 있다.서비스는 initial/destructive renewal ordering, storage request deadline, reference cancellation, terminal DB ownership fence와 accounting을 계속 소유한다. 새 guard는 heartbeat lifecycle, renewal coalescing, deadline, claim-loss latch와 late-result fencing만 소유한다.
Invariant 보존
다음 failure mode를 각각 유지하거나 더 직접적인 단위 테스트로 보강하였다.
기존 service 테스트 25개 의미 케이스는 삭제 없이 새 책임별 suite에 모두 대응한다.
중복 제거
object-deletion.test.ts의 기본 partial recovery 테스트는 더 강한 prefix invariant 테스트가 processed count, 부모 PREFIX 기록, 후속 page 처리와 same-sweep no-retry까지 포함하여 제거검증
임시 dependency override
CI의 workspace audit가 GHSA-ggr8-5vv4-36mx를 탐지하여, Prisma 7.9.1은 유지하고
@prisma/config@7.9.1하위의deepmerge-ts만8.0.1로 제한하여 override하였다.deepmerge를 c12 merger로 전달하는 단일 경로deepmergeInto, 내부 type rename은 해당 경로에서 미사용npm ci후 실제 8.0.1 설치와 7.1.5 미설치 확인npm audit --audit-level=high: 취약점 0건제거 계획
@prisma/config가deepmerge-ts >=8.0.0을 직접 선언하는지 확인한다.prisma,@prisma/client,@prisma/adapter-pg를 함께 갱신한다.npm ci, audit, Prisma generate/validate, 전체 test/lint/architecture/build를 다시 실행한다.