fix: rename wisp prefix from 'eph' to 'wisp' (bd-ucj8)
New wisps now use 'wisp' segment (e.g., gt-wisp-xxx) instead of 'eph'. Detection patterns updated to support both for backwards compatibility with existing gt-eph-* wisps in databases. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Executed-By: beads/crew/dave Rig: beads Role: crew
This commit is contained in:
committed by
Steve Yegge
parent
d371baf2ca
commit
8601ed01b6
@@ -383,34 +383,47 @@ func TestIsWispOperation(t *testing.T) {
|
||||
{
|
||||
name: "mol burn",
|
||||
cmdNames: []string{"bd", "mol", "burn"},
|
||||
args: []string{"bd-eph-abc"},
|
||||
args: []string{"bd-wisp-abc"},
|
||||
want: true,
|
||||
},
|
||||
{
|
||||
name: "mol squash",
|
||||
cmdNames: []string{"bd", "mol", "squash"},
|
||||
args: []string{"bd-eph-abc"},
|
||||
args: []string{"bd-wisp-abc"},
|
||||
want: true,
|
||||
},
|
||||
// Ephemeral issue IDs in args
|
||||
// Ephemeral issue IDs in args (wisp-* pattern)
|
||||
{
|
||||
name: "close with bd-eph ID",
|
||||
name: "close with bd-wisp ID",
|
||||
cmdNames: []string{"bd", "close"},
|
||||
args: []string{"bd-wisp-abc123"},
|
||||
want: true,
|
||||
},
|
||||
{
|
||||
name: "show with gt-wisp ID",
|
||||
cmdNames: []string{"bd", "show"},
|
||||
args: []string{"gt-wisp-xyz"},
|
||||
want: true,
|
||||
},
|
||||
{
|
||||
name: "update with wisp- prefix",
|
||||
cmdNames: []string{"bd", "update"},
|
||||
args: []string{"wisp-test", "--status=closed"},
|
||||
want: true,
|
||||
},
|
||||
// Legacy eph-* pattern (backwards compatibility)
|
||||
{
|
||||
name: "close with legacy bd-eph ID",
|
||||
cmdNames: []string{"bd", "close"},
|
||||
args: []string{"bd-eph-abc123"},
|
||||
want: true,
|
||||
},
|
||||
{
|
||||
name: "show with gt-eph ID",
|
||||
name: "show with legacy gt-eph ID",
|
||||
cmdNames: []string{"bd", "show"},
|
||||
args: []string{"gt-eph-xyz"},
|
||||
want: true,
|
||||
},
|
||||
{
|
||||
name: "update with eph- prefix",
|
||||
cmdNames: []string{"bd", "update"},
|
||||
args: []string{"eph-test", "--status=closed"},
|
||||
want: true,
|
||||
},
|
||||
// Non-wisp operations (should NOT bypass)
|
||||
{
|
||||
name: "regular show",
|
||||
@@ -438,9 +451,9 @@ func TestIsWispOperation(t *testing.T) {
|
||||
},
|
||||
// Edge cases
|
||||
{
|
||||
name: "flag that looks like eph ID should be ignored",
|
||||
name: "flag that looks like wisp ID should be ignored",
|
||||
cmdNames: []string{"bd", "show"},
|
||||
args: []string{"--format=bd-eph-style", "bd-regular"},
|
||||
args: []string{"--format=bd-wisp-style", "bd-regular"},
|
||||
want: false,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ func handleFreshCloneError(err error, beadsDir string) bool {
|
||||
// - mol wisp subcommands (create, list, gc, or direct proto invocation)
|
||||
// - mol burn (only operates on wisps)
|
||||
// - mol squash (condenses wisps to digests)
|
||||
// - Commands with ephemeral issue IDs in args (bd-*-eph-*, eph-*)
|
||||
// - Commands with ephemeral issue IDs in args (bd-*-wisp-*, wisp-*, or legacy eph-*)
|
||||
func isWispOperation(cmd *cobra.Command, args []string) bool {
|
||||
cmdName := cmd.Name()
|
||||
|
||||
@@ -97,14 +97,16 @@ func isWispOperation(cmd *cobra.Command, args []string) bool {
|
||||
}
|
||||
|
||||
// Check for ephemeral issue IDs in arguments
|
||||
// Ephemeral IDs have "eph" segment: bd-eph-xxx, gt-eph-xxx, eph-xxx
|
||||
// Ephemeral IDs have "wisp" segment: bd-wisp-xxx, gt-wisp-xxx, wisp-xxx
|
||||
// Also detect legacy "eph" prefix for backwards compatibility
|
||||
for _, arg := range args {
|
||||
// Skip flags
|
||||
if strings.HasPrefix(arg, "-") {
|
||||
continue
|
||||
}
|
||||
// Check for ephemeral prefix patterns
|
||||
if strings.Contains(arg, "-eph-") || strings.HasPrefix(arg, "eph-") {
|
||||
// Check for ephemeral prefix patterns (wisp-* or legacy eph-*)
|
||||
if strings.Contains(arg, "-wisp-") || strings.HasPrefix(arg, "wisp-") ||
|
||||
strings.Contains(arg, "-eph-") || strings.HasPrefix(arg, "eph-") {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2417,7 +2417,7 @@ func TestSpawnMoleculeEphemeralFlag(t *testing.T) {
|
||||
}
|
||||
|
||||
// Spawn with ephemeral=true
|
||||
result, err := spawnMolecule(ctx, s, subgraph, nil, "", "test", true, "eph")
|
||||
result, err := spawnMolecule(ctx, s, subgraph, nil, "", "test", true, "wisp")
|
||||
if err != nil {
|
||||
t.Fatalf("spawnMolecule failed: %v", err)
|
||||
}
|
||||
@@ -2435,8 +2435,8 @@ func TestSpawnMoleculeEphemeralFlag(t *testing.T) {
|
||||
|
||||
// Verify spawned issues have the correct prefix
|
||||
for _, newID := range result.IDMapping {
|
||||
if !strings.HasPrefix(newID, "test-eph-") {
|
||||
t.Errorf("Spawned issue ID %s should have prefix 'test-eph-'", newID)
|
||||
if !strings.HasPrefix(newID, "test-wisp-") {
|
||||
t.Errorf("Spawned issue ID %s should have prefix 'test-wisp-'", newID)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2490,7 +2490,7 @@ func TestSpawnMoleculeFromFormulaEphemeral(t *testing.T) {
|
||||
}
|
||||
|
||||
// Spawn with ephemeral=true (simulating bd mol wisp <formula>)
|
||||
result, err := spawnMolecule(ctx, s, subgraph, nil, "", "test", true, "eph")
|
||||
result, err := spawnMolecule(ctx, s, subgraph, nil, "", "test", true, "wisp")
|
||||
if err != nil {
|
||||
t.Fatalf("spawnMolecule failed: %v", err)
|
||||
}
|
||||
@@ -2509,8 +2509,8 @@ func TestSpawnMoleculeFromFormulaEphemeral(t *testing.T) {
|
||||
|
||||
// Verify they have the correct prefix
|
||||
for _, newID := range result.IDMapping {
|
||||
if !strings.HasPrefix(newID, "test-eph-") {
|
||||
t.Errorf("Spawned issue ID %s should have prefix 'test-eph-'", newID)
|
||||
if !strings.HasPrefix(newID, "test-wisp-") {
|
||||
t.Errorf("Spawned issue ID %s should have prefix 'test-wisp-'", newID)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -257,8 +257,8 @@ func runWispCreate(cmd *cobra.Command, args []string) {
|
||||
}
|
||||
|
||||
// Spawn as ephemeral in main database (Ephemeral=true, skips JSONL export)
|
||||
// Use "eph" prefix for distinct visual recognition
|
||||
result, err := spawnMolecule(ctx, store, subgraph, vars, "", actor, true, "eph")
|
||||
// Use "wisp" prefix for distinct visual recognition
|
||||
result, err := spawnMolecule(ctx, store, subgraph, vars, "", actor, true, "wisp")
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error creating wisp: %v\n", err)
|
||||
os.Exit(1)
|
||||
|
||||
Reference in New Issue
Block a user