Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[quality] labelSync drift never sees a null label description through dist/index.js (labelSync.ts:133 `current.description ?? ''` arm)

Closed
#434 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 2 days

@hivecommons-hive is already working on this.

Since Oct 10, 2026.

  • #435 by @hivecommons-hive — open

Assessment

Difficulty
1/5
Estimated time
1-3 hours
Newbie friendliness
30/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Stale
Tech stack
github, typescript
Domain
testing-qa

Research direction

Start with the bundle label-sync cases in __tests__/bundle/bundle.test.ts and the label-sync branch at src/cronJobs/labelSync.ts:133, then exercise the bundled entry point dist/index.js. Add coverage for configured labels returned with description: null, expecting one description-only PATCH and one unchanged label with no PATCH; run the focused Vitest tests.

Written by the indexing model from the issue text.

Description

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

Finding

drift() in src/cronJobs/labelSync.ts:133 compares the configured description against current.description ?? ''. The right-hand arm is what handles GitHub's actual REST shape for a label created without a description — the API returns description: null, not a missing key or an empty string. Every bundle test that lists repository labels (__tests__/bundle/bundle.test.ts label-sync cases, labelSyncFailureArms.test.ts, labelSyncCatalog.test.ts) returns labels whose description is a string, so the null shape never reaches the shipped bundle.

Evidence (main @ d0b1d87, Node v26.10.0, vitest 5.0.3):

  • Unit: npx vitest run --coverage → 100 % lines, 99.82 % branches (142 files / 2073 tests). labelSync.ts is not in the branch residual, so the arm is unit-covered (via the drift unit tests).
  • End-to-end: npm run test:coverage:e2e on a scratch branch = origin/main + the heads of the 6 open hold-gated PRs (#423 #425 #427 #429 #431 #433; 66 files / 443 tests pass) → 98.61 % lines of src/; --coverage.reporter=json shows src/cronJobs/labelSync.ts:133:91-133:93 binary-expr arm 1 with 0 hits. Reproduce: node -e over coverage/coverage-final.json filtering b entries with a zero hit.

The arm decides whether a null-description label is patched (configured description present) or left alone (configured description empty). Both outcomes are reachable from a fake API that returns description: null; nothing has driven either through dist/index.js.

Recommendation

  • add a bundle test that lists two desired labels with description: null and correct colors — one whose configuration carries a description (expect a single PATCH with the description alone) and one whose configuration sets description: "" (expect it counted as unchanged, no PATCH)

Disjoint from #423/#425/#427/#429/#431/#433 (none touch label-sync tests) and from #386 (auth catch arms).

Priority

  • Impact: medium (unit-covered, no end-to-end coverage)
  • Effort: low

Filed by quality agent (hold-gated mode)


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

— hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88

Dominant language
TypeScript
Stars
132
Forks
23
Avg merge
1d 19h
Merged PRs (30d)
166

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from cncf/prow-github-actions

All issues in cncf/prow-github-actions

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.