#5725 gave the cmd/bd init gateway credential fixtures a private helper
protocol. While it was queued, #5749 landed internal/testutil/credentialcmd
for the same production shell boundary, leaving two parallel
implementations: the same emit/exit-23/marker operations, the same exit-97
malformed sentinel and the same Windows .cmd trampoline. They had already
drifted. The private copy claims a process on an env var alone, with no
argv sentinel, and its command text is stable rather than unique per call,
although the production credential cache is keyed on that text.
Port cmd/bd onto the shared fixture, as internal/creds and
internal/storage/dolt already use it:
- TestMain claims helper processes with credentialcmd.Dispatch() before
any suite setup, and calls credentialcmd.Cleanup() after the suite.
- AdoptsToken, SkipsEmbeddedMode, FailsClosed and PresetWins build their
commands with credentialcmd.Emit/Exit23/Marker and check non-invocation
with credentialcmd.AssertMarkerAbsent. Their assertions are unchanged.
- The private protocol, its constants and
TestApplyInitGatewayCredentialHelperProtocol, which tested only that
protocol, are removed. credentialcmd's own TestProtocol covers the
shared one and already runs natively on Windows in pr.yml.
- The native driver's fixture list drops the removed test, and bd_test
gains the //internal/testutil/credentialcmd dep (gazelle agrees).
Agent-Signature: claude-code-claude-opus-5-5-max on behalf of Gas City Adopt-PR
Co-authored-by: Eddie the Engineer <adopt-pr@gascity.local>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>