Skip to content

Gate prefetch offload behind gvfs.prefetch-offload#2054

Merged
tyrielv merged 4 commits into
microsoft:masterfrom
tyrielv:tyrielv/flag-prefetch-offload
Jul 15, 2026
Merged

Gate prefetch offload behind gvfs.prefetch-offload#2054
tyrielv merged 4 commits into
microsoft:masterfrom
tyrielv:tyrielv/flag-prefetch-offload

Conversation

@tyrielv

@tyrielv tyrielv commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add a disabled-by-default gvfs.prefetch-offload config flag
  • gate prefetch commit/blob mount offload runtime paths on that flag, preserving direct-auth behavior when disabled
  • emit heartbeat telemetry under FeatureFlags.PrefetchOffload
  • add unit test assertions for the new heartbeat metadata

Notes

@tyrielv
tyrielv force-pushed the tyrielv/flag-prefetch-offload branch from 10cceca to b4c1f60 Compare July 9, 2026 23:18
@tyrielv
tyrielv marked this pull request as ready for review July 9, 2026 23:20
@tyrielv
tyrielv enabled auto-merge July 9, 2026 23:20
@tyrielv

tyrielv commented Jul 13, 2026

Copy link
Copy Markdown
Contributor Author

@copilot resolve the merge conflicts in this pull request

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds a disabled-by-default gvfs.prefetch-offload configuration flag and uses it to runtime-gate the existing mount-process prefetch offload paths so the default behavior remains the direct-auth flow. It also logs whether offload is enabled in prefetch telemetry metadata.

Changes:

  • Add gvfs.prefetch-offload config key + default (false) constant.
  • Gate commit/blob prefetch offload-to-mount execution on gvfs.prefetch-offload.
  • Emit PrefetchOffloadEnabled as metadata on the PerformPrefetch related event.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 2 comments.

File Description
GVFS/GVFS/CommandLine/PrefetchVerb.cs Reads gvfs.prefetch-offload, records it in telemetry metadata, and gates mount-process offload paths on the flag.
GVFS/GVFS.Common/GVFSConstants.cs Introduces GVFSConstants.GitConfig.PrefetchOffload and PrefetchOffloadDefault.
GVFS/GVFS.UnitTests/Virtualization/FileSystemCallbacksTests.cs No functional change (diff appears to be formatting/line-number-only).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread GVFS/GVFS/CommandLine/PrefetchVerb.cs
Comment thread GVFS/GVFS/CommandLine/PrefetchVerb.cs
@tyrielv

tyrielv commented Jul 14, 2026

Copy link
Copy Markdown
Contributor Author

@copilot resolve the merge conflicts in this pull request

tyrielv and others added 3 commits July 14, 2026 16:35
Default gvfs.prefetch-offload to false and skip mount offload runtime paths unless enabled. Add heartbeat FeatureFlags.PrefetchOffload telemetry and unit assertions.

Assisted-by: GPT-5.3-Codex
Copilot-Session: 85dced45-8638-4b33-a1d1-8af4c8e37fb0
Signed-off-by: Tyrie Vella <tyrielv@gmail.com>
The gvfs.prefetch-offload flag state is already captured fleet-wide by the
git Trace2 collector via trace2.configparams (scalar.*,gvfs.*,...), surfaced
as Summary.payload.params. Re-emitting it in VFS.Heartbeat is redundant and
client-side telemetry adopts slowly across the GVFS fleet.

Drop the FeatureFlags heartbeat metadata and the GitRepo.GetConfigBoolOrDefault
wrapper added only to feed it. The gvfs.prefetch-offload gate in PrefetchVerb
is unaffected.

Assisted-by: Claude Opus 4.8
Signed-off-by: Tyrie Vella <tyrielv@gmail.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@tyrielv
tyrielv force-pushed the tyrielv/flag-prefetch-offload branch from c46b973 to ee65930 Compare July 14, 2026 23:36
@tyrielv
tyrielv merged commit 7c23da0 into microsoft:master Jul 15, 2026
35 checks passed
@tyrielv tyrielv mentioned this pull request Jul 15, 2026
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