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.1.tar.gz (127.4 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.1-py3-none-any.whl (69.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: fticket-0.1.1.tar.gz
  • Upload date:
  • Size: 127.4 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.1.tar.gz
Algorithm Hash digest
SHA256 8ea427a8802ecf932ae7474a5ab44c491db34da1055b56ca8d1f35b4976bf1fc
MD5 13bb376569c5e127f7528ca28754759e
BLAKE2b-256 77316f4ed6e2f34ac11a82435a22a62a51236f3d34eabafb3dc0bc132cf38f74

See more details on using hashes here.

Provenance

The following attestation bundles were made for fticket-0.1.1.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.1-py3-none-any.whl.

File metadata

  • Download URL: fticket-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 69.2 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d6fe76f09a1c45cd774714d342c387a9a1f2c327fcf248f9e9209318d3526f7f
MD5 9eae8599dfd9e9a2c0c028281907a259
BLAKE2b-256 ff1597a6b7cd6c6715a35c8a302d7140e8f452668831984f6b71fccd252fdd9c

See more details on using hashes here.

Provenance

The following attestation bundles were made for fticket-0.1.1-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