Skip to content

refactor: remove dead code in utils#335

Open
Jisung Chae (jisung-02) wants to merge 1 commit into
mainfrom
chore/remove-dead-code
Open

refactor: remove dead code in utils#335
Jisung Chae (jisung-02) wants to merge 1 commit into
mainfrom
chore/remove-dead-code

Conversation

@jisung-02

@jisung-02 Jisung Chae (jisung-02) commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

What

Remove unused functions from pkg/utils/utils.go: JoinUint64s and the ExpandGlobArgs family (expandSingleGlobArg, toAbsolutePattern, toRelativePaths, containsGlobPattern), plus the now-unneeded path/filepath import.

Why

The removed functions had zero callers. ExpandGlobArgs was only ever used by the old pkg/runner/shell.go; once shell execution moved to executor/handlers/shell/, the call site went away and the functions became dead code.

No behavior change. Build and tests pass.

Copilot AI review requested due to automatic review settings June 18, 2026 05:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Not ready to approve

The new NextBackOff implementation can overflow time.Duration on doubling before applying the cap, which can produce negative intervals for very large MaxInterval configurations.

Pull request overview

This PR removes unused utility helpers from pkg/utils and simplifies the retry backoff calculation in internal/retry by switching from math.Min to the Go built-in min, reducing imports and avoiding float conversions.

Changes:

  • Removed dead code from pkg/utils/utils.go (JoinUint64s and glob-expansion helpers).
  • Simplified ExponentialBackoff.NextBackOff in internal/retry/retry.go to use min() and drop the math import.
File summaries
File Description
pkg/utils/utils.go Deletes unused helper functions and removes the now-unneeded path/filepath import.
internal/retry/retry.go Simplifies backoff capping logic by using min() instead of math.Min.

Copilot's findings

  • Files reviewed: 2/2 changed files
  • Comments generated: 1

Note

Your feedback helps us improve the quality of this feature.
Please use 👍 or 👎 to tell us whether this assessment is correct.

Comment thread internal/retry/retry.go Outdated
@jisung-02 Jisung Chae (jisung-02) changed the title refactor: remove dead code in utils and simplify NextBackOff refactor: remove dead code in utils Jun 18, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ Ready to approve

The change is limited to verified-unused code removal (no remaining in-repo call sites), with no functional behavior changes introduced.

Note: this review does not count toward required approvals for merging.

Copilot's findings
  • Files reviewed: 1/1 changed files
  • Comments generated: 0 new

Note

Your feedback helps us improve the quality of this feature.
Please use 👍 or 👎 to tell us whether this assessment is correct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants