Skip to content

v3.1.0

Choose a tag to compare

@github-actions github-actions released this 22 Aug 10:05
· 16 commits to main since this release

Changelog - v3.1.0

All notable changes to the law-scrapper-mcp project for version v3.1.0 will be documented in this file.

The format is based on Keep a Changelog 1.1.0,
and this project adheres to Semantic Versioning 2.0.0.

[v3.1.0] - 2026-08-22

Added

  • Listing and result set paginationlist_loaded_documents and list_result_sets accept limit/offset and return page_info.
  • Search and browse pagination metadatasearch_legal_acts and browse_acts return page_info; browse_acts accepts offset.
  • Failed metadata category trackingMetadataOutput.failed_categories provides an explicit list of metadata categories that could not be fetched.
  • Context character ceiling visibilitySearchInActOutput.context_chars_requested / context_chars_applied, plus an informational hint when context was trimmed.
  • API retry loop configurationLAW_MCP_API_MAX_ATTEMPTS (default 3) and LAW_MCP_API_RETRY_BUDGET (default 45.0 s) settings for the API client retry loop.

Changed

  • CI Action Runtime — CI and release workflows bump pinned GitHub Actions to the Node 24 runtime (actions/checkout 7.0.1, astral-sh/setup-uv 10.0.1, actions/upload-artifact 7.0.1, actions/download-artifact 8.0.1, softprops/action-gh-release 3.0.2).
  • API Client Layering & ResilienceSejmApiClient splits request handling into three layers (_send / _execute_with_resilience / _request); exception translation occurs outside the retry loop.
  • Circuit Breaker Admission Contract — The circuit breaker gains an explicit try_acquire / release_success / release_failure / release_probe contract; the probe counter increments on admission rather than completion.
  • Specific Exception Classification — HTTP 500 and 504 raise ApiUnavailableError instead of generic SejmApiError, aligning with the circuit breaker classification while remaining backward-compatible via inheritance.
  • Search In Act Pagination & Binary Searchsearch_in_act builds context and resolves sections only for hits on the requested page; section lookup uses binary search.
  • Concurrent Metadata Retrievalget_system_metadata(category="all") fetches categories concurrently within client semaphore limits instead of sequentially.
  • Search In Act Input Schema Documentation — The context_chars description in search_in_act inputSchema clearly states the 2000-character ceiling and trimming behavior.

Fixed

  • Metadata count integrity — A failure when fetching an individual metadata category no longer silently understates total_count.
  • Search count discrepancy handlingSearchOutput.total_count is raised to the actual number of returned records when the Sejm API reports a count lower than its response payload.
  • 5xx error retries — Fixed exception translation so HTTP 5xx errors properly reach the retry policy instead of being intercepted prematurely.
  • Transport error handling — Transport errors other than timeouts (ConnectError, ReadError, RemoteProtocolError) are translated to domain exceptions rather than leaking raw httpx exceptions to the services layer.
  • Circuit breaker failure counting — A failed operation increments the breaker failure count by 1 rather than by the number of retry attempts; retry loops obey the configured time budget and abort if the circuit opens.
  • Half-open state transition — Confirmed failures in a retry sequence are booked even when subsequent attempts are rejected by the circuit breaker, preventing stuck half-open states.
  • Local protocol error exclusionhttpx.LocalProtocolError (malformed client requests) is excluded from retry loops and circuit breaker failure tallies.
  • Retry setting validationLAW_MCP_API_MAX_ATTEMPTS and LAW_MCP_API_RETRY_BUDGET are validated (ge=1 / gt=0) to prevent silent zero-iteration loops.
  • Retry-After header validation — Rejects non-finite, NaN, and negative Retry-After values to prevent scheduling anomalies.
  • Accurate User-Agent reporting — The User-Agent header reports the actual server version and contact address instead of a hardcoded string.

Removed

  • tenacity dependency — Replaced with an explicit, resilient retry loop in client/sejm_client.py.
  • LAW_MCP_API_MAX_RETRIES setting — Removed deprecated setting in favor of LAW_MCP_API_MAX_ATTEMPTS.