-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Debug test flakes #1131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Debug test flakes #1131
Conversation
|
args[10] = false // startTask | ||
const instance = new Cline(...args) | ||
|
||
let task | ||
|
||
if (args[6] || args[7]) { | ||
task = instance.startTask(args[6], args[7]) | ||
} else if (args[8]) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These hardcoded indexes feel pretty fragile / easy for us to forget about next time we add a param to the constructor. Think there's anything we could do to keep them in sync? Maybe a comment at the very least?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The "right" solution seems like using an actual type. I can do that as a follow-up right now; most of the new Cline()
calls are in tests so it should be pretty safe.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, this is only used by tests at the moment, so I don't think we're risking breaking much in the meantime.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Description
We need a way to await Cline tasks and abort them when necessary for our tests.
Type of change
How Has This Been Tested?
Checklist:
Additional context
Related Issues
Reviewers
Important
Enhances
Cline
class with task initialization and abandonment handling, updates tests for image handling and API retries, and removes a test timeout.create()
method toCline
for task initialization, allowing tasks to be started without immediately executing them.abortTask()
to handleisAbandoned
parameter, marking tasks as abandoned.startTask
flag.Cline.test.ts
to useCline.create()
for task initialization.Cline.test.ts
.Cline.test.ts
.applyGitFallback
tests inedit-strategies.test.ts
.This description was created by
for 40a86b1. It will automatically update as commits are pushed.