Repository navigation
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.
무엇
src/automation/coverageRatchetGate.ts:coverageRatchetHold()가 병합 기준(merge-base) main 커밋의 커버리지를 기준값으로 저장·재사용하고, 변경의 커버리지가 그보다 낮으면(허용 오차 0.01%p)hold를 돌려준다.~/.openswarm/coverage-baselines.json(OPENSWARM_COVERAGE_BASELINES로 변경 가능), 키는<origin URL>@<merge-base SHA>. "최신 main" 하나가 아니라서 오래된 main에서 딴 브랜치를 잘못 보류하지 않는다.skipped(사유 기록), base는 측정되는데 head 측정 불가·측정 예외 →hold(fail-closed), 하락 →hold.publishOnPark.ts: testRemovalGate와 함께holdBeforePublication()으로 묶어 lease fence(beforePublish) 전에 실행. 보류 시operatorPark = { code: 'coverage_dropped' }(testRemovalGate와 같은 NEEDS_HUMAN 경로), skip은 이벤트 로그·콘솔에 남긴다.아직 동작하지 않는 부분 (중요)
측정은
CoverageProviderseam(setCoverageProvider)이고 기본 provider는 아직 없다. 그래서 이 PR이 머지돼도 실제 저장소는 전부Coverage ratchet skipped: no coverage provider is configured로 기록되고 보류되지 않는다. 숫자는 하네스가 실행한 것에서 나와야 하고(워커 보고 텍스트를 파싱하는tester.ts의 coverage는 이 게이트가 막으려는 회피 그 자체라 쓰지 않았다), 신뢰할 수 있는 base/head 실행기는runVerify뿐인데 그쪽에 커버리지 수치를 싣는 일은 이 이슈보다 크다. 후속 작업으로 provider 구현이 필요하다.왜
AGT-4190 방어 2번. 테스트를 지우지 않고 약하게 바꾸면 testRemovalGate를 그대로 통과한다.
검증
coverageRatchetGate.test.ts12건: 하락 시 보류, 같거나 오르면 통과, 허용 오차, 기준값 저장·재사용(base 측정 1회), 오래된 merge-base 기준 비교, base 측정 불가 시 skip, head 측정 불가·예외 시 보류, merge-base 없음 skip, provider 미설정 skip, 등록 provider 사용, 파일 저장소 왕복.publishOnPark.test.ts2건 추가: 하락 시 park·beforePublish/PR 생성 미호출, pass/skip이면 발행.vitest run src/automation95 파일 1228 테스트 통과, publishOnPark를 쓰는workerContext·worktreeManager테스트 65건 통과,tsc --noEmit -p tsconfig.check.json통과, oxlint 0건.Linear: AGT-4898