Fixing unit tests on windows (#813)
* Add Windows stub for orphan cleanup * Fix account switch tests on Windows * Make query session events test portable * Disable beads daemon in query session events test * Add Windows bd stubs for sling tests * Make expandOutputPath test OS-agnostic * Make role_agents test Windows-friendly * Make config path tests OS-agnostic * Make HealthCheckStateFile test OS-agnostic * Skip orphan process check on Windows * Normalize sparse checkout detail paths * Make dog path tests OS-agnostic * Fix bare repo refspec config on Windows * Add Windows process detection for locks * Add Windows CI workflow * Make mail path tests OS-agnostic * Skip plugin file mode test on Windows * Skip tmux-dependent polecat tests on Windows * Normalize polecat paths and AGENTS.md content * Make beads init failure test Windows-friendly * Skip rig agent bead init test on Windows * Make XDG path tests OS-agnostic * Make exec tests portable on Windows * Adjust atomic write tests for Windows * Make wisp tests Windows-friendly * Make workspace find tests OS-agnostic * Fix Windows rig add integration test * Make sling var logging Windows-friendly * Fix sling attached molecule update ordering --------- Co-authored-by: Johann Dirry <johann.dirry@microsea.at>
This commit is contained in:
@@ -147,6 +147,7 @@ func runSling(cmd *cobra.Command, args []string) error {
|
||||
// Determine mode based on flags and argument types
|
||||
var beadID string
|
||||
var formulaName string
|
||||
attachedMoleculeID := ""
|
||||
|
||||
if slingOnTarget != "" {
|
||||
// Formula-on-bead mode: gt sling <formula> --on <bead>
|
||||
@@ -434,12 +435,8 @@ func runSling(cmd *cobra.Command, args []string) error {
|
||||
|
||||
fmt.Printf("%s Formula bonded to %s\n", style.Bold.Render("✓"), beadID)
|
||||
|
||||
// Record the attached molecule in the wisp's description.
|
||||
// This is required for gt hook to recognize the molecule attachment.
|
||||
if err := storeAttachedMoleculeInBead(wispRootID, wispRootID); err != nil {
|
||||
// Warn but don't fail - polecat can still work through steps
|
||||
fmt.Printf("%s Could not store attached_molecule: %v\n", style.Dim.Render("Warning:"), err)
|
||||
}
|
||||
// Record attached molecule after other description updates to avoid overwrite.
|
||||
attachedMoleculeID = wispRootID
|
||||
|
||||
// Update beadID to hook the compound root instead of bare bead
|
||||
beadID = wispRootID
|
||||
@@ -488,6 +485,15 @@ func runSling(cmd *cobra.Command, args []string) error {
|
||||
}
|
||||
}
|
||||
|
||||
// Record the attached molecule in the wisp's description.
|
||||
// This is required for gt hook to recognize the molecule attachment.
|
||||
if attachedMoleculeID != "" {
|
||||
if err := storeAttachedMoleculeInBead(beadID, attachedMoleculeID); err != nil {
|
||||
// Warn but don't fail - polecat can still work through steps
|
||||
fmt.Printf("%s Could not store attached_molecule: %v\n", style.Dim.Render("Warning:"), err)
|
||||
}
|
||||
}
|
||||
|
||||
// Try to inject the "start now" prompt (graceful if no tmux)
|
||||
if targetPane == "" {
|
||||
fmt.Printf("%s No pane to nudge (agent will discover work via gt prime)\n", style.Dim.Render("○"))
|
||||
|
||||
Reference in New Issue
Block a user