Fjord Account hosts: fj-driven git fails fast with an explanation instead of prompting (#222) #327
Loading…
Reference in a new issue
No description provided.
Delete branch "fj-222-fjord-git-refuse"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Interim step for #222 (not a fix: the gateway git route is platform work, tracked on the platform side).
On a Fjord Account host fj hands git the forge's own clone URL and no credential, so a clone, fetch or push could sit on a username prompt. Now:
git::note_fjord_host, set where the client is built). Everygitfj spawns after that runs withGIT_TERMINAL_PROMPT=0,GIT_ASKPASSempty (git then skipsGIT_ASKPASS,core.askPassandSSH_ASKPASSfor its HTTP prompts) andGCM_INTERACTIVE=never. Credential helpers still run, so a credential the user configured for the instance keeps working.Deliberately not refused outright: someone with an SSH remote or their own credential helper on a Fjord host works today, and a blanket refusal would break them. The instruction was "refuse with a clear message and never hang"; this keeps the second part absolute and gives the message where git actually fails. SSH remotes keep ssh's own passphrase prompt (the user authenticating; forcing BatchMode would break passphrase-protected keys), noted in the code and changelog.
Tests: unit tests for the prompt policy and the hint conditions;
tests/fjord_host_git.rsruns the real command against a mock gateway and a forge that demands credentials, with askpass wired throughGIT_ASKPASS,SSH_ASKPASSandcore.askPassto a program that hangs, under an enforced 30 second timeout. The Fjord case fails fast, starts no askpass, shows git's "terminal prompts disabled" and the hint, and never echoes the bearer; the old policy fails that test by hanging. A PAT host keeps git's own prompting and gets no hint.Self-review: round 1 askpass (fixed), round 2 SSH passphrase prompts (answered above), round 3 BLOCKING 0.
Automated Codex review (read-only) of head
aaf46cd848.No actionable findings against the diff and fleet standards. Formatting checks pass. Build and integration tests were not run.
BLOCKING: 0
Reviewed head
aaf46cd848at 2026-11-12T11:53:49Z by codex exec (read-only sandbox).