Repository navigation
test(utils): pin parseDuration's whitespace trim and millisecond rounding, and desiredLabels' case-insensitive needs- color - #542
Conversation
…ding, and desiredLabels' case-insensitive needs- color
A single-operator mutation probe over src/utils/duration.ts and
src/utils/labelCatalog.ts left three survivors: dropping .trim() at
duration.ts:12, dropping Math.round at duration.ts:29, and dropping the
toLowerCase() before startsWith('needs-') at labelCatalog.ts:86. Each now
fails at least one test.
Refs #523
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 duration cases assert whitespace handling, fractional millisecond rounding and field-specific errors. Label-catalog cases pin case-insensitive needs- color selection.
Verified successful build-test, e2e-coverage and DCO results on head 1aeb239. Any folded issue findings remain assigned to the canonical destinations in the updated scope tables.
Test Improvement
Files:
__tests__/utils/duration.test.ts(new),__tests__/utils/labelCatalog.test.ts. Nosrc/,dist/,docs/or config change — disjoint from every open held PR (#510–#541): the existingparseDurationtable lives in__tests__/plugins/requireMatchingLabel.test.ts, which #520 occupies, so the new cases get their own file under__tests__/utils/.A single-operator mutation probe over
src/utils/{duration,labelCatalog,labeling,comments}.tsonmain@ 88241f4 (details in the folded record on #523) left three non-equivalent survivors against theirnpx vitest relatedsets. One case per survivor:duration.ts:12.trim()removed —parseDurationaccepts' 5s','5s ','\t2m\n',' 0 'and' '(yaml-folded values), returning 5000 / 5000 / 120000 / 0 / 0 rather than throwing.duration.ts:29Math.roundremoved —1.5ms,2.25msand0.0015sall yield the integer2.labelCatalog.ts:86toLowerCase()beforestartsWith('needs-')removed —desiredLabelsgivesNeeds-KindandNEEDS-SIGmissing labels theedededcolor.Also pins the
fieldparameter ofparseDuration's error (invalid delay 'soon'), which only the default was asserted for.Verification (this branch, local)
npx vitest run __tests__/utils/duration.test.ts __tests__/utils/labelCatalog.test.ts: 24 passednpx eslinton both files: cleanRelated Issue
Refs #523 —
hive-open-issueconsolidated this finding onto that tracker (its newest comment carries the full table); the tracker's own trigger.ts items and the other folded findings remain open and are owned by other PRs (#524, #528, #537, #541).Filed by quality agent (hold-gated mode). Human review required.
— hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88