retrofit0.10.0-wip.8

retrofit op truncate

Rewind the oplog to a checkpoint by removing a suffix of ops

Usage:
  retrofit op truncate [flags]

Flags:
      --drop-seals int   also peel back this many Seal records (and everything each covers); the flag is the attestation, and each Seal removed is reported
      --dry-run          preview the opids that would be removed without writing
  -h, --help             help for truncate
      --help-all         show extended help (vocabulary, semantics, caveats)

Global Flags:
      --as string        output mode: text | json (default "text")
  -C, --chdir string     treat <dir> as the working directory for the entire run
      --config string    retrofit.toml path (overrides discovery; also accepts $RETROFIT_CONFIG)
  -f, --file string      oplog file path; selects a registered [[schema]] path (overrides discovery)
      --no-consolidate   render every advisory occurrence instead of collapsing repeats
  -q, --quiet count      suppress the advisory tier on stderr; stack (-qq) to drop it whole (errors and results still print)
      --schema <name>    registered schema <name> (resolves via the chain when omitted)
  -v, --verbose          reveal info-tier advisories on stderr

Docs: https://docs.retrofit.sh/current/commands/retrofit-op-truncate/

retrofit op truncate --help-all adds:

Extended help:

Truncation boundaries:

  Default (no flag) removes the unsealed tail: every op after the
  most-recent `Seal` record. Sealed ops are never touched. When the
  tail is already fully sealed this is a guarded no-op (exit 0, the
  file is left byte-identical).

  --drop-seals N peels back N Seal records, removing each seal and the
  ops it covers. Crossing a seal removes attested history; the flag is
  the attestation, and each Seal removed is reported. op 0 (CreateSchema) always survives:
  --drop-seals with a count >= the number of seals lands at exactly the
  schema root.

  Truncation is pure suffix removal: the oplog file is rewritten, never
  deleted, and the schema stays registered.

Before 1.0, any release may change behavior; the release notes list what changed.