git_policy_cli/lib.rs
1//! What:
2//! Internal native cli-git implementation,
3//! not yet the production executable.
4//! Why:
5//! The Rust rewrite preserves Git's own argument,
6//! repository and transaction semantics.
7//!
8//! In TS you'd write (pseudocode):
9//! ```ts
10//! // Internal modules used by the forthcoming native entry point and consumer verification.
11//! ```
12
13/// The decision one invocation ends in:
14/// become Git,
15/// or print and exit.
16pub mod action;
17
18/// Variables added to every real-Git child:
19/// lock PID injection and the forward-target marker.
20pub mod child_environment;
21
22/// The one failure type for rejected configuration content or files.
23pub mod config_error;
24
25/// Repository-root discovery and bounded reading of `cli-git.config.jsonc`.
26pub mod config_file;
27
28/// Lazy configuration loading for known inspection versus mutation/ambiguous commands.
29pub mod config_loading;
30
31/// Whole-document JSONC validation into typed settings.
32pub mod config_parse;
33
34/// Validation of the `policies` section and per-policy options.
35mod config_policies;
36
37/// The `rulesFile` option:
38/// a repository-relative name that stays inside the repository.
39pub mod config_rules_file;
40
41/// Typed settings and their defaults.
42pub mod config_schema;
43
44/// Key-naming typed readers over parsed JSONC values.
45mod config_values;
46
47/// JSONL event rendering for wrapper-made diagnostics.
48pub mod diagnostics;
49
50/// Worktree target classification for worktree-enforcing policies.
51pub mod effective_target;
52
53/// The per-invocation decision the thin executable performs.
54pub mod entry;
55
56/// Spellings of the wrapper-only escape hatches shared by several modules.
57pub mod escape_hatch;
58
59/// Starting real Git with unchanged arguments,
60/// streams and exit status.
61pub mod forwarding;
62
63/// Captured read-only real-Git queries over raw bytes.
64pub mod git_metadata;
65
66/// Git 2.56.0 global-argument boundaries over unchanged operating-system strings.
67pub mod global_arguments;
68
69/// Configuration of the repository one invocation selects.
70pub mod invocation_config;
71
72/// The `git cli-git` decision:
73/// help,
74/// retired commands,
75/// and direct `check`/`fix`.
76pub mod management;
77
78/// The `git cli-git` argument grammar.
79pub mod management_arguments;
80
81/// The fixed registry of shipped policies.
82pub mod policy_registry;
83
84/// PATH resolution of the real Git executable.
85pub mod real_git;
86
87/// Wrapper self-exclusion for one PATH candidate.
88pub mod real_git_candidate;
89
90/// Disposable fixtures shared by unit tests;
91/// never part of the release executable.
92#[cfg(test)]
93mod test_support;
94
95/// Repository and worktree identity as reported by real Git.
96pub mod worktree_identity;
97
98/// Git 2.56.0 `parse-options` tokenization of one command's argument region.
99pub mod command_options;
100
101/// Long-option matching:
102/// exact names,
103/// unique abbreviations and `no-` negation.
104mod command_options_long;
105
106/// Final-state and position questions over a tokenized region.
107pub mod command_options_query;
108
109/// Short-option clusters and their attached or following values.
110mod command_options_short;
111
112/// The shared decision of which bytes are an option's value.
113mod command_options_value;
114
115/// Real-Git fixtures and table oracles for command tests;
116/// never in the release build.
117#[cfg(test)]
118mod command_test_support;
119
120/// Differential harness over `git rev-parse --parseopt`;
121/// never in the release build.
122#[cfg(test)]
123mod command_test_parseopt;
124
125/// Table oracle over `--git-completion-helper-all`;
126/// never in the release build.
127#[cfg(test)]
128mod command_test_completion;
129
130/// Facts about the arguments after `git commit`.
131pub mod command_commit;
132
133/// The complete Git 2.56.0 option table of `git commit`.
134pub mod command_commit_table;
135
136/// The shared result and builder of transforms that add tokens to a command line.
137pub mod rule_argument_rewrite;
138
139/// Pure core of the index-against-`HEAD` check.
140pub mod rule_commit_index;
141
142/// Pure decision of the commit-only transform.
143pub mod rule_commit_only;
144
145/// User-facing diagnostics of the commit-only transform.
146pub mod rule_commit_only_message;
147
148/// Pure core of the merge,
149/// cherry-pick and revert conclusion check.
150pub mod rule_commit_sequencer;
151
152/// The Git 2.56.0 option table of `git push` and its facts.
153pub mod command_push;
154
155/// The Git 2.56.0 option table of `git status`,
156/// its facts and the advice-key reading.
157pub mod command_status;
158
159/// Pure decision of the atomic-push transform.
160pub mod rule_atomic_push;
161
162/// Pure decision of the status-hints transform.
163pub mod rule_status_hints;
164
165/// The Git 2.56.0 option table of `git add` and its bulk-staging facts.
166pub mod command_add;
167
168/// The Git 2.56.0 option table of `git clean` and its deletion facts.
169pub mod command_clean;
170
171/// The Git 2.56.0 option table of `git reset` and its mode.
172pub mod command_reset;
173
174/// `git stash` subcommand dispatch and wrapper-flag positions.
175pub mod command_stash;
176
177/// The Git 2.56.0 option tables of every `git stash` subcommand.
178pub mod command_stash_table;
179
180/// Branch-creation facts of `git branch`,
181/// `git checkout` and `git switch`.
182pub mod command_branch_create;
183
184/// Which action a tokenized `git branch` region selects.
185mod command_branch_mode;
186
187/// The complete Git 2.56.0 option table of `git branch`.
188pub mod command_branch_table;
189
190/// Explicit creation and the remote-guess candidate of `git checkout` and `git switch`.
191mod command_branch_target;
192
193/// The complete Git 2.56.0 option tables of `git checkout` and `git switch`.
194pub mod command_checkout_table;
195
196/// The Git 2.56.0 option groups of `git config`.
197pub mod command_config_table;
198
199/// The form and file scope of a `git config` region.
200pub mod command_config;
201
202/// Pure decision of the require-root policy.
203pub mod rule_require_root;
204
205/// Whether a `git worktree` invocation creates or moves a worktree.
206pub mod command_worktree;
207
208/// Wrapper-only control spellings,
209/// their meanings,
210/// and removal before the subcommand.
211pub mod wrapper_controls;
212
213/// Removal of every wrapper control from one invocation,
214/// by position.
215pub mod wrapper_invocation;
216
217/// Lifecycle triggers and the trigger set of every shipped policy.
218pub mod policy_trigger;
219
220/// Policy events and their JSON Lines rendering.
221pub mod policy_events;
222
223/// A pathname as events report it:
224/// text,
225/// plus base64 `pathBytes` when it is not UTF-8.
226pub mod event_path;
227
228/// Ordered policy execution for one lifecycle point.
229pub mod policy_engine;
230
231/// Slice 6: the exact grammar of one policy-proposed Git patch (`commit-transaction-patch.ts`).
232pub mod policy_patch_validate;
233
234/// Slice 6: one policy patch applied to the private index with `git apply --cached --3way`.
235pub mod policy_patch;
236
237/// Slice 6: writes one corrected file into the private commit index as a blob and an index entry.
238pub mod private_index_stage;
239
240/// Slice 6: the commit path's bounded policy convergence over the private index.
241pub mod commit_convergence;
242
243/// The commit transaction in the incumbent's order, up to the settled policies.
244pub mod commit_transaction;
245
246/// The conclusion of a settled commit transaction: preparation, landing and post-landing completion.
247pub mod commit_conclusion;
248
249/// The landing loop with replay, revalidation and the starvation reservation.
250pub mod commit_landing_loop;
251
252/// The landing lock a landing attempt takes, with the recovery every acquisition runs first.
253pub mod commit_landing_lock;
254
255/// Revalidation of a replayed tree outside both landing locks.
256pub mod commit_revalidation;
257
258/// The normalization-only transaction for a correction that removed every change.
259pub mod commit_no_change;
260
261/// The `git commit` command: the transaction, the settled events, the post-commit gate and the backup.
262pub mod commit_command;
263
264/// The disposable, recoverable workspace of one commit transaction.
265pub mod commit_workspace;
266
267/// Rule facts from the real repository with candidates read from the private index.
268pub mod commit_facts;
269
270/// The worktree completion records of selected corrections and of hook changes.
271pub mod commit_worktree_records;
272
273/// The replay-relevant commit options.
274pub mod commit_replay_options;
275
276/// Slice 9 skeleton: the order around a landed commit and a guarded Git child; not reachable until landing is merged.
277pub mod commit_lifecycle;
278
279/// The bounded loop that repeats a pass after corrections changed candidate content.
280pub mod policy_convergence;
281
282/// The one query for repository identity,
283/// top level and the path below it.
284pub mod repository_location;
285
286/// Lazily fetched repository facts behind one interface,
287/// with the real-Git provider.
288pub mod repository_facts;
289
290/// Pure decision of the linked-worktree-only policy.
291pub mod rule_linked_worktree;
292
293/// Pure decision of the branch-worktree-only policy and its one-query remote guess.
294pub mod rule_branch_worktree;
295
296/// Pure decision of the add-explicit policy.
297pub mod rule_add_explicit;
298
299/// The repository content the dependent-version planner reads, and its two failure kinds.
300pub mod dependent_version_content;
301
302/// Which paths the dependent-version planner reads: manifests, configuration, source.
303pub mod dependent_version_paths;
304
305/// Strict JSON reading of a manifest's name, version and dependency names.
306pub mod dependent_version_manifest;
307
308/// Patch bumps of plain release versions and `JSON.stringify` quoting.
309pub mod dependent_version_release;
310
311/// The byte-preserving rewrite of a manifest's top-level version.
312pub mod dependent_version_text;
313
314/// Publishable package names from the generated registry configuration.
315pub mod dependent_version_publishable;
316
317/// Whether source text imports a package.
318pub mod dependent_version_imports;
319
320/// The dependency walk and the plan of dependent bumps.
321pub mod dependent_version_graph;
322
323/// Every workspace manifest at both states, and which versions were raised.
324pub mod dependent_version_states;
325
326/// Which development dependencies each dependent bundles.
327pub mod dependent_version_bundled;
328
329/// The dependent-version plan with exact manifest bytes before and after.
330pub mod dependent_version_plan;
331
332/// The decision and findings of `mono/dependent-version-bump`.
333pub mod dependent_version_policy;
334
335/// The dependent-version planner's view of a prepared candidate state.
336pub mod dependent_version_lifecycle;
337
338/// Whether a direct fix may change a tracked file it did not select.
339pub mod policy_added_path;
340
341/// The `mono/dependent-version-bump` check over a lifecycle's candidate state.
342pub mod policy_dependent_version;
343
344/// An in-memory workspace that records reads; never in the release build.
345#[cfg(test)]
346mod dependent_version_test_support;
347
348/// Differential fixture reading and canonical results; never in the release build.
349#[cfg(test)]
350mod dependent_version_fixture_json;
351
352/// Canonical renderings of the native planner's results; never in the release build.
353#[cfg(test)]
354mod dependent_version_fixture_output;
355
356/// One differential case evaluated by the native planner; never in the release build.
357#[cfg(test)]
358mod dependent_version_fixture_cases;
359
360/// The native planner against the incumbent's recorded results; never in the release build.
361#[cfg(test)]
362mod dependent_version_differential_tests;
363
364/// The shipped policies as checks over rule cores and repository facts.
365pub mod policy_checks;
366
367/// What a lifecycle offers content policies,
368/// and its candidates once prepared.
369pub mod policy_content;
370
371/// The built-in final-newline policy:
372/// canonical final LF,
373/// preserved paths,
374/// findings.
375pub mod policy_final_newline;
376
377/// The optional root-context policy:
378/// no top-level `CONTEXT.md` enters the index.
379pub mod policy_root_context;
380
381/// The optional forbidden-strings policy over the linked scanner,
382/// with redacted findings.
383pub mod policy_forbidden_strings;
384
385/// One child program run with a time bound and output caps,
386/// through files instead of pipes.
387pub mod bounded_child;
388
389/// Where the `markdown/autofix` policy finds `monochromatic-lint`:
390/// absolute PATH entries only.
391pub mod markdown_linter_lookup;
392
393/// What one linter run printed:
394/// the fixed source and the findings left,
395/// or why it is unusable.
396pub mod markdown_linter_output;
397
398/// The one-rule linter configuration and the private temporary file it is written to.
399pub mod markdown_linter_config;
400
401/// The gitignore-syntax `exclude` patterns of `markdown/autofix`,
402/// matched as the linter matches them.
403pub mod markdown_exclude;
404
405/// The `markdown/autofix` policy over candidates,
406/// behind its linter interface.
407pub mod policy_markdown;
408
409/// The executable's linter for that policy:
410/// `monochromatic-lint` on PATH,
411/// bounded,
412/// once per candidate.
413pub mod markdown_linter;
414
415/// The executable's panic hook:
416/// where an internal error happened,
417/// never its message.
418pub mod panic_notice;
419
420/// Installing a direct fix's corrections into the worktree,
421/// all or none.
422pub mod direct_fix_install;
423
424/// The direct fix:
425/// converge corrections in memory,
426/// then install them.
427pub mod direct_fix;
428
429/// The fixed argument transforms of a forwarded command,
430/// in order.
431pub mod policy_transforms;
432
433/// One complete pass:
434/// built-in policies,
435/// fixed transforms,
436/// optional policies.
437pub mod policy_pass;
438
439/// The names of the commands built into Git 2.56.0.
440pub mod git_builtins;
441
442/// The work of the installed cli-git that is not ported,
443/// and the refusal notice.
444pub mod unported;
445
446/// The lifecycle of one wrapped Git command,
447/// from refusals to forwarding.
448pub mod wrapped_command;
449
450/// A scripted repository-facts provider for unit tests;
451/// never in the release build.
452#[cfg(test)]
453mod policy_test_support;
454
455/// The one failure type of the candidate layer and its closed list of causes.
456pub mod candidate_error;
457
458/// Validated Git object names and the file modes a candidate can carry.
459pub mod candidate_object;
460
461/// Pure framing of one `git cat-file --batch` reply.
462pub mod candidate_batch;
463
464/// Pure parsing of raw NUL-delimited changed-path records.
465pub mod candidate_record;
466
467/// The long-lived object reader that answers every blob read of an invocation.
468pub mod candidate_reader;
469
470/// Immutable candidate versions:
471/// identity,
472/// pathname,
473/// mode,
474/// change and object per path.
475pub mod candidate_version;
476
477/// Per-invocation listing,
478/// lazy bytes and invalidation of candidate versions.
479pub mod candidate_store;
480
481/// Pure parsing of `git ls-files --stage` records and the delta between two index states.
482pub mod candidate_stage;
483
484/// The files of a commit's tree with their modes and objects.
485pub mod candidate_tree;
486
487/// A private,
488/// timestamp-preserving copy of the real index,
489/// removed when dropped.
490pub mod candidate_private_index;
491
492/// What `git add` would stage,
493/// and the worktree files a direct command selects.
494pub mod candidate_prediction;
495
496/// The linked forbidden-strings scanner:
497/// one load per invocation,
498/// typed redacted findings.
499pub mod scanner_adapter;
500
501/// Rules-file precedence and which candidates the scanner is given.
502pub mod scanner_selection;
503
504/// One scan pass over a candidate version's exact bytes.
505pub mod scanner_run;
506
507/// Which engine failure code each candidate and scanner failure carries.
508pub mod scanner_failure_code;
509
510/// Process isolation and rule fixtures for scanner controls;
511/// never in the release build.
512#[cfg(test)]
513mod scanner_test_support;
514
515/// Private,
516/// crash-safe file primitives shared by every durable record.
517pub mod private_storage;
518
519/// Compact JSON records read and written with the incumbent's `JSON` semantics.
520pub mod json_record;
521
522/// Random identifiers in the layout of the incumbent's `randomUUID`.
523pub mod random_id;
524
525/// Text operations with the exact semantics of JavaScript's built-ins.
526pub mod js_text;
527
528/// Process-birth identities in the incumbent's exact spelling.
529pub mod process_identity;
530
531/// The owner record inside every owner-lock directory.
532pub mod owner_lock_record;
533
534/// Rename-published owner locks with dead-owner retirement and an unbounded wait.
535pub mod owner_lock;
536
537/// Line-oriented debug and warning diagnostics on standard error.
538pub mod diagnostic_log;
539
540/// The fail-closed failure of reading or recovering durable transaction state.
541pub mod recovery_error;
542
543/// The owner record of one commit-transaction directory and its liveness rule.
544pub mod transaction_owner;
545
546/// The per-worktree registry of commit-transaction directories.
547pub mod transaction_registry;
548
549/// The schema-version-2 journal records of one commit transaction and their filenames.
550pub mod transaction_journal;
551
552/// The exact encoding of every journal record.
553pub mod transaction_journal_encode;
554
555/// Strict parsers of every journal record.
556pub mod transaction_journal_parse;
557
558/// UTC timestamps in the exact form of JavaScript's `toISOString`.
559pub mod iso_time;
560
561/// The filesystem identity recorded with every real `index.lock` a transaction creates.
562pub mod filesystem_identity;
563
564/// Running real Git for transaction,
565/// recovery and landing work.
566pub mod transaction_git;
567
568/// The preparation and landing leases nested wrapper invocations inherit.
569pub mod transaction_lease;
570
571/// The dispatch plan of one commit transaction, its JSON spelling and the config reads it makes.
572pub mod hook_dispatch_plan;
573
574/// The hooks directory of one transaction: its plan and one entry per preparation event.
575pub mod hook_dispatch_entries;
576
577/// The hook dispatcher entered by a transaction's hook entry name, under the hook lock.
578pub mod hook_dispatch;
579
580/// No-follow file operations recovery and landing share.
581pub mod recovery_files;
582
583/// Durable evidence a dead transaction left:
584/// attempt records,
585/// owned locks and Git's PID file.
586pub mod recovery_evidence;
587
588/// The reflog search that proves which commit an interrupted transaction landed.
589pub mod recovery_reflog;
590
591/// Deciding whether a landing landed,
592/// and installing its recorded post-index.
593pub mod recovery_completion;
594
595/// The `.keep` files protecting a landing's migrated pack.
596pub mod pack_keep;
597
598/// Test-only transaction phase markers, compiled into the release executable and armed only by an environment variable.
599pub mod transaction_phase;
600
601/// Landing target comparison, nonce reflog message and compare-and-swap.
602pub mod landing_support;
603
604/// Migration of a prepared commit's shadow objects into a kept pack of the real store.
605pub mod landing_objects;
606
607/// Post-index a landing installs, computed against the real index at landing.
608pub mod landing_index;
609
610/// One landing attempt inside the landing critical section, and its outcome.
611pub mod landing_attempt;
612
613/// The `concurrent-commit` finding for a landing that landed nothing.
614pub mod landing_findings;
615
616/// Git commands run against a transaction's shadow repository.
617pub mod shadow_git;
618
619/// Native conclusion cleanup reproduced in the owning worktree.
620pub mod conclusion_cleanup;
621
622/// The per-worktree capture store:
623/// location,
624/// sequence and identity.
625pub mod capture_store;
626
627/// `captured.json`,
628/// landed-capture records,
629/// their recording and pruning.
630pub mod capture_records;
631
632/// Replay: the unified-diff parser of subsumption (`replay_patch`).
633pub mod replay_patch;
634
635/// Replay: the exact strict reverse check of subsumption (`replay_reverse_apply`).
636pub mod replay_reverse_apply;
637
638/// Replay: the one-sided extension of subsumption over zero-context hunks (`replay_containment`).
639pub mod replay_containment;
640
641/// Replay: raw commit objects as bytes, the unsigned rewrite and signed-rebuild inputs (`replay_object`).
642pub mod replay_object;
643
644/// Replay: capture order over the landed first-parent history and the per-path decision (`replay_capture_order`).
645pub mod replay_capture_order;
646
647/// Replay: the starvation reservation of the next landing slot (`replay_reservation`).
648pub mod replay_reservation;
649
650/// Replay: the shadow-repository Git runner that every replay step uses (`replay_shadow`).
651pub mod replay_shadow;
652
653/// Replay: shared paths of the landed history and the prepared commit, with their three entries (`replay_shared_paths`).
654pub mod replay_shared_paths;
655
656/// Replay: the text half of subsumption over index-named blobs and hunks (`replay_subsumption_text`).
657pub mod replay_subsumption_text;
658
659/// Replay: subsumption rules and the synthetic merge base (`replay_subsumption`).
660pub mod replay_subsumption;
661
662/// Replay: capture-order history and the per-path decisions from the transaction's and landed records (`replay_capture_history`).
663pub mod replay_capture_history;
664
665/// Replay: the merge tree, the first conflicting landed commit, and the replayed commit rebuild (`replay_merge`).
666pub mod replay_merge;
667
668/// Replay: the replayed index, the shadow HEAD move, and the pre-commit re-run decision of revalidation (`replay_revalidation`).
669pub mod replay_revalidation;
670
671/// Replay: one replay of a prepared commit onto a moved target, the integrator's replay result (`replay_commit`).
672pub mod replay_commit;
673/// The invocation capture:
674/// repository layout, symbolic `HEAD`, conclusion kind, ref backend and base.
675pub mod capture_invocation;
676
677/// The capture under capture order:
678/// the capture lock, the store identity, the sequence and `captured.json`.
679pub mod capture_order;
680
681/// The shadow repository `config` file and the copied repository format.
682pub mod shadow_config;
683
684/// The shadow repository links to the real shared entries.
685pub mod shadow_links;
686
687/// The shadow ref store: snapshot, private target, symbolic refs and `HEAD`.
688pub mod shadow_refs;
689
690/// The shadow conclusion copies at preparation.
691pub mod conclusion_copy;
692
693/// Argument transforms of native preparation: normalisation, global split, `-a` removal and private arguments.
694pub mod commit_args;
695
696/// The private commit index: copies, selection modes, pathspec files and listings.
697pub mod commit_index;
698
699/// Native `git commit` in the shadow, the prepared commit read back and `prepared.json`.
700pub mod commit_preparation;
701
702/// Creation of the shadow repository of one transaction.
703pub mod shadow_create;
704
705/// Loading many blobs through one `git cat-file --batch`.
706pub mod blob_batch;
707
708/// Bringing added paths' worktree copies to their landed bytes.
709pub mod worktree_completion;
710
711/// Owner inspection of registry entries and the oldest-first order.
712pub mod recovery_inspect;
713
714/// Recovery of one dead-owner transaction.
715pub mod recovery_landing;
716
717/// Disposal of a landed transaction: shadow removal, directory removal, then landed-capture pruning.
718pub mod landed_disposal;
719
720/// The post-commit run after a landing: author environment, hook lock, and the hook runner with inherited streams.
721pub mod post_commit_hook;
722
723/// Post-landing completion of one landed commit: worktree copies, disposal, maintenance, then `post-commit`.
724pub mod post_landing;
725
726/// Recovery across every transaction directory of one worktree.
727pub mod recovery_scan;
728
729/// Startup recovery of interrupted commit transactions.
730pub mod commit_recovery;
731
732/// Startup recovery as a step of a wrapped or direct command.
733pub mod transaction_gate;
734
735/// Process start times for lock owners,
736/// read from `/proc`,
737/// `ps` or the Windows process table.
738pub mod process_start;
739
740/// The Git version check run once before work that depends on Git's behavior.
741pub mod git_version;
742
743/// Processes holding a lock file open,
744/// found by device and inode.
745pub mod index_lock_holders;
746
747/// Parsers of `lsof -F pcDi` records and Restart Manager lines,
748/// matched by device and inode.
749pub mod index_lock_holder_parsers;
750
751/// Evidence about a foreign `index.lock` and the verdict it supports.
752pub mod index_lock_evidence;
753
754/// The Git command a forwarded invocation runs,
755/// after ordinary alias expansion.
756pub mod forwarded_command;
757
758/// Index-writer classification and the commands that coordinate with a landing.
759pub mod index_writer_commands;
760
761/// Waiting for a foreign index.lock under the classification rules and Git's backoff schedule.
762pub mod index_lock_wait;
763
764/// The host side effects of the index-lock wait:
765/// /proc reads,
766/// sleeps,
767/// randomness and standard error.
768pub mod index_lock_wait_host;
769
770/// The landing location a forwarded index writer coordinates with:
771/// the real index and the registry.
772pub mod landing_location;
773
774/// Coordination of a forwarded index writer:
775/// the landing lock,
776/// the wait for a foreign lock and the lease.
777pub mod index_writer_coordination;
778
779/// Running a coordinated forwarded index writer:
780/// the landing lock held while real Git runs as a child.
781pub mod index_writer_forward;
782
783/// The real index.lock a landing creates,
784/// identifies and releases only while it is the same file.
785pub mod real_index_lock;
786/// Automatic maintenance decision: config record parsing and the enable and detach rules.
787pub mod maintenance_decision;
788
789/// Running automatic maintenance after a landing: the config read, then `git maintenance run --auto`.
790pub mod maintenance_run;
791
792/// Catching SIGINT, SIGTERM, SIGHUP and SIGQUIT while a Git child runs, and relaying only process-sent signals.
793pub mod signal_relay;
794
795/// Exact removal of retired hk hook registrations from one explicit Git configuration scope.
796pub mod maintenance_hk_config;
797
798/// The per-branch push coordination file name: a reversible, flat, case-safe key.
799pub mod auto_push_branch_key;
800
801/// The per-branch `last-pushed` record: validation, tolerant reads and atomic publication.
802pub mod auto_push_record;
803
804/// Waiting for a lock a live process holds: a slow-wait notice naming the holder and a configurable backstop.
805pub mod live_lock;
806
807/// Read-only Git queries of the auto-push, each with a deadline and separate output streams.
808pub mod bounded_query;
809
810/// The auto-push's real `git push` with a deadline, its low-speed abort and the lock wait limit derived from it.
811pub mod bounded_push;
812
813/// Single-flight push coordination per branch: owner lock, record joins and the push itself.
814pub mod auto_push_single_flight;
815
816/// Post-commit auto-push of a landed commit: the push argv, the surfaced output and the failure reporting.
817pub mod auto_push;
818
819/// The post-commit gate over a landed commit: its events, its blocking and the backup it allows.
820pub mod post_commit;
821
822/// Authoritative manual-push updates discovered by a private dry-run push and confirmed with ls-remote.
823pub mod manual_push_probe;
824
825/// Published-set and range computation for manual-push scans: which pushed commits a remote does not have.
826pub mod manual_push_range;
827
828/// The manual-push candidate scope of one push: the commits and trees the destination lacks.
829pub mod manual_push_lifecycle;
830/// The one failure type of the linked-worktree ignored-state copy and its diagnostics.
831pub mod worktree_copy_error;
832
833/// Which linked worktrees a worktree-creating Git command registered, before and after it ran.
834pub mod worktree_copy_registry;
835
836/// The ignored source paths a linked-worktree copy selects, and the path validation every selection passes.
837pub mod worktree_copy_selection;
838
839/// The deterministic parent-first manifest of a copy, and the mode application to a staged copy.
840pub mod worktree_copy_manifest;
841
842/// Exact comparison of manifest entries against the filesystem, and the source stability check after staging.
843pub mod worktree_copy_compare;
844
845/// The private, validated stage of one source's ignored state beside a destination worktree.
846pub mod worktree_copy_stage;
847
848/// The exclusive creation of one destination entry from the stage, and the identity captured after it.
849#[cfg(unix)]
850pub mod worktree_copy_install_entry;
851
852/// Installation of a validated stage into a new worktree, with preflight, batches and rollback on failure.
853#[cfg(unix)]
854pub mod worktree_copy_install;
855
856/// Removal of the paths a failed installation created, only where their identity and content still prove them cli-git's own.
857#[cfg(unix)]
858pub mod worktree_copy_rollback;
859
860/// The durable journal of one copy: exact encoding, strict validation, private storage and removal.
861#[cfg(unix)]
862pub mod worktree_copy_journal;
863
864/// The durable claim on a stage container's name, and the removal of stages an interrupted copy left behind.
865#[cfg(unix)]
866pub mod worktree_copy_stage_claim;
867
868/// The append-only install log of one stage: per-batch intents and creations, with resumption.
869#[cfg(unix)]
870pub mod worktree_copy_install_log;
871
872/// One journaled installation to an end, resumption from the log, and synchronization of a created worktree.
873#[cfg(unix)]
874pub mod worktree_copy_transaction;
875
876/// The settlement lock that serializes copy installation and recovery, its owner record, and inherited leases.
877#[cfg(unix)]
878pub mod worktree_copy_lock;
879
880/// Recovery of interrupted copies: registration checks, discards with notices, resumption, and the pending check.
881#[cfg(unix)]
882pub mod worktree_copy_recovery;
883
884/// The linked-worktree ignored-state copy around one forwarded Git invocation: the integrator's entry point.
885#[cfg(unix)]
886pub mod worktree_copy;
887
888/// Which forwarded invocations the copy applies to, and the child run that carries its settlement lease.
889pub mod worktree_copy_forward;