refactor: consolidate formatDuration to single source in time-format.ts#1853
Open
iyoda wants to merge 2 commits intocode-yeongyu:devfrom
Open
refactor: consolidate formatDuration to single source in time-format.ts#1853iyoda wants to merge 2 commits intocode-yeongyu:devfrom
iyoda wants to merge 2 commits intocode-yeongyu:devfrom
Conversation
This was referenced Feb 15, 2026
There was a problem hiding this comment.
1 issue found across 19 files
Confidence score: 2/5
- High risk due to a concrete install/build failure:
package.jsonadds a self-dependency (oh-my-opencode), which creates a circular dependency and will break installation. - Because this is a clear, high-severity issue (9/10) with certain impact, it significantly lowers merge safety.
- Pay close attention to
package.json- remove the invalid self-dependency to avoid build failures.
Prompt for AI agents (all issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="package.json">
<violation number="1" location="package.json:65">
P0: Invalid self-dependency 'oh-my-opencode' added to dependencies. The package cannot depend on itself - this creates a circular dependency and will cause installation/build failures. This appears to be an accidental inclusion unrelated to the PR's formatDuration refactoring.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
package.json
Outdated
There was a problem hiding this comment.
P0: Invalid self-dependency 'oh-my-opencode' added to dependencies. The package cannot depend on itself - this creates a circular dependency and will cause installation/build failures. This appears to be an accidental inclusion unrelated to the PR's formatDuration refactoring.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At package.json, line 65:
<comment>Invalid self-dependency 'oh-my-opencode' added to dependencies. The package cannot depend on itself - this creates a circular dependency and will cause installation/build failures. This appears to be an accidental inclusion unrelated to the PR's formatDuration refactoring.</comment>
<file context>
@@ -62,6 +62,7 @@
"detect-libc": "^2.0.0",
"js-yaml": "^4.1.1",
"jsonc-parser": "^3.3.1",
+ "oh-my-opencode": "^3.5.5",
"picocolors": "^1.1.1",
"picomatch": "^4.0.2",
</file context>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
0dc8f9a to
7f9c969
Compare
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.
Summary
Consolidate 4 identical
formatDurationimplementations down to 1 canonical source atsrc/shared/time-format.ts.Changes
src/features/background-agent/format-duration.tssrc/features/background-agent/duration-formatter.tssrc/tools/delegate-task/time-formatter.tsshared/time-formatNet: -41 lines removed
Verification
bun run typecheck✅bun test✅ (2693 pass, 0 fail)bun run build✅PR Stack
This is PR 2 of 9 in the code deduplication refactor series. Depends on #1852.
Summary by cubic
Consolidates all duration formatting into a single utility at src/tools/background-task/time-format.ts and deletes dead background-task modules to reduce duplication and maintenance.
Written for commit 7f9c969. Summary will update on new commits.