Skip to content

Regenerate the client from the latest OpenAPI specification - #95

Open
splch wants to merge 1 commit into
scan-findings/3-prosefrom
security/scan-findings
Open

Regenerate the client from the latest OpenAPI specification#95
splch wants to merge 1 commit into
scan-findings/3-prosefrom
security/scan-findings

Conversation

@splch

@splch splch commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator

Summary

Part 4 (top) of the stack #96 -> #97 -> #98 -> #95; merge bottom-up. Regenerates the client from the latest upstream spec at api.ionq.co/v0.4/api-docs (59 new generated files, 16 deleted, 37 changed). User-visible changes are itemized in the CHANGELOG; the notable ones:

  • get_job (and therefore wait_for_job/async_wait_for_job) returns SingleCircuitJob | MultiCircuitJob | QaoaJob | QuantumFunctionJob instead of the removed GetJobResponse. QuantumFunctionJobResults now types value and variance, closing a known upstream gap.
  • New endpoints move_job (POST /jobs/{UUID}/move) and get_format_schema (GET /schemas/formats/{format}); the three variant-results endpoints and several restructured models were removed upstream.
  • The backend parameter enum narrowed upstream to qpu.forte-1 and qpu.forte-enterprise-1 - aria-1/2 and forte-enterprise-2/3 are no longer accepted by the typed endpoints that validate it.
  • Tests and docs that referenced the removed variant endpoints now use get_characterization as the multi-path-param example, preserving the security suite's second-position-parameter traversal coverage.
  • All security post-hooks from Fix security scan findings across the client and codegen pipeline #96 apply to the regenerated tree, including the new endpoint modules; the Q-CTRL api_credentials field is unchanged upstream and its repr masking still holds.

Test plan

  • uv run pytest at this head: 275 passed, 100% branch coverage, warnings-as-errors - including the endpoint-level traversal tests against the regenerated modules and the Q-CTRL repr-masking tests.
  • uv run ruff check, uv run ruff format --check, uv run ty check ionq_core/: clean. pdoc builds.
  • Post-commit staleness: the documented regen command reproduces the committed tree byte-for-byte (the generated.yml gate).

Important

Most code in ionq_core/ is auto-generated and overwritten on regeneration.
See CONTRIBUTING.md for which files are safe to edit.

@splch
splch requested a review from a team as a code owner August 25, 2026 19:50
Syncs openapi.json with the live spec at api.ionq.co/v0.4/api-docs
(59 new generated files, 16 deleted, 37 changed). User-visible changes
are itemized in the CHANGELOG; the notable ones:

- get_job now returns SingleCircuitJob | MultiCircuitJob | QaoaJob |
  QuantumFunctionJob instead of the removed GetJobResponse; polling's
  annotations follow. QuantumFunctionJobResults now types value and
  variance, closing a known upstream gap.
- New endpoints: move_job (POST /jobs/{UUID}/move) and get_format_schema
  (GET /schemas/formats/{format}). Removed upstream: the three
  variant-results endpoints and several restructured models.
- The backend parameter enum narrowed upstream to qpu.forte-1 and
  qpu.forte-enterprise-1 (aria-1/2 and forte-enterprise-2/3 removed).
- The Q-CTRL api_credentials field is unchanged upstream; the repr
  post-hook still applies, verified by the existing masking tests.
- Tests and docs that referenced the removed variant endpoints now use
  get_characterization as the multi-path-param example; the security
  path-traversal tests keep their second-position-parameter coverage.

All security post-hooks applied to the regenerated tree (path-param
routing in every endpoint module including the new ones, header and
credential repr hygiene, SPDX + EOF normalization).

@natestemen natestemen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO the PR is too large to give an effective review of, especially since it is raising and addressing security issues. Lots of important cleanup here (e.g. 3f6d926) but not sure it belongs all in one PR.

Since this repo is not being used AFAIK, fine with merging it to move quickly, but I do believe it would be better practice to break it up.

(I wrote this even before the latest commit got added which expanded the PR by 6k+ lines).

@natestemen

Copy link
Copy Markdown
Contributor

Given #90 already got a review, and addresses some of the issues here, why not start there?

@splch splch changed the title Fix security scan findings across the client and codegen pipeline Regenerate the client from the latest OpenAPI specification Aug 25, 2026
@splch
splch changed the base branch from main to scan-findings/3-prose August 25, 2026 20:29
@natestemen

Copy link
Copy Markdown
Contributor

@splch is this entirely auto-generated?

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.

2 participants