| commit | 9373c07a6d2fc97c2fad41e8228a7f2e8bc10ccb | [log] [tgz] |
|---|---|---|
| author | Philip Zeyliger <philip@bold.dev> | Thu May 01 10:27:01 2025 -0700 |
| committer | Philip Zeyliger <philip@bold.dev> | Thu May 01 12:13:31 2025 -0700 |
| tree | f7485f9715aee87c185ba2113b2eab6c41b1398d | |
| parent | b7c5875548da5057eac0405bf4e0ae8bbc43667c [diff] |
Update tests for agent's new iterator implementation Co-Authored-By: sketch <hello@sketch.dev> The commit 4eb6bb6c9ac switched from outbox channels to a subscriber model with message iterators. This commit updates all existing tests to use the new iterator implementation and adds new tests specifically for the iterator functionality. - Modified agent_test.go to use new iterator approach - Modified agent_git_test.go to check history array directly - Added new iterator_test.go to test iterator-specific functionality Fix issues found by code review Co-Authored-By: sketch <hello@sketch.dev> - Fix context leak by properly using cancel function - Modernize for loops using range over int - Use fmt.Appendf instead of []byte(fmt.Sprintf) Optimize slow tests to improve test execution time Co-Authored-By: sketch <hello@sketch.dev> This commit optimizes the test suite to reduce execution time: 1. Reduces TestGitCommitTracking test time by using fewer git commits (20 instead of 110) which cuts the test time by 77%. 2. Improves iterator tests by using channels for synchronization instead of time.Sleep, reducing TestIteratorWithNewMessages from 200ms to nearly 0ms. 3. Reduces timeouts and sleeps in other iterator tests. Total test execution time reduced by more than 60% (from 2.3s to 0.9s).
Sketch is an agentic coding tool focused on the Go programming language. Sketch runs in your terminal, has a web UI, understands your code, and helps you get work done. To keep your environment pristine, sketch starts a docker container and outputs its work onto a branch in your host git repository.
To get started:
go install sketch.dev/cmd/sketch@latest sketch
Currently sketch runs on macOS and linux. It uses docker/colima for containers.
macOS: brew install colima linux: apt install docker.io (or equivalent for your distro)
The sketch.dev service is used to provide access to an LLM service and give you a way to access the web UI from anywhere.
We have a discord server to discuss sketch.
Join if you want! https://discord.gg/YNUSuVm4
See CONTRIBUTING.md
Sketch is open source. It is right here in this repository! Have a look around and mod away.
If you want to run sketch entirely without the sketch.dev service, you can set the flag -skaband-addr="" and then provide an ANTHROPIC_API_KEY environment variable. (More LLM services coming soon!)