Skip to content

fix: clean dog formula dispatch lifecycle#4256

Open
Bella-Giraffety wants to merge 4 commits into
gastownhall:mainfrom
Bella-Giraffety:polecat/synth/gt-pr-sheriff-4060-resheriff-upstream
Open

fix: clean dog formula dispatch lifecycle#4256
Bella-Giraffety wants to merge 4 commits into
gastownhall:mainfrom
Bella-Giraffety:polecat/synth/gt-pr-sheriff-4060-resheriff-upstream

Conversation

@Bella-Giraffety

Copy link
Copy Markdown
Collaborator

Supersedes #4060 and replaces #4243 with a clean upstream/main-based branch. Implements the PR Sheriff root-cause dog formula dispatch fix without the wisp_reaper/daemon TTL bandaid: pool-wide dog dispatch serialization, idle-only dog assignment, existing hooked formula reuse/start, and ownership/timestamp-guarded cleanup. Validation: go test ./internal/dog -count=1; GT_TEST_NO_NUDGE=1 go test ./internal/cmd -run 'Test(RunSlingFormula|DogDispatchInfo|CleanupDelayedDogFormulaFailure)' -count=1 -timeout=60s; go test ./internal/daemon -run 'TestDispatchReaperDogUsesDogPoolSling|TestWispReaper|TestDefaultReaperIntervalIsOneHour' -count=1 -timeout=60s; go build ./cmd/gt.

@github-actions github-actions Bot added the status/needs-triage Inbox — we haven't looked at it yet label Jun 12, 2026
@Bella-Giraffety Bella-Giraffety added status/accepted Confirmed and on our radar priority/p2 Medium — real problem, workaround exists kind/bug Broken behavior labels Jun 12, 2026
@github-actions github-actions Bot removed the status/needs-triage Inbox — we haven't looked at it yet label Jun 12, 2026
@codecov-commenter

codecov-commenter commented Jun 12, 2026

Copy link
Copy Markdown

❌ 12 Tests Failed:

Tests completed Failed Passed Skipped
10688 12 10676 52
View the full list of 12 ❄️ flaky test(s)
github.com/steveyegge/gastown/internal/cmd::TestEnsureBeadsConfigYAML_CreatesWhenMissing

Flake rate in main: 100.00% (Passed 0 times, Failed 16 times)

Stack Traces | 0s run time
=== RUN   TestEnsureBeadsConfigYAML_CreatesWhenMissing
    install_test.go:98: config.yaml = "prefix: hq\nissue-prefix: hq\ndolt.idle-timeout: \"0\"\nexport.auto: \"false\"\n", want "prefix: hq\nissue-prefix: hq\ndolt.idle-timeout: \"0\"\n"
--- FAIL: TestEnsureBeadsConfigYAML_CreatesWhenMissing (0.00s)
github.com/steveyegge/gastown/internal/cmd::TestFilterAndSortSessions_SortOrder

Flake rate in main: 86.36% (Passed 3 times, Failed 19 times)

Stack Traces | 0s run time
=== RUN   TestFilterAndSortSessions_SortOrder
    agents_test.go:323: filterAndSortSessions returned 7 agents, want 8
--- FAIL: TestFilterAndSortSessions_SortOrder (0.00s)
github.com/steveyegge/gastown/internal/cmd::TestGetTrackedIssues_FallsBackToShowTrackedDependencies

Flake rate in main: 100.00% (Passed 0 times, Failed 16 times)

Stack Traces | 0s run time
=== RUN   TestGetTrackedIssues_FallsBackToShowTrackedDependencies
    convoy_external_tracking_test.go:98: getTrackedIssues: querying tracked issues for hq-cv-ext: bd dep: unexpected bd args: dep list hq-cv-ext --direction=down --type=tracks --json
--- FAIL: TestGetTrackedIssues_FallsBackToShowTrackedDependencies (0.00s)
github.com/steveyegge/gastown/internal/cmd::TestGuessSessionFromWorkerDir

Flake rate in main: 86.36% (Passed 3 times, Failed 19 times)

Stack Traces | 0s run time
=== RUN   TestGuessSessionFromWorkerDir
--- FAIL: TestGuessSessionFromWorkerDir (0.00s)
github.com/steveyegge/gastown/internal/cmd::TestGuessSessionFromWorkerDir/different_rig

Flake rate in main: 86.36% (Passed 3 times, Failed 19 times)

Stack Traces | 0s run time
=== RUN   TestGuessSessionFromWorkerDir/different_rig
    agents_test.go:626: guessSessionFromWorkerDir(".../myrig/crew/alpha", "/town") = "gt-crew-alpha", want "mr-crew-alpha"
--- FAIL: TestGuessSessionFromWorkerDir/different_rig (0.00s)
github.com/steveyegge/gastown/internal/cmd::TestJSONOutput_ErrorsReturnNonZeroExit

Flake rate in main: 86.36% (Passed 3 times, Failed 19 times)

Stack Traces | 0.01s run time
=== RUN   TestJSONOutput_ErrorsReturnNonZeroExit
    convoy_stage_test.go:2519: error output should still be valid JSON: unexpected end of JSON input
        raw:
--- FAIL: TestJSONOutput_ErrorsReturnNonZeroExit (0.01s)
github.com/steveyegge/gastown/internal/cmd::TestJSONOutput_NoHumanReadableText

Flake rate in main: 86.36% (Passed 3 times, Failed 19 times)

Stack Traces | 0.02s run time
=== RUN   TestJSONOutput_NoHumanReadableText
    convoy_stage_test.go:2463: stdout is not valid JSON: unexpected end of JSON input
        raw:
--- FAIL: TestJSONOutput_NoHumanReadableText (0.02s)
github.com/steveyegge/gastown/internal/cmd::TestRunConvoyList_UsesTownRootAndStripsBeadsDir

Flake rate in main: 100.00% (Passed 0 times, Failed 16 times)

Stack Traces | 0.01s run time
=== RUN   TestRunConvoyList_UsesTownRootAndStripsBeadsDir
⚠ Warning: skipping convoy hq-cv-town: querying tracked issues for hq-cv-town: bd dep: unexpected bd args: dep list hq-cv-town --direction=down --type=tracks --json
    convoy_bd_routing_test.go:156: expected convoy JSON output, got:
        []
--- FAIL: TestRunConvoyList_UsesTownRootAndStripsBeadsDir (0.01s)
github.com/steveyegge/gastown/internal/cmd::TestRunConvoyStatus_UsesTownRootAndStripsBeadsDir

Flake rate in main: 100.00% (Passed 0 times, Failed 16 times)

Stack Traces | 0.01s run time
=== RUN   TestRunConvoyStatus_UsesTownRootAndStripsBeadsDir
    convoy_bd_routing_test.go:211: runConvoyStatus: getting tracked issues for hq-cv-status: querying tracked issues for hq-cv-status: bd dep: unexpected bd args: dep list hq-cv-status --direction=down --type=tracks --json
--- FAIL: TestRunConvoyStatus_UsesTownRootAndStripsBeadsDir (0.01s)
github.com/steveyegge/gastown/internal/polecat::TestManagerAgentLifecycleUsesTownBeadsDir

Flake rate in main: 100.00% (Passed 0 times, Failed 16 times)

Stack Traces | 0.02s run time
=== RUN   TestManagerAgentLifecycleUsesTownBeadsDir
    manager_test.go:2178: manager create did not use town BEADS_DIR; log:
        env=.../TestManagerAgentLifecycleUsesTownBeadsDir1213296939/001/.beads args=init --prefix gt --server
        env=.../TestManagerAgentLifecycleUsesTownBeadsDir1213296939/001/.beads args=config set issue_prefix gt
        env=.../TestManagerAgentLifecycleUsesTownBeadsDir1213296939/001/.beads args=migrate --yes
        env=.../TestManagerAgentLifecycleUsesTownBeadsDir1213296939/001/.beads args=config set types.custom agent,role,rig,convoy,slot,queue,event,message,molecule,gate,merge-request
        env=.../TestManagerAgentLifecycleUsesTownBeadsDir1213296939/001/.beads args=config get types.custom
        env=.../TestManagerAgentLifecycleUsesTownBeadsDir1213296939/001/.beads args=--allow-stale version
        env=.../TestManagerAgentLifecycleUsesTownBeadsDir1213296939/001/.beads args=create --json --id=gt-gastown-polecat-rust --title=gt-gastown-polecat-rust --description=gt-gastown-polecat-rust
        
        role_type: polecat
        rig: gastown
        agent_state: spawning
        hook_bead: null
        cleanup_status: null
        active_mr: null
        notification_level: null --type=task --labels=gt:agent --force
        env=.../TestManagerAgentLifecycleUsesTownBeadsDir1213296939/001/.beads args=show gt-gastown-polecat-rust --json
        env=.../TestManagerAgentLifecycleUsesTownBeadsDir1213296939/001/.beads args=update gt-gastown-polecat-rust --description=gt-gastown-polecat-rust
        
        role_type: polecat
        rig: gastown
        agent_state: nuked
        hook_bead: null
        cleanup_status: null
        active_mr: null
        notification_level: null
--- FAIL: TestManagerAgentLifecycleUsesTownBeadsDir (0.02s)
github.com/steveyegge/gastown/internal/refinery::TestEngineerClearAgentActiveMRUsesTownBeadsDir

Flake rate in main: 100.00% (Passed 0 times, Failed 16 times)

Stack Traces | 0.01s run time
=== RUN   TestEngineerClearAgentActiveMRUsesTownBeadsDir
    engineer_test.go:127: refinery active_mr cleanup did not use town BEADS_DIR; log:
        env=.../TestEngineerClearAgentActiveMRUsesTownBeadsDir652739675/001/.beads args=--allow-stale version
        env=.../TestEngineerClearAgentActiveMRUsesTownBeadsDir652739675/001/.beads args=show gt-gastown-polecat-rust --json
        env=.../TestEngineerClearAgentActiveMRUsesTownBeadsDir652739675/001/.beads args=update gt-gastown-polecat-rust --description=gt-gastown-polecat-rust
        
        role_type: polecat
        rig: gastown
        agent_state: idle
        hook_bead: null
        cleanup_status: null
        active_mr: null
        notification_level: null
--- FAIL: TestEngineerClearAgentActiveMRUsesTownBeadsDir (0.01s)
github.com/steveyegge/gastown/internal/rig::TestInitBeadsWritesConfigOnFailure

Flake rate in main: 100.00% (Passed 0 times, Failed 16 times)

Stack Traces | 0.01s run time
=== RUN   TestInitBeadsWritesConfigOnFailure
    manager_test.go:682: config.yaml = "prefix: gt\nissue-prefix: gt\ndolt.idle-timeout: \"0\"\nexport.auto: \"false\"\n", want "prefix: gt\nissue-prefix: gt\ndolt.idle-timeout: \"0\"\n"
--- FAIL: TestInitBeadsWritesConfigOnFailure (0.01s)

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@Bella-Giraffety

Copy link
Copy Markdown
Collaborator Author

Final polecat update: branch is mergeable and branch-specific validation is green. I fixed the branch-caused lint issue and the full local lint now passes. GitHub Lint and Windows Smoke Test are green. Full Test/Integration are failing on unrelated baseline drift outside this PR's dog-dispatch scope (agent session prefix expectations, convoy bd mock args, config.yaml export.auto expectations, town BEADS_DIR expectations, and integration dolt default port). Tracked follow-up: hq-3o1u. I am leaving #4256 open rather than broadening this PR beyond the PR #4060 cleanup-first dog dispatch fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/bug Broken behavior priority/p2 Medium — real problem, workaround exists status/accepted Confirmed and on our radar

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants