···2626 | Repo_error of Opam_repo.error
2727 | Git_error of Git.error
2828 | Dirty_state of Package.t list
2929+ | Monorepo_dirty
2930 | Package_not_found of string
3031 | Claude_error of string
3132···3738 Fmt.pf ppf "Dirty packages: %a"
3839 Fmt.(list ~sep:comma (using Package.name string))
3940 pkgs
4141+ | Monorepo_dirty -> Fmt.pf ppf "Monorepo has uncommitted changes"
4042 | Package_not_found name -> Fmt.pf ppf "Package not found: %s" name
4143 | Claude_error msg -> Fmt.pf ppf "Claude error: %s" msg
4244···7476 Some
7577 "Commit changes in the monorepo first: cd mono && git add -A && git \
7678 commit"
7979+ | Monorepo_dirty ->
8080+ Some "Commit or stash your changes first: git status && git add -A && git commit"
7781 | Package_not_found _ ->
7882 Some "Check available packages: ls opam-repo/packages/"
7983 | Claude_error msg when String.starts_with ~prefix:"Failed to decode" msg ->
···15791583 match ensure_monorepo_initialized ~proc ~fs:fs_t ~config with
15801584 | Error e -> Error e
15811585 | Ok () -> (
15861586+ (* Check for uncommitted changes in monorepo *)
15871587+ let monorepo = Config.Paths.monorepo config in
15881588+ if Git.is_dirty ~proc ~fs:fs_t monorepo then begin
15891589+ Log.err (fun m -> m "Monorepo has uncommitted changes");
15901590+ Error Monorepo_dirty
15911591+ end
15921592+ else begin
15821593 (* Regenerate opam-repo from monorepo to ensure URLs are up to date *)
15831594 regenerate_opam_repo ~fs:(fs_t :> _ Eio.Path.t) ~config ();
15841595 match discover_packages ~fs:(fs_t :> _ Eio.Path.t) ~config () with
···1901191219021913 Ok summary
19031914 end
19041904- end)
19151915+ end
19161916+ end)
1905191719061918(* Opam metadata sync: copy .opam files from monorepo subtrees to opam-repo *)
19071919
+1
lib/monopam.mli
···5050 | Git_error of Git.error (** Git operation error *)
5151 | Dirty_state of Package.t list
5252 (** Operation blocked due to dirty packages *)
5353+ | Monorepo_dirty (** Monorepo has uncommitted changes *)
5354 | Package_not_found of string (** Named package not found in opam repo *)
5455 | Claude_error of string (** Claude API or response parsing error *)
5556