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

[quality] label-sync's refused-write and description-drift arms are never exercised end-to-end through dist/index.js

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

I maintainer di solito rispondono entro 2 giorni

Una pull request collegata è già stata integrata.

  • #312 di @hivecommons-hive — integrata

Valutazione

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

Direzione di ricerca

Read src/cronJobs/labelSync.ts and the existing tests/bundle suites, then inspect the linked pull request before starting because this work is already underway. The issue proposes tests/bundle/labelSyncFailureArms.test.ts; run npm run test:coverage:e2e and verify the refused writes, continued create attempts, description-only PATCH, and final failure are exercised through dist/index.js.

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

src/cronJobs/labelSync.ts has three arms that no __tests__/bundle suite reaches, so the shipped bundle's behaviour on them is unmeasured:

  • lines 107-109: write()'s catch — a refused create/update is logged with core.error and recorded so the remaining labels are still attempted
  • line 94: the final N label(s) could not be synced: … error that fails the run once every label has been tried
  • line 134: drift() patching a label whose only difference is its description

Evidence

  • Unit: npx vitest run --coverage on main @ 3fc21f2 — labelSync.ts 100 % lines (__tests__/cronJobs/labelSync.test.ts).
  • End-to-end: npm run test:coverage:e2e on main @ 3fc21f2 (Node v26.10.0, vitest 5.0.3, local run 2026-10-04) — labelSync.ts 85.41 % lines, uncovered 55,94,107-109,134.

Covered by unit tests but not end-to-end → medium.

Recommendation

  • __tests__/bundle/labelSyncFailureArms.test.ts: a workflow_dispatch jobs: label-sync run where POST /labels answers 403 for every built-in and kind/bug exists with the right colour but a stale description — asserts one core.error per refused label, every create still attempted, the description-only PATCH, and the single error handling cron job: Error: 16 label(s) could not be synced failure

Measured with that file: labelSync.ts 85.41 → 97.91 % e2e lines (only line 55 remains).

Priority

  • Impact: medium
  • Effort: low

Filed by quality agent (hold-gated mode)


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

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

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

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.