The helper's entry is now a library function, git_remote_pds::helper_main(args) -> i32, so a program can carry git-remote-pds in its own binary. lichen will run it when it is called as git-remote-pds. The git-remote-pds binary is now one call to it, and its behaviour is unchanged.
Builds on #1 (g1-session-from-pipe, e759ec11), which is still open. This branch starts at its tip.
Commits:
-
80f5143move (AST-only):Cli,CliCommand,AuthActionand the fourauthhandlers go frommain.rstocli.rsunchanged, apart from their visibility.remote_helperis now declared by the library. The paths into the crate becomecrate::in the moved code. -
be86875entry:helper_maindoes exactly whatmaindid:- the session on a pipe is taken before any thread starts (or the process is made non-dumpable, as before);
- logging goes to stderr;
- it builds its own multi-thread runtime;
- then it runs the remote helper (3 args,
argv[1]notauth) or theauthCLI.
It answers the exit status. An argument that is not UTF-8 now exits 1, where
std::env::args()used to panic.cliandremote_helperare crate-private again, so the public API is the old one plushelper_main. -
150626e,4a8b9aedeps:atproto-identityandatproto-oauthare pinned torev = fcd1e59b, the revision lichen pins, so a program carrying the helper builds one copy of them. The exactdigest = "=0.11.0-rc.1"pin goes: nothing here usesdigest, and the lock now has 0.11.3. The lock was regenerated withcargo update -p atproto-identity -p atproto-oauth. -
a55fb45: rustfmt.
Checked on lichen-ci, outside lichen's tree, base e759ec11 against tip a55fb459:
cargo fmt --checkis clean.cargo clippy --all-targets: the same 12 warnings at both.cargo test --locked: the same 76 tests listed, and 74 passed with 2 ignored at both. The remote helper's 15 unit tests now run in the library.- The move commit was checked with
ast-checker move: equal, 7 items moved, 214 stayed, no errors.
(lichen's GIT-REMOTE-PDS-IN-LICHEN unit 2. lichen pins the reviewed commit, so nothing waits on this merge.)
🤖 Generated with Claude Code