[quality] src/server (GitHub App server) is never executed: entry point at 0 % lines, default background arm unpinned, dist-server bundle never built-and-run by any test
I maintainer di solito rispondono entro 2 giorni
Una pull request collegata è già stata integrata.
- #611 di @hivecommons-hive — integrata
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 55/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- node.js, typescript
Direzione di ricerca
Read the existing tests in __tests__/main.test.ts and inspect src/server/main.ts, src/server/node.ts, and src/adapters/app/webhook.ts. Add the four tests described in the issue, including building and booting the ncc bundle in a temporary directory. Run npm test and test:coverage; done means the server entry point, default background behavior, non-Error throw path, and shipped bundle are exercised.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Finding
#608 added the GitHub App adapter (src/adapters/app/) and its Node server (src/server/), shipped as a separate ncc bundle (dist-server/index.js, built by npm run pack:server and run by the Dockerfile). vitest.e2e-coverage.config.mjs excludes src/adapters/app/** and src/server/** from the bundle-coverage run with the note "unit coverage holds them to 100%". At main@282b8e0 that is not what the unit run reports:
| file | lines | miss |
|---|---|---|
src/server/main.ts |
0 % | line 3 — the entry point main() call is never executed |
src/server/node.ts |
94.7 % | line 24 — buildReceiver's default background (every test overrides it); branch at line 47, the env.PORT ?? 8080 default |
src/adapters/app/webhook.ts |
100 % lines, 93.75 % branches | line 65 — the String(error) arm when building the platform throws a non-Error |
Separately, nothing executes the server as shipped. __tests__/bundle/ runs the committed dist/index.js end to end and selfContained.test.ts checks its require() list, but dist-server/ is gitignored, test.yml builds it (npm run pack) only after test:coverage, and no test reads or boots it. An ncc-specific breakage in the server bundle (a leaked require, a dynamic import ncc cannot follow, a node: prefix issue in hono / @octokit/auth-app) would pass CI and fail at docker run.
Evidence / provenance
- Unit:
npx vitest run --coverageonmain@282b8e0, local — All files 99.88 / 99.54 / 99.82 / 99.88;src/server/main.ts0 % lines;src/server/node.ts94.73 % lines, 75 % branches;src/adapters/app/webhook.ts93.75 % branches. The run is green because the floor invitest.config.mjsis 99. - End-to-end (bundle):
vitest.e2e-coverage.config.mjscoverage.exclude: ['src/adapters/app/**', 'src/server/**']— these paths are by design absent from the e2e figure, so there is no e2e evidence to combine; this finding uses unit data only. - Shipped bundle:
npm run pack:server(14.7 s locally) produced a self-contained bundle that, copied to a directory with nonode_modules, answered/healthz200, a signedpingwithpong200 and an unsigned one with 401 — i.e. it works today, and nothing pins that.
Recommendation
One PR, cluster src/server/** + src/adapters/app/webhook.ts:65:
-
__tests__/server/main.test.ts— mirror of__tests__/main.test.ts: loading the entry point callsmain()once with no arguments. -
__tests__/server/node.test.ts— withbuildReceiver's defaultbackground, a signed delivery throughbuildAppis answered 202 while its dispatch is still pending. -
__tests__/adapters/app/webhookNonErrorThrow.test.ts—receiveWebhookanswers 400unusable deliveryand logs the thrown value whenappPlatformthrows a non-Error. -
__tests__/server/bundle.test.ts— buildsrc/server/main.tswith ncc into a temp directory outside the repository (so a leakedrequirecannot resolve), boot it there, and check therequire()list, the JSONlistening on :<port>line,/healthz, a signedpingand an unsigned rejection. Building inside the test is what makes it run innpm testandtest:coveragewithout reorderingtest.yml.
Decision taken by hive: the env.PORT ?? 8080 default (node.ts:47) is left unpinned — reaching it means binding port 8080 on the runner, which is not something a unit test should depend on. If the maintainers want the comment in vitest.e2e-coverage.config.mjs to stay true, that arm is the one line that keeps src/server under 100 % branches after the PR.
Priority
- Impact: medium — a new deployment path (Docker image, beta) with its entry point and shipped artifact never executed by any suite
- Effort: low
Filed by quality agent (hold-gated mode)
🐝 Hive Agent: quality | Instance: hosted-available-lke648397-260827-5q9t | SHA: d8f3f5b
— hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88
- Lingua principale
- TypeScript
- Stelle
- 132
- Fork
- 24
- Merge medio
- 1g 12h
- PR unite (30g)
- 229
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
-
[quality] worker.ts scheduled(), queue consumer and deferViaQueue run under no test (unit excludes the file; miniflare suite only drives fetch())Forse già presa @hivecommons-hive l’ha presa oggi. Apertaagent/quality needs-kind stage/040-covered-by-pr testing
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
cncf/prow-github-actions#629 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
[quality] Helm chart: ingress.yaml is rendered by no helm-unittest suite and by neither kind install; serviceaccount/configmap/service and the apiUrl, extraEnv, image.tag, create=false arms are unassertedForse già presa @hivecommons-hive l’ha presa oggi. Apertaagent/quality needs-kind stage/040-covered-by-pr testing
Difficoltà 2/5 1-3 ore Idoneità per principianti 30/100
cncf/prow-github-actions#625 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
[quality] Gate proposal: scheduled Stryker run over the whole src/ tree (five advisory shards)Apertaagent/quality needs-human needs-kind stage/045-needs-decision testing
Difficoltà 4/5 3-5 giorni Idoneità per principianti 30/100
cncf/prow-github-actions#594 · 4 commenti ·
I maintainer di solito rispondono entro 2 giorni
-
🐝 Hive Advisory ReportApertahive/advisory kind/cleanup needs-human stage/045-needs-decision
Difficoltà 5/5 Più di una settimana Idoneità per principianti 15/100
cncf/prow-github-actions#170 · 5 commenti ·
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di cncf/prow-github-actions
Issue simili
-
area:desktop area:ui bug platform:macos
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
anthropics/claude-code#106183 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
feature:App-Tour feature:Chat ready Web
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
digitalfabrik/integreat-app#4523 · 2 reazioni ·
I maintainer di solito rispondono entro 3 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Required Lexical field accepts two empty paragraphsForse già presa @lazerg l’ha presa oggi. ApertaBug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
payloadcms/payload#19222 ·
I maintainer di solito rispondono entro 1 giorno