Add TST + TCU real ruling-text tools (feature-004, v0.6.0)
Widen round 2026-07-07, all contracts verified live:
- TST (jurisprudencia-backend2.tst.jus.br): the morning rejection
(unreliable_exact_match) is REVERSED - a browser network trace of the
real frontend showed the request body needs a top-level orgao:"TST" and
numeracaoUnica.orgao:"5"; with those, free text narrows 3,751,594
ACORDAO -> 228,802 for one phrase and a full CNJ numeracaoUnica narrows
to exactly 1 from a bare httpx client. 8,483,448 documents across the
eight valid tipos (DECISAO_MONOCRATICA from config.json silently no-ops
and is rejected). New tools: br_search_case_tst, br_get_case_tst.
Redacted txtInteiroTeor ("removido no backend") falls back to the same
record's inteiroTeorHtml, mechanically flattened.
- TCU (pesquisa.apps.tcu.gov.br/rest/publico/base/acordao-completo):
keyless JSON search with dedicated total quantidadeEncontrada (525,620
acordaos unfiltered) and a full-document endpoint carrying real ruling
prose (ACORDAO deliberation + RELATORIO + VOTO). Exact lookup is
(numero, ano, colegiado); ambiguous numero/ano pairs error and list the
deciding bodies instead of guessing. New tools: br_search_case_tcu,
br_get_case_tcu.
Rejected with documented reasons (SOURCES.md ledger, LDH status @ check):
TRF4/TRF5 geo_restricted (no TCP from EU client, 2 rounds), RFB
sijut2consulta no_machine_api (scrape-class Struts HTML). TJDFT/TJBA left
as explicit todo.
Tests: 32 passed (offline fixtures + live smokes), ruff clean,
publication gate PASS. Version 0.6.0 in pyproject.toml + server.json.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> M
mazurwieslaw2022-cmd committed
3906edc2a06ed33896bf8f66cab062b5048f7c26
Parent: a07e85f