JuliusBrussee/caveman · error

open recovery store %q: %w

Error message

open recovery store %q: %w

What it means

Error "open recovery store %q: %w" thrown in JuliusBrussee/caveman.

Source

Thrown at shrink/shrink.go:70

func resolveStore(opts []Option) (*ccr.Store, func() error, error) {
	var cfg config
	for _, o := range opts {
		o(&cfg)
	}
	if cfg.store != nil {
		return cfg.store, func() error { return nil }, nil
	}
	path := cfg.path
	if path == "" {
		p, err := defaultCCRPath()
		if err != nil {
			return nil, nil, err
		}
		path = p
	}
	s, err := ccr.Open(path)
	if err != nil {
		return nil, nil, fmt.Errorf("open recovery store %q: %w", path, err)
	}
	return s, s.Close, nil
}

// defaultCCRPath resolves the durable shared recovery store path, mirroring the
// engine CLI, MCP server, and proxy: CAVEMAN_CCR_DB, else CAVEMAN_HOME/ccr.db,
// else ~/.caveman/ccr.db. It creates the parent directory so the first shrink on a
// machine succeeds.
func defaultCCRPath() (string, error) {
	if p := os.Getenv("CAVEMAN_CCR_DB"); p != "" {
		return p, nil
	}
	home := os.Getenv("CAVEMAN_HOME")
	if home == "" {
		h, err := os.UserHomeDir()
		if err != nil {
			return "", fmt.Errorf("resolve home directory: %w", err)
		}

View on GitHub (pinned to 27d5a3981a)

Solutions

  1. Fix opening the recovery store (path/permissions) and retry.

When it happens

Trigger: Thrown at shrink/shrink.go:70 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/6a9530f9a605fb59. Report an issue: GitHub.