Repository navigation
test(label-sync,app): pin the failure-list and source separators, the label-sync debug trace and the private-key trim - #689
Conversation
… label-sync debug trace and the private-key trim A Stryker pass over the four src/ modules no earlier probe covered (adapters/app/settings.ts, cronJobs/handleCronJob.ts, cronJobs/labelSync.ts, utils/octokit.ts) left five behavioural survivors; each test here fails under exactly one of them and passes on main: - labelSync.ts:90 and handleCronJob.ts:31: a run where two creates are refused must fail naming both labels with their reasons, comma-separated, after logging 'running label-sync job' as sweep.test.ts already pins for the lgtm and sweep jobs. - labelSync.ts:45: with an org-level and a repo-level prow.yaml the debug line names both sources, comma-separated, instead of 'the built-in defaults only'. - settings.ts:40: a key carrying the newlines and spaces a secret file or heredoc leaves around it is trimmed after the \n unescape, as the docstring and docs/github-app.md promise. Signed-off-by: quality <280983584+hivecommons-hive[bot]@users.noreply.github.com>
|
Important Held for human review by the hive's ACMM level gate. This PR was opened by the "quality" agent while Hive policy required a human checkpoint for that agent. Agent PRs are held at ACMM L3–L5; an Hive will keep the |
bfaaaf1
ℹ️ Sentinel notice — informational; author is trusted (hive agent), merge is not blockedHive flagged this PR (author @hivecommons-hive[bot], head
Hive did not add the |
|
Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor. Reviewed by Reviewer notesRead the sources, not just the diff; this looks correct to me. Verified against the tree at
Both files pass as a whole: 36/36 locally, CI green. Test-only change, no production code touched, and the occupied-ground claim holds — no other open quality PR touches these two files. The No findings. |
|
/kind cleanup 🐝 Hive Agent: — hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88 |
Test Improvement
Three tests in two existing files, pinning the five behavioural survivors of a Stryker pass over the four
src/modules no earlier probe had covered (adapters/app/settings.ts,cronJobs/handleCronJob.ts,cronJobs/labelSync.ts,utils/octokit.ts: 200 mutants, 186 killed, 14 survived; the other nine are equivalent or change only aninfolog's separator):__tests__/cronJobTest/labelSync.test.ts—names every refused label with its reason, comma-separated, when several writes fail: two 422s, asserting the wholesetFailedmessage (2 label(s) could not be synced: kind/bug (…), lgtm (…)) and therunning label-sync jobdebug line (labelSync.ts:90,handleCronJob.ts:31; the existing case provokes one failure so the separator was never exercised, andsweep.test.ts:730pins the sibling debug lines forsweepandlgtmonly).__tests__/cronJobTest/labelSync.test.ts—names each configuration source the labels came from, comma-separated: an org-level and a repo-levelprow.yaml, asserting the debug line names both (labelSync.ts:45, both thesources.length === 0arm and thejoin(', ')).__tests__/adapters/app/platform.test.ts—trims the newlines and spaces a secret file or heredoc leaves around the key:settingsFromEnvwith a key wrapped in\n/spaces, expecting the trimmed,\n-unescaped PEM (settings.ts:40, the.trim()the docstring anddocs/github-app.mdpromise).No production code changes. Verified at
9aa12b8: each of the five mutations applied by hand makes exactly one of these tests fail; restored, 36/36 pass in the two files;eslintandtsc -p tsconfig.test.jsonclean.Why these and not the equivalent ones:
{ required: false }→{}is the input getter's default,/\s+/→/\s/is hidden by thefilter(c => c !== '')that follows, andcreateLabel'scolor/descriptionspreads serialise identically because JSON dropsundefined.Related Issue
Refs #682 — this lands the settings/labelSync survivor finding the hive folded into that issue; the issue's primary finding (the v8-ignore hint guard under Stryker's sandbox) remains open and is carried by #683.
Occupied-ground check: touches only
__tests__/cronJobTest/labelSync.test.tsand__tests__/adapters/app/platform.test.ts; held #681 touchescron.test.ts/redis.test.ts/stores.test.ts, #685sweepDelayGuards.test.ts, and none of #680–#688 touch either file.Filed by quality agent (hold-gated mode). Human review required.
— hive: agent=quality backend=copilot model=claude-fable-5.1