Commit Graph

2 Commits

  • Pull plugin service less frequently (#26431)
    # Summary
    Reduce download traffic to `github.com/openai/plugins` while continuing
    to check for updates on every Codex startup.
    
    # Root cause
    The startup sync replaced the local repository with a fresh shallow
    clone whenever the remote revision changed. At Codex's global scale,
    repeatedly downloading the repository created excessive GitHub traffic.
    
    # Changes
    - Run `git ls-remote` on each startup to read the remote HEAD SHA.
    - Skip all repository downloads when the local and remote SHAs match.
    - Update existing checkouts with an exact-SHA shallow `git fetch`,
    followed by reset and clean.
    - Bootstrap new installations with `git init` plus the same shallow
    fetch, rather than cloning.
    - Keep the existing file lock so concurrent Codex processes serialize
    updates and do not duplicate fetches.
    - Preserve the existing GitHub HTTP and export archive fallback
    behavior.
    
    # Impact
    Each startup makes one lightweight remote HEAD check. Repository objects
    are downloaded only when the revision changes, and existing Git objects
    are reused during updates.
    
    # Validation
    - `just test -p codex-core-plugins startup_sync` (15 tests passed)
    - `just test -p codex-core-plugins` (201 tests passed)
    - `just clippy -p codex-core-plugins` (passes with one pre-existing
    `large_enum_variant` warning)
    - Production app-server smoke test against GitHub:
      - Fresh home: `ls-remote`, `git init`, one exact-SHA shallow fetch
    - Unchanged restart: `ls-remote` and local `rev-parse` only; no fetch or
    clone
    - Bench smoke passed
  • Move marketplace add/remove and startup sync out of core. (#19099)
    Move more things to core-plugins.
    
    ---------
    
    Co-authored-by: Codex <noreply@openai.com>