Skip to content

feat: gate git credential refresh behind GitCredentialRefresh flag (dogfood only)#10397

Merged
jasonkeung merged 1 commit intomasterfrom
feat/git-credential-refresh-flag
May 7, 2026
Merged

feat: gate git credential refresh behind GitCredentialRefresh flag (dogfood only)#10397
jasonkeung merged 1 commit intomasterfrom
feat/git-credential-refresh-flag

Conversation

@jasonkeung
Copy link
Copy Markdown
Contributor

@jasonkeung jasonkeung commented May 7, 2026

Summary

  • Adds a GitCredentialRefresh feature flag to gate the credential-writing and background refresh-loop behavior introduced in [REMOTE-1370] Phase 2b: driver credential writes and refresh loop #10153
  • Flag is dogfood-only (added to DOGFOOD_FLAGS); off by default in Preview and Stable builds
  • When the flag is off, the git_credentials fetch future short-circuits to Ok(vec![]), the credential file write block is skipped, and task_id_for_refresh is forced to None so the background refresh loop never spawns

Files changed

File Change
crates/warp_features/src/lib.rs New GitCredentialRefresh variant; added to DOGFOOD_FLAGS
app/Cargo.toml New git_credential_refresh = [] Cargo feature
app/src/lib.rs Compile-time bridge: #[cfg(feature = "git_credential_refresh")] FeatureFlag::GitCredentialRefresh
app/src/ai/agent_sdk/mod.rs Guard fetch future and write block behind flag
app/src/ai/agent_sdk/driver.rs Guard refresh loop (task_id_for_refresh) behind flag

Test plan

  • Build dogfood — credential fetch and refresh loop should be active
    loop still working with flag enabled: https://www.loom.com/share/14d64e5c90414328a9a9387d9820be7c
  • Build stable/preview (without git_credential_refresh feature) — git_credentials returns early, no credential files written, no refresh loop spawned

This PR was created by Oz (running Claude Code).

Adds a `GitCredentialRefresh` feature flag to control the driver
behavior introduced in #10153 (credential file writes and background
refresh loop). The flag is enabled for dogfood builds only, so the
feature can be validated internally before wider rollout.

- `FeatureFlag::GitCredentialRefresh` added to the enum and wired
  through the compile-time bridge in `app/src/lib.rs`
- `DOGFOOD_FLAGS` includes the new flag
- `mod.rs`: the `git_credentials` fetch future short-circuits to
  `Ok(vec![])` and the write block is skipped when the flag is off
- `driver.rs`: `task_id_for_refresh` is set to `None` (suppressing
  the refresh loop) when the flag is off

Co-Authored-By: Oz <oz-agent@warp.dev>
@cla-bot cla-bot Bot added the cla-signed label May 7, 2026
@jasonkeung jasonkeung marked this pull request as ready for review May 7, 2026 21:00
@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented May 7, 2026

@jasonkeung

I'm starting a first review of this pull request.

You can view the conversation on Warp.

I completed the review and no human review was requested for this pull request.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Copy link
Copy Markdown
Contributor

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

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

Overview

This PR adds a dogfood-only GitCredentialRefresh feature flag and gates the Git credential fetch/write path plus the background refresh loop behind it.

Concerns

  • Manual testing evidence is missing for this behavioral change. Please include screenshots, a screen recording, or equivalent command/log output showing dogfood builds still fetch/write/refresh credentials and stable/preview builds skip those paths, or justify why manual testing is not possible.

Verdict

Found: 0 critical, 1 important, 0 suggestions

Request changes

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@jasonkeung jasonkeung requested a review from abhishekp106 May 7, 2026 22:29
@jasonkeung jasonkeung enabled auto-merge (squash) May 7, 2026 22:30
@jasonkeung jasonkeung merged commit 8a005e5 into master May 7, 2026
50 checks passed
@jasonkeung jasonkeung deleted the feat/git-credential-refresh-flag branch May 7, 2026 22:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants