[quality] owners.ts: 13 behavioural mutants survive the suite, incl. a shared group cache key that gives every team the first team's members
Maintainer thường phản hồi trong vòng 1 ngày
Một pull request liên quan đã được merge.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- github-actions, typescript
- Lĩnh vực
- testing
Hướng nghiên cứu
The issue names the exact mutants by line in src/utils/owners.ts and prescribes the deliverable: a new __tests__/utils/ownersGuards.test.ts exercising expandGroups, parseOwners, loadOwnersTree, repoHasOwners and branchHasOwners with no src/ changes. Start by reading #572's harness notes, then reproduce with npx stryker run --mutate src/utils/owners.ts. Done is when the 13 listed mutants are killed (15 → 2 survivors, ~98.5%). Note: an open PR #575 already targets this issue, so it is effectively claimed.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Finding
Running the bounded Stryker harness proposed in #572 against src/utils/owners.ts (npx stryker run --mutate src/utils/owners.ts --force, Stryker 10.0.0, Vitest 5.0.4, main @ e3119ad) gives 332 mutants: 304 killed, 13 timed out, 15 survived (95.48%). Unit coverage of the file is 100/100/100/100 (npm run test:coverage @ e3119ad), so these are assertion gaps, not coverage gaps; the bundle suite runs the committed dist/index.js and cannot see a mutation of src/.
Thirteen of the survivors are behavioural (each applied by hand at its reported span and re-run to confirm):
| Site | Mutant | What goes unpinned |
|---|---|---|
owners.ts:151 memoized(groupCache, \${owner}/${slug}`, …)` |
key → '' |
Every team shares one cache entry: the second @org/team in an OWNERS set resolves to the first team's members. No test expands two distinct teams in one run. |
owners.ts:99 parseGroup regex |
leading ^ removed |
alice@org/team is read as a group of org and a team is fetched for it |
owners.ts:52 options !== null |
→ true |
a bare options: key (YAML null) throws TypeError instead of meaning "no options" |
owners.ts:278 file.content === undefined |
→ false |
a blob with an encoding but no content fails with a Buffer TypeError, not "invalid OWNERS file returned from GitHub API for …" (only encoding-less blobs are tested) |
owners.ts:468 repository?.default_branch |
?. → . |
a payload with no repository at all throws instead of asking repos.get (every test payload carries a repository object) |
owners.ts:482 isNotFound (6 mutants) |
guards → true / &&→|| |
a string or null rejection from git.getTree is never exercised; several arms would throw TypeError: Cannot use 'in' operator instead of the listing error |
owners.ts:447 entry.path !== undefined |
→ true |
a tree entry without a path throws inside probeBranchOwners (the same guard in loadOwnersTree is pinned) |
owners.ts:398 hasOwnersCache key ${owner}/${repo} |
→ '' |
repoHasOwners answers a second repository from the first |
owners.ts:139 other-organization warning |
text → '' |
the only user-facing hint that a group was ignored |
Not counted: owners.ts:161 (warning text, asserted exactly by held #564) and owners.ts:317 (core.debug text, equivalent by the review standard #572 documents).
Recommendation
Pin each contract in one new unit file, __tests__/utils/ownersGuards.test.ts, with direct expandGroups/parseOwners/loadOwnersTree/repoHasOwners/branchHasOwners calls (no src/ change). Re-running the harness with that file: 15 → 2 survivors (98.49%), both the exclusions above.
-
__tests__/utils/ownersGuards.test.tspins the 13 behavioural mutants listed above
Priority
- Impact: medium (the group-cache key is a real bug class for repositories that list two teams; the rest are guard contracts)
- Effort: low
Refs #554 ("Strengthen assertions and the test harness" — a consumer of the mutation harness, not a tracker box of its own).
Filed by quality agent (hold-gated mode)
🐝 Hive Agent: quality | Instance: hosted-available-lke648397-260827-5q9t | SHA: e3119ad
— hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88
- Ngôn ngữ chính
- TypeScript
- Star
- 132
- Fork
- 24
- Merge trung bình
- 1 ngày 6 giờ
- Pull request đã merge (30 ngày)
- 232
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của cncf/prow-github-actions
-
agent/quality kind/cleanup stage/045-needs-decision testing
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 15/100
cncf/prow-github-actions#672 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[quality] chart: CronJob name exceeds the 52-character API limit for release names of 32+ characters; no test pins resource-name lengthCó thể đã có người làm @mrbobbytables đã nhận hôm nay. Đang mởagent/quality kind/cleanup stage/040-covered-by-pr testing
Độ khó 3/5 Nửa ngày Mức phù hợp với người mới 50/100
cncf/prow-github-actions#667 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
🐝 Hive Advisory ReportĐang mởhive/advisory kind/cleanup
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 15/100
cncf/prow-github-actions#170 · 9 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của cncf/prow-github-actions
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Broken links in the docsĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 83/100
Maintainer thường phản hồi trong vòng 1 ngày
-
🔊 a11y
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
betagouv/mon-entreprise#4726 ·
Maintainer thường phản hồi trong vòng 9 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Deltares/fews-pi-requests#357 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug confirmed js v6
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày