refactor: simplify wisp architecture - single DB with Wisp flag (bd-bkul)

- Remove cross-store squash logic from mol_squash.go
  - Delete runWispSquash() and squashWispToPermanent() functions
  - Simplify runMolSquash() to work with main store only

- Update mol_burn.go to work with main database
  - Remove .beads-wisp/ directory references
  - Look for Wisp=true issues in main store instead

- Update mol_bond.go to use Wisp flag instead of separate store
  - --wisp now creates issues with Wisp=true in main store
  - --pour creates issues with Wisp=false (persistent)
  - Update bondProtoMol signature to accept both flags

- Deprecate wisp storage functions in beads.go
  - WispDirName, FindWispDir, FindWispDatabasePath
  - NewWispStorage, EnsureWispGitignore, IsWispDatabase
  - All marked deprecated with reference to bd-bkul

- Remove obsolete cross-store squash tests
  - TestSquashWispToPermanent
  - TestSquashWispToPermanentWithSummary
  - TestSquashWispToPermanentKeepChildren

All tests pass. Build succeeds.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Steve Yegge
2025-12-24 20:42:54 -08:00
parent c0271aedbf
commit f2e6df95c0
6 changed files with 121 additions and 583 deletions

View File

@@ -620,6 +620,9 @@ func FindAllDatabases() []DatabaseInfo {
// WispDirName is the default name for the wisp storage directory.
// This directory is a sibling to .beads/ and should be gitignored.
// Wisps are ephemeral molecules - the "steam" in Gas Town's engine metaphor.
//
// Deprecated: Wisps are now stored in the main database with Wisp=true.
// The separate .beads-wisp/ directory is no longer used ("bd-bkul").
const WispDirName = ".beads-wisp"
// FindWispDir locates or determines the wisp storage directory.
@@ -627,6 +630,9 @@ const WispDirName = ".beads-wisp"
//
// Returns the path to the wisp directory (which may not exist yet).
// Returns empty string if no .beads directory can be found.
//
// Deprecated: Wisps are now stored in the main database with Wisp=true.
// The separate .beads-wisp/ directory is no longer used ("bd-bkul").
func FindWispDir() string {
beadsDir := FindBeadsDir()
if beadsDir == "" {
@@ -642,6 +648,9 @@ func FindWispDir() string {
// FindWispDatabasePath returns the path to the wisp database file.
// Creates the wisp directory if it doesn't exist.
// Returns empty string if no .beads directory can be found.
//
// Deprecated: Wisps are now stored in the main database with Wisp=true.
// The separate .beads-wisp/ directory is no longer used ("bd-bkul").
func FindWispDatabasePath() (string, error) {
wispDir := FindWispDir()
if wispDir == "" {
@@ -660,6 +669,9 @@ func FindWispDatabasePath() (string, error) {
// Creates the database and directory if they don't exist.
// The wisp database uses the same schema as the main database.
// Automatically copies issue_prefix from the main beads config if not set.
//
// Deprecated: Wisps are now stored in the main database with Wisp=true.
// The separate .beads-wisp/ directory is no longer used ("bd-bkul").
func NewWispStorage(ctx context.Context) (Storage, error) {
dbPath, err := FindWispDatabasePath()
if err != nil {
@@ -696,6 +708,9 @@ func NewWispStorage(ctx context.Context) (Storage, error) {
// EnsureWispGitignore ensures the wisp directory is gitignored.
// This should be called after creating the wisp directory.
//
// Deprecated: Wisps are now stored in the main database with Wisp=true.
// The separate .beads-wisp/ directory is no longer used ("bd-bkul").
func EnsureWispGitignore() error {
beadsDir := FindBeadsDir()
if beadsDir == "" {
@@ -743,6 +758,9 @@ func EnsureWispGitignore() error {
// IsWispDatabase checks if a database path is a wisp database.
// Returns true if the database is in a .beads-wisp directory.
//
// Deprecated: Wisps are now stored in the main database with Wisp=true.
// The separate .beads-wisp/ directory is no longer used ("bd-bkul").
func IsWispDatabase(dbPath string) bool {
if dbPath == "" {
return false