Repository navigation
Feat/0.4.1 framework guides - #16
Merged
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR change?
Why?
Type of change
Tests
uv run ruff check .anduv run ruff format --check .passuv run mypypassesuv run coverage run -m pytestanduv run coverage report --omit=...(as in CI) pass, at or above 80%Integration (...)job's commands pass locally (if an integration changed)uv buildsucceedsChecklist
CHANGELOG.mdupdated under[Unreleased](if a user of the package can see the change)README.md