Skip to content

MESA v0.9.2 — legal retrieval and admission hardening

Choose a tag to compare

@Yasou13 Yasou13 released this 06 Nov 18:45
· 38 commits to main since this release
8cd2cfe

This release hardens the Turkish legal extraction and retrieval features from
Round 16 and Round 17. V4 HTTP routes remain compatible. Production qualification
remains NO-GO pending the normal certification and production-like release gates.

Added

  • Rule-based Turkish legal item extraction for newly admitted chunks, capturing
    versioned legal rule items with chunk offsets (citation, decision_ref,
    date, amount, duration, and outcome). Extracted items are returned in
    search provenance under legal_items separately from SPO facts, without
    affecting fusion scores. Document purge erases their source quotes.
  • Store-learned law names: authorized document titles and law headers provide
    scope-cached and indexed law names, including the K. abbreviation.
  • Exact-match-first slot: queries matching a decision's own docket/decision reference
    or exact law/article occupy at most three leading search positions in document order,
    preserving remaining result order. Decision matching requires references beginning in
    the first 300 characters of an authorized first chunk; later quotations do not count.

Changed

  • MESA_LEGAL_RULES_ENABLED defaults to true. When set to false, it disables
    automatic legal identity assignment and item extraction during ingestion. During
    search, it disables legal processing (citation resolution, exact-match slot,
    decision künye promotion, legal ranking factors, and graph citation parsing) and
    suppresses stored legal result overlays in returned copies while keeping durable
    identities and snapshots intact.
  • Open-ended SPO fact extraction (MESA_EXTRACTION_ENABLED) defaults to false
    regardless of MESA_MODEL_ENABLED; an explicit true still enables it.
  • Constitutional Court names (Anayasa Mahkemesi, its suffix forms and AYM)
    no longer activate Constitution citation ranking; separate statute citations in
    the same query are preserved.
  • Large-document admission waits for queue room on queue_over_capacity without
    repeating full document chunk planning.

Security

  • Fixed synchronous CPU-bound request-path stalls that also affect 0.9.1: rule
    extraction, citation resolution, scope building, and heavy token scoring now bound
    caller-text work and yield thread execution, keeping /health responsive under
    high load. Users of 0.9.1 are recommended to upgrade.

Known issues

  • Post-merge CI on Python 3.13: a 200 ms wall-clock parser test exceeded its bound on the CI runner (heaviest case ~162 ms locally). Outputs are unaffected; the speed-up lands on main and ships in 0.9.3.

  • Heavy 1,000-candidate search takes approximately 11.6 s; /health responsiveness
    is restored for measured repros, but heavy-query execution time is not proved faster.

  • Older whole-document secret scanning and extreme Unicode normalization can still
    cause sub-second request-path stalls.

  • UUID ties can change ordering across separately ingested stores; same-store
    retrieval remains deterministic for retained inputs.

  • Large documents take minutes to become fully ready: a 5 MB document
    (4,999,000 bytes) took about 7 minutes (7m00.6s) to become ready with models off
    and graph on.

  • Non-object document requests keep an INFO-level 422 detail wording difference;
    HTTP status, error code, location, and OpenAPI schema remain unchanged.

Install and upgrade

pip install --upgrade mesa-memory==0.9.2

Back up existing stores and follow the upgrade procedure before upgrading.

Validation

Full comparison.

The annotated v0.9.2 tag is SSH-signed and passed the full local signed-tag preflight.

Final PR coverage: Python 3.11 88.09%, Python 3.13 88.07%; 2,032 tests passed in each coverage job. Full local release gate: 2,037 local tests plus 10 separate MCP tests passed.

Build evidence

Attached distributions match the published PyPI files by SHA256. The build evidence archive contains the reproducible tag-CI wheel, locked-runtime CycloneDX SBOM, and verified OIDC provenance reports constrained to Yasou13/MESA, .github/workflows/ci.yml, refs/tags/v0.9.2, and release commit 8cd2cfe1df5356e73b3bef83ae640850fd54c798.