[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
Los mantenedores suelen responder en 2 días
Ya se ha fusionado un pull request relacionado.
- #611 de @hivecommons-hive — fusionado
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 55/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- node.js, typescript
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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
- Lenguaje dominante
- TypeScript
- Estrellas
- 132
- Forks
- 24
- Merge medio
- 1 d 12 h
- PR fusionados (30 d)
- 229
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de 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())Posiblemente ocupada @hivecommons-hive la tomó hoy. Abiertoagent/quality needs-kind stage/040-covered-by-pr testing
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
cncf/prow-github-actions#629 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
[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 unassertedPosiblemente ocupada @hivecommons-hive la tomó hoy. Abiertoagent/quality needs-kind stage/040-covered-by-pr testing
Dificultad 2/5 1-3 horas Aptitud para principiantes 30/100
cncf/prow-github-actions#625 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
[quality] Gate proposal: scheduled Stryker run over the whole src/ tree (five advisory shards)Abiertoagent/quality needs-human needs-kind stage/045-needs-decision testing
Dificultad 4/5 3-5 días Aptitud para principiantes 30/100
cncf/prow-github-actions#594 · 4 comentarios ·
Los mantenedores suelen responder en 2 días
-
🐝 Hive Advisory ReportAbiertohive/advisory kind/cleanup needs-human stage/045-needs-decision
Dificultad 5/5 Más de una semana Aptitud para principiantes 15/100
cncf/prow-github-actions#170 · 5 comentarios ·
Los mantenedores suelen responder en 2 días
Todos los issues de cncf/prow-github-actions
Issues similares
-
b:minor bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
software-mansion/argent#1698 ·
Los mantenedores suelen responder en 1 día
-
e2e-failure ready-to-code
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
redhat-developer/rhdh-plugin-export-overlays#4624 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
better-auth/better-auth#12132 · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
automation missing-model model-sync provider:tinfoil
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
anomalyco/models.dev#12053 ·
Los mantenedores suelen responder en 1 día
-
o8 next debug build aborts on Glass to Dark appearance switch (nil identifier messaged before check)Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
hurttlocker/o8#5112 ·