Add tests, test-gen command, review fixes, README, CI - #4
Merged
Conversation
- 21 unit tests for lib/ and runners/ (db, metric, state, mock runner) - New test-gen command: generate tests, run, fix failures iteratively - Fix review findings: dynamic default branch detection, --agents whitespace trimming, status cost error handling, session ID validation - README: document Go CLI harness with all 9 commands and examples - GitHub Actions CI: build + vet + test + format check on push/PR
…t quality Critical: - NewSessionID fallback now produces fixed-length 12-char hex (was PID-length) Warnings: - testgen: track test pass/fail, mark session "failed" if tests never pass - testgen: handle CommitAll and GetSteps errors - resume: compile regex at package level, normalize input to lowercase - DefaultBranch: use TrimPrefix for slash-safe branch name parsing - DB tests: check all setup errors via mustCreateSession/mustCreateStep helpers - DB permissions test: handle OpenDB error, close DB, use mask comparison Suggestions: - TruncStr: use rune-based truncation (UTF-8 safe) - Metric truncation test: portable printf instead of /dev/zero - TestDetectRunners: assert runner names and Available() consistency - CI gofmt: run once instead of three times
All 5 tri-* commands now check if the devkit binary is in PATH and delegate to it when found — avoids output truncation, gets SQLite session tracking, and full stdout capture for free. Falls back to plugin-based orchestration if harness not installed. Makefile: add link target, install prints GOPATH/bin path guidance.
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
devkit test-gencommand — generate tests, run, fix failures iteratively (9th command)Test plan
cd src && make build && ./bin/devkit --helpshows 9 commandsgo test ./... -racepasses all 21 tests