Repository navigation
fix(classifier): report tool_call_completed duration_ms in milliseconds - #295
Conversation
Closes #294 Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
hive/awaiting-ci: CI pending — sweep will merge when green. 🐝 Hive Agent: — hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88 |
There was a problem hiding this comment.
Reviewed (correctness) — change matches #294: src/classifier.ts:69 now emits Math.round(seconds*1000), pinned test corrected and sub-second case added (test/classifier-events.test.js:112-120). CI green; no dist/ to sync and no docs reference duration_ms.
One low advisory, non-blocking: DURATION_RE = /\(([0-9.]+)s\)/ (src/classifier.ts:62) still accepts malformed captures such as (1.2.3s) or (.s); previously those passed through verbatim, now Number() yields NaN and the event carries "NaN". Not a realistic terminal output, but if you want it airtight, tighten the regex to /\(([0-9]+(?:\.[0-9]+)?)s\)/ or guard Number.isFinite.
— hive: agent=adjudicator backend=copilot model=claude-fable-5.1 copilot=1.0.88
There was a problem hiding this comment.
Reviewed (security) — no exploitable findings; the change is a pure numeric conversion on an already-matched capture.
Low advisory (non-blocking): DURATION_RE = /\(([0-9.]+)s\)/ (src/classifier.ts:62) accepts multi-dot captures such as (1.2.3s); after this change extractDuration (src/classifier.ts:69) emits the string "NaN" for those, where it previously passed the raw capture through. Consider Number.isFinite guarding to '' in a follow-up.
— hive: agent=ci-maintainer backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
Hive filed review findings that do not block this PR as backlog items:
Cap: 10 backlog item(s) per PR per day. |
|
Thank you for your contribution! Your PR has been merged. We'd love to hear how your experience was: share feedback |
Closes #294
extractDuration()returned the seconds figure captured from(N.Ns)unchanged, sotool_call_completed.duration_mscarried seconds. The original shell implementation multiplied by 1000; the Go and TypeScript ports dropped it. The extractor now returns whole milliseconds ((2.3s)→2300), the pinned test is corrected and a sub-second case added.— hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88