All work

Tenure

A trust ledger for code written by AI agents.

Context
Built at a crypto derivatives exchange
Year
2026
Role
Sole author: designed it and built it with coding agents
Stack
Go, SQLite, GitHub App, React 19

The problem

Teams now merge a lot of agent-written code, and 'the tests passed' says little about whether it lasts. Tenure measures how much of each agent's code survives, per module, and makes agents prove their claims before a human signs off.

  • Every number carries its sample size and a 95% confidence interval.
  • Attribution must work across Claude Code, Cursor and plain commits.
  • Ships as one binary a team can run on a laptop.

Architecture

Fig. 1 Commit trailers, agent session logs and editor tracking data are reconciled into line-level attribution. That feeds a survival ledger, while agent pull requests get proof packets; both inform a risk-ranked sign-off desk.

What I built

  1. 01A survival ledger: how much of each agent's code is still there 14 and 30 days after merge, per module, from git blame.
  2. 02Attribution from commit trailers, Claude Code session logs and Cursor's tracking database.
  3. 03Proof packets that re-run an agent pull request's tests in a clean worktree, check its scope and flag tests that assert nothing.
  4. 04A sign-off desk that ranks agent pull requests by risk; signing approves them on GitHub.
  5. 05A Go server with an embedded React UI, a GitHub App and Jira links.

By the numbers

max gap to the prototype, 436 module cells
0.1 pt
proof packets on 24 live PRs
61
Go tests
1,631
commits in the repo it was validated on
2,502

Hard problems

01

Checking the ledger against its own prototype

Before trusting the product, I ran it on the team's 2,502-commit trading repo next to the Python prototype that motivated it. Every per-model 30-day survival figure matched within 0.1 points across 436 module cells, and a warm rebuild took 2.7 seconds.

02

Tests that test nothing

On 13 open agent pull requests, every proof packet finished with no errors or timeouts, and two caught tests that made no runtime assertion at all. The write-up also records the tool's own false warnings.

03

Numbers that admit their uncertainty

A survival rate from five merges is not a fact. Every figure ships with n and a 95% confidence interval, so a small sample looks small.