Skip to content

Feat/0.4.1 framework guides - #16

Merged
vericto merged 2 commits into
mainfrom
feat/0.4.1-framework-guides
Oct 24, 2026
Merged

vericto merged 2 commits into
mainfrom
feat/0.4.1-framework-guides

Conversation

@vericto

@vericto vericto commented Oct 24, 2026 •

Copy link
Copy Markdown
Owner

What does this PR change?

Why?

Type of change

  • Driver wrapper (Snowflake, sqlite3, SQLAlchemy, DB-API)
  • Runtime API or CI-check client (retries, fail mode, caching)
  • Integration (LangChain, LlamaIndex, dbt, Airflow)
  • Sanitized mode
  • Bug fix
  • Documentation or examples
  • Dependencies or CI

Tests

  • Added or updated tests that cover the change, including the failure path
  • uv run ruff check . and uv run ruff format --check . pass
  • uv run mypy passes
  • uv run coverage run -m pytest and uv run coverage report --omit=... (as in CI) pass, at or above 80%
  • The Integration (...) job's commands pass locally (if an integration changed)
  • uv build succeeds

Checklist

  • Commits follow Conventional Commits
  • CHANGELOG.md updated under [Unreleased] (if a user of the package can see the change)
  • New or changed options, environment variables or errors documented in README.md
  • Parameter values are still never sent to Vericto
  • CI is green

…FAIL_MODE means closed

Documentation release with one small fix.

Fixed
- An empty or whitespace-only VERICTO_FAIL_MODE now means the default,
  closed, instead of raising VerictoConfigError (the bug vericto-node fixed
  in 0.2.2). The error names VERICTO_FAIL_MODE when the value came from it.
  Tests: tests/test_guard.py.

Added
- docs/frameworks/: LangChain, LlamaIndex, SQLAlchemy and DB-API (official
  integrations) and Django, CrewAI, OpenAI Agents SDK, Pydantic AI and
  Vanna 2.x (patterns), each with a runnable example and tested versions.
- scripts/docs_stub.py (a local Runtime API stand-in with the service's
  status codes and bodies) and scripts/check_docs.py (runs every python
  block of the README and the guides against it). CI job "Docs examples":
  core in the dev environment, each guide against ci/requirements-docs-*.txt.

Changed
- README: Core API, Verdict fields, timeouts and retries (per attempt, worst
  case), sync and async, runnable fail-closed/fail-open example, Frameworks
  table (official vs pattern), corrected CA bundle note, absolute links for
  PyPI; Spanish section updated.
- Docstrings for public APIs that had none.
- sdist ships docs/ and scripts/, no README.es.md.
- uv.lock compatible updates; snowflake-connector-python 5.1.0 on 3.11+ (4.8.0
  on 3.10), which drops filelock 3.32.7 (3 CVEs) there; a type-checker
  annotation on the connector splitter import (no behavior change). CI
  pins langchain-core 1.7.0, SQLAlchemy 2.1.6, coverage 7.17.0.
- _version.py 0.4.1, CHANGELOG [0.4.1] - 2026-10-23.
…iness policy context

Breaking change: Vericto.check() follows the fail mode. Under fail_mode="open",
when Vericto cannot answer (network error, timeout, 5xx, a body that is not JSON
or has no decision, rate limit, quota), it returns an UNEVALUATED verdict with
the reason instead of raising VerictoUnavailable. Under "closed" (the default)
check(), enforce() and every wrapper raise VerictoUnavailable, as before.
VerictoConfigError is raised in both modes. vericto-node 0.4.0 makes the same
change, so both SDKs share one contract. The LangChain check tool now calls
check() instead of re-implementing it.

Added: context={"ticket", "tenant"} and end_user={...} on check, enforce,
prepare, enforce_all and RuntimeApiEvaluator.evaluate, validated before sending
with the limits of vericto-fmw's policyContextSchema (1-128 / 1-256 characters
in UTF-16 units, no control characters, identifier keys, at most 16 end_user
keys, no other context key); part of the cache key; on sqlalchemy.instrument and
the LangChain/LlamaIndex wrappers as a value or a per-statement callable. They
take effect when business policies are enabled in the workspace.

Tests for the fail-mode contract (network error, timeout, 5xx, invalid JSON in
both modes) and for the request body against the fake server and the docs stub,
which now validates and records the fields. README, LangChain, LlamaIndex and
SQLAlchemy guides updated; compatible dev-lock and CI pin refresh.
@vericto
vericto requested a review from donkan168 as a code owner October 24, 2026 03:03
@vericto
vericto merged commit 269b4db into main Oct 24, 2026
18 checks passed
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