v3.1.0
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 pagination —
list_loaded_documentsandlist_result_setsacceptlimit/offsetand returnpage_info. - Search and browse pagination metadata —
search_legal_actsandbrowse_actsreturnpage_info;browse_actsacceptsoffset. - Failed metadata category tracking —
MetadataOutput.failed_categoriesprovides an explicit list of metadata categories that could not be fetched. - Context character ceiling visibility —
SearchInActOutput.context_chars_requested/context_chars_applied, plus an informational hint when context was trimmed. - API retry loop configuration —
LAW_MCP_API_MAX_ATTEMPTS(default 3) andLAW_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/checkout7.0.1,astral-sh/setup-uv10.0.1,actions/upload-artifact7.0.1,actions/download-artifact8.0.1,softprops/action-gh-release3.0.2). - API Client Layering & Resilience —
SejmApiClientsplits 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_probecontract; the probe counter increments on admission rather than completion. - Specific Exception Classification — HTTP 500 and 504 raise
ApiUnavailableErrorinstead of genericSejmApiError, aligning with the circuit breaker classification while remaining backward-compatible via inheritance. - Search In Act Pagination & Binary Search —
search_in_actbuilds context and resolves sections only for hits on the requested page; section lookup uses binary search. - Concurrent Metadata Retrieval —
get_system_metadata(category="all")fetches categories concurrently within client semaphore limits instead of sequentially. - Search In Act Input Schema Documentation — The
context_charsdescription insearch_in_actinputSchemaclearly 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 handling —
SearchOutput.total_countis raised to the actual number of returned records when the Sejm API reports acountlower 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 rawhttpxexceptions 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 exclusion —
httpx.LocalProtocolError(malformed client requests) is excluded from retry loops and circuit breaker failure tallies. - Retry setting validation —
LAW_MCP_API_MAX_ATTEMPTSandLAW_MCP_API_RETRY_BUDGETare validated (ge=1/gt=0) to prevent silent zero-iteration loops. Retry-Afterheader validation — Rejects non-finite, NaN, and negativeRetry-Aftervalues to prevent scheduling anomalies.- Accurate User-Agent reporting — The
User-Agentheader reports the actual server version and contact address instead of a hardcoded string.
Removed
tenacitydependency — Replaced with an explicit, resilient retry loop inclient/sejm_client.py.LAW_MCP_API_MAX_RETRIESsetting — Removed deprecated setting in favor ofLAW_MCP_API_MAX_ATTEMPTS.