Skip to main content

Factory Ticket System (FTS): transactional coordination core for the AI software factory

Project description

fticket — Factory Ticket System (FTS)

Transactional coordination core for the AI software factory: task status, claims, dependencies, resource leases, and history in one SQLite file (WAL, single writer, one BEGIN IMMEDIATE transaction per operation). Task folders stay immutable-path artifact storage; FTS owns all control-plane state. Zero runtime dependencies.

Install

uvx fticket board        # run from PyPI, no install (fticket and fts are the same CLI)
uv tool install fticket  # puts fts + fticket on PATH
uv sync                  # dev
uv pip install .         # as a library

Quickstart

from fticket import FTS, Mode

FTS.init_db("factory.db", stages=["code", "review", "qa", "deploy"])  # create schema first
fts = FTS("factory.db")

t = fts.create_ticket(title="build parser", stage="code", folder_path="tasks/0001")
claim = fts.claim("code", worker_id="coder-1")         # atomic, race-free
fts.start(claim.ticket.id, "coder-1")                  # claimed -> in_progress
fts.acquire(resource="staging", ticket_id=t.id, worker_id="coder-1", mode=Mode.EXCLUSIVE)
fts.complete(t.id, "coder-1")                          # records reached_stage
fts.advance(t.id, "coder-1", to_stage="review")        # done -> queued @ review
fts.tick()                                             # expire TTLs, promote waitlists

CLI

fts <cmd> --db factory.db — read commands work on a read-only database.

init create schema, seed config + stages
board / show <id> / dag / queues board grid, ticket detail + history, dependency DAG, queue depths
why <id> / triage / stats / doctor stuck-ticket root cause, dead-letter + orphans, AC16 metrics, health checks
create / claim / renew / start / complete / advance ticket lifecycle
transition / reject / dead-letter / revive generic edge, bounce, operator kill, un-kill
add-dep / acquire / release / register-resource dependencies and resource leases
tick / scheduler one sweep pass / loop until Ctrl-C
events poll/tail the event stream
config get|set tunables (bounce_limit, claim_ttl_ms, ...)
serve read-only web dashboard

Dashboard

fts serve --db factory.db --port 8377

Read-only, bound to 127.0.0.1 only, GET-only, no external assets.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fticket-0.1.2.tar.gz (129.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fticket-0.1.2-py3-none-any.whl (69.7 kB view details)

Uploaded Python 3

File details

Details for the file fticket-0.1.2.tar.gz.

File metadata

  • Download URL: fticket-0.1.2.tar.gz
  • Upload date:
  • Size: 129.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for fticket-0.1.2.tar.gz
Algorithm Hash digest
SHA256 15bbd63305788ecb1864595543f01b6cd00b6c5e90a97287c81cb4e62e81867b
MD5 fbd25b16d1111b7a7183e6d6742d3748
BLAKE2b-256 ae36b1b3f2059a12e46323e84eae5574b7d986f28a530904400ff4b51c6bcbd8

See more details on using hashes here.

Provenance

The following attestation bundles were made for fticket-0.1.2.tar.gz:

Publisher: publish.yml on fmktech/fticket

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fticket-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: fticket-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 69.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for fticket-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c7ad4634b9a856228b9956f44ece45bc19ba99795e73227d9f39372a2f65158b
MD5 865eb01276f04f5c7bdedb14722bb1d6
BLAKE2b-256 85de24bb6f948ba2d0e8da5ab0c4f7db449bf6460c78efa6f603bd1321baf056

See more details on using hashes here.

Provenance

The following attestation bundles were made for fticket-0.1.2-py3-none-any.whl:

Publisher: publish.yml on fmktech/fticket

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page