Skip to content
Back to skills

Verify Runtime Invariants

ASecurity

Check Everett's SQLite provider links, transcript byte windows, and delivery retry invariants against the Rust implementation. Use when changing T3 projections, transcript parsing, dispatch or webhook acknowledgment.

  • 5 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 2, 2026
ai-agentspythonrustgosqldatabase

Works with

  • mcp

Security analysis

A100/100

Scanned December 2, 2026

npx -y skills add raitoxlol/everett --skill verify-runtime-invariants --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Verify Runtime Invariants?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Verify Runtime Invariants
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/raitoxlol-verify-runtime-invariants/badge)](https://www.skillsdirectory.com/skills/raitoxlol-verify-runtime-invariants)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: verify-runtime-invariants
description: Check Everett's SQLite provider links, transcript byte windows, and delivery retry invariants against the Rust implementation. Use when changing T3 projections, transcript parsing, dispatch or webhook acknowledgment.
---

# Verify Everett runtime invariants

Run from the repository root.

```sh
for model in projection transcript inbox-budget dispatch delivery; do
  scripts/check-runtime-model.py "$model" || exit 1
done
```

The runner copies the Rust crate, runs the real implementation, and checks that each deliberately broken variant fails inside a test. A build failure or an empty test selection fails the check. The runner requires Python 3 and the Rust toolchain from `everett-rs/Cargo.toml`. It does not edit the worktree. Set `CARGO_TARGET_DIR` to reuse a build cache.

| Check | Implementation | Scope |
|---|---|---|
| Provider link selection preserves exactly the qualifying row pairs | `adapters/t3code.rs`, `provider_links` | Every combination of two distinct values and NULL across the two IDs, with hidden false, true, and NULL. Checks pair multiplicity against the original OR join. Run `cargo test --locked --manifest-path everett-rs/Cargo.toml --test t3code --test t3_legacy` for end-to-end visibility. |
| Complete JSON objects inside either window appear in order and once | `session.rs`, `read_windows` | Every window width for three records drawn from seven representatives, with and without a final newline. Includes multibyte text, invalid rows, arrays, and null. A separate check caps reads to the measured length during append. |
| MCP inbox sizing matches the full wire encoder | `mcp.rs`, `inbox_batch_overhead` and `encoded_inbox_size` | Three session IDs crossed with every three-item combination of seven JSON shapes. The byte count is checked for every nonempty prefix. |
| A confirmed or uncertain T3 dispatch stops retries from delivering another nudge | `inbox/t3_dispatch.rs`, `dispatch_once_at` | Every sequence of up to four attempts across five modeled outcomes. Includes a real SQLite journal, failed persistence, and a concurrent caller. Panic stands in for interruption in the dispatch window. |
| A persisted Dot receipt survives refresh and restart | `gateway_events.rs`, `Events::deliver` and `flush_acknowledgments` | Seven representative responses crossed with refresh, a concurrent SQLite writer, a blocked fallback journal, reopening the store, and up to three retries. Reopens the database after saving the receipt in a separate journal while SQLite is busy. |

The provider join proof partitions eligible pairs into those whose active provider IDs match and those whose active IDs do not match or are NULL. In the second part, the historical link and hidden predicates must both be true. Those parts are disjoint and exhaust the original OR predicate in SQLite's three-valued logic. The test checks the actual query builder across its predicate equivalence classes.

The delivery restart check fails if the 2xx receipt stays only in memory when SQLite rejects the write. Recovery applies the persisted receipt before claiming new work. A separate replay check verifies that one receipt cannot complete a newer claim or increment attempts twice. These guarantees start when either durable write succeeds. The interval before that remains a potential retry window.

Coverage was derived from `v2.5.0` at `32c1b81` and checked against the working-tree implementation. When touching a covered function, compare its state transitions with the model and rerun the mutant checks before updating this record. A passing check applies to its stated model. Runtime properties for account boundaries, peer transport, relay ordering and recovery, and concurrent memory merges need separate verification.

Run `scripts/audit-regression-history.py` to list candidate commits and existing test paths. An empty property column is an open audit item. Commit naming is incomplete evidence for historical bugs.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.