Files
codex/codex-rs/ext/git-attribution/Cargo.toml
T
Dmitriy Kovalenko ac2a31a717 Prefetch Git attribution policy when a thread starts (#65241)
## Why

The first turn could spend up to five seconds waiting for the workspace
attribution setting. Starting the request during thread initialization
lets it overlap with MCP startup.

## What changed

Fetch the policy in the background for threads using Codex backend
authentication. Reuse the pending lookup on the first turn when it
matches the thread's current authentication generation, and cancel any
unclaimed lookup on thread shutdown.

Cache a disabled policy after a timeout until its retry deadline. Once
the deadline passes, the next lookup can fetch the setting again.

## Testing

The app-server test waits for the settings request before starting the
first turn. The extension test covers retry deadlines across turns for
both prefetched and cached policies.

GitOrigin-RevId: 6f66f6299b56affc6c95558c94381e476a5cc1d8
2026-12-02 11:46:51 +00:00

30 lines
782 B
TOML

[package]
edition.workspace = true
license.workspace = true
name = "codex-git-attribution"
version.workspace = true
[lib]
name = "codex_git_attribution"
path = "src/lib.rs"
doctest = false
[lints]
workspace = true
[dependencies]
codex-backend-client = { workspace = true }
codex-extension-api = { workspace = true }
codex-features = { workspace = true }
codex-http-client = { workspace = true }
codex-login = { workspace = true }
codex-model-provider = { workspace = true }
codex-runtime-agent-instance = { workspace = true }
serde_json = { workspace = true }
tokio = { workspace = true, features = ["rt", "time"] }
tokio-util = { workspace = true, features = ["rt"] }
[dev-dependencies]
tokio = { workspace = true, features = ["macros", "rt"] }
wiremock = { workspace = true }