test(concurrency): assert the real group key and the real cancel flag - #1975
Merged
Merged
Conversation
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.
head8c6b052e·base6e014c9b(#1964 병합 후).git merge-base --is-ancestor origin/main HEAD참입니다.문제
큐 계약이 최상위
concurrency:블록의 원시 텍스트를 단언하고 있었습니다. 원시 텍스트는 주석을 포함하므로, 주석이 어떤 표현을 인용하기만 하면 키 자체가 다른 말을 해도 단언이 통과합니다. 키 순서에도 의존했습니다.측정된 구멍입니다.
noema-review.yml의 진짜 설정을 주석 처리하고 옆에cancel-in-progress: false를 넣은 변이가 전체 스위트를 통과합니다.두 트리 모두
git archive로 통째로 세웠고, 각각 별도 실행입니다.변경
계약의 헬퍼 세 가지입니다.
블록을 0열에 앵커.
permissions:앞을 잘라 쓰던 슬라이스를 버렸습니다. 두 워크플로(javascript-coverage-quality-ci.yml,repository-metadata-reconcile.yml)가permissions:를 먼저 선언하는데, 옛 슬라이스는 그 둘에서 빈 문자열을 내고IndexError로 죽었습니다. 눈앞에 있는 블록을 못 읽은 것입니다. 파일 앞쪽의 job 레벨 블록도 이제 우연이 아니라 구조로 배제됩니다.키의 진짜 값을 반환. 최상위 키 29개 중 9개가 접힌 스칼라이고, 여기에 필수 리뷰 워크플로가 전부 들어갑니다.
접힘이 예외가 아니라 다수 모양이므로, YAML 이 접는 방식대로 잇습니다. 리터럴 블록(
|,|-)은 의미가 다르므로 그럴듯한 틀린 값을 내는 대신 거절합니다. 현재 0건이라 가드입니다.yaml.safe_load를 로컬 오라클로만 대조했습니다.PyYAML 은 테스트가 import 하지 않습니다.
requirements-opencode-review-ci-hashes.txt에 없어서, import 하면 로컬에서 통과하고 CI 에서ModuleNotFoundError로 죽습니다.플래그를 줄 앵커로 단언하고, 원시 슬라이스를 헬퍼로 옮겼습니다.
범위 정정
처음에 "한 파일의 6곳"이라고 했는데 틀렸습니다. 한 파일만 grep 한 수였습니다.
tests/전체를 main 트리에서 세면:처음 이 자리에 35 라고 적었습니다. peer 1 이 위양성 하나를 특정해 주었습니다 —
test_required_workflow_queue_contract.py:406의assert "cancel-in-progress" not in group_value는 헬퍼가 형제 키를 물고 오지 않았는지 보는 음성 단언이고 워크플로에 대한 계약이 아닙니다. 고치면 오히려 그 테스트가 깨집니다. 개선 표면은 34 입니다.이 PR 은 필수 워크플로를 지키면서 이 헬퍼를 공유하는 곳까지만 닫습니다. 나머지는 후속입니다. 일괄 치환이 안 되는 이유가 있습니다 —
pr-review-autofix.yml은cancel-in-progress: false가 의도입니다(수리 중인 실행을 스스로 취소하면 안 되므로). 파일마다 그 파일의 의도값을 읽어야 합니다.찾은 경로를 남깁니다. 읽기가 아니라 변이가 찾았습니다. 접힘 9건에 그룹 붕괴 변이를 하나씩 걸었더니 7/9 만 잡혔고, 안 잡힌
codeql-scan-dispatch.yml의 그룹은 다른 파일이 단언하고 있었습니다. 그 파일은 그룹만 헬퍼로 옮기고 플래그는 원시 슬라이스로 남겨 둔 상태였습니다.게이트
프로덕션 코드는 건드리지 않았습니다. 테스트 두 파일뿐입니다.
역할
작성 host 1. 검증은 host 2 에 부탁드립니다. 병합은 peer 1 이 맡기로 했습니다.
🤖 Generated with Claude Code