Repository navigation
test(label-sync): pin the case-insensitive name and color folds, the null-description fold, the dry-run counts and per_page - #531
Conversation
…null-description fold, the dry-run counts and per_page The 'only the case of the name or color differs' test built its fixture with withChanges, which matched names exactly, so the re-cased Kind/Bug and LGTM entries never replaced anything and the test passed with the .toLowerCase() folds removed. withChanges now matches case-insensitively and the test asserts the fixture really carries the re-cased entries, plus a mixed-case configured name against a lowercase repository label. Also pins: a configured empty description against a null repository description is in sync; the exact dry-run summary line; per_page=100 on the label listing. Each of the six surviving mutants on src/cronJobs/labelSync.ts (lines 52, 57, 63, 86, 130, 133) now fails exactly one test. 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 |
|
Please add a kind label with |
mrbobbytables
left a comment
There was a problem hiding this comment.
Copilot review performed under the maintainer's explicit authorization to update, review, release reviewed holds, and merge eligible PRs in this cleanup.
The re-cased fixture now actually replaces labels, and the cases observe case-insensitive names/colors, null-versus-empty description equivalence, pagination and exact dry-run counts.
Verified successful build-test, e2e-coverage and DCO results on head 71dd891. Any folded issue findings remain assigned to the canonical destinations in the updated scope tables.
Test Improvement
Files:
__tests__/cronJobTest/labelSync.test.tsonly. Nosrc/,dist/,docs/or config change. Disjoint from every open held PR (#510–#530): none touches this file; #528 adds only__tests__/bundle/files forlabelSync.ts:107.A single-operator mutation probe over
src/cronJobs/labelSync.tsonmain@ 88241f4 (18 mutants againstnpx vitest related src/cronJobs/labelSync.ts --run, 4 files / 77 tests) left six non-equivalent survivors. The headline one: the test titledwrites nothing when only the case of the name or color differs …built its fixture withwithChanges(...), whosechange.name === label.namematch is exact, so the re-casedKind/Bug/LGTMentries never replaced anything and the served fixture wascompleteunchanged — the test passed with every.toLowerCase()fold deleted.This PR:
withChangesmatch names case-insensitively and asserts the served fixture really containsKind/BugandLGTM(killslabelSync.ts:57map key and:130color compare); adds a mixed-case configured nameNeeds-Triageagainst a lowercase repositoryneeds-triage(kills:63, which no lowercase catalog name can reach)description: ""vs repositorydescription: null→ no write, one moreunchanged(kills:133?? '')core.infoline exactly —would create 1 [kind/bug], would update 1 [lgtm (color, description)], unchanged 17(kills:86)per_page=100on the label listing in the paging test (kills:52)Equivalent survivors left alone:
:117/:118spread folds (JSON.stringifydropsundefined, so the wire body is identical either way).Verification (this branch, local)
npx vitest run __tests__/cronJobTest/labelSync.test.ts: 15 passed (was 14)src/cronJobs/labelSync.ts,npx vitest related src/cronJobs/labelSync.ts --run: 1 failed | 77 passed for every one (mutants reverted, not committed)npx eslint __tests__/cronJobTest/labelSync.test.ts: cleanRelated Issue
Refs #523 — this lands the
labelSync.test.tsfinding the hive folded onto that tracker (five boxes, all in this PR). The tracker's owntrigger.test.tsfinding is #524's, and its other folded items (approveReview, therun.ts:40/config.ts:657v8-ignore) are #527's and asrc/change respectively, so the issue stays open.Filed by quality agent (hold-gated mode). Human review required.
— hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88