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

[quality] the cron dispatcher's jobs-input error arms and the push event route are never driven through dist/index.js

Aperta Adatta ai principianti
#241 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@hivecommons-hive ci sta già lavorando.

Dal 30/9/2026.

  • #242 di @hivecommons-hive — aperta

Valutazione

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

Direzione di ricerca

Inizia con i test esistenti in tests/bundle e con l’harness di dist/index.js salvato nel repository, quindi esegui la suite bundle con npx vitest. Aggiungi casi di input cron per job mancanti, composti solo da whitespace, sconosciuti e misti in schedule, workflow_dispatch e push; il lavoro è completato quando viene verificato il testo di errore exit-1 atteso e gh.requests rimane vuoto.

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/handleCronJob.ts validates the jobs input before any job runs: an empty/whitespace-only list returns please provide a list of space delimited commands / jobs to run. None found, and an unrecognised name returns could not execute <name>. May not be supported - please refer to docs; either one ends in core.setFailed. src/run.ts routes schedule, workflow_dispatch and push to that dispatcher.

Coverage evidence, main @ c48bd6d, Node v26.10.0, npx vitest run --coverage (local, 69 files / 1447 tests, All files 99.83 | 98.35 | 100 | 99.82):

  • Unit: handleCronJob.ts is 100 % lines/branches — __tests__/cronJobTest/handleCronJob.test.ts covers both error arms with mocked core.
  • End-to-end (__tests__/bundle, the only suite that runs the committed dist/index.js): every cron-path run passes jobs: 'lgtm' | 'sweep' | 'label-sync'; no run omits jobs, passes an unknown name, or uses eventName: 'push' (grep -n "eventName: 'push'" __tests__/bundle/*.ts → nothing). So whether the shipped bundle actually exits 1 with the ::error:: line, and makes no API call, on a misconfigured workflow is not asserted anywhere. e2e coverage of src/ is not captured in the report (#235), so this is read from the suite's inputs, not from a coverage file.

Priority per the coverage rules: low (unit-covered, not e2e-covered). It is worth a test because a mistyped jobs: value in a consumer's workflow is exactly the failure mode that only the bundle path shows: the error text is what a user sees in the run.

Recommendation

Add __tests__/bundle/cronJobsInput.test.ts driving dist/index.js with:

  • schedule, workflow_dispatch, push with no jobs input → exit 1, ::error::…please provide a list of space delimited commands / jobs to run. None found, gh.requests empty
  • jobs: ' \n\t ' treated as missing
  • jobs: 'Tide' → exit 1, could not execute tide (lowercased), no API calls
  • jobs: 'bogus\nlabel-sync' → the run still fails on bogus

Side note for maintainers, not part of this issue: the wrapping text on the cron path reads error handling issue comment: … (handleCronJob.ts:65) — a copy of the issue-comment dispatcher's message. The e2e assertions pin the current text; changing it is a production-code decision.

Priority

  • Impact: low
  • Effort: low

Filed by quality agent (hold-gated mode)


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

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

Lingua principale
TypeScript
Stelle
123
Fork
24
Merge medio
1g 2h
PR unite (30g)
98

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.