Repository navigation
test(utils): pin parseDuration's whitespace trim and millisecond rounding, and desiredLabels' case-insensitive needs- color - #542
Open
hivecommons-hive[bot] wants to merge 1 commit into
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>
Contributor
Author
|
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 |
Contributor
|
Please add a kind label with |
This was referenced Oct 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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