1 Commits

  • package: factor DotSlash executable fetching (#24129)
    ## Why
    
    The package builder already fetches `rg` from a checked-in DotSlash
    manifest. The zsh packaging work needs the same
    fetch/cache/size-check/SHA-256/extract path for another manifest, but
    keeping that refactor inside the zsh PR makes the review harder to
    follow.
    
    This PR factors the existing `rg`-specific implementation into a
    reusable helper with no intended behavior change for `rg` packaging.
    
    ## What Changed
    
    - Added `scripts/codex_package/dotslash.py` for checked-in DotSlash
    manifest parsing, archive download, cache reuse, size validation,
    SHA-256 validation, and member extraction.
    - Updated `scripts/codex_package/ripgrep.py` to delegate to the shared
    helper.
    - Preserved the existing `rg` manifest path, cache key, destination
    filename, and executable-bit behavior.
    
    ## Testing
    
    - `python3 -m py_compile scripts/codex_package/dotslash.py
    scripts/codex_package/ripgrep.py scripts/codex_package/cli.py
    scripts/codex_package/layout.py scripts/codex_package/zsh.py`
    - `python3 -m unittest discover scripts/codex_package`
    
    
    ---
    [//]: # (BEGIN SAPLING FOOTER)
    Stack created with [Sapling](https://sapling-scm.com). Best reviewed
    with [ReviewStack](https://reviewstack.dev/openai/codex/pull/24129).
    * #23768
    * #23756
    * __->__ #24129