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

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: fticket-0.1.0.tar.gz
  • Upload date:
  • Size: 127.3 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.0.tar.gz
Algorithm Hash digest
SHA256 537992acf4873672cf98ce5386a8fc8ef2b49fb33582cc2e11407069755d2773
MD5 ce6753eb05f98190464530660e7b7a3e
BLAKE2b-256 927b95d5734197e724eb6c4a98c12fa2db428e78ddc1bd59062d0e7d83f360d9

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: fticket-0.1.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a51bd4b341c4d41e7fa437544c6023c486c1ed4cd2ad2e098b913fa98e9d9e99
MD5 00d2db39f095ab3d3e2085586402e8a3
BLAKE2b-256 073e4b664d95877a689356746af634915cf0ce42261e52b11c8a65f1d7a6935f

See more details on using hashes here.

Provenance

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