Migrating from Manual Approval Flows
If your codebase already has ad-hoc approval logic —input() prompts, Slack confirmation bots, or custom approval middleware — Attesta can replace them with a unified, auditable framework.
Before: Manual Approval Patterns
- Inline input()
- Custom Decorator
- Slack Bot
After: Attesta
Replace Inline Prompts
Replace manual Attesta now handles the approval prompt, risk scoring, minimum review time enforcement, and audit logging — all automatically.
input() calls with the @gate decorator:Replace Slack Bots
If you had a custom Slack approval bot, replace it with an Attesta
SlackRenderer:Migration Checklist
| Manual Pattern | Attesta Replacement |
|---|---|
input("Approve?") | @gate decorator |
| Custom approval decorator | @gate or @attesta.gate |
| Slack approval bot | SlackRenderer |
| Custom audit logging | AuditLogger or custom AuditLogger protocol |
| Risk classification logic | RiskScorer (default or custom) |
| Per-action risk levels | risk_hints={} or YAML overrides: |
| Environment checks | environment="production" parameter |
Migrating Between Attesta Versions
v0.x to v1.0 (Current)
Attesta follows semantic versioning. The v0.x series is the initial release; v1.0 will be the first stable API.Breaking Changes to Watch For
- Import Paths
- Configuration Format
- Challenge Map Keys
Imports were consolidated in v0.1.0. If you are upgrading from an earlier pre-release:The package was renamed from
gatekeeper-ai to attesta. Update all imports.Upgrade Procedure
Check for Deprecation Warnings
Run your test suite with warnings enabled:Attesta emits
DeprecationWarning for legacy features that will be removed in a future version.Update Configuration Format
If you are still using the flat YAML format, migrate to the rich format. Use
from_config() — it auto-detects both formats, so you can migrate incrementally.Verify Audit Chain Continuity
After upgrading, verify that the existing audit chain is still intact:
Update Trust Engine Storage
If you are using persistent trust storage, the TrustEngine will load existing data automatically. No manual migration is needed for trust profiles.
Timeout Policy Migration Notes (fail_mode)
Recent releases wire policy.fail_mode and policy.timeout_seconds directly into
runtime gate behavior (Python and TypeScript SDKs).
For challenge timeouts:
fail_mode | Runtime verdict | Executes protected action? |
|---|---|---|
deny | TIMED_OUT | No |
allow | APPROVED | Yes |
escalate | ESCALATED | No |
TIMED_OUT, audit your
policy config before upgrading and explicitly set fail_mode: deny.
Upgrading Domain Profiles
Domain profiles encode industry-specific risk patterns, sensitive terms, and compliance references. When regulations change or your domain knowledge evolves, you need to update them.Updating a Custom Profile
Custom profiles registered withregister_preset() are loaded at runtime. Update your profile definitions and re-register to apply changes. To upgrade:
attesta.yaml
Overriding Profile Fields
If you need to customize a registered profile, load the preset and modify specific fields:Creating a Custom Profile
For complete control, create a profile from scratch:Merging Profiles
When your organization spans multiple regulatory domains, merge profiles:attesta.yaml
Profile Version Tracking
Track profile versions in your configuration for reproducibility:attesta.yaml
Migration Support Matrix
| From | To | Complexity | Notes |
|---|---|---|---|
input() prompts | @gate | Low | Direct replacement |
| Custom decorator | @gate / @attesta.gate | Low | Map parameters to Attesta equivalents |
| Slack approval bot | SlackRenderer | Medium | Reimplement webhook handling |
| Custom risk logic | RiskScorer protocol | Medium | Wrap existing logic in score() method |
| Flat YAML config | Rich YAML config | Low | Both formats supported |
| gatekeeper-ai package | attesta package | Low | Rename imports |
Quick Start
Get started with Attesta from scratch
Configuration
Full YAML configuration reference