fix: stabilize beads and config tests (#560)

* fix: stabilize beads and config tests

* fix: remove t.Parallel() incompatible with t.Setenv()

The test now uses t.Setenv() which cannot be used with t.Parallel() in Go.
This completes the conflict resolution from the rebase.

* style: fix gofmt issue in beads_test.go

Remove extra blank line in comment block.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Erik LaBianca
2026-01-16 18:29:18 -05:00
committed by GitHub
parent 22a24c5648
commit 43e38f037c
4 changed files with 56 additions and 5 deletions

View File

@@ -1804,7 +1804,6 @@ 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)
@@ -2134,7 +2133,7 @@ func TestCloseAndClearAgentBead_FieldClearing(t *testing.T) {
for i, 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-%d", tc.fields.RoleType, i)
agentID := fmt.Sprintf("test-testrig-%s-case-%c", tc.fields.RoleType, 'a'+i)
// Step 1: Create agent bead with specified fields
_, err := bd.CreateAgentBead(agentID, "Test agent", tc.fields)
@@ -2371,7 +2370,7 @@ func TestCloseAndClearAgentBead_ReasonVariations(t *testing.T) {
for i, tc := range tests {
t.Run(tc.name, func(t *testing.T) {
agentID := fmt.Sprintf("test-testrig-polecat-reason%d", i)
agentID := fmt.Sprintf("test-testrig-polecat-reason-%c", 'a'+i)
// Create agent bead
_, err := bd.CreateAgentBead(agentID, "Test agent", &AgentFields{