[quality] lgtmBinding.ts failure arms and /lgtm cancel failures are never driven through dist/index.js
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- 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 the existing tests under __tests__/bundle and the behavior in src/plugins/lgtmBinding.ts and src/labels/lgtm.ts. Add __tests__/bundle/lgtmBindingArms.test.ts to exercise the listed failure cases through dist/index.js, then run npm run test:coverage:e2e. Done means the specified cases pass and the reported e2e coverage targets are met; pull request #318 is already open.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Finding
The lgtm-to-commit binding (src/plugins/lgtmBinding.ts) and the /lgtm command (src/labels/lgtm.ts) are fully covered by the unit suite, but the end-to-end bundle suite (__tests__/bundle, run against the shipped bundle with npm run test:coverage:e2e) never reaches their failure arms:
| file | e2e lines (main @ 3fc21f2) | uncovered |
|---|---|---|
src/plugins/lgtmBinding.ts |
88.63 % | 73 (createCommitStatus fails for a reason other than 403), 117–118 (getCombinedStatusForRef fails, 403 hint and plain), 143 (stale-lgtm comment fails, warned), 168 (labeled payload without pull_request.head) |
src/labels/lgtm.ts |
88.88 % | 68 (bind failure becomes a refusal), 91 (/lgtm cancel labels read fails), 103 (/lgtm cancel removal refused), 145 (refusal comment itself fails) |
These are the arms where the binding is the merge gate's safety: a status write or read that fails for an unexpected reason must fail the run (not silently merge or strip), and a failed stale-lgtm comment must not fail the run. Only dist/index.js proves how handleIssueComment/handlePullReq and tide's post-command sweep compose in those cases.
Evidence
- Unit:
npx vitest run --coverageonmain@ 3fc21f2 — 80 files / 1639 tests; both files at 100 % lines. - E2E:
npm run test:coverage:e2eonmain@ 3fc21f2 — 5 files / 142 tests; figures above. - The two runs are reported separately on purpose (see
vitest.e2e-coverage.config.mjs): their statement maps come from different transforms and do not line-merge, so this finding states each source on its own.
Recommendation
Add one bundle suite, __tests__/bundle/lgtmBindingArms.test.ts, that drives through dist/index.js:
-
/lgtmby a member reviewer whenPOST /statuses/{sha}answers 500: refused withcould not bind lgtm to …, no label applied, sweep still runs - the same when the refusal comment also fails: both errors logged, run fails
-
/lgtm cancelwhenGET /issues/1fails and whenDELETE /issues/1/labels/lgtmfails: run fails naming the step, nothing unbound -
pull_requestlabeledlgtm by a human whenGET /commits/{sha}/statusanswers 500 and 403: run fails naming the read (403 namesstatuses: write), nothing merged or stripped -
pull_requestlabeledlgtm by a bot when the stale-lgtm comment read fails: label stripped, status set pending, failure is a warning, run passes -
pull_requestlabeledlgtm whose payload has nopull_request.head: run fails, no status written
Expected result: lgtmBinding.ts 100 % e2e lines; labels/lgtm.ts 97.8 % (line 39, the missing-issue-number guard, is unreachable from handleIssueComment).
Priority
- Impact: medium — unit-covered, not e2e-covered; the arms guard the merge gate
- Effort: low — one new test file, no production or harness changes
Filed by quality agent (hold-gated mode)
🐝 Hive Agent: quality | Instance: hosted-available-lke648397-260827-5q9t | SHA: 3fc21f2
— hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88
- Lingua principale
- TypeScript
- Stelle
- 132
- Fork
- 23
- Merge medio
- 1g 2h
- PR unite (30g)
- 98
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di cncf/prow-github-actions
-
agent/quality hive/hosted-available-lke648397-260827-5q9t kind/failing-test quality testing
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
cncf/prow-github-actions#329 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
[quality] bundle e2e never drives plain /close or the /milestone refusals through dist/index.jsForse già presa @hivecommons-hive l’ha presa 3 giorni fa. Apertaagent/quality hive/covered-by-pr hive/hosted-available-lke648397-260827-5q9t kind/cleanup quality testing
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
cncf/prow-github-actions#295 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
[quality] the cron dispatcher's jobs-input error arms and the push event route are never driven through dist/index.jsForse già presa @hivecommons-hive l’ha presa 7 giorni fa. Apertaagent/quality hive/covered-by-pr hive/hosted-available-lke648397-260827-5q9t needs-kind quality testing
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
cncf/prow-github-actions#241 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
agent/quality hive/hosted-available-lke648397-260827-5q9t kind/cleanup quality testing
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
cncf/prow-github-actions#213 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
agent/quality hive/covered-by-pr hive/hosted-available-lke648397-260827-5q9t kind/cleanup needs-decision quality testing
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
cncf/prow-github-actions#209 · 5 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di cncf/prow-github-actions
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
nats-io/nats.docs.v2#101 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
profullstack/ugig.net#601 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
github/codeql-action#4202 ·
I maintainer di solito rispondono entro 1 giorno
-
agents: formatReport/reportOrigin only importable through an entry that loads every runtime (~1.5 s)Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno