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

[quality] the bundle e2e suite never drives /meow — src/issueComment/meow.ts has unit coverage only

Chiusa
#243 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

@hivecommons-hive ci sta già lavorando.

Dal 7/10/2026.

  • #244 di @hivecommons-hive — integrata
  • #372 di @hivecommons-hive — aperta

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
70/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
github-actions, node.js, typescript
Ambito
testing

Direzione di ricerca

Start with tests/bundle/bundle.test.ts, fakeGithub.ts, and src/issueComment/meow.ts; run the existing bundle suite and inspect how it spawns dist/index.js. Add the /meow end-to-end cases using a preload to redirect only the cat API origin. Done means the listed success, retry, filtering, degradation, masking, redirect, and failed-write behaviours pass against the shipped bundle.

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

Descrizione

agent/quality hive/hosted-available-lke648397-260827-5q9t hive/verified-open kind/cleanup quality testing

Finding

/meow (src/issueComment/meow.ts) is the one issue_comment command the bundle end-to-end suite never runs. __tests__/bundle/bundle.test.ts drives /kind, /label, /assign, /close, /lgtm, /approve, /retest, /ok-to-test, /remove, /milestone, /hold, /auto-cc, /check-required-labels; the open hold-gated PRs cover /cc /uncc /unassign /retitle /lock /reopen (#238), /test and lgtm cancel (#240) and the cron jobs input (#242). Nothing spawns the committed dist/index.js with prow-commands: /meow.

That matters more for /meow than for the others: it is the only handler that calls out to a third-party origin from the runner (fetch('https://api.thecatapi.com/…') via the global fetch, with redirect: 'manual', AbortSignal.timeout, a 5xx retry loop, an x-api-key header from the cat-api-key input and a host allow-list on the returned url). Whether the ncc bundle preserves that behaviour — global fetch resolution, core.setSecret masking of the key, the "provider outage degrades to a note, only the GitHub write fails the action" contract — is exactly what a unit test with a mocked fetch cannot show.

Evidence

  • Unit: npx vitest run --coverage on main @ c48bd6d (Node v26.10.0, @vitest/coverage-v8 5.0.1): src/issueComment/meow.ts 100 % stmts / 97.5 % branch / 100 % lines (__tests__/issueCommentTest/meow.test.ts, fetch mocked in-process).
  • End-to-end: grep -n meow __tests__/bundle/*.ts → no match on main @ c48bd6d, and none of #236/#238/#240/#242 add one. The bundle suite's hits on src/ are not captured in the coverage report (#235), so this is established from the test inventory, not from a merged profile.

Recommendation

Add a bundle test that spawns dist/index.js on an issue_comment event with prow-commands: /meow against fakeGithub.ts plus a local stand-in for the cat api. The cat api url is hardcoded in meow.ts, so the child needs a preload (NODE_OPTIONS=--require) that rewrites only the https://api.thecatapi.com origin to the stub and leaves headers, redirect and signal untouched. Cases worth asserting end-to-end:

  • a /meow line posts ![cat](<url>) as the only GitHub call (no authorization read, no post-command sweep)
  • cat-api-key reaches the provider as x-api-key and is masked (::add-mask::) in the log
  • a 5xx is retried (up to three attempts), a 4xx is not, and a redirect is never followed
  • an empty list / record without url / http: url / foreign host / unparsable url all degrade to The cat API is unavailable right now. with a ::warning::, exit 0
  • /meow in a fenced block, /meowvie, /meow please, can we /meow make no request to either api
  • a refused GitHub comment write fails the run

Priority

  • Impact: medium — unit-covered; the only handler that reaches a third-party origin has no shipped-bundle evidence
  • 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
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.