document checkpoint policy unset downgrades · Entire

document checkpoint policy unset downgrades

fa54b81→main·

pfleidi·2w ago·3 files·+12 added/-3 removed

Clarify that empty-value policy unsets inherit the CLI default while still using the normal downgrade guard, so --force may be required.

Sessions

44797dac9f78View transcript

[?
Enforce Checkpoint Policies in CLICodex·GPT-5.5·2 steps](/content/gh/entireio/cli/session/019f05ad-eea0-7202-a508-ec34d069a2d2#timeline-44797dac9f78/index.html)

Changes

3

34 unmodified lines

35
36
37
38
38
39
40
41
42
43
44
1 unmodified line

46
47
48
46
47
49
50
51
52
53

34 unmodified lines

checkpoint_min_version is an upgrade nudge. Clients that cannot read that version warn users to upgrade, but policy alone does not block checkpoint writes or app usage. Set checkpoint_min_version to "" to inherit the CLI default.`,
or app usage. Set checkpoint_min_version to "" to inherit the CLI default.

Unsetting a field still uses the normal downgrade guard. If inheriting the default would lower the field's effective version, pass --force to allow it.`,
            Hidden: true,
            Args:   cobra.NoArgs,
            RunE: func(cmd *cobra.Command, _ []string) error {
1 unmodified line

},
    }

cmd.Flags().StringVar(&opts.version, checkpointVersionFlag, "", `Set the checkpoint version used for new writes. Use "" to unset`)
cmd.Flags().StringVar(&opts.minVersion, checkpointMinVersionFlag, "", `Set the checkpoint version used for upgrade warnings. Use "" to unset`)
cmd.Flags().StringVar(&opts.version, checkpointVersionFlag, "", `Set the checkpoint version used for new writes. Use "" to unset; --force may be required`)
cmd.Flags().StringVar(&opts.minVersion, checkpointMinVersionFlag, "", `Set the checkpoint version used for upgrade warnings. Use "" to unset; --force may be required`)
cmd.Flags().BoolVar(&opts.force, "force", false, "Allow checkpoint policy version downgrades")
return cmd
}

Mcmd/entire/cli/checkpoint_policy.go+6/-3

44 unmodified lines

45
46
47
48
49
50
51

44 unmodified lines

require.Contains(t, help, "Set the checkpoint version used for new writes")
    require.Contains(t, help, "Set the checkpoint version used for upgrade warnings")
    require.Contains(t, help, `Use "" to unset`)
    require.Contains(t, help, "Unsetting a field still uses the normal downgrade guard")
    require.NotContains(t, help, "unset-checkpoint-version")
}

Mcmd/entire/cli/checkpoint_policy_test.go+1

310 unmodified lines

311
312
313
314
315
316
317
318
319
320
321

310 unmodified lines

`entire checkpoint policy --checkpoint-min-version ""`, the CLI uses its default
minimum checkpoint version for warning decisions.

Unsetting a field is still evaluated against the normal downgrade guard. If the
field's current effective version is newer than the default inherited after
unsetting, `entire checkpoint policy` rejects the change unless `--force` is
passed.

`entire checkpoint policy` validates requested policy values against the
current CLI, so it rejects setting unsupported checkpoint versions.

Mdocs/architecture/sessions-and-checkpoints.md+5