Repository navigation
Releases
Releases · mikedclarke/trackd
v0.8.0
A security and data-safety release. Four changes can refuse a request that
0.7.0 accepted: editing another token's comment, a comment or description over
256 KiB, a comment idempotency key reused on another issue, and a milestone
name that differs from an existing one only in case. The server commands'
refusals also change exit code.
Security
- A comment can be edited only by the token that wrote it or by an admin
token; any other token gets 403forbidden. Before, any token could rewrite
any comment, and the comment kept its original author's name. - Every request body is capped at 1 MiB, the MCP endpoint and the web forms
included; before, only the REST API had the cap. A whole request, body
included, must also arrive within 30 seconds. - A comment body and an issue description are capped at 256 KiB, on create,
edit, append and replace. A longer one is refused as a validation error
(400, exit 2) naming both sizes. Imports are exempt. - Every web form post, the sign-in included, is refused when it comes from
another site (checked withSec-Fetch-Site, thenOrigin); the sign-in had
no check before. A proxy that forwards its public host keeps working, and
withbase_urlset, that URL's origin is trusted. - The request log writes the path as it was sent, escaped, so an encoded line
break in a URL can no longer start a forged log line. - A form's return path refuses every control character, which closes a
redirect to another host through a tab. - The launchd plist written by
service installsetsUmask077, so the
service's database, snapshots, dumps and log are readable by their owner
only. Exports and restored databases are created 0600.
Changed
- Commits and WAL checkpoints on macOS now ask the drive for a full flush
(fullfsyncandcheckpoint_fullfsync), so a power cut cannot lose a write
already confirmed. Writes cost a few milliseconds more. - A comment idempotency key already used on another issue is refused with a
conflict (409, exit 5) instead of returning that issue's comment as if the
new one had been posted. A replay on the same issue still returns the stored
comment, whatever its body: a key names the thing, not the request text. - Creating or recoloring a label records a
label.createdorlabel.updated
event (trackd events --entity label), including the label the server adds
itself foragent_label;POST /api/v1/labelstakes an optionalactor.
Before, label writes left no audit event. - Milestone names are unique within a project without regard to case, among
unarchived milestones (create, rename, unarchive). token add,token revokeandsetting setrefuse a path with no database
(no database at <path>, exit 3) instead of creating an empty one.- The server commands' expected refusals exit with the documented codes:
another trackd holding the database, an existing export or restore target,
or another export still running exit 5; a dump with no end record exits 2. - The MCP
save_issuestatusfield points atlist_statusesinstead of
listing a fixed set of names.
Fixed
restoretakes the database lock whether or not the file exists, so it is
refused while a server runs even after the database was moved aside. It
copies through<db>.restoringand publishes only once synced and verified.
The refusal now says to stop the server first.trackd export --outafter an export that was killed no longer fails with
"file exists" on the<file>.partialit left behind: the next export to the
same path takes that file over. An advisory lock on the temp file tells a
leftover from an export still writing to it, every write goes through the
locked file, and a link or another file at that name is refused, never
followed. On Windows and on filesystems without advisory locks, a leftover
.partialcannot be told from a running export, so it is refused and has to
be removed by hand, as in 0.7.0.- Pruning (
trackd backup --keep,serve --backup-keep) removes the hidden
.trackd-<stamp>.db.partiala snapshot killed mid-write leaves in the backup
directory, once it has gone an hour unwritten. Before, nothing removed it, and
each one was the size of the database. import --dry-runagainst a path with no database no longer creates and
migrates one.- A snapshot dated more than five minutes in the future no longer counts as a
fresh backup (which skipped every startup backup), and pruning removes it
first. - Two backups in the same second no longer delete each other's temp file.
- A board action that combines a reply with a change no longer saves the reply
when the change is refused for a stale version, so submitting again after a
reload cannot post the reply twice. - The issue, project and milestone event feeds clamp
limitto 1000, as the
global feed does. trackd comment <key>accepts every key an issue prefix can make, including
lower case and digits in the prefix.- Issues imported from Linear store millisecond timestamps, so they sort and
filter correctly against native ones. - The README and CONCEPTS list the real dependency count, the eight default
statuses and the one release recipe; the unused goreleaser config is removed.
v0.7.0
Changed
- The dump format is version 3:
trackd exportends the dump with an end
record holding the count of each record type and the sha256 of every byte
before it, andtrackd import trackdchecks a dump against it before
anything is kept. A dump cut short on a line boundary, with a line missing or
changed, or with anything after the end record is refused and the database is
left as it was; before, a dump cut short (even to its header line alone)
imported as complete. A dump written before this release has no end record
and is refused unless--unverifiedis passed, which imports it with a
stderr line saying its completeness could not be checked. An older trackd
refuses a version 3 dump. trackd export --outwrites to<file>.partialand gives the dump its name
only once it is complete and synced, so a failed export leaves no file behind
instead of a partial one under the final name.- MCP
save_issueis annotated as not idempotent (idempotentHint: false):
an unkeyed create and anappend_descriptionadd again when called twice,
so a client must not retry it as if it were safe to repeat.
Fixed
trackd setting set label_groupsover issues or projects that already hold
more than one label of a group (archived ones included) is refused with exit
5, listing them; before, the setting was stored and the clash kept. An import
whose label memberships break its ownlabel_groupsis refused the same way.
Ordinary label writes on an issue that already clashes are unchanged.- A backup is written under a temporary name and takes its snapshot name only
once it passes its integrity check, so a backup killed mid-write no longer
leaves a file that looks like a snapshot. At startup, a recent snapshot skips
the startup backup and dates the last backup in/healthzonly when it
passes its integrity check; a corrupt one is logged and left in place, and
the newest good snapshot, or a fresh backup, is used instead. - Setting an issue's project to the one it already has (in any case) no longer
clears its milestone, bumps its version or records an event. updated_sinceandcompleted_sincecompare as instants on every interface:
a cutoff written with an offset or fractional seconds now matches what REST
already returned, and a value that is not a timestamp is avalidation
error over MCP (and from the store) instead of an empty list.- A private saved view's events no longer appear in the shared activity feed
(GET /api/v1/eventsand MCPlist_activity) for anyone but its owner and
admin tokens. Visibility follows the view as it stands now, for its whole
history: a view made private hides its earlier events, and a private view
later shared shows them to everyone. Paging is unaffected. - A quick-action button on a view page whose action was changed after the page
loaded is refused with "reload the view" instead of applying the new
definition, and a refused action leaves the issue untouched, including any
reply typed with it.
v0.6.0
Added
trackd service <status|start|stop|restart|install|uninstall>manages the
launchd job that runsserveon macOS. The job label comes from--labelor
$TRACKD_SERVICE_LABEL, never a built-in default.statusputs launchd's
state next to a/healthzprobe and exits 0 only when both are fine, 6
otherwise;installwrites and loads the plist (with--dry-runto print it
first), never overwrites an existing one and refuses when the database's or
the log's folder is missing;stopunloads the job, since launchd respawns a
killed one. The commands only wraplaunchctlin the user's own session.
Fixed
trackd health --jsonon a degraded server printed the report and then an
error object, so stdout was not one JSON document; it now prints the report
alone and still exits 6.
v0.5.0
Added
actor_from_tokensetting (trackd setting set actor_from_token true), off
by default. When on, only anadmintoken may name anactorother than
itself on a write; anagenttoken that names someone else is refused with
a 403forbidden(CLI exit 4) and nothing is written. It covers every REST
write that takesactor(issue create, update, batch update and append;
comment add and edit; relations; project, milestone and view create and
update) and the matching MCP tools (save_issue,add_comment,
save_relation,save_project,save_milestone,save_view). Naming the
token's own name, or leavingactorout, still works. Off, behaviour is
unchanged.
v0.4.0
Added
- Batch issue update:
PATCH /api/v1/issuestakes{"updates": [{"key": ..., <the fields of a single PATCH>}, ...]}, up to 100 items, and answers 200
with{"results": [...]}, one per item in request order:okwith the
updatedissue, or theerror,codeand HTTPstatusthat item would
have got on its own. Each item goes through the single update's own path, in
its own transaction with its own audit event, and the same rules apply
(append-only descriptions, admin-onlyreplace_description,
expected_version). A refused item does not stop or undo the others.
trackd issue update KEY [KEY...]sends one batch for several keys, prints a
line per key and exits with the first refusal's code. trackd issue list --allfollowsnext_offsetto the last page, so a query
matching more than one page comes back whole. Without--order-byit walks
oldest created first, so an issue updated mid-walk is neither skipped nor
repeated.GET /api/v1/events?key=KEY(repeatable, up to 100),trackd events --key
andkeyson the MCPlist_activitytool narrow the feed to those issues,
so several issues' histories come back in one request with the usual
after_idcursor. An unknown key is a 422invalid_ref.- The MCP
list_issuesresult carriesnext_offsetlike the REST envelope. - The web board says "showing 500 of N issues" when a filter matches more than
the 500 it shows. - The server checkpoints the write-ahead log (
PRAGMA wal_checkpoint(TRUNCATE))
after each scheduled backup and on a clean shutdown, so the-walfile no
longer sits at its high-water size for good.
Changed
--description -,--body -,--text -and--append -keep stdin byte
for byte, trailing newline included, so a body read back compares equal to
the one written. Bodies piped in now keep their final newline; a script that
relied on it being trimmed should strip it itself. Empty or whitespace-only
stdin is still refused.- Extra bare words after
trackd issue update KEYare now read as more keys
(a batch) rather than refused. A bare word that is not shaped like an issue
key is still a usage error, before anything is sent, so an unquoted
--title Fix the bugchanges nothing; quote a flag value that has spaces.
Fixed
trackd issue list --tsvsaysmore resultson stderr when the page was
full, instead of stopping at the limit without a word.
v0.3.2
Fixed
- The exclusive lock is taken before the database file is opened, not after
its integrity check and migrations have run. Atoken add,setting set,
importorrestoreaimed at a database a server is serving now refuses
before touching the file; until now it migrated the live file first and
refused afterwards.store.Options.Exclusivereplaces the separate
LockExclusivestep, andClosereleases the lock. - A patch that changes nothing (a label the issue already has, its current
priority or status, an archive of an archived issue) is a no-op: the version
does not move and no event is recorded, so a repeated or redundant write can
no longer make another writer'sexpected_versionfail. - Issue keys are matched case-insensitively (
trackd issue show gdl-12), like
every other lookup already was. labelandexclude_labelgiven with a view are added to the view's own
labels instead of replacing them, so an explicit label narrows the view as
the docs said it did.- Quick action buttons on a view row post the action's name rather than its
position, so a view edited between the page render and the tap applies the
action the person read, or refuses, never a neighbour. - A request that died (context canceled or timed out), a transaction the
driver gave up on, or a value the JSON encoder could not write is reported
as a 500internal, not a 400validation, so an agent knows to retry
rather than blame its input.
v0.3.1
Added
- Saved views: a named issue filter stored server-side, so a queue can be
opened by name from every interface. Migration0005_views.sql(schema 5);
GET/POST /api/v1/viewsandGET/PATCH /api/v1/views/{name};
trackd view list|show|create|update|delete|restore;
trackd issue list --view NAMEand?view=NAMEon the issue list, whose
explicit filters layer on top of the view's; MCPlist_viewsand
save_view, andviewonlist_issues. A view filters on statuses, status
types, project, labels, excluded labels, assignee, milestone, priorities, a
relativeupdated_withinwindow (7d,48h), creator, text and order. It
is shared by default or private to its owner and admins; only the owner or
an admin may change it; deleting archives it and frees the name. Views ride
in the JSONL dump and are audited (view.created|updated|archived|restored,
trackd events --entity view). - Quick actions on a view: up to four named one-tap patches (status, priority,
add or remove labels) shown as buttons on every row of the view in the web
board (--quick "Answered: remove=waiting"). - The web board works a queue. Every saved view is a tab and a plain URL
(/ui/view/<name>); each row opens inline to the latest comment, a reply
box, the quick actions, and a status, priority and label form. The issue
page gains the same action form. Every write goes through the store like
the API, is attributed to the signed-in token, records the same audit event,
and carries the issue version the page was rendered with: a change that
lost a race is refused with a notice (the reply typed with it is still
saved). Views can be created, edited and archived from the board (+ view). issue list --priority(repeatable, matches any) and--created-by, and
the matchingpriorityandcreated_bylist parameters on the API and
prioritiesandcreated_byon MCPlist_issues.
Changed
- The board and issue page lay out in one column on a phone: no sideways
scrolling, full-width controls, tabs that scroll. trackd viewis now the view command group, so it no longer hints at
trackd issue view(which still works as an alias ofissue show).
v0.3.0
Added
- Web board logins are durable: sessions persist in the database (hashed, like
API tokens), survive server restarts, and slide their 30-day expiry on use,
so a browser stays signed in until it signs out. Revoking a token ends its
sessions. Migration0004_ui_sessions.sql; /healthz now reports schema 4. - The issue page takes comments: posted as the signed-in token, attributed and
audited exactly like an API comment. A "use as reply" button on each comment
copies its body into the reply box, so reply-with-this-text flows (reviews,
approvals) work from a phone. Cross-origin form posts are refused. trackd comment <key> --body <text>now adds a comment, as an alias for
trackd issue comment, so the natural guess works instead of erroring.trackd comment list <key>lists an issue's comments with their ids, so a
caller editing or replying to one reads the id off the list instead of
guessing it.- A token can be read from a file named by
$TRACKD_TOKEN_FILE, keeping the
credential out of the environment and the process table. The order is
--token, then$TRACKD_TOKEN, then the file. workspace_nameis a writable setting (trackd setting set workspace_name).
It sets the name shown in the web board header and was previously only
reachable by editing the database directly.
Changed
- The web board is no longer described as read-only; commenting is the one
write it offers. All other writes stay with the API, CLI, and MCP. - CLI
--jsonlist output is now enveloped everywhere, matching the REST API:
project list,label list,milestone list,statuses,issue events
andissue relatereturn{"projects": [...]},{"labels": [...]}and so
on rather than a bare array. This is a breaking change for scripts that
parsed the bare array from those commands. trackd <verb>where<verb>is really an issue subcommand (show,list,
create, ...) now answers with adid you mean "trackd issue <verb>"?hint
instead of dumping the whole usage screen.trackd issue updatehelp marks--replace-descriptionand
--clear-descriptionas admin-token only, and a 403 refusal now points at
trackd issue appendas the path an agent token can take.
Fixed
trackd <command> --help(and-h) exits 0 instead of 2, so a harness or
script does not read a help request as an error./healthzreports the schema version derived from the embedded migrations
rather than a hand-maintained constant that could drift.- The server answers
/favicon.icowith 204 No Content, so a browser board
visit no longer logs a 404 for it.
v0.2.0
Added
issue getandissue viewas aliases forissue show.issue list --searchas an alias for-q.issue list --columns <cols>and--tsvfor a lightweight, flat list output
(a subset ofkey,status,priority,project,assignee,labels,title), so a queue
read does not need to parse the full JSON. The default table and default
--jsonoutput are unchanged.--priorityonissue createandissue updateaccepts a word
(none|urgent|high|medium|low) as well as the0-4integer.issue create --milestone(andupdate) accepts a milestone id as well as a
name, matching howmilestone updateaddresses one.agent_labelsetting: a label the server auto-applies to issues created by
non-admin tokens (empty by default, which disables it).
Changed
statuses listis accepted as a synonym forstatuses(thelistverb from
project list/label listis tolerated rather than rejected).trackd comment create/add/newnow point attrackd issue comment
rather than returning a bare "unknown subcommand".
v0.1.1
Added
setting setrecords asetting.updatedaudit event (entitysetting, the
key asentity_key, with--actor).- Error-code reference tables in
docs/API.md(every code with its HTTP status
and CLI exit code) anddocs/CLI.md(the four codes the CLI raises itself).
Changed
issue append,issue commentandcomment editaccept--textand
--bodyinterchangeably. Passing both at once is a usage error.issue relate --removeis idempotent: the server answers 200 with
"removed": true|falserather than 404, and the CLI exits 0 either way and
says which happened. A mistyped key or relation type is still an error.
Fixed
trackd comment <ISSUE-KEY>now points attrackd issue commentinstead of
the opaque "unknown comment subcommand".- The admin and server commands (
setting,token,export,import,
backup,restore,serve) report an unknown flag as a usage error
(exit 2,code: "usage") with a JSON error object, instead of exit 1 /
internal. - A missing API token is caught locally and reported as exit 4 (
unauthorized)
with an actionable message, instead of after a wasted request. label add --colorrejects a value that is not a#rgbor#rrggbbhex
color (422) instead of storing it and drawing nothing.- Issue titles and project and milestone names are trimmed and must be 1 to 500
characters, on create and on update (422 otherwise). - errcheck findings across the store and server.