aitododocs Coming soonAutonomous delivery

Moving a store

Markdown

A store lives in one place at a time, the repo or the server; the server's record is the truth (GET /v1/projects/{p}/store: location: repo|server|moving, movedAt).

Guideabout 3 min1 commands
On this page

Both directions need the admin token.

  • tkt store move --to server (in the repo whose .aitodo.yaml names the store): needs .aitodo/server.yaml, a tkt doctor without errors (warnings pass), nothing uncommitted (ERR_BAD_REQUEST), no live claim (ERR_ALREADY_CLAIMED; --force-claims drops the leases), no open decomposition (ERR_CONFIRM_REQUIRED; --force-decompositions drops them).
  • tkt store move --to repo --dir .tickets (where .aitodo.yaml says store: server): --dir must not exist, or be empty; commit it and .aitodo.yaml.
Details6 items
  • Merge open branches first: their tickets are not in the move. After --to server, commit what it prints.
  • To the server: the store needs its own directory. The client uploads the committed files, with the history (a git bundle) when the store dir is the root of its own repository; the server checks with tkt doctor while moving, then server. Only then the client removes the local dir and rewrites .aitodo.yaml to store: server. A failure leaves repo and the local store untouched.
  • Back: the server freezes the store (moving: every /cli call gets 409 ERR_STORE_MOVING), the client writes it, then repo, and the server archives its copy to stores/.archive/<project>-<date> (never deleted); .aitodo.yaml says workspaceDir: <dir>. A failed release removes the dir: run it again; a crash after the release: the same command only rewrites the pointer. Open decompositions refuse here too; forced, they stay in the archive.
  • Half-done: the operator runs tkt operator store-unfreeze <project> --server https://tkt.ideathon.me (back to server) or tkt operator store-release <project> --server https://tkt.ideathon.me (repo, archived); each leaves an audit line.
  • Guards: /cli runs only while server. A clone still writing its old local store gets 409 ERR_STORE_LOCATION ("this local copy is stale") once it asks for an id or a claim; tkt doctor warns STALE_LOCAL_STORE (skipped offline or without a token), also when a branch merged later brings the store dir back.
  • REST (admin): POST /v1/projects/{p}/store:import {tar, bundle?, forceClaims?} (base64; at most 100 MB together, else 413 ERR_PAYLOAD_TOO_LARGE; the body is read only after the admin token check; a broken store 400 ERR_BAD_REQUEST) → {location, storeVersion, movedAt, history, files}; POST /v1/projects/{p}/store:export and POST /v1/projects/{p}/store:release take {forceDecompositions?}.

Commands on this page#

Generated from the registry: src/aitodo/api/selfdoc_entries/maint.py · maint.store-movev0.1.298