Skip to content

Allow PrjFlt on Dev Drives through GVFS.Service - #2188

Open
Tyrie Vella (tyrielv) wants to merge 6 commits into
masterfrom
tyrielv/devdrive-projfs-filter
Open

Tyrie Vella (tyrielv) wants to merge 6 commits into
masterfrom
tyrielv/devdrive-projfs-filter

Conversation

@tyrielv

@tyrielv Tyrie Vella (tyrielv) commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Problem and Context

A Dev Drive can reject the ProjFS filter (PrjFlt) with 0x800701DE when no applicable filter allowance includes it. A clone or mount then fails until an administrator updates the allowance and remounts the volume.

GVFS.Service already enables and attaches ProjFS for unelevated callers. Extend that path to persist an allowance on the affected volume. Machine-wide allowances and Group Policy remain unchanged.

Changes

  • Route unelevated ReFS attachment checks through the service, even when the ProjFS driver runs. Retain the existing NTFS readiness behavior.
  • After a Dev Drive rejects attachment, append PrjFlt to that volume's allowance list. Retain the saved volume entries and keep inherited allowances separate.
  • Add the default-off gvfs.auto-allow-devdrive-filter flag. An explicit true system or resolved client value opts in. The service reads the system value for each recovery request. An explicit false value on either side vetoes the update.
  • Read booleans through the shared Git configuration reader, including system includes and conditional client includes. One deadline covers the read and its retries. Configuration read or parse failures prevent automatic writes.
  • Reject unfinished allowance-list continuations and query diagnostics before a policy update. Require a final attached-filter list or the explicit no-attached-filters message before treating an omitted volume list as empty. Accept the attached list at EOF without a newline.
  • Recheck the volume list before replacement and verify it after the update. A 30-second process budget and a separate policy lock prevent stalled fsutil waits from retaining the driver-health lock.
  • Retry attachment once. If the mounted volume still uses its previous policy, report the persistent allowance and the required restart or remount. Never force-dismount a volume.
  • Share the manual remedy between service and virtualization failure paths. Show setFiltersAllowed /volume for the target volume, warn that it replaces the saved volume list, and omit /f.
  • Record the requested and verified volume lists independently of the attachment outcome. Report a saved update even when fsutil cannot dismount a busy volume.
  • Add unit tests for the two vetoes, scoped Git reads, retry telemetry, timeout handling, strict Git exit handling, nullable wire compatibility, volume-list preservation, truncated and malformed output, recovery outcomes, and ReFS readiness.

Operational constraints

An explicit opt-in permits a persistent allowance on the affected Dev Drive, but only after attachment fails with the rejection code. Disabling the flag stops future automatic updates. It does not remove an existing allowance.

ReFS attachment verification requires the service. Existing volumes can still require one remount or restart before the new allowance takes effect.

Known gaps and deliberate decisions

  • Client configuration — GVFS.Service runs as LocalSystem and cannot read the caller's user configuration directly. The client sends its resolved value over the named pipe to preserve per-user and per-repository opt-outs. The service reads system configuration separately and treats a false value as an administrator veto.
  • Concurrent volume administration — The service rechecks before replacement, but fsutil provides no atomic conditional update. A simultaneous administrator edit to that same volume can still race. Manual policy edits require coordination with mount attempts. No atomic-update follow-up is planned.
  • Delegated operation — The service retains local-user access to the fixed PrjFlt operation. It adds no caller impersonation or enlistment-ownership check. The administrator veto uses the service-selected Git installation's system configuration and its includes. Other Git installations and ProgramData-only configuration are not independent service vetoes.
  • Validation scope — Complete clone/mount, installed LocalSystem execution, and reboot recovery remain unverified. These checks are pending before this draft is ready.
  • Output compatibility — Unrecognized or localized fsutil output prevents automatic writes and requires manual configuration. The parser cannot detect every truncation or an omitted middle section in otherwise complete-looking output. No localization follow-up is planned.

@tyrielv
Tyrie Vella (tyrielv) force-pushed the tyrielv/devdrive-projfs-filter branch from 1751c38 to 29427e9 Compare November 13, 2026 23:53
@tyrielv
Tyrie Vella (tyrielv) marked this pull request as ready for review November 17, 2026 17:57
@KeithIsSleeping

Copy link
Copy Markdown

[KeithBot]: ⚠️ 2 issues · iteration 1 (4e6664c)

  1. 🟠 High Parser rejects every real fsutil devdrv query output; auto-allow never runs
  2. 🟡 Medium Manual-fix messages drop the tested setFiltersAllowed /volume remedy

Validation

  • ❌ Parser vs real fsutil query output
  • ❌ Recovery manual-fix message text
  • ⚠️ NativeAOT publish Service + gvfs.exe — partial
  • ⚠️ PR CI run 44130839473 — partial
  • ✅ GVFS.UnitTests full, head 2090 + base
  • ✅ PR + related fixtures (195 cases)
  • ✅ Real git config reads + fsutil timeout
  • ✅ GVFS.CommandLine.Tests + PostIndex hook
  • ⏭️ Live Dev Drive / LocalSystem service E2E — not run

🤖 KeithBot · claude-opus-5.5, gpt-6.1-sol, gemini-4-argon + approach review · reply on a thread to dispute

@KeithIsSleeping

Copy link
Copy Markdown

[KeithBot]: ✅ Resolved · iteration 2 (e563d63)

  • Parser rejects every real fsutil devdrv query output; auto-allow never runs: fixed
  • Manual-fix messages drop the tested setFiltersAllowed /volume remedy: fixed
  • New changes since iteration 1: no new issues

Validation

  • ✅ Original fsutil-output repro at head
  • ✅ TryAllowFilter vs stateful fake fsutil
  • ✅ Manual remedy: service + GVFS.Mount
  • ✅ PR fixtures + full GVFS.UnitTests
  • ✅ PR CI run 44348772029
  • ✅ Real git config reads + fsutil timeout
  • ✅ GVFS.CommandLine.Tests (not in CI)
  • ⏭️ Live Dev Drive / LocalSystem E2E — not run

Approving.

🤖 KeithBot · claude-opus-5.5, gpt-6.1-sol, gemini-4-argon · reply on a thread to dispute

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you publish or link line/differential coverage for the new policy parser, configuration vetoes, and recovery handler, especially refusal, timeout, and nullable-wire compatibility paths? The exact-head unit-test jobs pass on both architectures, but I could not find a coverage report or gate showing which added lines they exercise. This is a non-blocking validation-visibility suggestion.

Comment thread GVFS/GVFS.Common/GVFSConstants.cs Resolved
A Dev Drive can reject PrjFlt with 0x800701DE when no applicable
allowance includes it. An unelevated mount cannot update that policy.

Route unelevated ReFS attachment checks through GVFS.Service. After
the volume rejects attachment, append PrjFlt to that volume's list.
Keep inherited allowances separate and leave machine-wide lists
unchanged. Recheck before replacement and verify the saved result.
External edits to the same volume still require coordination.

Gate updates behind gvfs.auto-allow-devdrive-filter, default on.
Read fresh booleans through Git, including system includes and
conditional client includes. Either scope can veto a write.
Unreadable or invalid configuration prevents automatic updates.

Separate the policy lock from driver-health work. Bound fsutil waits
with a shared process budget and observe child exit during cleanup.
Disable further automatic updates if child cleanup cannot complete.

Record policy changes independently of the attachment outcome.
If a busy volume retains its old policy, report that it needs a
remount or restart. Never force-dismount the volume.

Add unit tests for veto precedence, configuration errors, nullable
wire compatibility, per-volume preservation, busy-write readback,
recovery outcomes, and typed attachment decisions.

Assisted-by: GitHub Copilot (Auto)
Co-authored-by: Copilot <[email protected]>
Signed-off-by: Tyrie Vella <[email protected]>
Read both the client and system boolean through the shared Git
config reader. Keep system includes and conditional client includes.
Use one deadline across attempts and pass the caller's tracer to
the retry policy.

Treat timeouts, truncated output, process failures, and unavailable
enlistments as read failures. Do not select the default on failure.
Wait for a cancelled child to exit before its process handle closes.

Add isolated unit tests for scope, strict results, retry telemetry,
timeouts, and process-start errors.

Co-authored-by: Copilot <[email protected]>
Require the observed final attached-filter section and a complete
last line before the service interprets an omitted volume list.
Reject unfinished filter-list continuations and query diagnostics.

Add unit tests for truncated captured outputs, incomplete queries
before writes, and failed readback after an attempted update.

Co-authored-by: Copilot <[email protected]>
Accept the attached-filter list at EOF without a final newline.
Recognize the explicit empty-attached-list message and the
antivirus-protection-disabled status line. Keep the final-section
and unfinished-continuation guards for allowance lists.

Share the manual remedy between the service and virtualization
failure paths. Name the target volume, preserve its existing
entries, and show setFiltersAllowed /volume without /f.

Add regression tests for the producer output forms and the shared
manual remedy on disabled and failed-policy requests.

Co-authored-by: Copilot <[email protected]>
Require an explicit true value before the service updates a Dev Drive
filter allowance. Preserve the client value as nullable so an unset key
does not override an explicit system opt-in. A false value at either
side still vetoes the update, and a client read failure fails closed.

Keep ReFS attachment verification independent of the flag. Add unit
tests for opt-in, both vetoes, read failures, and old-client requests
through the recovery boundary.

Signed-off-by: Tyrie Vella <[email protected]>
Co-authored-by: Copilot <[email protected]>
Wait for an active Git configuration process to exit after the shared
reader terminates it. Keep the upstream single-owner termination logic.
Report a process error if the cleanup wait expires.

Add tests that assert exit observation and prevent a second termination.

Signed-off-by: Tyrie Vella <[email protected]>
Co-authored-by: Copilot <[email protected]>
@KeithIsSleeping

Copy link
Copy Markdown

[KeithBot]: ✅ Resolved · iteration 3 (1b5a415)

  • Parser rejects every real fsutil devdrv query output; auto-allow never runs: fixed
  • Manual-fix messages drop the tested setFiltersAllowed /volume remedy: fixed
  • New changes since iteration 2: no new issues

Validation

  • ✅ Prior-fix files unchanged since i2
  • ✅ Original fsutil repro rerun at head
  • ✅ Default-off gate vs real git
  • ✅ Gate mutants vs new tests
  • ✅ Cleanup wait with a real hung child
  • ✅ GVFS.UnitTests full, head + base
  • ✅ FT LocalComponents + auth FT
  • ✅ PR CI run 44604721221
  • ⏭️ Live Dev Drive / LocalSystem E2E — not run

Approving.

🤖 KeithBot · claude-opus-5.5, gpt-6.1-sol, gemini-4-argon · reply on a thread to dispute

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants