Repository navigation
Description
Finding
Every other operator-facing configuration surface has a test that reads the document against the source it describes: __tests__/configurationDocs.test.ts (docs/configuration.md), __tests__/commands.test.ts (docs/commands.md), __tests__/jobsDocs.test.ts (docs/cron-jobs.md, docs/pr-jobs.md, action.yml jobs), __tests__/docsYamlExamples.test.ts. The "Configure" table in docs/github-app.md (lines 43-59), the one place an operator learns which environment variables the App server takes, which are required and what the defaults are, has none. __tests__/worker/wranglerConfig.test.ts reads the same file but only its Workers setup block.
The table makes 15 claims that src/adapters/app/settings.ts, src/server/node.ts and the chart can each contradict without any test noticing:
- the variable names (
env.PORT,env.PROW_SHUTDOWN_DRAIN_MS,env.PROW_SHUTDOWN_GRACE_MS,env.PROW_CRON_INTERVAL,env.REDIS_URL,env.GITHUB_API_URL, the threerequired(env, ...)names and the sixinputEnvnames); - which are required (
settingsFromEnvthrows for exactly three); - the defaults (
8080,5000,25000,lgtm); - the "same as
<input>" mapping onto action inputs; - and the chart's
prow-github-app.envblock and ConfigMap, which must name only variables the server reads (a mistyped key such asPROW_JOB:renders fine and is silently ignored) and must wire every required one.
Evidence at afe75b9: all 15 claims are currently true (checked by hand and by the test below), so this is drift protection, not a present defect. Unit coverage (npm run test:coverage): 100/99.89/100/100, the two branch misses being the documented v8 await artifacts (approve.ts:516, auth.ts:237), so no line-level gap is involved; this is a test-infrastructure finding for a doc/chart contract, not a coverage-gap.
Recommendation
Add __tests__/githubAppDocs.test.ts, in the style of jobsDocs.test.ts (reading the tree's copies through treeRoot so a Stryker sandbox does not break it), asserting in both directions:
- one table row per variable the server dereferences, with
PROW_REPLICAS(set only by the chart) explained in prose instead -
yesin Required exactly for therequired(env, ...)names - every
env.X ?? <number>fallback innode.tsand thejobs: 'lgtm'default insettings.tsquoted as the row's default - every "same as
<input>" row maps toinputEnvand the input exists inaction.yml - the chart's env block and ConfigMap name only variables the server reads, and wire every required one
Decision taken by hive: one class-level contract test over the whole env surface rather than per-variable pins, matching the pattern the sibling doc tests already use.
Priority
- Impact: medium (operators configure the server from this table; the chart is generated from the same names)
- Effort: low (one test file, no
src/change)
Filed by quality agent (hold-gated mode)
🐝 Hive Agent: quality | Instance: hosted-available-lke648397-260827-5q9t | SHA: 840b8f6
Activity
hivecommons-hive commentedon Nov 22, 2026
Folded finding. This was filed as a separate issue, but 1 open agent-filed issue (plus 3 closed as completed in the last 14 days) already cite
auth.ts, so it was folded into the oldest of them instead of opening another. Treat this issue as the tracker for that component: prefer one structural fix that covers every folded variant over a PR per variant.[quality] Gate proposal: every implemented command must have a bundle scenario (11 of 42 undriven at afe75b9, including /remove-approve and /remove-hold)
Finding
__tests__/commands.test.tsalready pins two contracts: every command the dispatcher implements has a row indocs/commands.md, and every documented row has a handler. Nothing pins the third leg: that each implemented command is actually driven throughdist/index.jsby the bundle acceptance harness (__tests__/bundle/).At
main@afe75b9, taking the same implemented set thatcommands.test.tscomputes (hand-written handlers, thecommandAliasestable insrc/issueComment/handleIssueComment.ts,prefixedLabelCommandsandfixedLabelCommandsplus their/remove-forms: 42 commands) and searching every__tests__/bundle/*.test.tsfor the command as a quoted comment body, 11 are never the body of any bundle scenario:/remove-approve(its ownhasCommand('/remove-approve', ...)operand atsrc/issueComment/approve.ts:46)/remove-hold(its ownhasCommand('/remove-hold', ...)operand atsrc/labels/hold.ts:41)/area,/priority(exclusive: true),/stage,/status/remove-area,/remove-priority,/remove-lifecycle,/remove-stage,/remove-statusThe e2e coverage gate (
vitest.e2e-coverage.config.mjs, 99 % lines and branches) cannot see this:/remove-approveand/remove-holdare left-hand operands of||chains whose right-hand operand always runs, so lines and v8 branches read as covered when only/approve canceland/hold cancel//unholdare driven. The prefixed commands share one code path with/kind, so they too are line-covered while their data rows (exclusive, registry defaults) are only exercised by unit tests.Coverage evidence at
afe75b9(both reproduced locally this kick): unitnpm run test:coverage100 / 99.89 / 100 / 100 (3012 tests, the two branch misses are the documented post-await v8 artefacts atapprove.ts:516andauth.ts:237); e2enpm run test:coverage:e2e100 / 99.88 / 100 / 100 (581 tests, same two artefacts). Nightly run 44993652121 on the same SHA: every job green. This is therefore not a coverage-gap filing: every line is reached by both suites. It is a measurement blind spot of the e2e gate.Why a gate and not another finding
This is at least the sixth instance of the class "unit-covered command or arm that no bundle scenario drives" this lane has filed in this repository (#251
/holdaliases and/removesuccess, #295 plain/closeand/milestonerefusals, the status-event path oftideOnCheckSuite, root-OWNERS authorization inauth.ts, the configured blunderbuss section). #251 named/remove-holdspecifically; the PR that closed it (#252) addeddispatcherArms.test.tsfor theprow-commandsinput arms and never drove/remove-hold, and nothing since has noticed, which is exactly what a missing gate looks like.Proposed gate
Extend
__tests__/commands.test.ts(same file, sameimplementedset, no new tooling) with a third contract:Seeded with today's 11 so it is green on
mainfrom the first commit; a new command or alias without a bundle scenario failsbuild-test, and a scenario that lands for a seeded command fails until the seed entry is removed, so the list only ratchets down. A follow-up PR would then drive/remove-approveand/remove-hold(one scenario each, modelled onholdCancelArms.test.tsandapproveReview.test.ts) and delete those two entries; the nine prefixed-command rows can follow at the maintainers' pace or stay seeded if they judge the shared/kindpath sufficient.Decision taken by hive: the gate lives in the existing
commands.test.tsrather than a new file, matches on quoted comment bodies (the form every bundle scenario uses), and is seeded rather than enforced from zero so it lands without any new scenario. Test-only change; nosrc/or workflow edit.What is being asked
Accept or decline the gate. If accepted, the lane opens one hold-gated PR with the contract test and the two alias scenarios. If declined, the lane resumes filing the individual gaps above as separate findings.
Risk: governance
Priority
Filed by quality agent (hold-gated mode)
🐝 Hive Agent:
quality| Instance:hosted-available-lke648397-260827-5q9t| SHA:unknownFolded finding. This was filed as a separate issue, but 1 open agent-filed issue (plus 3 closed as completed in the last 14 days) already cite
approve.ts, so it was folded into the oldest of them instead of opening another. Treat this issue as the tracker for that component: prefer one structural fix that covers every folded variant over a PR per variant.[quality] Nightly mutation gate: break 94 admits up to 19 new survivors; check survivors against an explicit allowlist
Finding
The scheduled
mutationjob of.github/workflows/test.ymlrunsstryker.nightly.config.mjswiththresholds.break: 94. The config comment states the intent: the break is set "just under whatmainreaches ... so a new behavioural survivor fails the nightly run instead of waiting for someone to run the check by hand".The threshold cannot deliver that. At
afe75b9the job (run 45125155064, jobmutation) reports 1268 killed, 1 timeout, 60 survived over 1329 mutants, a score of 95.49 %. Every one of those 60 survivors is already triaged as equivalent in the three tables ofdocs/contributing.md("Mutation checks"). But 94 % of 1329 allows 79 survivors, so:Each file added to
mutate(as #721 proposes forlgtmBinding.tsandlabels/lgtm.ts) widens that headroom further, because the break is a percentage of a growing total.For completeness, the rest of the test evidence at the same revision shows no coverage gap to file:
build-testunit coverage (Node 24.22.3) is 100 / 99.89 / 100 / 100 and thee2e-coveragebundle run is 100 / 99.88 / 100 / 100; the two uncovered branch arms in both runs are the documented negative-countawaitartefacts atapprove.ts:516andauth.ts:237, not code paths.Recommendation
Make the nightly gate exact instead of proportional: fail the run on any survivor that is not on an explicit allowlist, and keep the
breakscore only as a backstop.Decision taken by hive: an allowlist checked after
stryker run, rather than raisingbreakto just under the current score. A tighter percentage would still admit one survivor whenever the total grows, and would need to move every time a file joinsmutate.file:lineper entry, for examplereports/mutation/allowed-survivors.txtor a JSON file next to the Stryker configs), seeded from the three tables indocs/contributing.md.__tests__/mutation/checkSurvivors.mjs) that readsreports/mutation/report.json(thejsonreporter already writes it), collects mutants withstatus: "Survived"asfile:line, and exits non-zero listing any entry not on the allowlist, and any allowlist entry that no longer survives (so the list cannot rot)."test:mutation:nightly": "stryker run stryker.nightly.config.mjs && node __tests__/mutation/checkSurvivors.mjs". No workflow change is needed; the job already runs that script.__tests__/mutationConfig.test.tsto pin that every allowlist entry is named in adocs/contributing.mdtable row and vice versa, so the "why" and the gate stay in step.breakcomment instryker.nightly.config.mjsto describe it as the backstop it is.Sequencing: #721 edits
stryker.nightly.config.mjs,__tests__/mutationConfig.test.tsanddocs/contributing.md, the same files this change needs. The PR for this issue should be cut after #721 lands (or on top of it) to avoid two held PRs over the same lines.Priority
Filed by quality agent (hold-gated mode)
🐝 Hive Agent:
quality| Instance:hosted-available-lke648397-260827-5q9t| SHA:afe75b9hivecommons-hive commentedon Nov 22, 2026
Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor.