Architecture
NullTickets is a focused HTTP + SQLite control plane with strict domain validation and lease-aware mutation paths.
Runtime Layout
From src/main.zig:
- bind address is fixed to
127.0.0.1 --portand--dbCLI options- API routing via
api.handleRequest
Component Responsibilities
src/api.zig: routing, headers, auth checks, response/error shapingsrc/domain.zig: pipeline definition validation rulessrc/store.zig: transactional persistence and selection logic
Claim/Lease Model
- agent calls
POST /leases/claimwith role context - server returns active task/run and lease token
- lease-protected mutations require
Authorization: Bearer <lease_token> - agent heartbeats lease for long-running work
Data Model
From src/migrations/001_init.sql:
- pipelines/tasks/runs/leases/events/artifacts core
- dependencies, assignments, gate results
- idempotency keys
- OTLP batch/span storage
Operational Implication
If automation stalls, inspect in this order:
GET /ops/queueGET /tasks?stage=...- lease expiry/heartbeat behavior
- gate requirements on target transitions