Remove version field from metadata.json

- Removes noisy version mismatch warnings on every bd upgrade
- Version field in metadata.json was redundant with daemon version checking via RPC
- Daemon version mismatches still detected via HealthResponse
- Removes checkVersionMismatch() function and related test file
- Updates .beads/.gitignore to properly ignore merge artifacts

Amp-Thread-ID: https://ampcode.com/threads/T-7ba8aff2-97a0-4d0c-9008-e858bdfadd61
Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
Steve Yegge
2025-11-08 18:16:39 -08:00
parent 384a369acf
commit 734579b1a2
10 changed files with 12 additions and 261 deletions

View File

@@ -11,14 +11,12 @@ const ConfigFileName = "metadata.json"
type Config struct {
Database string `json:"database"`
Version string `json:"version"`
JSONLExport string `json:"jsonl_export,omitempty"`
}
func DefaultConfig(version string) *Config {
func DefaultConfig() *Config {
return &Config{
Database: "beads.db",
Version: version,
JSONLExport: "beads.jsonl",
}
}

View File

@@ -7,16 +7,12 @@ import (
)
func TestDefaultConfig(t *testing.T) {
cfg := DefaultConfig("0.17.5")
cfg := DefaultConfig()
if cfg.Database != "beads.db" {
t.Errorf("Database = %q, want beads.db", cfg.Database)
}
if cfg.Version != "0.17.5" {
t.Errorf("Version = %q, want 0.17.5", cfg.Version)
}
if cfg.JSONLExport != "beads.jsonl" {
t.Errorf("JSONLExport = %q, want beads.jsonl", cfg.JSONLExport)
}
@@ -29,7 +25,7 @@ func TestLoadSaveRoundtrip(t *testing.T) {
t.Fatalf("failed to create .beads directory: %v", err)
}
cfg := DefaultConfig("0.17.5")
cfg := DefaultConfig()
if err := cfg.Save(beadsDir); err != nil {
t.Fatalf("Save() failed: %v", err)
@@ -48,10 +44,6 @@ func TestLoadSaveRoundtrip(t *testing.T) {
t.Errorf("Database = %q, want %q", loaded.Database, cfg.Database)
}
if loaded.Version != cfg.Version {
t.Errorf("Version = %q, want %q", loaded.Version, cfg.Version)
}
if loaded.JSONLExport != cfg.JSONLExport {
t.Errorf("JSONLExport = %q, want %q", loaded.JSONLExport, cfg.JSONLExport)
}