Issue Tracking #
On this page
Give your app a shared place for bug reports, feedback, and test results. Read this page when connecting your backend to Issue Tracking or testing that connection without contacting the live service.
Turn Zero Cloud operates Issue Tracking. Signed-in Turn Zero members can read the issues their membership allows in a browser. To read restricted issues, a member needs contribute or owner access. Their membership must allow restricted issues and have no account restriction. The service also has pages for stopping issue-watch emails.
People, agents, and programs use their own tools to file reports, rate their experience, and work each report through to an outcome. The package states the service's contract and includes a client and a test double for an application's backend and its tests.
Use it when #
Use Issue Tracking when an application needs one queue for bug reports, feedback, and the checks its test runs record, which agents file and read as readily as people do. Declare the issue_tracking service in the manifest, and the platform creates one space, the set of records one owner keeps, shared by both of the application's environments. Your backend reaches the space through the platform's egress gateway, which presents the space's credential for it.
Use it for an application's own end users: the backend files each user's report under the user's identity and reads the queue through the client. When your backend files a report for one of your users, send that user only their own report's state. Do not send the call's whole answer: the issue in it holds other reporters' words. Your tool reads the whole space, files into it and settles its reports through the platform's feedback actions, naming the space (Feedback in your application's space).
Do not use it for work that needs boards or sprints, for notifying your application's users, or for fields your application defines. A watch call can name an issue and a messaging handle, which gets one message each time the issue's state, outcome, or waiting_for changes. The handle names a messaging participant, which an account that holds Turn Zero's messaging product has. Your tool can set that messaging watch through relay_issue_act; your backend's gateway forwards no watch.
A person can watch by email with email: true through tztrack_watch on the Turn Zero connection or the REST API. The emails go only to that caller's verified sign-in addresses. The service holds no address and sends no email to your application's users. A space credential or relay_issue_act is refused watch_refused for email. Watching an issue gives the confirmation, changes and stop link.
An issue moves only through the calls and the passes, along one fixed set of allowed moves between its states. The passes are the AI runs that match new reports to known issues (What the triage passes do). They require the space's own ai_reviews_enabled setting to be on. These runs also need the tzTrack AI reviews option. An unbilled account's own space is exempt. A paused account's paid passes do not run.
The option leaves the setting unchanged unless tztrack_set_ai_passes includes enable_reviews: true with on: true. The setting alone runs nothing. You can also set it through the contract's configure call (Configure the space). The tzTrack AI reviews option is a paid monthly item for each space, including a space created for an application.
What it provides #
Spaces and access #
- Spaces. A space contains one owner's records and is identified by a universally unique identifier (UUID). Each of its tokens has one of five permission levels, from lowest to highest
file,report,contribute,record, andowner, one token per holder. Every call made with a token reads and writes that space alone. Keep afiletoken in your backend and give it to no end user, device, or client: its holder names the reporter each call is for. - The report level. A
reporttoken files and reads as a reporter does and never sees a restricted issue. It can be limited to a list of the space's components when it is minted. - Attributed writes. Every write names the person, agent, or program that acted. A service that relays its users' actions names each user, never itself, and a relayed read returns that user's own reports and nothing of anyone else's.
- Issues and reports. An issue is the one curated record of a problem. It has a short identifier such as
#12, a kind, a state and an outcome, a priority, a component, what it waits for and who claims it, and the counts of its reports. A report is one filing in the filer's words, never edited, linked to the issue with the reason for the link. - The kinds.
bug,gap,docs,friction,question,task,praise, andidea;problem,error, andmistakefile abug. Anideatakes no priority and is never fixed, andnextnever hands it out. Later requests link to it, so its report count is its demand. - What an issue waits for.
waiting_fornames who or what it waits on: null,person(the space's owner),person:<account>(one member of a shared space),reporter,outside:<what>, orevidence(more evidence is needed). Everywaitingissue usesevidence, and no other state does. An issue waiting for a person, the reporter, or an outside event stays open, and nothing closes it on its own.listandcountfilter and group by it and by the claim,noneselecting the issues with no value. Forwaiting_for,outsidealone selects every issue whose wait starts withoutside:. - Who claims it.
claimed_byidentifies the worker handling the issue: null, or a label of 1 to 200 printable characters. Onlynextsets abranch:<name>claim and returns its lease, the record and secret used to control that claim. Other workers claim throughupdatewith another label. A claim made while another exists is refusedlease_conflict. Callgive_backwith a reason to clear a claim: a caller at thecontributelevel can clear a label claim, but clearing a branch claim also requires its lease secret. A claim untouched for a day hasclaim_stale: true.
Match a report to an issue #
- Matching at filing. The service fingerprints evidence the platform adds to a report and links repeats to the known issue without AI. A report whose origin is not
workspaceorplatformis never linked by its evidence onto a restricted issue, one marked as a security concern that the service hides from other reporters. When the filer follows up with the same problem key, the service adds a new report to the same issue. Ifwaiting_forisreporter, that reporter’s follow-up clears the field and returns the issue to the queue. - What a fingerprint needs. A report links by its fingerprint only where its evidence names the call's
refusal. Two reports of a call that was answered, naming no refusal, are never linked by it. - Undoing a confirmation. If a filer's
followcloses the issue created for their filing as a duplicate, and that issue contains only their report,unmergealso removes the link made byfollow. The report then belongs only to its own issue. - A repeat of a declined request. A filing's
candidates, its likely matches, include an issue closeddeclinedoras_designed: a request considered and not taken. It ranks after an open issue that matches as well, and a closed restricted one is never offered, whatever the filing's origin. Each candidate carries itsoutcome, null while the issue is not closed, and a fixedsentence, such as "Not taken.", and never the resolution's words. Afollowonto such an issue adds the report and leaves the issue closed. - Which issues are candidates. A filing that names a
componentis offered that component's issues by its title's words, and an issue of another component only where the filing's evidence matches it. A filing that names none is offered issues of every component. - Why a candidate matched. Each candidate names its issue's
kindandcomponent, and itssummarywhere a trusted actor wrote one. Itsmatched_evidencelists the filing's evidence fields that matched the existing reports used to select the issue. It is empty when only the title's words matched. A filing's words are matched only against text the candidate shows. That can be the issue's title, if shown, or its summary, if a trusted actor wrote it. An issue whose words the filer is not shown is offered only where its evidence matches.
Report amendments and notes #
- Clearing a resolution. In the current Issue Tracking API,
updatewithresolution: nullclears the resolution of a new or open issue and writes no replacement.settleandwaitwrite one. TheupdatethatcreateIssueTrackingClientmakes still writes a resolution, on any state. - Amend your own report. Call
submitwithamendsset to the original report's number. The service adds a new report withamendsandwithdrawsand leaves the original as filed. The amendment joins each issue the original belongs to withlink_basis: amendment. An unknown report number or a report filed by another actor returnsreport_not_found. - What you can amend. Send at least one of
kind,labels,title,text,impact,workaround,proposed_resolution,attachments, orwithdraws. A praise report can staypraise, and other reports can use any kind they could file exceptpraise. A field report cannot usequestionortask. Sendinglabelsrequirescontributeaccess or higher. Below that level the service returnsgrant_required. - What the amendment keeps. The problem key stays the same. If you omit
kind,title,text,impact,workaround, orproposed_resolution, the amendment uses the latest amendment that did not withdraw the report, or the original if there is none. A withdrawal with noimpacthas none. Sendnullto cleartext,workaround, orproposed_resolution. An empty string clearstexttoo. Evidence stays on the original report. A person decides how to settle the issue after a withdrawal. - What changes on the issue. The amendment can update the kind or replace the filing labels on the issue the original report opened. Send the full list of filing labels to keep. The service keeps any kind or labels a space member set by hand. Issues the report only joined keep their own kind and labels.
- Which client amends.
createIssueTrackingClienthas noamends, so a backend amends through the gateway withcreateIssueTrackingClientV2(Methods and results). - Images on reports and comments. A filing and a comment can each carry up to four images, PNG, JPEG, or WebP, each at most 512 KiB, judged by their bytes and never by a name. The service stores each beside its report, under the report's own privacy and restriction, within 16 MiB a space. A read lists each image as
{ id, media_type, size_bytes, sha256 }, andGET /v2/attachment/<id>under acontributetoken fetches it. A retry stores no image,redactat theownerlevel removes one whole, the retention drop takes a report's images with its text, and no AI pass reads one. - A note to reporters. An issue's
note_to_reportersholds up to 2,000 characters, returned by a read that names a reporter. Anupdateatcontributeor above writes or clears it on any state; a filing cannot set it. Never quote a report or name a reporter or restricted issue. Afixesorresolveslanding, the record of a fixing commit, writes a note naming the commit and when it landed. Reporters read it only while the issue is fixed or closeddoneorverified. OnlycreateIssueTrackingClientV2returns it through the gateway.
Kinds and relations #
- Praise apart. Praise and every other kind are kept on separate issues. A report filed as
praiseopens or joins a praise issue, and a report of another kind joins no praise issue, even under a problem key once used for praise. Where a praise report and a problem's issue meet, the service relates the two issues, unless either is restricted, and links neither report across. No merge joins a praise issue with an issue of another kind, and a praise report never reopens a fixed issue. - Mentions become relations. In the current Issue Tracking API, a comment or an
updatethat sets the summary adds arelates_tolink to each issue it names, such as#12. The service makes at most five relations a write; the answer'smentionedlists them. It skips the issue itself, a number with no issue, a pair already related or unlinked, and a restricted issue beside one that is not. A quoted line opening with>or a code span links nothing, nor does a number inside a word, a path, or an entity. A report's text links nothing. - Mentions stay related. No pass reads a mention: the
relates_tothe service makes stays as it is, and a person or a session setsblocksorpart_ofwithrelate. - Who waited on a settled issue. In the current Issue Tracking API,
settlereturns up to 20 entries inrelated_open. It includes incoming and outgoingblocks,part_of, orrelates_tolinks with an issue that is not closed. Each entry names the relation'stype,from, andtarget, and the other issue'sstate.blockscomes first, thenpart_of, thenrelates_to, each by effective priority and then by number. A restricted issue is listed only when the settled issue is restricted too. Where 20 are listed,readthe issue for the rest.
Builds and verification #
- Builds and checks. A build records a version of a release line, the sequence of versions an environment runs, written by the deploy. A check records each run of a monitored job under a stable key, and an issue opens from it only once the failures repeat. An issue a check opens reads
blockedwhere the check breaks after at least three green runs and the failure is in the product or the client. A build without a release line counts toward neither cause. A landing records the commit that fixed an issue, with its regression test and proof. - Withdrawing a run. The job that posted a check run can withdraw it using the run's original key. The withdrawal stays in the check's history and closes the failure episode that run opened: the sequence of failures since the check first failed, normally ended by a successful run. If the withdrawal also supplies a
key, that key prevents duplicate withdrawals on retry; it does not identify the original run. - Verification by exposure. A fixed issue closes verified once live builds that contain the fix have exercised it a set number of times, with no report of the same point since. An issue nobody can explain waits, and the next report reopens it. A bug or a friction closed
doneby hand, with no landing, names infixed_inthe build that serves the fix where a returning reporter filed on it, and may name it otherwise. A later report then reopens the issue only when it comes from that build or a later one, and with nofixed_init reopens nothing. - A report that names no build. For a
productrelease line, a report with no build on that line counts as seen with the fix only if it was filed after the release containing the fix went live. If the report names a build on that line, the service uses only that build to decide. On aclientline, only a named build counts. Your backend's reports name no line, so on aproductline they are read by when they were filed. Each report'sseen_after_fix_basissays which reading found it with the fix:build,filed_at, orlanding. - A fix no release ships. Where no release ships a fix within the space's
watch_cap_daysafter it lands, 14 days unless the space sets another, the daily sweep labels the issuerecheckand leaves it fixed. - A fix on the
landingline. If your space declares a component on thelandingline, the fix takes effect when it lands. A report filed at or after that landing counts as a report with the fix, regardless of the build it names, and the AI reviewer can reopen the issue. A report filed before the landing, or after a newerrevert, attaches to the issue. These fixes require no exposures and are recorded as unshipped. If the component declares an exposure source, the sweep addsrecheckafterwatch_cap_days. A space that declares no components treats itslandingline as aproductline.
Proposals from AI passes #
- Passes. Two AI passes propose and check duplicates, splits, and themes, and the triage pass judges each new issue to give it a priority from 1 to 3. A merge is applied where they agree and the evidence on at least one side was stamped by the platform or confirmed against its records. A pass never edits a report, and never moves a priority a person or a program wrote. How an issue gets its priority explains each rule.
- What delays a merge. A merge the passes agree on waits while its duplicate carries a
plan, isfixed, or carries a branch's claim. Once the duplicate is free, the passes apply the merge at their next write, or withdraw it where it no longer fits their limits. A merge withdrawn because its master closed as a duplicate is proposed again against the surviving master. A person'ssettleapplies a merge held by a plan at once, and so doescreateIssueTrackingClient'ssettlewith the actapprove. - When an agreement lapses. The critic must review the merge again if the master issue closes or moves to
waitingorfixed, a report joins or leaves either issue, or a component is set. The master is the issue the duplicate merges into. The merge then waits for the critic to read it again. - What the passes propose. A
readwithoutactorreturnsproposals, the pending proposals for a merge, split, or theme that reaches the issue. A merge reaches its duplicate and its master, a theme its issue, and a split the first issue its report is linked to. Each entry carries itsid, itstype, its other end, the passes'verdicts, itsdisagreements, its instantat, andrestricted.listwithproposed: trueselects the issues a waiting proposal reaches. - How often the passes' merges were wrong.
read_spacereturnssampled_merges,{ rate, audits }: the share of the last thirty days' audited merges judgedwrong, 0 where none was audited, and how many verdicts it counts. Whilerateis above the configuration'smerge_error_rate_threshold, an agreed merge waits for a person.relay_issue_actforwardsread_spaceonly under anownertoken.
Counts, reads, and the client #
- A space's figures.
countreturns how many issues have the state, outcome, kind, component, label,waiting_for,claimed_by, effective priority, or requirement you name, leaving out issues with labels you name. It returns a total, or totals by any one field except the requirement.ratesreturns how many issues were filed, closed by outcome, reopened after a fix, and still open, per day or week over up to 400 steps. It also returns the time to close by kind and effective priority. Both take anownertoken;relay_issue_actforwards both at itsownerlevel, and the gateway forwards neither (Keep your own issue list). - Counting through the gateway. A deployment counts the issues
listreturns. It requests pages withlimit: 100until the returnedcursoris null. A page can contain fewer than 100 issues even when more pages follow. A large space is counted over several minutes, its pages paced within the space's rate. From development alistnames its actor, so that count holds the actor's own issues alone. - Reads and erasure. List, search, and export read a space. Erasure replaces a person's identity on every record and keeps every report's text, so leave out of a report anything you do not want kept.
- A client and a test double, which The client and Test with the double describe.
States, permission levels, and moves #
An issue is in one of five states: new, open, waiting, fixed, and closed. A filing opens it new where the space's passes run, and open where they do not, the default. Triage, or an update that sets its kind or component, moves a new issue to open.
wait parks a new or open issue as waiting, with what would settle it, as a green check does for the open issue it opened. With waiting_for set to person, person:<account>, reporter, or outside:<what>, it sets what the issue waits for and moves no state. An update giving a waiting issue any other value is refused state_conflict, reopen the way out.
A fixes or resolves landing recorded with land moves an issue to fixed or closes it done. A narrows landing leaves its state, and a revert reopens it. The settle call closes an issue with an outcome. The reopen call moves a fixed, closed, or waiting issue back to open. Use unmerge to reverse a duplicate settlement. A new report, or one a merge moves in, reopens a waiting issue or one closed unexplained.
A landing's proof reads proved, unverified, or untestable. unverified marks a test read from the commit alone, with no proof record behind it, and moves the issue as proved does.
A closed issue carries one outcome: verified, done, as_designed, declined, duplicate, superseded, noted, or unexplained. A fixed issue closes verified once live builds have exercised the fix enough times with no report of the same point, and one nobody can explain closes unexplained after the long wait. A praise filing that opens its issue closes it noted at once.
Each token has one permission level, and a level allows its own calls and those of every level below it:
filefiles withsubmitand confirms a repeat withfollow, for the reporter each call names. Itsfollownames a likely match the report's filing was offered, or an issue the reporter already reports. Any other issue number is refusedissue_not_found, as a number that matches no issue is.reportfiles and reads as a reporter does: it reads, lists, and searches issues, never a restricted one.contributereads, lists, and searches issues, sets an issue's curated members withupdate, comments, relates, and splits. It sets what an issue waits for withwait, takes work withnext, and gives work or a label claim back. On/v2, it can reopen ataskand settle ataskwith any outcome its state allows exceptduplicate.recordconfirms a report's evidence and records landings, builds, shipments, exposures, and checks.ownercan settle or reopen other kinds of issues on/v2, settle asduplicateto merge issues, and useunmergeto reverse a merge. On/v1,settlerequiresowner. This level also clearsrestrictedmarks and alarms, redacts, reads counts and rates, exports, erases an actor, reads and restores the record, configures the space, mints and revokes tokens, and deletes the space.
Restricted issues #
The service hides a restricted issue from a reporter and from no one else. Below the contribute permission level, and in every read that names a reading actor, a restricted issue is never returned. From the contribute level up, every read returns it as it returns any other issue. A filing whose origin is not workspace or platform is offered no restricted issue as a likely match, under any token. The one exception is a filing under an owner token that names its caller's relayed_level as contribute or above, as the platform's relay does at the contribute level.
Where the service accepts filings directly under the caller's own credential, it determines that level from the caller's access to the space. A filing sent directly that includes relayed_level is refused invalid_request.
A filing marked restricted links only to restricted issues, and otherwise opens its own restricted issue. A later confirmation of its report links it only to restricted issues too. A filing kept back from a restricted issue opens its own issue restricted as well, and so does a report a later confirmation keeps back, where its issue holds that report alone.
Where a report is kept from a restricted issue closed done or verified, the daily sweep surfaces that issue once with the label recheck and leaves it closed. A person reads it and reopens it or leaves it.
Code that reaches the service with its own token reads these answers:
- Under a
contributeorrecordtoken,list,search, and the counts ofread_spaceinclude restricted issues. - A
listthat namesactoranswers no restricted issue, whatever the token, as the reporter's own view never does. Withproposed: trueit selects no issue by a proposal that reaches a restricted issue. - A
read'sproposalsentry that reaches a restricted issue carriesrestricted: true. The calls that answer it take acontributetoken, so a reporter never reads one. - On the calls
createIssueTrackingClientmakes, an issue record carriesrestricted,trueorfalse. Theirupdatesets norestricted, and is refusedinvalid_requestwhere it names one. - On the service's current calls, an
updatethat setsrestrictedtofalse, or that namesalarm, is refusedgrant_requiredunder a token belowowner, before the key is read. Settingrestrictedtotrueneeds acontributetoken.
Merging an issue preserves its restricted text: the resulting issue is restricted if either original issue was restricted. If the merge sets that mark, its merged history entry records restricted: false for the earlier value. Splitting an issue from a restricted issue creates another restricted issue, whether a person or an AI pass performs the split. unmerge leaves each issue's current restricted mark unchanged.
The triage pass looks for a restricted issue's likely matches, and offers a restricted issue among another issue's. A merge or a theme between a restricted issue and one that is not waits for a person, and the passes withdraw it where it no longer fits their limits. A merge or a theme of two restricted issues follows the usual limits.
The second reader is the AI pass that checks an issue's priority again. No pass can clear a restricted mark; only a person at the owner level can do so, with update. An older issue's history may hold a kept entry from when the second reader retained a mark. Calls through createIssueTrackingClient return no kept entry.
The second reader also flags an issue with an alarm. It does so where three accounts report the issue as blocking them, or where its reports name security, data loss, or billing. A flagged issue comes first within its effective priority in next and in list's priority order. list's ranking_score order puts the flagged issues of effective priority 2 first, and the newest and report_count orders ignore the flag. list { alarm: true } reads every flagged issue.
Priority 1, a close, or a move to idea clears the flag, and so does an owner token's update naming alarm with null. A later mark the second reader reads sets it again.
When a pass gives up on an item, it writes a critic_failed entry on the item's issue. The entry names the item and why: three failed attempts, or 36 hourly runs with no answer from the model. An item given up on for want of an answer is still tried once each run, and the first answer written for it adds a critic_cleared entry. The calls createIssueTrackingClient makes return neither entry.
How the gateway keeps both environments apart #
The space is created when the manifest is first submitted. Your deployments in each environment file into it and read from it, and so do your local runs, under the development credential. The submission result's issue_tracking list gives the space, and never a token. An application that has a space for each environment keeps both until it is deleted, its production space created at its first promote, or its first production deploy where it has one environment.
For a shared space binding, the gateway keeps the two environments apart in three ways. An older application provisioned with one space per environment reaches that environment’s space without the shared binding’s report stamp or actor prefix.
- It stamps every report your backend files with the environment the call came from and the version it serves,
localfrom your own machine. On the first client'ssubmitthese areevidence.environmentandevidence.version. OncreateIssueTrackingClientV2's they are oneseen_inentry,{ release_line: null, version, environment }, in place of any the call names, and an amendment carries none. - It puts
development:in front of every person, agent, or program id a development call names, so a development tester never appears as one of your production users. From development, alistwithoutactoris refusedinvalid_request, as arereadandsearchon either client. So is a development write that names another issue by its id, and an id that already starts withdevelopment:or passes 200 characters once prefixed. - A deployment reaches the space at its binding's grant level:
reportfor the application's own space or a space for each environment, andreportorcontributefor a space of your account. Atreport, a deployment can file reports and read the space. On the first client’s wire (0.2.0),contributeaddsupdate,comment, andrelate. The gateway refusessettle,export, anderase_actorat both deployment grant levels on that wire. Those three calls requireowner. Both clients classifyexportas a read that requiresowner. A call outside the binding’s grant returnsissue_tracking_call_refused.
Every filing on createIssueTrackingClientV2 reaches the space with the origin field, whatever it names, so the service reads it as a reporter's. One naming an evidence_basis other than claimed is refused invalid_request, and so is one naming relayed_level.
At report, the gateway leaves a restricted issue out of every response, whichever space the binding names. A list or a search skips it, and a read of it is refused as for an issue the space does not hold. The response to a filing or an amendment names no restricted issue. A read's proposals leave out each entry that reaches one, and a reporter's own view never holds one. The counts read_space returns include restricted issues, because the gateway forwards a count as it comes.
At report a list that names proposed is refused issue_tracking_call_refused on either client; its other filters still work. A read at report leaves out each history entry that records a proposal. On the first client's calls there, every issue's proposed reads false, and a read leaves out a relation that is still only proposed.
A finding is an issue that groups other issues, its members, stored as a task labelled finding. On the first client's calls at report, a finding's members list only the issues that are in it. A finding whose own proposed field is true is left out, just like a restricted issue. A finding created by a proposal and not yet approved is also left out.
The first client's list and search also skip a finding the passes made that a person approved and later declined by hand, though a read of it still returns it. On createIssueTrackingClientV2 the gateway skips every finding with no report of its own, approved ones included, so a backend at report sees no such finding. Read findings at a higher grant level.
The contribute grant level adds the working calls, and owner reaches every call; no deployment has owner. The call that starts a deploy may name commit, 7 to 64 lower-case hexadecimal characters. After each deploy, promote, and rollback, the platform writes a build record into the application's own space naming the version, the environment, and that commit, never delaying the deploy. A malformed commit, or one on the call that only prepares an upload, is refused invalid_request. An application with a space for each environment gets no build record.
A space of your account's own #
A manifest can instead name a space your account created with create_space, and the platform binds the application to it under the same three rules. Bind an application to the space gives the space and level to name, the release line the platform adds, and their refusals.
Issue Tracking connects your application to tzTrack, Turn Zero's issue tracker. Every account has it, so there is nothing to add. If a call through this binding is refused tztrack_required, repeat the request; read_account lists the products the account holds.
Deletion and copies #
The platform keeps the space's token in custody under a platform-minted name, and no application and no author has it. A manifest revision that drops the kind changes nothing: the space and its records remain. The platform reads a space's records only through the feedback actions naming the space, the export, the deletion of the space or of your account, and the daily copy.
Deleting the application deletes its own space with every record in it, and ends a binding to a space of your account's own. Deleting your account deletes every space of its applications and its own. delete_space, which you approve in the browser, deletes one space your account owns with every record in it and ends every binding to it (Delete a space). Deleting the development environment deletes nothing of a shared space, ends a development binding, and deletes a per-environment development space. A deleted space cannot be recovered.
Once a day, the platform copies each space your account holds and each application's own space into storage it holds for your account. A copy is kept 35 days, the newest until a newer one is written, and a space's copies are deleted with it. Per-environment spaces are not copied, and no action reads or restores a copy.
The daily copy lists a report's or a comment's images and carries none of their bytes; a copy the contract's read_record answers carries them, and a restore from it brings a redacted image back. Deleting a space deletes its images with it, and a holder of the owner level removes one image whole with redact.
Availability #
Version 0.100.0 is the package's current version, and this page describes it. Until the library's next publish, read_library can return an earlier version, the one you can take, so this page can describe a change that version lacks. The entry includes the testing subpath. The entry contains the compiled clients and double as the npm package @turnzero/tztrack, the package's product statement and detailed contract, and its integration guide. The contract's "Migration to" sections explain changes to the package's guarantees by version.
Turn Zero Cloud runs the service and creates one space for every application that declares the kind. That space counts toward neither the account's five spaces nor its 100,000 open issues. There is no charge for calls, records or stored bytes in that space.
tzTrack AI reviews is a paid option for each space, an application's own space included. Call tztrack_set_ai_passes with the space, on: true and enable_reviews: true to turn on the option and the space's reviews setting together.
Check reviews_written. If it is false, the option is on and any charge remains, but the setting was not written. Repeat the same call to retry the setting without charging again for an option already on. Without enable_reviews, only the option changes.
Turning on the option charges one day’s share of its monthly rate unless that space was already charged for it that UTC day. The daily billing run charges for each later UTC day it finds the option on. Turning it off stops new charges from the next run and returns nothing already charged.
When the day’s charge is due, the remaining Free Allowance plus available credit must exceed the option’s charge for the days left in the UTC month, including today. The call can be refused balance_short (402) or rates_unread (503). Space limits and tzTrack AI reviews explains the limits and option; the pricing page gives its rate.
The service limits each space's forwarded calls per minute, and a call past the limit is refused rate_limited. When many reads of large spaces run at once, the service can also refuse a read rate_limited: wait a few seconds and call again.
Related feature packages #
The tztrack package depends on no other feature package. Storage states the rule this service applies to every write: where a service relays its users' actions, each write names the user who acted. Account verifies the end users an application names as actors.
The client #
The package is published in the library as the npm package @turnzero/tztrack, not on the npm registry; Use the feature package library installs it with one line. The module holds two clients: createIssueTrackingClient and createIssueTrackingClientV2. For a binding limited to a list of components, use createIssueTrackingClientV2. The gateway refuses calls from the first client on that binding.
For createIssueTrackingClientV2, the gateway forwards four calls: submit, read, list, and search. The V2 submit call can also amend a user's report. See Methods and results for the calls the first client can use. A relay of your account reaches the other V2 calls.
Construction #
createIssueTrackingClient(transport) builds the client for bindings without a components list, with no options. transport(path, init) sends each call to POST /egress/v0/issue-tracking/v1/<call> under the application's platform credential, TURNZERO_CLOUD_APP_TOKEN, and returns the response. The path sits on TURNZERO_CLOUD_GATEWAY_URL where the deploy sets it, and on TURNZERO_CLOUD_API where it does not. The gateway finds the space from the calling application and environment, and presents the space's token for it.
A local run reaches the same space through the platform's public gateway under the development credential. For a shared space binding, the gateway stamps the run's reports local. A test runs the double in its place (Test with the double).
createIssueTrackingClientV2(transport), also with no options, runs over the same transport, each call at /egress/v0/issue-tracking/v2/<call>.
For a program calling the service directly, construct createIssueTrackingClientV2(transport, { space, credential }) with the space's owner token. Its configure method accepts add_release_lines, a list of { name, kind } entries. New names are appended; an existing name keeps its line's settings, including kind. A configure naming only add_release_lines changes nothing and leaves changed_at unchanged when all its names are already present.
Declare each name once, and choose product or client as kind. An addition that would take the list past 50 lines is refused without changes. Do not send add_release_lines beside release_lines, which still replaces the whole list. The gateway, the relay and the service's MCP tools do not accept this member.
Methods and results #
For the first client, the gateway forwards submit, read, list, search, and read_space at the report grant level, each a method of the client, such as client.submit(request) and client.readSpace(). Each method takes { signal } as its last argument.
submit({ actor, kind, source, title, body, evidence, key })files one report,actorbeing{ kind, id }for the user you file for. It returns{ issue, outcome }, the outcome one offiled,retried,repeated,reopened, andrecovered.read(issue)returns the issue, its history, comments, relations, and members.listandsearchreturn issues,listin the ordernewestorscore, the service's rank by an issue's reports.- On this client, a priority is 1 to 4.
excerptmay only befalse, andtrueis refusedinvalid_request.recovered: trueis refusedrecovery_unmatchedunless that actor's own filing under that key opened the issue and every report on the issue is that actor's.
On createIssueTrackingClientV2 the gateway forwards submit, read, list, and search at both grant levels, and refuses every other call issue_tracking_call_refused. Use the first client for other forwarded calls only where the binding has no components list. A components binding admits only these four V2 calls.
submit({ actor, origin, kind, title, text, key })files one report, and returns itsreport, whoseidis its number, with theissueand theoutcome. The current outcomes arefiled,linked,retried,notedandamended. The gateway files it with the originfield. The service refuses aquestionortaskfiled this way. Use the first client for those kinds only if the binding has no components list.submit({ actor, amends, text, withdraws, key })corrects or withdraws a report thatactorfiled,amendsbeing its number. A new amendment returnsamended; a retry with the same key returnsretried.read({ issue, actor }),list({ actor }), andsearch({ query, actor })return that user's own view: the issues their reports belong to, each with their reports and each report'samends,withdraws, andseen_after_fix_basis.
Failures #
IssueTrackingGatewayRefusal, for the gateway's own refusal, which the client tells apart by the marker header.issue_tracking_call_refusedis a call the gateway does not forward, andissue_tracking_application_requireda credential that names no application.issue_tracking_not_provisionedis an environment with no space, andissue_tracking_unavailablea token that cannot be read, which may be retried.tztrack_requiredis a binding to a space of your account's own while your account lacks tzTrack.IssueTrackingRefusal, for the service's refusal by name inrefusal, withstatusanddetail. A refused call changes nothing. Itsownis null except on areadnamingactorrefusedissue_not_found, where that user's own report joined the issue the number names. Thereownis the identifier of the issue that report is on now. A read naming the same actor returns that issue.ownnever names an issue that user cannot read. It is null for another user's issue, for a restricted issue, and for a number that names no issue.IssueTrackingUnreachable, when the transport fails, the service reports a fault, or the client cannot read the response. You can retry a read. If you retry a write that takes akey, reuse the original key.
Branch on refusal, never on detail. The refusals page lists the gateway's five refusals with their cause and remedy. The service's own names, recovery_unmatched among them, are listed in the package's contract, the entry's tztrack.md.
Test with the double #
createIssueTrackingDouble(options) from @turnzero/tztrack/testing answers both clients' calls in memory, and passes the same list of test cases the contract states. Seed a space with double.createSpace(), then take double.gatewayView({ space }) over its space.id: the gateway's view, as the deployed backend reaches its space. Build createIssueTrackingClient(view.transport) with no options, and createIssueTrackingClientV2(view.transport) for the four current calls the view forwards. reset() empties every space, so seed a space and take its view in each test. A test runs this sample over the double.
import assert from 'node:assert/strict';
import { createIssueTrackingClient, createIssueTrackingClientV2, IssueTrackingGatewayRefusal } from '@turnzero/tztrack';
import { createIssueTrackingDouble } from '@turnzero/tztrack/testing';
// One space, reached as the deployed backend reaches it: through the gateway's view.
const tracker = createIssueTrackingDouble();
const { space } = tracker.createSpace();
const view = tracker.gatewayView({ space: space.id });
const client = createIssueTrackingClient(view.transport);
// The backend files the signed-in user's report under the user's own id.
const filed = await client.submit({ actor: { kind: 'person', id: 'user-1' }, kind: 'bug', source: 'person', title: 'Export does nothing', body: 'Clicking Export downloads no file.' });
assert.equal(filed.outcome, 'filed');
// Answer the user with their own report's state alone, never the whole issue.
const reply = { issue: filed.issue.id, status: filed.issue.status };
assert.equal(reply.status, 'open');
// The same transport carries the current client's filing and the user's own amendment.
const current = createIssueTrackingClientV2(view.transport);
const first = await current.submit({ actor: { kind: 'person', id: 'user-1' }, origin: 'field', kind: 'bug', title: 'Import fails' });
const amended = await current.submit({ actor: { kind: 'person', id: 'user-1' }, amends: first.report.id, withdraws: true });
assert.equal(amended.outcome, 'amended');
// A call the gateway refuses throws its own refusal, told apart from the service's.
view.refuseNext('issue_tracking_unavailable');
await assert.rejects(client.list(), (error) => error instanceof IssueTrackingGatewayRefusal && error.refusal === 'issue_tracking_unavailable');
The client's refusals are those Failures lists. These come from the double's own setup:
| Refusal | Cause | Remedy |
|---|---|---|
issue_tracking_call_refused, issue_tracking_application_required, issue_tracking_not_provisioned, issue_tracking_unavailable, tztrack_required |
view.refuseNext scripted the gateway's refusal, or the call named a path the gateway does not forward, such as "delete_space". |
Call through the client, and assert the refusal where the test scripts it. |
issue_tracking_not_provisioned, unscripted |
The view's space does not exist: it was never seeded, or reset() emptied it. The view returns this refusal on its own for every call to a space that does not exist. |
Seed the space with double.createSpace() and take its view again in each test. |