fix(gastown): repair malformed patch files for nixos-rebuild
Some checks failed
CI / check (push) Failing after 17m48s

- Remove 'index 0000000..1111111' lines that made patches appear as new files
- Fix hunk line counts in several patches
- Add missing leading spaces to blank context lines
- Temporarily disable statusline optimization patch (needs regenerating)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-31 13:20:12 -08:00
parent 56097aefa4
commit 123e7d3b3a
8 changed files with 28 additions and 33 deletions

View File

@@ -1,5 +1,4 @@
diff --git a/internal/cmd/statusline.go b/internal/cmd/statusline.go
index 0000000..1111111 100644
--- a/internal/cmd/statusline.go
+++ b/internal/cmd/statusline.go
@@ -6,6 +6,7 @@ import (
@@ -8,13 +7,13 @@ index 0000000..1111111 100644
"sort"
"strings"
+ "time"
"github.com/spf13/cobra"
"github.com/steveyegge/gastown/internal/beads"
@@ -15,6 +16,43 @@ import (
"github.com/steveyegge/gastown/internal/workspace"
)
+// statusLineCacheTTL is how long cached status output remains valid.
+const statusLineCacheTTL = 10 * time.Second
+
@@ -52,7 +51,7 @@ index 0000000..1111111 100644
@@ -32,6 +70,20 @@ func init() {
func runStatusLine(cmd *cobra.Command, args []string) error {
t := tmux.NewTmux()
+ // Optimization: skip expensive beads queries for detached sessions
+ if statusLineSession != "" {
+ if !t.IsSessionAttached(statusLineSession) {
@@ -68,9 +67,9 @@ index 0000000..1111111 100644
+
// Get session environment
var rigName, polecat, crew, issue, role string
@@ -149,7 +201,12 @@ func runWorkerStatusLine(t *tmux.Tmux, session, rigName, polecat, crew, issue st
// Output
if len(parts) > 0 {
- fmt.Print(strings.Join(parts, " | ") + " |")
@@ -80,12 +79,12 @@ index 0000000..1111111 100644
+ }
+ fmt.Print(output)
}
return nil
@@ -389,7 +446,12 @@ func runMayorStatusLine(t *tmux.Tmux) error {
}
}
- fmt.Print(strings.Join(parts, " | ") + " |")
+ output := strings.Join(parts, " | ") + " |"
+ if statusLineSession != "" {
@@ -94,11 +93,11 @@ index 0000000..1111111 100644
+ fmt.Print(output)
return nil
}
@@ -458,7 +520,12 @@ func runDeaconStatusLine(t *tmux.Tmux) error {
}
}
- fmt.Print(strings.Join(parts, " | ") + " |")
+ output := strings.Join(parts, " | ") + " |"
+ if statusLineSession != "" {
@@ -107,11 +106,11 @@ index 0000000..1111111 100644
+ fmt.Print(output)
return nil
}
@@ -526,7 +593,12 @@ func runWitnessStatusLine(t *tmux.Tmux, rigName string) error {
}
}
- fmt.Print(strings.Join(parts, " | ") + " |")
+ output := strings.Join(parts, " | ") + " |"
+ if statusLineSession != "" {
@@ -120,11 +119,11 @@ index 0000000..1111111 100644
+ fmt.Print(output)
return nil
}
@@ -617,7 +689,12 @@ func runRefineryStatusLine(t *tmux.Tmux, rigName string) error {
}
}
- fmt.Print(strings.Join(parts, " | ") + " |")
+ output := strings.Join(parts, " | ") + " |"
+ if statusLineSession != "" {
@@ -133,4 +132,4 @@ index 0000000..1111111 100644
+ fmt.Print(output)
return nil
}