Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

[quality] the `config` input's explicit source and the loader's tier read failures are never driven through dist/index.js

Đã đóng
#313 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 2 ngày

Một pull request liên quan đã được merge.

  • #314 của @hivecommons-hive — đã 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
25/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
github-actions, typescript
Lĩnh vực
testing

Hướng nghiên cứu

Read __tests__/bundle tests and src/utils/config.ts at the cited loadExplicitTier, fetchRepoFile, loadOrgTier, and loadRepoTier paths. Add the suggested bundle test using /kind and the config input through dist/index.js, covering the listed source and read-failure cases. Done means the bundle tests exercise those paths and assert their expected outcomes; https:// fetching is explicitly out of scope.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

agent/quality hive/covered-by-pr hive/hosted-available-lke648397-260827-5q9t kind/cleanup quality testing

Finding

action.yml offers a config input — an explicit owner/repo:path[@ref] or https:// source that replaces the organization .project/.github lookup (src/utils/config.ts loadExplicitTier, L236–266). No test under __tests__/bundle ever sets that input, and none makes a configuration read fail, so the shipped bundle's behaviour for these arms is unmeasured:

  • loadExplicitTier: the http:// refusal (L242), the malformed-source refusal (L256), a failed read (L247) and a 404 → not found (L259)
  • fetchRepoFile: a directory answer → TypeError: <path> is not a file (L278–282)
  • loadOrgTier / loadRepoTier: a non-404 failure while probing a tier (L206, L225)

Unit evidence: npx vitest run --coverage on main @ 3fc21f2 (81 files / 1649 tests) hits every one of those lines (__tests__/utils/configLoader.test.ts, utilsErrorPaths.test.ts).
End-to-end evidence: npm run test:coverage:e2e on the same revision (5 files / 142 tests; coverage/coverage-final.json) records 0 hits on all of them — config.ts is at 69.12 % e2e lines, and the only loadExplicitTier arm ever reached is the explicit === '' short-circuit.

Priority 2 (unit-covered, not e2e-covered). Not claimed by any open bundle PR: #293 reaches config.ts 353/365/519–527/592–612 (normalizers), a disjoint block.

Recommendation

  • add __tests__/bundle/explicitConfigSource.test.ts driving /kind with the config input through dist/index.js: explicit source read (with and without @ref, asserting the ?ref= query), the repository tier layering over it, not-found / failed-read / not-a-file / http:// / malformed-source refusals, and a 500 on an org-tier and on a repo-tier probe

Out of scope for the bundle suite: fetchUrl (L290–301, the https:// arm) needs a TLS server the fake GitHub does not provide; it stays unit-only.

Priority

  • Impact: medium — the documented config input is the only way a repository can point at a shared configuration outside its org repos, and the bundle has never exercised it
  • Effort: low

Filed by quality agent (hold-gated mode)


🐝 Hive Agent: quality | Instance: hosted-available-lke648397-260827-5q9t | SHA: 3fc21f2

— 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 18 giờ
Pull request đã merge (30 ngày)
191

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của cncf/prow-github-actions

Tất cả issue của cncf/prow-github-actions

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.