Skip to content

ci: accept the existing search limit schema repair - #30

Closed
enyst wants to merge 1 commit into
review-base/rest-compat-search-limitfrom
enyst/rest-compat-search-limit-repair
Closed

enyst wants to merge 1 commit into
review-base/rest-compat-search-limitfrom
enyst/rest-compat-search-limit-repair

Conversation

@enyst

@enyst enyst commented Sep 13, 2026

Copy link
Copy Markdown
Owner

HUMAN:


AGENT:

Why

OpenHands#4991 fixes Query(lte=100) to Query(le=100) on four paginated search endpoints. These handlers already rejected limits above 100 with assertions. The change publishes the existing bound and returns 422 for oversized requests.

oasdiff 1.19.1 reports this as request-parameter-max-set warnings. Although oasdiff --fail-on ERR exits 0, our wrapper rejects the unrecognized changes.

This follows the targeted exception pattern used for the VS Code documented default in OpenHands#4213, cloud-proxy removal in OpenHands#3687, and MCP schema repairs in OpenHands#4229.

Summary

  • Accept only the limit query parameter gaining maximum: 100 on GET conversation search, conversation event search, bash event search, and subdirectory search.
  • Require the baseline operation ID to match, and its integer query parameter to contain lte: 100 with no existing maximum.
  • Emit a notice and test the checker’s exit behavior. Other endpoints, methods, parameters, bounds, missing legacy metadata, future tightening, and mixed unrelated breakages still fail.

Issue Number

Related to OpenHands#4991. Prepared as a separate PR against upstream main at 76e9e250, to merge before OpenHands#4991 updates its checker.

GitHub denied upstream PR creation with 403 — Resource not accessible by integration. This draft targets an exact mirror of that main commit so the diff contains only the checker exception and tests. Open the branch as an upstream PR.

How to Test

uv run python -m pytest -q -o addopts='' tests/cross/test_check_agent_server_rest_api_breakage.py
uv run pre-commit run --files .github/scripts/check_agent_server_rest_api_breakage.py tests/cross/conftest.py tests/cross/test_check_agent_server_rest_api_breakage.py

Results: 53 passed; all changed-file pre-commit hooks passed.

Also ran the full checker with real generated OpenAPI schemas and the workflow-pinned oasdiff 1.19.1, comparing against the released v1.47.0 tag:

Source under review Checker Exit
Main 76e9e250 This PR 0
Updated OpenHands#4991 d390bed7 Original 1
Updated OpenHands#4991 d390bed7 This PR 0

The successful OpenHands#4991 run emitted the repair notice for exactly the four search endpoints. Existing handling of the release-baseline modify_params removals already allows those entries.

For this local comparison, baseline selection was pinned to the published v1.47.0 release because the PyPI metadata lookup intermittently timed out; baseline generation was made to fail hard rather than skip. Schema generation and oasdiff output were real.

Exact comparison harness

Run this in each checkout, with oasdiff 1.19.1 on PATH. For the combined case, apply this PR’s checker change to OpenHands#4991 first.

git fetch https://github.com/OpenHands/software-agent-sdk.git refs/tags/v1.47.0:refs/tags/v1.47.0
uv run python - <<'PY'
import importlib.util
import sys
from pathlib import Path

path = Path(".github/scripts/check_agent_server_rest_api_breakage.py")
spec = importlib.util.spec_from_file_location("compat", path)
mod = importlib.util.module_from_spec(spec)
sys.modules[spec.name] = mod
spec.loader.exec_module(mod)
mod._get_baseline_version = lambda distribution, current: "1.47.0"
original_generate = mod._generate_openapi_for_git_ref

def required_baseline(ref):
    schema = original_generate(ref)
    if schema is None:
        raise RuntimeError("Baseline generation failed: " + ref)
    return schema

mod._generate_openapi_for_git_ref = required_baseline
raise SystemExit(mod.main())
PY

Video/Screenshots

Not applicable; checker exit codes and reproduction above.

Design Doc

The scope and rationale are documented above.

Type

  • Bug fix
  • Feature
  • Refactor
  • Breaking change
  • Docs / chore

Notes

The exception depends on historical lte: 100 metadata. Once the baseline publishes a normal maximum, it cannot qualify for this exception.

Allow only the four known GET search operations to publish maximum 100 when their baseline limit schema contains the legacy lte 100 typo. Keep other parameter restrictions and mixed breaking changes blocking.

Co-authored-by: openhands <openhands@all-hands.dev>
@coderabbitai

coderabbitai Bot commented Sep 13, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

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.

@enyst enyst closed this Sep 14, 2026
@enyst
enyst deleted the enyst/rest-compat-search-limit-repair branch September 14, 2026 20:38
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