fix(git): recover untrusted repository operations with a confirmation flow - #2239
Draft
guantw wants to merge 1 commit into
Draft
fix(git): recover untrusted repository operations with a confirmation flow#2239guantw wants to merge 1 commit into
guantw wants to merge 1 commit into
Conversation
guantwforce-pushed
the
fix/git-trust-recovery
branch
from
August 12, 2026 07:19
05d1e88 to
46c2e4dCompareguantwforce-pushed
the
fix/git-trust-recovery
branch
3 times, most recently
from
August 13, 2026 02:24
319d29e to
24f1ad3Compare… flow - detect dubious ownership at the service boundary and raise typed trust errors instead of raw failures - confirm the repository root through a unified interactive flow that writes safe.directory and replays the blocked operation once - keep trust probes read-only and non-interactive paths prompt-free; never replay side-effecting commands - provide an authorization entry on the Git scene trust-required state and localized manual-resolution copy for uncertain or unsupported outcomes - serialize Deep Review target Git reads so an interactive trust decision settles before sibling bounded-evidence requests - normalize trust prompt dedupe keys per platform (Windows/UNC case-fold, POSIX case-safe) and scope read-only graph queries to non-interactive mode - tighten path identity and scope checks on Windows and harden refresh lifecycle after disposal
guantwforce-pushed
the
fix/git-trust-recovery
branch
from
August 13, 2026 02:43
24f1ad3 to
4483c8fCompareguantw
marked this pull request as draft
August 13, 2026 09:16
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Recovery flow for Git dubious-ownership / untrusted repositories: blocked operations now surface a unified trust confirmation instead of failing with no exit, and the original command completes once the repository root is authorized.
safe.directoryand replays the blocked operation once.Problem
On Windows, transferring a repository folder to a different account (e.g.
system) makes Git refuse to open it with "detected dubious ownership" unless the root is listed insafe.directory. BitFun's Git tooling then failed at the operation boundary, and the Git scene showed a static "trust required" state with no authorization entry. Operations that could not reach any interactive Git call ? such as Deep Review target preparation ? stayed blocked, and a second attempt was required even after the user approved the trust prompt.Analysis
safe.directory, which BitFun never wrote.trust unsupported, aborting the whole preparation even after the user approved.Verification
services-integrationsgit tests (29) andremote_workspace_policycontract tests pass./var -> /private/varsymlink case covered by keeping repository-root discovery path-stable; confirmed green on macOS/Ubuntu CI.Reviewer Notes