JuliusBrussee/caveman · error

configure sqlite storage budget %q: %w

Error message

configure sqlite storage budget %q: %w

What it means

Error "configure sqlite storage budget %q: %w" thrown in JuliusBrussee/caveman.

Source

Thrown at engine/ccr/store_sqlite.go:178

		return nil, fmt.Errorf("open sqlite %q: %w", canonicalPath, err)
	}
	// One writer connection. With a single connection every statement serializes
	// in-process (no self-contention) while busy_timeout absorbs cross-process
	// contention; it is also mandatory for an in-memory DSN, where a second
	// pooled connection would be a second, empty database.
	db.SetMaxOpenConns(1)
	db.SetMaxIdleConns(1)
	if err := RetryOnBusy(func() error { _, e := db.Exec(schema); return e }); err != nil {
		_ = db.Close()
		return nil, fmt.Errorf("migrate sqlite %q: %w", canonicalPath, err)
	}
	if err := RetryOnBusy(func() error { return ensureMetadataColumn(db) }); err != nil {
		_ = db.Close()
		return nil, fmt.Errorf("migrate sqlite metadata %q: %w", canonicalPath, err)
	}
	if err := configureStorageBudget(db, maxBytes); err != nil {
		_ = db.Close()
		return nil, fmt.Errorf("configure sqlite storage budget %q: %w", canonicalPath, err)
	}
	if err := secureSQLiteFiles(canonicalPath); err != nil {
		_ = db.Close()
		return nil, err
	}
	// CCR is one local embedded database. Serialize access through one connection:
	// this prevents SQLITE_BUSY under background capture and keeps :memory:
	// stores on the same schema-bearing connection.
	db.SetMaxOpenConns(1)
	db.SetMaxIdleConns(1)
	return &Store{db: db, maxBytes: maxBytes}, nil
}

// PrepareSQLitePath creates or tightens a persistent SQLite file before the
// driver sees it. Recovery databases can contain prompts, credentials, and tool
// results, so neither a permissive umask nor a caller-supplied symlink may widen
// access. Existing WAL/SHM files receive the same checks.
func PrepareSQLitePath(path string) error {

View on GitHub (pinned to 27d5a3981a)

Solutions

  1. Fix the sqlite storage budget configuration error.

When it happens

Trigger: Thrown at engine/ccr/store_sqlite.go:178 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of JuliusBrussee/caveman@27d5a3981a (2026-08-15). Data as JSON: /api/errors/691cd9d9eeb236ae. Report an issue: GitHub.