feat: opt-in polecat self-terminate after gt done (polecat_self_terminate config)#3295
Closed
dannomayernotabot wants to merge 4 commits intogastownhall:mainfrom
Closed
feat: opt-in polecat self-terminate after gt done (polecat_self_terminate config)#3295dannomayernotabot wants to merge 4 commits intogastownhall:mainfrom
dannomayernotabot wants to merge 4 commits intogastownhall:mainfrom
Conversation
❌ 2 Tests Failed:
View the top 2 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
6032e79 to
55ebfdd
Compare
… binaries - Add nolint:unparam to writeTemplate for unused hooksDir parameter - Update TestBuildRefineryPatrolVars_FullConfig to expect judgment_enabled and review_depth vars added to buildRefineryPatrolVars - Add dummy opencode binary to PATH in TestRunHooksSyncNonClaudeAgent so agent resolution doesn't fall back to claude - Add dummy agent binaries to scaffoldWorkspace in doctor tests so template agent sync checks can actually detect non-Claude agents Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…lip-flop
When both an orphan database (e.g., "gastown") and its canonical counterpart
("gt") exist in Dolt, EnsureAllMetadata would process both, writing different
dolt_database values to the same metadata.json. This caused confusing
"identity mismatch repair" warnings that flip-flopped on every startup.
Build a reverse rig→canonical-DB map and skip databases that share a rig's
directory name but aren't the rig's canonical database.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…cats The idle reaper checked agent bead hook_bead to determine if a polecat had active work, but updateAgentHookBead was made a no-op (declaring work bead assignee as authoritative). This caused the reaper to kill working polecats whose agent bead hook_bead pointed to stale/closed beads from previous swarms. Add hasAssignedOpenWork() fallback: before killing a polecat as "working-no-hook", query bd list for beads assigned to this polecat with hooked/in_progress/open status. If any exist, the polecat has active work and should not be reaped. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add `polecat_self_terminate` config option (default: false) under operational.daemon. When enabled, polecats kill their session 3s after gt done instead of transitioning to IDLE. Config: settings/config.json → operational.daemon.polecat_self_terminate: true This is opt-in to preserve the existing persistent polecat model while allowing operators who run at scale (10-30 concurrent polecats) to use disposable polecats with fresh context windows per task. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
55ebfdd to
47177ed
Compare
3 tasks
Collaborator
|
Superseded by #3302 (same feature — opt-in polecat self-terminate) which was merged. |
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
Opt-in config option. Adds
polecat_self_terminate(default:false) underoperational.daemoninsettings/config.json. When enabled, polecats kill their tmux session 3 seconds aftergt doneinstead of transitioning to IDLE. Default behavior is unchanged.{"operational": {"daemon": {"polecat_self_terminate": true}}}Understanding the Current Design
The persistent polecat model (gt-hdf8) is well-designed:
git worktree addWhy Opt-In Self-Termination Helps at Scale
At 10-30 concurrent polecats, the persistent model creates compounding issues:
hook_bead, causing reaper to kill working polecats (fix: daemon idle reaper checks work bead assignee before killing polecats #3294)gt doneWhat's Preserved
FindIdlePolecatfinds dead-session polecats,ReuseIdlePolecatcreates fresh branch on existing worktreeEvidence
I have a long markdown file tracking all my findings throughout this process and documentation of what occurred, how i fixed, etc etc. happy to share if helpful/wanted