Skip to main content

SyncArgs

Struct SyncArgs 

Source
pub struct SyncArgs {
Show 14 fields pub recursive: bool, pub pack_root: Option<PathBuf>, pub pack: Option<PathBuf>, pub dry_run: bool, pub quiet: bool, pub no_validate: bool, pub ref_override: Option<String>, pub only: Vec<String>, pub force: bool, pub force_prune: bool, pub force_prune_with_ignored: bool, pub quarantine: bool, pub parallel: Option<u32>, pub retain_days: Option<u32>,
}

Fields§

§recursive: bool

Recurse into child packs.

§pack_root: Option<PathBuf>

Pack root. Directory holding .grex/pack.yaml, or the YAML file itself. When omitted, sync prints the legacy M1 stub and exits 0.

§pack: Option<PathBuf>

Path to the pack root (formerly --workspace). Defaults to the pack root directory (where .grex/pack.yaml lives). When set, this path becomes the canonical meta directory: children resolve parent-relatively as <pack>/<child.path>. The path MUST exist; symlinks are resolved to their canonical inode (logged as pack: <input> → <canonical> when it differs). The legacy --workspace spelling is preserved as a deprecated alias and emits a one-time warning per process; removal scheduled for v2.0.0.

§dry_run: bool

Plan actions without touching the filesystem.

§quiet: bool

Suppress per-action log lines.

§no_validate: bool

Skip plan-phase validators. Debug-only escape hatch.

§ref_override: Option<String>

Override the default ref for every pack in this sync invocation. Accepts a branch, tag, or commit SHA. Empty strings are rejected.

§only: Vec<String>

Restrict sync to packs whose workspace-relative path (or name) matches the glob. Repeat the flag to OR-combine multiple patterns (standard */**/? semantics). Non-matching packs are skipped entirely — no action execution, no lockfile write.

§force: bool

Re-execute every pack even when its actions_hash is unchanged from the prior lockfile. Overrides the M4-B skip-on-hash short-circuit; dry-run semantics are unchanged.

§force_prune: bool

v1.2.0 Stage 1.l — Override Phase 2 prune-safety refusal for dirty (tracked or untracked-non-ignored) working trees. Still refuses ignored content unless --force-prune-with-ignored is also set. Never overrides GitInProgress (mid-rebase / merge / cherry-pick / revert / bisect).

§force_prune_with_ignored: bool

v1.2.0 Stage 1.l — Strongest prune override. Implies --force-prune and additionally drops trees whose only dirt is in --ignored paths (build artefacts, target/, node_modules/). Never overrides GitInProgress.

§quarantine: bool

v1.2.1 Item 5b — Recursively snapshot Phase 2 prune targets to <meta>/.grex/trash/<ISO8601>/<basename>/ BEFORE deletion. Audit log entry (QuarantineStart) is appended + fsync’d before any byte is copied; on snapshot failure the prune aborts and the original dest is left intact for forensics. Requires --force-prune or --force-prune-with-ignored — quarantine only applies to overridden prunes; clean-consent prunes still go through the direct-unlink fast path. The “requires one of” check is enforced in the verb handler (see crates/grex/src/cli/verbs/sync.rs) since clap’s requires/required_unless_present_any semantics don’t model “X requires (A or B)” cleanly without an ArgGroup. Matches Lean theorem quarantine_snapshot_precedes_delete.

§parallel: Option<u32>

Max parallel pack ops during this sync run (feat-m6-1).

Semantics:

  • Absent → default num_cpus::get() resolved in verbs::sync.
  • 0 → unbounded (Semaphore::MAX_PERMITS).
  • 1 → serial fast-path (preserves pre-M6 wall-order).
  • 2..=1024 → bounded parallel.

Env fallback: GREX_PARALLEL is honoured only when the flag is absent. Clap reads the env var automatically via env.

Distinct from the global --parallel on GlobalFlags; that knob is documented as the harness-level worker cap and rejects 0. Sync parallelism uses 0 as the “unbounded” sentinel per .omne/cfg/concurrency.md.

§retain_days: Option<u32>

v1.2.5 — sweep <meta>/.grex/trash/ of entries older than N days at the start of every meta sync (best-effort). When omitted, no GC fires (v1.2.1 indefinite-retention behavior is preserved). When set, sweep failures log via tracing and do NOT halt the sync.

Trait Implementations§

Source§

impl Args for SyncArgs

Source§

fn group_id() -> Option<Id>

Report the ArgGroup::id for this set of arguments
Source§

fn augment_args<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate Self via FromArgMatches::from_arg_matches_mut Read more
Source§

fn augment_args_for_update<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate self via FromArgMatches::update_from_arg_matches_mut Read more
Source§

impl Debug for SyncArgs

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl FromArgMatches for SyncArgs

Source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more