Skip to content

contracts: sync the CLI contract from InferenceInfra staging (release 2's contract family and the codex harness) - #198

Merged
Siddhesh2377 merged 3 commits into
mainfrom
chore/inferenceinfra-release2-contract-pin
Oct 19, 2026
Merged

Siddhesh2377 merged 3 commits into
mainfrom
chore/inferenceinfra-release2-contract-pin

Conversation

@sanchitmonga22

@sanchitmonga22 sanchitmonga22 commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

Syncs the CLI contract pin from an InferenceInfra commit that holds staging plus release 2's contract changes plus the codex harness (InferenceInfra #4854). Merge this before #4854 reaches the start train: #4854's consumer-impact job stays red until Wally main carries this pin. The previous attempt at it, #158, is closed and unmerged.

What changed

Both files are generated by the repo's own tool; nothing is hand-edited:

python3 contracts/sync_from_inferenceinfra.py --from <InferenceInfra @ 78fbc52a76>

The source commit is 78fbc52a76 on the InferenceInfra branch mig/devsync/wally-pin-source (pushed so the stamp names a commit anyone can fetch). It is staging (bc48453f13) merged with the end of the release 2 chat image family (5376a6b0b0, which carries the reasoning levels #4840, the image contracts #4863 and the chat image pull requests) and with #4854 (6f5d334646).

Every difference from the current pin is additive:

  • ApiErrorCode gains 30 values that InferenceInfra staging added (organisations, operator and price-version errors).
  • Harness gains codex (append-only; this is what #4854 adds).
  • The models response declares the x-request-id header; the cancel operation declares its 429 with Retry-After.
  • ModelReasoning's description cites InferenceInfra's docs/reference/models.md. No schema of the #4768 pin (contracts: sync the CLI contract from InferenceInfra #4768 (model reasoning object) #195) changes.
  • The source stamp moves from fix/reasoning-budget to mig/devsync/wally-pin-source.
  • src/account/console_contract.rs is regenerated from the extract (CONTRACT_SHA256 moves). No CLI code reads the new values.

The decisions contract (wally-decisions-public-v1.openapi.json) is unchanged: it already equals the source's, so decisions_contract.rs does not move.

Checks run locally

  • CI's "Console binding matches its pinned contract" step: tests/test_contract_sync.py (OK), generate_console_binding.py --check (matches), sync_from_inferenceinfra.py --check (Wally CLI lock OK (78fbc52a, mig/devsync/wally-pin-source, ...)).
  • tests/test_versions.py (OK).
  • cargo check --locked --all-targets (exit 0), cargo clippy --locked --all-targets -- -D warnings (exit 0) and cargo fmt --check (exit 0). check --all-targets compiles every test target against the regenerated binding, so no match on ApiErrorCode or Harness is left non-exhaustive. The build used placeholder console endpoints (https://console-api.invalid, https://console.invalid) in the environment, no .env.
  • Codex round 1 on this diff (gpt-6.1-sol, high, fast, exit 0): "No findings." It confirmed the extract matches the stamped commit, the schema changes are additive and no Rust match or secret is affected.
  • Not run: cargo test / ctest. On this host the test binaries fail to link (undefined Brotli* symbols; the cmake build the CI uses supplies them), which is the host, not the diff: it touches only the two generated files. CI's ctest is the check that runs them.

Against InferenceInfra's gate

contracts/check_consumer_impact.py --against-wally-pin --head <the source commit> with this tree as --wally-repo:

Wally tree result
this branch consumer-impact: none (exit 0)
today's main stale, CLI pin 6e4009badbfe -> ef52e0dcf18f (exit 1)

The pin equals InferenceInfra staging after release 2 plus #4854. It does not equal staging today (the reasoning levels and image contracts are still in review there), so InferenceInfra pull requests that land before release 2 will still see the job red. The start train is the first place it is meant to be green. If the contract set in staging differs when that train starts, the command above re-syncs it; it is deterministic.

Overlap with open PRs

None of the open PRs (#196, #166) touches the generated files.

Merge order

  1. This PR.
  2. InferenceInfra release 2 (the contract family above), then InferenceInfra #4854 on the start train.

Runanywhere-monorepo is also reached by the same InferenceInfra changes (its pins are not read by the staging gate; a warning only).

🤖 Generated with Claude Code


Summary by cubic

Synced the CLI contract pin to InferenceInfra staging commit d7e2304d, which carries release 2's contract family and the codex harness. All differences from the previous pin are additive, so no current CLI behavior changes.

  • ApiErrorCode gains 30 values; Harness gains codex.
  • The models response declares x-request-id; the cancel operation declares its 429 with Retry-After and documents pull-mode cancellation.
  • The decisions contract is unchanged.
  • The re-pin replaces the earlier 78fbc52a source; a main merge (release 0.8.8) touched no generated files.

Merge this before InferenceInfra #4854 reaches the start train; its consumer-impact check stays red until this pin lands.

Written for commit 45824cb. Summary will update on new commits.

View guided diff Turn on auto-fix

Summary by CodeRabbit

  • API Updates
    • Added support for the Codex harness and expanded documented error responses for account, identity, organization, invitation, membership, partner, gateway, pricing, and operational scenarios.
    • Clarified that the Authorization header may contain a console session token, and added documentation for the models endpoint’s request ID response header.
    • Documented pull-mode cancellation behavior, including its wait limits, rate limits, and retry guidance.
  • Documentation
    • Updated the model reasoning description to link to the model reference.

… 2's contract family and the codex harness)

Regenerated with the repo's own tool, nothing hand-edited:

    python3 contracts/sync_from_inferenceinfra.py --from <InferenceInfra @ 78fbc52a76, branch mig/devsync/wally-pin-source>

The source is InferenceInfra staging plus the contract changes release 2 carries (the reasoning levels, the decision and chat image
contracts, the chat image family) plus the codex harness (InferenceInfra #4854). Every difference from the previous pin is additive:

- ApiErrorCode gains 30 values staging added (organisations, operator and price-version errors).
- Harness gains codex (append-only).
- The models response declares the x-request-id header; the cancel operation declares its 429 with Retry-After.
- The ModelReasoning description now cites InferenceInfra's docs/reference/models.md. No schema of #4768's pin changes.
- The decisions contract (wally-decisions-public-v1) is unchanged: it already equals the source's.

console_contract.rs is regenerated from the extract (CONTRACT_SHA256 moves). No CLI code reads the new values.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sanchitmonga22
sanchitmonga22 requested a review from a team as a code owner October 14, 2026 12:26
@coderabbitai

coderabbitai Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 9f34ddae-3798-4e7b-86a8-076c74585cd7
📥 Commits

Reviewing files that changed from the base of the PR and between e337eaf and 45824cb.

📒 Files selected for processing: 2
  • contracts/wally-cli-v1.openapi.json
  • src/account/console_contract.rs

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.

📝 Walkthrough

The OpenAPI specification adds error codes and the codex harness value. It updates endpoint descriptions and response documentation. The Rust console contract adds corresponding error-code and harness mappings and updates its OpenAPI checksum.

Changes: Console contract updates

Layer / File(s) Summary
Add console contract values
contracts/wally-cli-v1.openapi.json, src/account/console_contract.rs
The OpenAPI specification and Rust contract add error-code variants and the codex harness value. The Rust contract adds string parsing and serialization mappings and updates its OpenAPI checksum.
Update endpoint documentation
contracts/wally-cli-v1.openapi.json
The specification updates descriptions and response documentation for /v1/me, /v1/models, and the cancel operation. It also updates the model reasoning reference and source metadata.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Merge Risk: ⚪ Minimal · up to 45824

The contract update has no identified merge-blocking issue; it is ready for normal checks.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 1 files. (1 skipped: 1 … Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and specifically describes the contract synchronization, release 2 contract changes, and codex harness addition.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 1 files. (1 skipped: 1 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

  • Fix all pre-merge checks with AI
✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • 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.

Main moved by four commits (release 0.8.8); none touches the two generated contract files or the decisions pin.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Siddhesh2377
Siddhesh2377 marked this pull request as ready for review October 19, 2026 11:46
@Siddhesh2377
Siddhesh2377 merged commit 7f97280 into main Oct 19, 2026
9 checks passed
Guo-astro pushed a commit to Guo-astro/rcli that referenced this pull request Oct 20, 2026
…x kept)

RunanywhereAI#198 re-synced this pin from InferenceInfra staging (release 2's contract
family and the codex harness). The CLI talks to inference.runanywhere.ai,
which runs InferenceInfra main (promoted from development), and that line
lacked codex. So every development change to control-plane-v1 now reports
"Wally main pin is stale" on InferenceInfra's release train (run
39342073419, "downstream contract freshness / Wally main vs this
control-plane").

InferenceInfra fix/codex-harness-live (3fb1fd00) ports the codex harness to
the live line. This re-syncs from it with
contracts/sync_from_inferenceinfra.py --from <that checkout>:

- Harness keeps codex (KCodex <-> "codex").
- Dropped relative to the staging pin, because the live API does not have
  them: 30 staging-only ApiErrorCode values (organization, invitation,
  partner and release-2 operator codes), the `x-request-id` header on the
  models listing response, and the cancel endpoint's 429. A grep of src/
  outside the generated console_contract.rs finds no use of any dropped
  variant.
- sync_from_inferenceinfra.py --check: "Wally CLI lock OK (3fb1fd00,
  fix/codex-harness-live)"; decisions_contract.rs matches its pin.

A local `cargo check` could not run: build.rs needs a CMake/Ninja native
toolchain this machine lacks. This change touches only the generated
binding; CI compiles it.

Merge this before the InferenceInfra PR (its consumer-impact gate compares
against this repo's main pin). When release 2 (staging) becomes production,
re-pin from that line again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Siddhesh2377 Siddhesh2377 mentioned this pull request Oct 21, 2026
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