Repository navigation
CallFence v0.1.0
CallFence Release Notes
Version 0.1.0 — Public Beta
Tagline: Test every action. Trust every agent.
Release Date: 2026-11-22
Status: RELEASE CANDIDATE (Awaiting Owner Authorization for PyPI Publishing)
Executive Overview
CallFence 0.1.0 is the first release candidate of the CallFence developer infrastructure platform for AI agents. It equips developers with local-first, fail-closed testing, verification, and runtime reliability tools for tool-calling agents.
CallFence addresses the critical gap between non-deterministic LLM reasoning and real-world tool execution by providing deterministic behavioral contracts, zero-side-effect VCR recording and replay, and native pytest integration.
Major Capabilities
1. Executable Behavioral Contracts & Assertions
- Declarative YAML and programmatic Pydantic contract definitions specifying allowed tools, argument constraints (types, numeric ranges, lengths, regex patterns with ReDoS protection, and enums), approval thresholds, and tool sequence workflows.
- Sub-millisecond deterministic assertion helpers (
assert_called,assert_not_called,assert_sequence,assert_arguments,assert_outcome,assert_denied,assert_replay_complete).
2. Tool Registry & Controlled Execution Perimeter
- Thread-safe
FenceToolRegistrywith@registry.tooldecorator andexecute()/execute_async()interfaces. - Clear architectural enforcement boundary ensuring that policy evaluation occurs before function invocation.
- Scoped
CallFenceSessionmanaging traces, context isolation via contextvars, and lifecycle events (agent_run_start,agent_run_end).
3. Fail-Closed Runtime Policy Engine & Cryptographic Approvals
- Real-time policy evaluation supporting both
ENFORCE(fail-closed, blocks calls and raisesPolicyViolationError) andOBSERVE(audit-only) modes. - Session-wide and per-tool concurrency budgets preventing denial-of-wallet and runaway loops.
- Multi-key cryptographic authorization engine using HMAC-SHA256
ApprovalTokenobjects with key rotation, explicit revocation, and replay attack prevention.
4. Deterministic Tool Recording & Replay (VCR for Agents)
- Offline regression testing engine that records live tool interactions into sanitized JSON fixtures and replays them with guaranteed zero network/tool side-effects.
- Canonical JSON argument normalization with strict argument matching.
- Automatic secret sanitization redacting credentials matching common sensitive patterns.
5. Native Pytest Integration & Zero-Config Fixtures
- Registered pytest plugin (
callfence = "callfence.pytest_plugin") providing automatic fixture discovery. - Fixtures:
callfence_session,callfence_contract,callfence_record, andcallfence_replay. @pytest.mark.callfencemarker for declarative test configuration.- Rich assertion failure formatting hook rendering structured context and parameter diffs.
6. Developer CLI & Execution Reporting
- Standalone
callfenceCLI binary with subcommands:callfence contract validate <file>(and aliascallfence validate <file>)callfence recording inspect <file>callfence trace inspect <file>callfence replay validate <file>
- ANSI terminal reports with status badges and latency summaries, plus machine-readable JSON exports.
Supported Python Versions & Environments
Empirically validated and tested across clean wheel installations on:
- Python 3.10 (Tested on CPython 3.10.22)
- Python 3.11 (Tested on CPython 3.11.18)
- Python 3.12 (Tested on CPython 3.12.16)
- Python 3.13 (Tested on CPython 3.13.18)
- Python 3.14 (Tested on CPython 3.14.5)
Security Boundaries & Explicit Limitations
CallFence is engineered with transparent and honest security boundaries:
- Controlled Dispatch Boundary: CallFence enforces policies strictly on actions dispatched through its controlled registry and session interfaces (
session.execute,registry.execute,CallFence.execute). Direct unmediated invocations of underlying Python functions bypass this perimeter. - Deterministic Replay Boundary: Replay guarantees deterministic responses at the tool dispatch boundary. It does not claim to make non-deterministic external LLM token generation reproducible.
- External System Isolation: Replay fixtures prevent invocations of registered tool callables. They do not sandbox arbitrary out-of-band network, socket, or filesystem calls made outside registered tools.
- Fixture Validation vs. Cryptographic Authenticity: Recording fixtures use Pydantic schema validation, size/depth limits, and canonical JSON argument representations to detect corruption and argument drift. Recording fixtures are standard JSON files, not cryptographically signed MACs; an ordinary digest check detects accidental alteration or corruption, but does not provide authenticated cryptographic integrity against an adversary with write access to the filesystem. Authenticated cryptographic authorization requires
ApprovalTokensigners. - Process-Local State: Token replay guards, concurrency counters, and execution budgets are in-memory and process-local. Distributed environments require external synchronization backends.
- Sanitization Guarantees: Automatic sanitization redacts known common credential names (API keys, authorization headers, passwords). It cannot guarantee removal of proprietary or obfuscated secrets in arbitrary user structures.
Verification Summary
- Tests Passed: 257 tests (all passing, 0 failures).
- Branch Coverage: 93.04% across the entire codebase.
- Static Type Checking: Strict Mypy 100% clean (0 errors across all source files).
- Linting & Formatting: Ruff 100% clean.
- Packaging: Source distribution and wheel distribution validated via clean isolated environment installation.
- Framework Integration: Validated against LangGraph (
langgraph==1.2.24StateGraph), autonomous multi-step financial agent, research synthesis agent, and generic LLM tool loop patterns.