Skip to content

fix(contract): file-specific certification response component names; guard against same-name components with different bodies - #777

Merged
nimrodbusany merged 1 commit into
developfrom
fix/certification-response-component-names
Nov 27, 2026
Merged

nimrodbusany merged 1 commit into
developfrom
fix/certification-response-component-names

Conversation

@nimrodbusany

Copy link
Copy Markdown
Contributor

fix(contract): file-specific certification response component names; guard against same-name components with different bodies

The certification build-session and process-record contracts reused OpenAPI response component names (PayloadTooLarge, Unauthorized, NotFound, InternalError, BadRequest, Forbidden, Conflict) that the existing certification contract and each other define with different bodies. A consumer that merges every contract file into one component namespace sees a conflict. This change gives the two newer files their own component names. Wire bodies are unchanged.

Ticket: none (contract fix: same-name response components with different bodies across certification files)
Security note: contract-only; no response body, status code, error code or validation rule changes; the closed error bodies stay closed
Spine-Trail: st_b8b70b04d692

What changes

  • certification/certificate_build_sessions_endpoints.json: response components renamed with the prefix CertificateBuildSession (PayloadTooLarge, Unauthorized, NotFound, BadRequest, Forbidden, Conflict), and every reference updated.
  • certification/process_records_endpoints.json: response components renamed with the prefix ProcessRecord (PayloadTooLarge, Unauthorized, NotFound, InternalError), and every reference updated.
  • The pinned certification/certification_endpoints_v0.json is unchanged.
  • New tests/test_component_name_collisions.py: loads every schema file and fails when the same components.<section>.<name> appears in two files with different bodies. It lists all seven clashes on the previous develop and passes after this change.

Compatibility

  • Every operation's fully resolved responses are identical before and after (compared by resolving all references on both revisions).
  • The breaking-change check compares resolved responses, not component names: no findings.
  • The Python and JavaScript SDK type generators read only *_schema.json files, not endpoint files, so no generated type name changes.

Checks

  • scripts/local_gate.sh: passed (9058 passed, 2 skipped).
  • scripts/compile_changelog.py --check, scripts/breaking_schema_check.py --check --base-ref origin/develop (no unacknowledged findings), parity and schema reachability up to date.
  • A backend started with this contract installed builds its OpenAPI document without conflicts (737 paths); with the previous develop contract the same build fails on the PayloadTooLarge clash. The backend contract tests report no component conflict and no operation losing its contract id.

Review receipt

  • An independent model review: all references resolve, every resolved response is byte-identical, the guard test is not vacuous; verdict ship.

🤖 Generated with Claude Code

…guard against same-name components with different bodies

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@nimrodbusany
nimrodbusany requested a review from a team as a code owner November 27, 2026 07:41
@sonarqubecloud

Copy link
Copy Markdown

@nimrodbusany
nimrodbusany added this pull request to the merge queue Nov 27, 2026
Merged via the queue into develop with commit 3cf544d Nov 27, 2026
18 checks passed
@nimrodbusany
nimrodbusany deleted the fix/certification-response-component-names branch November 27, 2026 08:16
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.

1 participant