Name a binary that exists, once per sync #90

Merged
a73x merged 1 commit from worktree-agent-a1c5bb6c1e7d01688 into main 2026-08-13 10:25:05 +00:00
a73x commented 2026-08-13 10:23:12 +00:00 (Migrated from git.a73x.sh)

Fixes the keyless-clone trust warning, which told the reader to run collab key add --self (no such binary) and printed twice for a single remote.

The duplicate came from the suppression flag living in reconcile_refs, which sync calls once for issues and once for patches. It is now a TrustWarning owned by the sync run, threaded through both calls, with sync_all holding one across every remote — the warning describes the local trust store, so no remote in that loop is relevant to it. Carried rather than static so sync stays callable more than once per test binary. Behaviour is unchanged: a keyless clone still accepts every valid signature and still warns.

Two more wrong names found by a full sweep and fixed: Error::KeyNotFound said collab init-key, and the server's governance-hook refusal — which goes back over SSH as the reason a push was rejected — prefixed itself git-collab: while running as git-collab-server. Those were the only ones left; every other cited command and flag already resolved.

Against recurrence, tests/cli_surface_test.rs scans the source text of src/ and the README for delimited command citations and checks each against clap's own command tree. Source text rather than runtime output because both shipped instances were typos in string literals, only observable if that error path runs — and neither ran. clap as the oracle rather than a hand-kept list so the test cannot drift from the binary; clap_mangen renders the man pages from the same tree, so those are correct by construction. A BINARY_NAME constant exists and the fixed messages build from it, but a constant only helps an author who reaches for it, so the lint is the real guard; it reads a leading {} as the binary name so the constant does not create a blind spot.

Verified by planting both bug forms and watching the lint fail with file, line, and the real alternatives. Full suite green, clippy --all-targets silent, tui_review_test 14/14 across four runs with no variance.


Migrated from git-collab patche 81ce00d2fd7025b395a7aa08ce2fb62e4a840802.

Original author: a73x dev@a73x.sh.

Fixes #88

Revision 1: 7a13f30a42c2d394b7a9f033b035a66e85842574; base b2db9cf477d1b655cf3a3bde35cb15f0b034536e

Fixes the keyless-clone trust warning, which told the reader to run `collab key add --self` (no such binary) and printed twice for a single remote. The duplicate came from the suppression flag living in `reconcile_refs`, which `sync` calls once for issues and once for patches. It is now a `TrustWarning` owned by the sync run, threaded through both calls, with `sync_all` holding one across every remote — the warning describes the local trust store, so no remote in that loop is relevant to it. Carried rather than static so `sync` stays callable more than once per test binary. Behaviour is unchanged: a keyless clone still accepts every valid signature and still warns. Two more wrong names found by a full sweep and fixed: `Error::KeyNotFound` said `collab init-key`, and the server's governance-hook refusal — which goes back over SSH as the reason a push was rejected — prefixed itself `git-collab:` while running as `git-collab-server`. Those were the only ones left; every other cited command and flag already resolved. Against recurrence, `tests/cli_surface_test.rs` scans the source text of src/ and the README for delimited command citations and checks each against clap's own command tree. Source text rather than runtime output because both shipped instances were typos in string literals, only observable if that error path runs — and neither ran. clap as the oracle rather than a hand-kept list so the test cannot drift from the binary; `clap_mangen` renders the man pages from the same tree, so those are correct by construction. A `BINARY_NAME` constant exists and the fixed messages build from it, but a constant only helps an author who reaches for it, so the lint is the real guard; it reads a leading `{}` as the binary name so the constant does not create a blind spot. Verified by planting both bug forms and watching the lint fail with file, line, and the real alternatives. Full suite green, clippy --all-targets silent, tui_review_test 14/14 across four runs with no variance. --- Migrated from git-collab patche `81ce00d2fd7025b395a7aa08ce2fb62e4a840802`. Original author: a73x <dev@a73x.sh>. Fixes #88 Revision 1: `7a13f30a42c2d394b7a9f033b035a66e85842574`; base `b2db9cf477d1b655cf3a3bde35cb15f0b034536e`
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
a73x/git-collab!90
No description provided.