Skip to content

feat(ipa): add IPA-132 LRO classification rules - #1444

Merged
julius-jogela merged 2 commits into
mainfrom
feat-ipa-132-lro-classification
Aug 20, 2026
Merged

julius-jogela merged 2 commits into
mainfrom
feat-ipa-132-lro-classification

Conversation

@julius-jogela

@julius-jogela julius-jogela commented Aug 20, 2026 •

Copy link
Copy Markdown
Contributor

Proposed changes

This PR adds the two IPA-132 rules classifying which methods must not be modeled as long-running operations. A read returns state that already exists on the server, so there is no background work to track and the method must not declare a 202 Accepted response.

Jira ticket: CLOUDP-435355

Rules added

Both at warn severity

Rule Checks
xgen-IPA-132-get-method-must-not-be-lro A Get method must not declare a 202 response. Applies to single resources and singleton resources, mirroring the IPA-104 Get method scoping
xgen-IPA-132-list-method-must-not-be-lro A List method must not declare a 202 response. Applies to resource collections, mirroring the IPA-105 List method scoping

Operations with x-xgen-IPA-exception for a rule are excluded from its validation.

Testing

  • Full suite: 128 suites / 805 tests pass. gen-ipa-docs, prettier and eslint clean.

Checklist

  • I have signed the MongoDB CLA
  • I have added tests that prove my fix is effective or that my feature works

Add the two rules classifying which methods must not be modeled as
long-running operations:

- xgen-IPA-132-get-method-must-not-be-lro: a Get method must not declare
  a 202 response; a Get returns the current state of a resource that
  already exists on the server. Applies to single resources and
  singleton resources, mirroring the IPA-104 Get method scoping.
- xgen-IPA-132-list-method-must-not-be-lro: a List method must not
  declare a 202 response; a List returns data from a collection that
  already exists on the server. Applies to resource collections,
  mirroring the IPA-105 List method scoping.

No GET method in the current spec declares a 202, so the rules report
nothing today; the tests cover the correct and incorrect examples from
the IPA-132 guidelines.
…ptions

Define the GetOperationObject alias used by IPA-104 and IPA-105 instead
of repeating the raw given, and add the compliant-method-with-exception
test case each IPA-132 rule test defines.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@julius-jogela
julius-jogela merged commit 44ea829 into main Aug 20, 2026
13 checks passed
@julius-jogela
julius-jogela deleted the feat-ipa-132-lro-classification branch August 20, 2026 14:32
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