fix(ci,tests): pin bd to v0.47.1 and fix hash-like test suffixes
Pin bd (beads CLI) to v0.47.1 in CI workflows and fix test agent IDs that trigger bd's isLikelyHash() prefix extraction logic. Changes: - Pin bd to v0.47.1 in ci.yml and integration.yml (v0.47.2 has routing defaults that cause prefix mismatch errors) - Fix TestCloseAndClearAgentBead_FieldClearing: change agent IDs from `test-testrig-polecat-0` to `test-testrig-polecat-all_fields_populated` - Fix TestCloseAndClearAgentBead_ReasonVariations: change agent IDs from `test-testrig-polecat-reason0` to `test-testrig-polecat-empty_reason` Root cause: bd v0.47.1's isLikelyHash() treats suffixes of 3-8 chars (with digits for 4+ chars) as potential git hashes. Patterns like `-0` (single digit) and `-reason0` (7 chars with digit) caused bd to extract the wrong prefix from agent IDs. Using test names as suffixes (e.g., `all_fields_populated`) avoids this because they're all >8 characters and won't trigger hash detection. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
committed by
Steve Yegge
parent
0545d596c3
commit
5178fa7f0a
3
.github/workflows/ci.yml
vendored
3
.github/workflows/ci.yml
vendored
@@ -235,7 +235,8 @@ jobs:
|
||||
git config --global user.email "ci@gastown.test"
|
||||
|
||||
- name: Install beads (bd)
|
||||
run: go install github.com/steveyegge/beads/cmd/bd@latest
|
||||
# Pin to v0.47.1 - v0.47.2 has routing defaults that cause prefix mismatch errors
|
||||
run: go install github.com/steveyegge/beads/cmd/bd@v0.47.1
|
||||
|
||||
- name: Build gt
|
||||
run: go build -v -o gt ./cmd/gt
|
||||
|
||||
3
.github/workflows/integration.yml
vendored
3
.github/workflows/integration.yml
vendored
@@ -30,7 +30,8 @@ jobs:
|
||||
git config --global user.email "ci@gastown.test"
|
||||
|
||||
- name: Install beads (bd)
|
||||
run: go install github.com/steveyegge/beads/cmd/bd@latest
|
||||
# Pin to v0.47.1 - v0.47.2 has routing defaults that cause prefix mismatch errors
|
||||
run: go install github.com/steveyegge/beads/cmd/bd@v0.47.1
|
||||
|
||||
- name: Add to PATH
|
||||
run: echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
|
||||
|
||||
@@ -1804,6 +1804,7 @@ func TestSetupRedirect(t *testing.T) {
|
||||
// TestAgentBeadTombstoneBug demonstrates the bd bug where `bd delete --hard --force`
|
||||
// creates tombstones instead of truly deleting records.
|
||||
//
|
||||
//
|
||||
// This test documents the bug behavior:
|
||||
// 1. Create agent bead
|
||||
// 2. Delete with --hard --force (supposed to permanently delete)
|
||||
@@ -2130,10 +2131,11 @@ func TestCloseAndClearAgentBead_FieldClearing(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
for i, tc := range tests {
|
||||
for _, tc := range tests {
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
// Create unique agent ID for each test case
|
||||
agentID := fmt.Sprintf("test-testrig-%s-case-%c", tc.fields.RoleType, 'a'+i)
|
||||
// Use tc.name for suffix to avoid hash-like patterns (e.g., single digits)
|
||||
// that trigger bd's isLikelyHash() prefix extraction in v0.47.1+
|
||||
agentID := fmt.Sprintf("test-testrig-%s-%s", tc.fields.RoleType, tc.name)
|
||||
|
||||
// Step 1: Create agent bead with specified fields
|
||||
_, err := bd.CreateAgentBead(agentID, "Test agent", tc.fields)
|
||||
@@ -2368,9 +2370,11 @@ func TestCloseAndClearAgentBead_ReasonVariations(t *testing.T) {
|
||||
{"long_reason", "This is a very long reason that explains in detail why the agent bead was closed including multiple sentences and detailed context about the situation."},
|
||||
}
|
||||
|
||||
for i, tc := range tests {
|
||||
for _, tc := range tests {
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
agentID := fmt.Sprintf("test-testrig-polecat-reason-%c", 'a'+i)
|
||||
// Use tc.name for suffix to avoid hash-like patterns (e.g., "reason0")
|
||||
// that trigger bd's isLikelyHash() prefix extraction in v0.47.1+
|
||||
agentID := fmt.Sprintf("test-testrig-polecat-%s", tc.name)
|
||||
|
||||
// Create agent bead
|
||||
_, err := bd.CreateAgentBead(agentID, "Test agent", &AgentFields{
|
||||
|
||||
Reference in New Issue
Block a user