Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Chiusa
#434 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

@hivecommons-hive ci sta già lavorando.

Dal 10/10/2026.

  • #435 di @hivecommons-hive — aperta

Valutazione

Difficoltà
1/5
Tempo stimato
1-3 ore
Idoneità per principianti
30/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
github, typescript
Ambito
testing-qa

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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

Lingua principale
TypeScript
Stelle
132
Fork
23
Merge medio
1g 18h
PR unite (30g)
170

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di cncf/prow-github-actions

Tutte le issue di cncf/prow-github-actions

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.