Embedded-mode push/pull route through versioncontrolops.{Push,Pull,
ForcePush,Fetch}, which always invoked CALL DOLT_PUSH/PULL/FETCH
without --user. The non-embedded DoltStore path has the
'if s.remoteUser != ""' branch that fires CALL DOLT_PUSH('--user',
?, ?, ?), but the embedded path bypasses it entirely.
Result: against a Dolt remotesapi server that requires CLONE_ADMIN
authentication, bd dolt push/pull from embedded mode fails with
"unauthenticated user does not have privilege CLONE_ADMIN", even when
DOLT_REMOTE_USER and DOLT_REMOTE_PASSWORD are set in the environment.
The shell-level workaround was to bypass bd: cd into the embedded
database dir and run 'dolt push --user beads origin main' directly.
Fix: extend versioncontrolops.{Push,Pull,ForcePush,Fetch} with a
trailing 'user string' (empty preserves prior behavior). When non-empty,
the SQL stored procedures get '--user' appended. EmbeddedDoltStore
reads DOLT_REMOTE_USER from the environment at call time and threads
it through; DOLT_REMOTE_PASSWORD is read by the in-process Dolt
server from the same env, matching the existing contract documented
on bd dolt push/pull.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>