Skip to content

feat(xtask): port the pins job to cargo xtask check-pins - #1828

Open
nathan-weinberg wants to merge 2 commits into
praxis-proxy:mainfrom
nathan-weinberg:pins/check-pins
Open

nathan-weinberg wants to merge 2 commits into
praxis-proxy:mainfrom
nathan-weinberg:pins/check-pins

Conversation

@nathan-weinberg

Copy link
Copy Markdown
Contributor

Summary

Second of three stacked PRs. Stacked on #1827. Review only the last commit, feat(xtask): port the pins job to cargo xtask check-pins; the earlier commit belongs to #1827.

The GPU workflow's pins job validated the pin manifests in about 270 lines of inline Python, which only ran on schedule, dispatch, or the vllm-full-suite label. This ports it to cargo xtask check-pins, so it runs locally, in make lint on every PR, and (in the next PR) inside bump-pins.

  • New light pins xtask feature (dev includes it). It depends only on toml, so the pins job builds check-pins without compiling the proxy: cargo run -p xtask --no-default-features --features pins -- check-pins --github-output "$GITHUB_OUTPUT".
  • Every Python invariant is ported:
    • Claude Code context and compaction arithmetic
    • OpenCode major-version and lane tripwires
    • provider/backend window agreement
    • the OpenCode 2.x and pi shared-backend rules
    • models.json agreement
    • explicit example-config routes
  • New checks:
    • A site table records every file location that embeds a client version or the vLLM image (manifests, harness constants, workflow env, the dev-endpoint image, the Containerfile), each with an exact expected count.
    • Checksum fixtures must exist, name the downloaded artifact, and have no stale sibling.
    • Both [vllm] blocks must pin the same tag@sha256 image.
    • The OpenCode model must match vLLM's served_model_name.
  • --github-output emits the same keys the job did, and a unit test holds them to the job's outputs: map.

Related issue

Part of #1798.

Validation

  • Ran the old inline Python and check-pins --github-output on the same tree. The 20 key=value outputs are byte-identical.

  • cargo test -p xtask --no-default-features --features pins pins::: 19 tests. Each mutates one real file in memory and asserts the matching invariant reports it.

  • cargo clippy -p xtask --all-targets -- -D warnings, with --no-default-features --features pins and with --features openai-all,store-all.

  • cargo xtask check-pins, lint-deps, lint-separators, make fmt.

  • Not run locally: cargo machete and cargo deny (not installed). The new toml dependency is MIT/Apache-2.0.

  • Unit tests

  • Integration or functional tests

  • make lint

Checklist

  • I reviewed every changed line and can explain the change.
  • New capabilities include an example config and functional example test.
  • User-facing behavior and generated documentation are updated.
  • Performance-sensitive changes include appropriate benchmark or load-test evidence.
  • Commits are signed and include a Signed-off-by trailer.

Breaking changes

None. The pins job keeps its outputs; it now sets up Rust, and its timeout goes from 10 to 15 minutes.

🤖 Generated with Claude Code

First of three changes automating pinned-client bumps. This one cuts the
number of sites a bump must touch and closes the existing drift, with no
new tooling yet.

- Claude Code: move the CPU lane from 2.1.267 to the manifest's 2.1.278,
  which the GPU lane already runs, and make the CPU job assert the
  installed version. Drop the duplicate constant in claude_code_vllm.rs
  in favor of CLAUDE_CODE_PINNED_VERSION, add a major_series tripwire,
  and add offline tests tying the manifest, constant, URL, and CI env.
- Codex: add codex-cli/pin.toml and CODEX_PINNED_VERSION. Each Codex CI
  job now derives every path, URL, and version check from one job-level
  CODEX_VERSION, and the cache key hashes the checksum fixture instead of
  embedding it. The WebSocket replay fixture is tied to the pinned
  version, so a bump must recapture it. codex_pin.rs enforces it all.
- OpenCode 1.x: add the checksum fixture test 2.x and pi already have.
- vllm/Containerfile: pin the base image by tag@digest, matching every
  other vLLM reference.
- Reword compaction-reserve comments that claimed 2.1.267 was pinned to
  say where the value was measured.

Signed-off-by: Nathan Weinberg <nweinber@redhat.com>
…y#1798)

Second of three changes automating pinned-client bumps. The GPU workflow's
`pins` job validated the manifests in ~270 lines of inline Python that only
ran on schedule, dispatch, or the vllm-full-suite label. Port it to a Rust
xtask so it runs locally, in `make lint` on every PR, and later inside
bump-pins.

- New light `pins` xtask feature (`dev` includes it) depends only on
  `toml`, so the `pins` job builds check-pins without compiling the proxy.
- Every Python invariant is ported: Claude context and compaction
  arithmetic, OpenCode major/lane tripwires, provider/backend window
  agreement, the 2.x and pi shared-backend rules, models.json agreement,
  and explicit example-config routes.
- New: a site table records every file location that embeds a client
  version or the vLLM image (manifests, harness constants, workflow env,
  dev-endpoint image, Containerfile) with an exact expected count. Checksum
  fixtures must exist, name the downloaded artifact, and have no stale
  sibling. Both [vllm] blocks must pin one tag@sha256 image.
- `--github-output` exports the same keys the job emitted; a unit test
  holds them to the job's `outputs:` map, and the values were diffed
  identical against the Python script.
- Unit tests mutate one real file in memory per invariant.

Signed-off-by: Nathan Weinberg <nweinber@redhat.com>
@coderabbitai

coderabbitai Bot commented Oct 26, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 59 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: praxis-proxy/ai
  • Branch: main
  • File: .coderabbit.yaml
  • Commit: 3a3704c
  • Layers: Repository YAML (base), Central YAML (inherited)
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 31e3c5be-f679-43a9-87f9-d82371262160
Commits

Reviewing files that changed from the base of the PR and between 3a3704c and bb3da4c.

Files ignored due to path filters: 1
  • Cargo.lock is excluded by !**/*.lock, !Cargo.lock
Files selected for processing: 22
  • .github/workflows/integration.yaml
  • .github/workflows/vllm-integration.yaml
  • Cargo.toml
  • Makefile
  • tests/integration/fixtures/claude-code-cli/pin.toml
  • tests/integration/fixtures/codex-cli/pin.toml
  • tests/integration/tests/suite/claude_code.rs
  • tests/integration/tests/suite/claude_code_vllm.rs
  • tests/integration/tests/suite/codex_http.rs
  • tests/integration/tests/suite/codex_pin.rs
  • tests/integration/tests/suite/codex_websocket.rs
  • tests/integration/tests/suite/harness.rs
  • tests/integration/tests/suite/main.rs
  • tests/integration/tests/suite/opencode.rs
  • vllm/Containerfile
  • xtask/Cargo.toml
  • xtask/src/main.rs
  • xtask/src/pins.rs
  • xtask/src/pins/check.rs
  • xtask/src/pins/manifest.rs
  • xtask/src/pins/sites.rs
  • xtask/src/pins/tests.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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