sipeed/picoclaw · error

V0→V1 migration failed

Error message

V0→V1 migration failed: %w

What it means

Returned during config load when the on-disk config is an old V0 layout and migrateV0ToV1 fails to transform the parsed map (unrecognized V0 shapes, missing expected keys). The migration error is wrapped with %w; the config file is left unmodified and loading aborts.

Solutions

  1. Inspect the wrapped migration error for the offending key or structure
  2. Back up and hand-edit the config to valid V0 (or current) format
  3. Check the project's migration notes for which V0 fields the migrator requires
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at pkg/config/config.go:1352 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of sipeed/picoclaw@49183d7e8d (2026-08-15). Data as JSON: /api/errors/353b5084a8629079. Report an issue: GitHub.

Appendix: source

Thrown at pkg/config/config.go:1352

				map[string]any{"path": path},
			)
			return nil, err
		}

		var m map[string]any
		m, err = loadConfigMap(path)
		if err != nil {
			logger.ErrorCF(
				"config",
				formatDiagnosticLogMessage("Failed to load config", err),
				map[string]any{"path": path},
			)
			return nil, err
		}

		migrateErr := migrateV0ToV1(m)
		if migrateErr != nil {
			return nil, fmt.Errorf("V0→V1 migration failed: %w", migrateErr)
		}
		migrateErr = migrateV1ToV2(m)
		if migrateErr != nil {
			return nil, fmt.Errorf("V1→V2 migration failed: %w", migrateErr)
		}
		migrateErr = migrateV2ToV3(m)
		if migrateErr != nil {
			return nil, fmt.Errorf("V2→V3 migration failed: %w", migrateErr)
		}

		var migrated []byte
		migrated, err = json.Marshal(m)
		if err != nil {
			return nil, err
		}

		cfg, err = loadConfig(migrated)
		if err != nil {

View on GitHub (pinned to 49183d7e8d)