Add gastown postPatch bug fixes from jt flake
- Fix mail router normalization in validateRecipient - Fix agentBeadToAddress to use title field for hq- prefixed beads - Fix crew/polecat home paths (remove incorrect /rig suffix) - Fix town root detection (RoleUnknown instead of RoleMayor) - Fix copyDir symlink handling - Pin to gastown commit 177094a matching jt flake Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
6
flake.lock
generated
6
flake.lock
generated
@@ -81,11 +81,11 @@
|
||||
"gastown": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1769402003,
|
||||
"narHash": "sha256-9jW0s/bqDIcWAf7ReYXhhPU5EQS0MNHVNlyYVnopORE=",
|
||||
"lastModified": 1769538736,
|
||||
"narHash": "sha256-A33gyS/ERUCFcaFG9PJdIHfIOafguqkRe+DuIZteH5s=",
|
||||
"owner": "steveyegge",
|
||||
"repo": "gastown",
|
||||
"rev": "baec5b6147eed8c63a0b4cef3529b4ebb520e910",
|
||||
"rev": "177094a2335786d1d450fd9e14b935877291c004",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
||||
@@ -18,7 +18,7 @@ let
|
||||
pname = "gastown";
|
||||
version = "unstable-${gastownRev}";
|
||||
src = globalInputs.gastown;
|
||||
vendorHash = "sha256-ripY9vrYgVW8bngAyMLh0LkU/Xx1UUaLgmAA7/EmWQU=";
|
||||
vendorHash = "sha256-+qaxEZgC2u51O458p3ZqZ333E/R0iRb+uKhKn8GcJJo=";
|
||||
subPackages = [ "cmd/gt" ];
|
||||
doCheck = false;
|
||||
|
||||
@@ -31,6 +31,65 @@ let
|
||||
"-X github.com/steveyegge/gastown/internal/cmd.BuiltProperly=1"
|
||||
];
|
||||
|
||||
# Bug fixes not yet merged upstream
|
||||
postPatch = ''
|
||||
# Fix validateRecipient bug: normalize addresses before comparison
|
||||
# See: https://github.com/steveyegge/gastown/issues/TBD
|
||||
substituteInPlace internal/mail/router.go \
|
||||
--replace-fail \
|
||||
'if agentBeadToAddress(agent) == identity {' \
|
||||
'if AddressToIdentity(agentBeadToAddress(agent)) == AddressToIdentity(identity) {'
|
||||
|
||||
# Fix agentBeadToAddress to use title field for hq- prefixed beads
|
||||
substituteInPlace internal/mail/router.go \
|
||||
--replace-fail \
|
||||
'return parseAgentAddressFromDescription(bead.Description)' \
|
||||
'if bead.Title != "" && strings.Contains(bead.Title, "/") { return bead.Title }; return parseAgentAddressFromDescription(bead.Description)'
|
||||
|
||||
# Fix crew/polecat home paths: remove incorrect /rig suffix
|
||||
substituteInPlace internal/cmd/role.go \
|
||||
--replace-fail \
|
||||
'return filepath.Join(townRoot, rig, "polecats", polecat, "rig")' \
|
||||
'return filepath.Join(townRoot, rig, "polecats", polecat)' \
|
||||
--replace-fail \
|
||||
'return filepath.Join(townRoot, rig, "crew", polecat, "rig")' \
|
||||
'return filepath.Join(townRoot, rig, "crew", polecat)'
|
||||
|
||||
# Fix town root detection: don't map to Mayor (causes spurious mismatch warnings)
|
||||
substituteInPlace internal/cmd/prime.go \
|
||||
--replace-fail \
|
||||
'if relPath == "." || relPath == "" {
|
||||
ctx.Role = RoleMayor
|
||||
return ctx
|
||||
}
|
||||
if len(parts) >= 1 && parts[0] == "mayor" {' \
|
||||
'if relPath == "." || relPath == "" {
|
||||
return ctx // RoleUnknown - town root is shared space
|
||||
}
|
||||
|
||||
// Check for mayor role: mayor/ or mayor/rig/
|
||||
if len(parts) >= 1 && parts[0] == "mayor" {'
|
||||
|
||||
# Fix copyDir to handle symlinks (broken symlinks cause "no such file" errors)
|
||||
# See: https://github.com/steveyegge/gastown/issues/TBD
|
||||
substituteInPlace internal/git/git.go \
|
||||
--replace-fail \
|
||||
'if entry.IsDir() {' \
|
||||
'// Handle symlinks (recreate them, do not follow)
|
||||
if entry.Type()&os.ModeSymlink != 0 {
|
||||
linkTarget, err := os.Readlink(srcPath)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := os.Symlink(linkTarget, destPath); err != nil {
|
||||
return err
|
||||
}
|
||||
continue
|
||||
}
|
||||
|
||||
if entry.IsDir() {'
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Gas Town - multi-agent workspace manager by Steve Yegge";
|
||||
homepage = "https://github.com/steveyegge/gastown";
|
||||
|
||||
Reference in New Issue
Block a user