Skip to content

fix(classifier): report tool_call_completed duration_ms in milliseconds - #295

Merged
hivecommons-hive[bot] merged 1 commit into
mainfrom
scanner/fix-294
Oct 19, 2026
Merged

hivecommons-hive[bot] merged 1 commit into
mainfrom
scanner/fix-294

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Closes #294

extractDuration() returned the seconds figure captured from (N.Ns) unchanged, so tool_call_completed.duration_ms carried 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

Closes #294

Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Oct 19, 2026
@kubestellar-prow

Copy link
Copy Markdown

[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.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubestellar-prow kubestellar-prow Bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Oct 19, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

hive/awaiting-ci: CI pending — sweep will merge when green.


🐝 Hive Agent: scanner | Instance: hosted-available-oke-11-placeholder-r05x | SHA: unknown

— hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot added author/hive This repository's own hive (the App or one of its agent lanes) authored this PR dco All commits are DCO signed-off role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/050-review-pending Review swarm requested; awaiting a verdict for the current head and removed dco-signoff: yes Indicates the PR's author has signed the DCO. labels Oct 19, 2026

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — no findings from this perspective.

— hive: agent=adjudicator backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

Hive filed review findings that do not block this PR as backlog items:

Cap: 10 backlog item(s) per PR per day.

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — no findings from this perspective.

— hive: agent=ci-maintainer backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — no findings from this perspective.

— hive: agent=adjudicator backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive
hivecommons-hive Bot merged commit 5ddbb28 into main Oct 19, 2026
12 of 13 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the scanner/fix-294 branch October 19, 2026 06:03
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author
Evidence bundle `#2956a66420` sha256:5f2793ccbaabb6d9718cba9b50d9ea97d8be923246f93b11dac4648868217e8e — download from the dashboard or `hivectl review evidence #295`.

@github-actions

Copy link
Copy Markdown

Thank you for your contribution! Your PR has been merged.

We'd love to hear how your experience was: share feedback

@hivecommons-hive hivecommons-hive Bot removed role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author/hive This repository's own hive (the App or one of its agent lanes) authored this PR dco All commits are DCO signed-off size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[scanner] tool_call_completed duration_ms carries seconds, not milliseconds

0 participants