Skip to main content

Module migrate_lockfile

Module migrate_lockfile 

Source
Expand description

grex migrate-lockfile — opt-in v1.1.x → v1.2.0 lockfile migrator.

v1.2.1 item 2 (per openspec/feat-v1.2.1/spec.md §“CLI grex migrate-lockfile dispatcher”). Thin shim over the v1.2.0 Stage 1.h library migrator grex_core::lockfile::migrate_v1_1_1::migrate_v1_1_1_lockfile, which is held under the pub mod migrate_v1_1_1 long path so that walker / sync / ls / doctor / add / rm cannot reach it (Stage 0 LOCKED decision #5 — removable-module isolation).

§Behaviour

  • --workspace <path> selects the meta whose <workspace>/.grex/grex.lock.jsonl is migrated. Defaults to the current working directory.
  • --dry-run (-n) inspects the on-disk shape and reports what would happen without writing. Lockfile bytes are unchanged.
  • Without --dry-run, the migrator rewrites the lockfile in place (atomic temp+rename via the library’s existing write_meta_lockfile).
  • Idempotent: running twice on a v1.2.0+ lockfile is a no-op.
  • Exits 0 on success (including the no-lockfile and already-migrated no-op paths). Exits 1 on IO / corruption errors surfaced by the migrator.

Functions§

run