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
| Use | What happens | When |
|---|---|---|
| Task-code validation | A 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 ready | One 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 login | A 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-back | One 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-back | One 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) |
| Directory | The 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.
| Method | GAOS sends | GAOS reads |
|---|---|---|
ListPeople | page (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 |
GetTask | task_code, exactly as written in the pull request | code, product_code, state (ACTIVE, ARCHIVED, DELETED), qa_person_id; since v0.89.0 url, title and assignee_ids |
AddComment | task_code, text (at most 1500 characters) | The status only |
RecordMerge | task_code, product_code (the binding’s), pr_url, person_id (the author’s); on an accept also mark_dev_done and confirm_nonce | outcome (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
| Topic | Rule |
|---|---|
| Transport | gRPC over HTTP/2 with TLS 1.3, to a certificate GAOS pins. Plaintext only towards a loopback address: tests, or a local tunnel. |
| Credential | HTTP Basic, authorization: Basic base64(client-id:secret), on every call. |
| Scope | The 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 codes | OK; 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. |
| Answers | One uncompressed message per call, at most 1 MiB. GetTask never answers OK without a task. |
| Paging | GAOS reads at most 20 pages of 100 — 2,000 people. A tracker honours any page_size up to 100. |
| Comment | At most 1500 characters. GAOS writes at most one comment per finished bundle. |
| Evolution | v1 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). |
| Trust | A 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
| Answer | Class | Breaker |
|---|---|---|
| code 0 with a usable message | ok | resets |
| code 5 | not found | resets |
| code 3 | invalid | resets; never retried |
code 0 but no task, or a state of UNSPECIFIED or outside the enum | unchecked: no alert, no write-back, asked again after 5 minutes | resets |
| code 7, 8 or 16 | auth | latched until the credentials file changes, or for one hour |
| any other code, a transport failure, a deadline, a malformed frame | unavailable | three 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.
| File | Content |
|---|---|
endpoint | One line, ip:port. An IP literal, never a host name. |
ca.pem | The tracker’s certificate, pinned as the only root; the server name checked is the IP. Required unless the IP is loopback. |
credentials | One line, client-id:secret. Empty at start-up means the profile is off. |
products | One line per GAOS product that may use the profile: <product-id> <tracker-code>, or <product-id> * for any code. # starts a comment. |
web | Optional, 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.
- Enabling needs an installed profile that allows the product and the code; otherwise 422
(
no connection named <name> is installed, orconnection <name> does not allow product <id> with code <CODE>). - No two enabled bindings may share a (connection, product code) pair, the code compared without regard to case; a second answers 409 naming the holder.
- Disabling keeps the entry; a disabled save may name no connection.
- Every change is a
ThirdPartyConfiguredevent: the alias, the kind, the switch, the connection and the code.
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.
- A product reaches only the people of its own connection.
- A number is never stored, logged, put in a packet, sent to Brain Town or written into an event
(BR-63). The one stored identifier is the alias
ext:<username>inContactNotified. - A Contacts destination of
trackermeans the person’s number in the product’s bound tracker, read when the line is sent (Contacts).
The note on the task
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
- Scope. A task outside the credential’s products, or whose product is not
product_code, answersNOT_FOUND. - The person.
person_idmust name an active person who is an assignee of the task, on every call; otherwise the answer isREFUSED(“the author is not assigned to the task”). GAOS also checks it wheneverGetTaskreports assignees; for a tracker that reports none, this rule is the only check. - Merged only, and a separate grant. A plain call sets the release status to its first step and to
nothing else.
mark_dev_done=trueis a separate permission, which the tracker may withhold; without it the answer isPERMISSION_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. - 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, answersREFUSEDfor an unfinished task, and never answersNEEDS_DEV_DONE. A plain call that carries aconfirm_noncevoids that nonce: GAOS sends one when the author rejects. - An accept (
mark_dev_done=true) needs aconfirm_noncethe tracker issued for this task and thisperson_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 answersRECORDED. A nonce already redeemed successfully, presented again for the same task and person, answersRECORDED(orALREADY) and writes nothing; GAOS relies on this when it retries an accept that timed out. A voided, expired or unknown nonce answersREFUSED(“the confirmation is not valid”). The call is GAOS’s claim that the person accepted on its page; it is not proof of consent. - History. Every write is recorded in the tracker’s own history as made “through the GAOS
integration”, with the
pr_url. Amark_dev_donewrite 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. - Idempotence. The same plain request twice writes at most once.
- Not granted. A tracker that does not implement the method, or a credential not granted it,
answers
UNIMPLEMENTEDorPERMISSION_DENIED.RESOURCE_EXHAUSTEDmeans stop calling.
| The task, on a plain call | The answer |
|---|---|
| development-done, release status below merged | RECORDED |
| release status at merged or later | ALREADY, with release_label |
| in development | NEEDS_DEV_DONE; nothing written; confirm_nonce issued (one use, 24 hours, bound to the task and the person) |
| not started, on hold | REFUSED, 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
| Answer | A plain call | An accept |
|---|---|---|
| code 0 | the outcome; resets the backoff | the outcome |
| code 12, or HTTP 404 or 501 | nomerge: paused for 1 hour | paused; the accept is refused |
| code 7 | nomerge: paused for 1 hour | confirmations off for 1 hour (confirmations not granted); the accept is refused; plain calls go on |
| code 8 | paused for 1 hour (asked to stop) | paused; the token is released for a retry |
| code 16 | paused for 5 minutes (credential refused) | paused; the accept is refused |
| code 5 | not found: the task is unknown | refused |
| code 3 | invalid: refused | refused |
| anything else, or a timeout | unavailable: backoff from 1 minute, doubling up to 30 | the token is released for a retry |
| code 0 with no outcome, or one GAOS does not know | unchecked: nothing is written or sent; a log line | refused |
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:
| Chip | When |
|---|---|
| Unusable | An enabled binding names a profile that is not installed, unusable, auth-latched, or does not allow the product and code. |
| Degraded | An 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. |
| Connected | At least one binding is enabled and every enabled binding’s profile is on and has refreshed. |
| Off | Anything else. |