Integrations

Task tracker

A GAOS product can be bound to a task tracker: the team tool that knows each task’s product, state and QA, and each person’s role, WhatsApp number and checked GitHub login. GAOS reaches it only through a small gRPC contract that GAOS publishes, gaos.tasktracker.v1.TaskTracker, so any tracker, private or public, can be connected (D-104, D-118, D-132). To connect one, follow Connect a task tracker.

What a binding gives

UseWhat happensWhen
Task-code validationA pull request whose Kode (jika dari task manager) names a task the tracker does not know, an archived or deleted task, or a task of another tracker product gets one unknown-task-code comment and one WhatsApp line.Each poll of an open, templated pull request; a known code is checked again after 30 minutes
Test plan readyOne notice, bundle:planned, on GAOS’s Notifications page: how many draft cases and links the test plan made. Since v0.87.0 it is GAOS-only and is not sent to WhatsApp, neither to the task’s QA nor to the group (D-129).A bundle’s test-planner card ends DONE
Routing by loginA notice whose GitHub login has no GAOS contact goes to the tracker’s person with that verified login, before the group.Every notice of the product
Write-backOne comment on the task: the finished pull requests (merged and closed counted apart), the test plan’s counts and case codes.Once per DONE test plan
Merge write-backOne RecordMerge per task: the release status moves to merged, or, for a task still in development, the author gets a one-time link to confirm development-done first (below). The author is told the outcome on their own number; a group never is.Once no open pull request names the task, after a GitHub review pull request naming it merged (since v0.89.0, D-132)
DirectoryThe Integrations view shows each connection’s counts to everyone and the per-person table to auto-fix admins.Refreshed every 15 minutes while a binding names the connection

GAOS changes a task in two ways only, both through RecordMerge: it moves the release status to its first step, merged, and no further; and, after the task’s assignee accepted on the one-time link, it asks the tracker to mark the task development-done on that person’s behalf, which the tracker may refuse to grant at all (BR-63). GAOS never creates a task, never moves any other state and never writes a person into the tracker.

The contract

The contract is one proto3 file, task-tracker-v1.proto. GAOS does not compile it (the dashboard is stdlib-only); a test holds GAOS’s hand-written codec to the file.

MethodGAOS sendsGAOS reads
ListPeoplepage (from 1), page_size (100)Active people only, in a stable order: id, username, display_name, role, github_login, github_verified, whatsapp, whatsapp_active; and total
GetTasktask_code, exactly as written in the pull requestcode, product_code, state (ACTIVE, ARCHIVED, DELETED), qa_person_id; since v0.89.0 url, title and assignee_ids
AddCommenttask_code, text (at most 1500 characters)The status only
RecordMergetask_code, product_code (the binding’s), pr_url, person_id (the author’s); on an accept also mark_dev_done and confirm_nonceoutcome (RECORDED, ALREADY, NEEDS_DEV_DONE, REFUSED), task, reason, release_label, confirm_nonce

Person fields 9 to 19 are reserved for logins on other forges.

The rules a tracker follows

TopicRule
TransportgRPC over HTTP/2 with TLS 1.3, to a certificate GAOS pins. Plaintext only towards a loopback address: tests, or a local tunnel.
CredentialHTTP Basic, authorization: Basic base64(client-id:secret), on every call.
ScopeThe credential sees only the tracker products it is granted. A task outside them answers NOT_FOUND, exactly like a missing one, so the tracker’s answer never reveals that a task exists. GAOS’s own alert does tell a pull request’s author whether a code is an open task of the bound product; that is accepted.
Status codesOK; NOT_FOUND for no such task or one out of scope; UNAUTHENTICATED or PERMISSION_DENIED when the credential is refused, except on RecordMerge, where PERMISSION_DENIED or UNIMPLEMENTED means the method (or, with mark_dev_done, that half of it) is not granted; RESOURCE_EXHAUSTED means stop calling (a lock-out after failed logins, or a rate limit); INVALID_ARGUMENT for a malformed request. Anything else counts as unavailable.
AnswersOne uncompressed message per call, at most 1 MiB. GetTask never answers OK without a task.
PagingGAOS reads at most 20 pages of 100 — 2,000 people. A tracker honours any page_size up to 100.
CommentAt most 1500 characters. GAOS writes at most one comment per finished bundle.
Evolutionv1 may gain new fields, methods and enum types; a published enum never gains a value. A change that needs a new value in an existing enum is v2 (amended by D-132).
TrustA bound tracker is GAOS’s authority on which person a GitHub login belongs to (github_verified) and where that person’s WhatsApp messages go. Bind only your own tracker, or one you have vetted. GAOS sends it task codes, person ids and, in the write-back and RecordMerge, the URLs of merged pull requests, including those of private repositories.

How GAOS reads an answer

AnswerClassBreaker
code 0 with a usable messageokresets
code 5not foundresets
code 3invalidresets; never retried
code 0 but no task, or a state of UNSPECIFIED or outside the enumunchecked: no alert, no write-back, asked again after 5 minutesresets
code 7, 8 or 16authlatched until the credentials file changes, or for one hour
any other code, a transport failure, a deadline, a malformed frameunavailablethree in a row open it for 1 minute, doubling up to 30

The breaker belongs to one connection. A code-8 latch therefore pauses, for up to an hour, every product bound to that connection and no other; keeping one profile per tracker credential keeps that blast radius small. While calls are paused, every use falls back to its off behaviour: the contact or the group, no validation, no note. A lookup on the poll path waits at most three seconds.

RecordMerge never moves this breaker or the auth latch. It has its own pause per connection (below), so a tracker that has not implemented it, or has not granted it, never stops validation, routing or the note.

Connection profiles

A connection is a profile folder the deployer installs under GAOS_TRACKERS_DIR (prod: deploy/stacks/prod.pr-trackers/<name>/, mounted read-only at /run/secrets/trackers). The folder is mode 700 and every file in it mode 600; a symbolic link is refused.

FileContent
endpointOne line, ip:port. An IP literal, never a host name.
ca.pemThe tracker’s certificate, pinned as the only root; the server name checked is the IP. Required unless the IP is loopback.
credentialsOne line, client-id:secret. Empty at start-up means the profile is off.
productsOne line per GAOS product that may use the profile: <product-id> <tracker-code>, or <product-id> * for any code. # starts a comment.
webOptional, since v0.89.0: one line, the tracker’s web base, https://host[:port]/[path/] — https, a host, and a trailing /. A task’s url is shown in a notice or on the confirmation page only when its scheme and host equal the base’s, its path starts with the base’s path, and it is at most 300 bytes with no whitespace. A malformed file shows the web file is not an https base ending in / on the connection’s row and drops every task link; the profile stays usable. Missing: no task links.

The endpoint and the credential are never set from the back office. Otherwise an admin could point GAOS at any host and receive the credential there, or make GAOS send another file as a credential. The back office only chooses among installed profiles, and the products file says which GAOS product may use which credential and tracker code. Profiles are read at start-up: adding one, or editing endpoint, ca.pem or products, needs a restart. A rewritten credentials is picked up through the auth latch.

The binding

On the back office’s Integrations view, an auto-fix admin (the accounts in GAOS_AUTOFIX_ADMINS) picks a product’s connection, types its tracker product code and ticks enabled. The form posts POST /products/{id}/third-party with kind=task-tracker, connection, productCode and enabled.

The link is ready only when the binding is enabled, its profile is installed with a client and allows the product and code, the breaker is closed, and the product is in GAOS_PR_TEMPLATE_PRODUCTS.

The people directory

For each connection, GAOS keeps in memory only the active people the credential may see: by id, and by lower-case GitHub login for verified logins. A login two verified people share is dropped and counted as a conflict. A number is usable when the tracker marks it active and it has 7 to 15 digits.

The note on the task

text
GAOS: the pull requests of this task are finished: 2 merged, 1 closed without merging.
https://github.com/example/app/pull/41
https://github.com/example/api/pull/17
Test plan: 3 draft case(s) created, 1 linked, 0 refused: TC-DEMO-001, TC-DEMO-002, TC-DEMO-003, TC-DEMO-010.
[gaos bundle task:DEMO-FEATURE-00042 · card t-512]

The task code is read from the bundle key (task:<code>), never from the pull requests, so a code edited after planning cannot redirect the note. It is written only after a fresh lookup confirms the task belongs to the bound product. A failure is logged and never retried.

Recording the merge

Since v0.89.0 (D-132, design docs/designs/merged-pr-task-status.md) GAOS tells the tracker when the pull requests naming a task have merged. When a GitHub review pull request of a bound product merges, GAOS freezes the task code its body names at that moment. Once no other pull request naming the task is open, it confirms the task with a fresh GetTask and makes one plain RecordMerge for the newest merged pull request, naming its author’s person. GAOS’s side is described on Pull requests; this section is the tracker’s side.

The rules a tracker follows for RecordMerge

  1. Scope. A task outside the credential’s products, or whose product is not product_code, answers NOT_FOUND.
  2. The person. person_id must name an active person who is an assignee of the task, on every call; otherwise the answer is REFUSED (“the author is not assigned to the task”). GAOS also checks it whenever GetTask reports assignees; for a tracker that reports none, this rule is the only check.
  3. Merged only, and a separate grant. A plain call sets the release status to its first step and to nothing else. mark_dev_done=true is a separate permission, which the tracker may withhold; without it the answer is PERMISSION_DENIED. Neither grant gives any other way to change a release status or a work state. These are requirements on the tracker; GAOS cannot enforce them.
  4. A plain call (mark_dev_done=false) answers by the task’s work state, in the table below. A tracker with no separate development-done step treats “finished” as development-done, answers REFUSED for an unfinished task, and never answers NEEDS_DEV_DONE. A plain call that carries a confirm_nonce voids that nonce: GAOS sends one when the author rejects.
  5. An accept (mark_dev_done=true) needs a confirm_nonce the tracker issued for this task and this person_id, no older than 24 hours. The tracker uses it up atomically: of two concurrent calls with one nonce, at most one writes. It moves the task from in development to development-done on the person’s behalf, under every rule it applies to that person, then records merged, and answers RECORDED. A nonce already redeemed successfully, presented again for the same task and person, answers RECORDED (or ALREADY) and writes nothing; GAOS relies on this when it retries an accept that timed out. A voided, expired or unknown nonce answers REFUSED (“the confirmation is not valid”). The call is GAOS’s claim that the person accepted on its page; it is not proof of consent.
  6. History. Every write is recorded in the tracker’s own history as made “through the GAOS integration”, with the pr_url. A mark_dev_done write adds “accepted through a one-time link sent to <person>; the holder was not authenticated”. No write is ever recorded as a session of the person.
  7. Idempotence. The same plain request twice writes at most once.
  8. Not granted. A tracker that does not implement the method, or a credential not granted it, answers UNIMPLEMENTED or PERMISSION_DENIED. RESOURCE_EXHAUSTED means stop calling.
The task, on a plain callThe answer
development-done, release status below mergedRECORDED
release status at merged or laterALREADY, with release_label
in developmentNEEDS_DEV_DONE; nothing written; confirm_nonce issued (one use, 24 hours, bound to the task and the person)
not started, on holdREFUSED, with a one-line reason

The work states are contract terms every tracker maps its own onto: in development is started and not yet declared finished; development-done is declared finished, including any later review step; not started and on hold are everything else still active. The release status is the tracker’s ordered record of how far finished work has travelled; GAOS asks only for its first step.

How GAOS reads a RecordMerge answer

AnswerA plain callAn accept
code 0the outcome; resets the backoffthe outcome
code 12, or HTTP 404 or 501nomerge: paused for 1 hourpaused; the accept is refused
code 7nomerge: paused for 1 hourconfirmations off for 1 hour (confirmations not granted); the accept is refused; plain calls go on
code 8paused for 1 hour (asked to stop)paused; the token is released for a retry
code 16paused for 5 minutes (credential refused)paused; the accept is refused
code 5not found: the task is unknownrefused
code 3invalid: refusedrefused
anything else, or a timeoutunavailable: backoff from 1 minute, doubling up to 30the token is released for a retry
code 0 with no outcome, or one GAOS does not knowunchecked: nothing is written or sent; a log linerefused

A reason, a release_label and a task title are free text from the tracker: GAOS keeps them to one line of at most 200 characters and defangs every address in them before they reach WhatsApp. A task url is shown only under the profile’s web base.

The Integrations block

The Task tracker block lists every installed connection (name, state, breaker, last refresh, the people counts, and how many of its last 10 lookups were unchecked) and every product’s binding. Since v0.89.0 a connection’s state also reads merge write-back: <state> while RecordMerge is paused (nomerge, asked to stop, credential refused, unavailable) or confirmations are off (confirmations not granted), and names a malformed web file. Endpoints, unusable: reasons and products lines are shown to auto-fix admins only. The chip takes the first rule that matches:

ChipWhen
UnusableAn enabled binding names a profile that is not installed, unusable, auth-latched, or does not allow the product and code.
DegradedAn enabled binding names a profile that is off, unavailable or stale, or whose last 10 lookups were all unchecked; or the bound product is not in GAOS_PR_TEMPLATE_PRODUCTS.
ConnectedAt least one binding is enabled and every enabled binding’s profile is on and has refreshed.
OffAnything else.