Integrations
Pull-request agents
A product's main repository receives pull requests, and somebody has to review them and prove they still work. With the Brain Town reader on, GAOS opens the cards for that work when a pull request opens, when it merges and when the staging deploy finishes. Two of the four are agents; two are jobs GAOS hands to the QA tool.
What opens what
| Trigger | GAOS opens | Worked by |
|---|---|---|
| A pull request opens (not a draft, not from a fork) | A PR review card | The pr-reviewer agent |
| The same event | An e2e automation card | The QA tool (a job GAOS starts and polls) |
| A pull request merges | A unit-test card; a review or e2e card that has not started is canceled. On a product with unit checks on, a fix-target repository gets no unit-test card: GAOS reads its CI check, or Jenkins posts the result, instead (unit tests) | The unit-test agent; GitHub Actions or Jenkins for a watched repository |
| The staging deploy finishes | An e2e run card | The QA tool |
The cards live on a separate PR workflow of the product, so a pull request never resets the product's own
plan. A replay plans nothing: the card carries its key, owner/repo#n:role, and a second event with the
same key is a no-op. A draft, a pull request from a fork and one from an author who is not an owner, member or
collaborator open nothing; GAOS_PR_MAX_OPEN (default 5) bounds the open cards of a product (When the card cap is full);
GAOS_PR_ALLOW_FORKS=1 admits forks.
Linked repositories
A product’s linked repositories decide what GAOS acts on. A pull request, a merge, a staging deploy or a review in a repository no product links plans nothing. The same list says which repositories a defect, and so auto-fix, may target (with the auto-fix target list), and where a bearer client of the product may plan pull-request cards. The first repository is the primary: the agents’ context names it (D-127).
The Repositories block, first in the product page’s side panel, lists them to everyone signed in.
An auto-fix admin links one by typing owner/repo (or host/path on the GitLab host) and
unlinks one with a confirmation. Naming a repository when creating a product is also an admin’s act.
Before linking
- The account GAOS posts as must have access to the repository (the GitHub bot account).
- The repository must be inside this instance’s Brain Town scope, or its events never arrive (the scope). Two instances never link one repository: their scopes never overlap.
What a link answers
| The toast says | Why |
|---|---|
Write a repository as owner/repo, or host/path on the GitLab host. | The entry does not parse, or has a . or .. segment. |
loop/… is a placeholder, not a repository. | The invented entry of a product created with no repository. |
Already linked: … / … is linked to <product>. Unlink it there first: only the first product would get its events. | One repository belongs to one product of an instance. |
No review token for GitHub on this instance: GAOS could not review its pull requests. | The instance has no review token for that forge. |
The token GAOS reads with cannot read …. Give its account access first. | The forge answered 401, 403 or 404 (a secondary rate limit also answers 403). |
… has moved (the forge answered a redirect). Link its new name. | A renamed or transferred repository. |
The forge did not answer; try again in a minute. | A timeout or a server error. |
Too many link attempts in the last minute. Try again in a minute. | Ten a minute per instance. |
… now names another GitLab project (id …; this product pinned …). Unlink it, then link it again to accept the new project. | The GitLab path was re-pointed since it was pinned. |
A successful link says Linked <repository>. and how the write token stands: The write
token’s account can push to it., … cannot push to it: auto-fix branches, labels and draft pull
requests will fail there., The write token’s access could not be confirmed. (GitLab does not
show inherited membership there) or No write token for GitHub on this instance: reviews only. It warns,
without refusing, on It is a public repository., It is visible to every account on the GitLab
host., a different owner from the product’s other repositories, and another product that lists it as an
auto-fix target or automation repository. The check proves that GAOS can reach the repository, not that it belongs
to the product.
What an unlink does
- GAOS stops planning cards for the repository’s pull requests, and stops their revision rounds and staging runs. Cards already open finish.
- The repository’s e2e kind is dropped; its GitLab pin is dropped unless an auto-fix list still names it.
- The auto-fix lists are not touched: a repository that is also an auto-fix target stays one. The block flags it.
- Unlinking the primary makes the next repository the primary; the confirmation and the timeline say so.
- Readiness is re-evaluated: an empty list loses the 8 points of “Repository linked”.
Pull requests already open when a repository is linked are not reviewed; when one merges, it gets the review at
merge (comments only, D-116). Every link and unlink is a
RecordUpdated line on the timeline, with the admin’s alias.
Which agents a product has
On the Agents page an admin (an account in GAOS_AUTOFIX_ADMINS) assigns agents to a
product, and one agent can serve several products. The page filters by product. A product whose assignments were
never saved runs every flow above, as before. Once they are saved, a flow runs only when an agent of its role is
assigned: no pr-reviewer, no review card; no qa, and the staging callback answers
422 unassigned. Saving also turns on changes requested for medium and worse findings (below).
Reset returns the product to “not configured”. Assignment switches a role on; it does not
choose which agent runs a card (D-102). The details, the severity board and the runbook are on Agents, severity and review fixes.
The labels
A card carries at most one label per family, and the vocabulary is closed: another word is refused with 422.
An operator changes a label on the board, and the change is a TaskLabeled event naming the account's
alias.
| Label | Meaning |
|---|---|
pr-review:auto | An agent reviews the pull request. The default. |
pr-review:manual | A person reviews it. The scheduler never dispatches the card. |
pr-review:needs-manual | The agent found something high or critical, or its reply could not be posted. A person takes over. |
e2e:automation, e2e:run | The QA-tool jobs. Never dispatched to an agent. |
unit:test | The unit-test card. Not planned for a fix-target repository of a product with unit checks on (D-105). |
severity:none … severity:critical | What the reviewer found. Shown as a coloured chip on the board and as a Severity column in the table, and filterable — Medium or worse lists the cards a person must read. An operator may correct it; that changes the record only. |
source:api, source:bundle | Set by the planner on a card an API client created or a bundle’s test-planner card: the cards agent assignment does not gate. An operator cannot set them; filter on them. See Where a card came from. |
The review
The pull request's title, description and diff are untrusted text and reach the agent as data in the packet, behind the egress pass: a secret in the diff refuses the dispatch, and the card waits for a person. The reviewer's instructions are Blueprint content, never a file from the pull request.
The agent ends its reply with one block, and GAOS, not the agent, posts it. The GitHub token is in the dashboard process and nowhere else.
```gaos-pr-review severity: none | low | medium | high | critical body: the review, at most 6000 characters, each finding with a file:line and a Reason: ```
The body is screened by the egress detectors before it is posted; a body that carries a secret is not posted and
the card goes to a person. It is posted as a comment, never an approval — except on a product
whose assignments are configured, where a medium, high or critical finding asks for changes. GAOS
never dismisses its review, so that body ends with a line asking a maintainer to
dismiss it once the points are addressed; on an agent’s pull request it only comments and
reviews again after each revision. Every body ends with a hidden marker, and the review is
pinned to the commit the reviewer read. When the author is the review account itself, or either login is unknown,
GAOS comments instead. The review posts under the account of GAOS_GITHUB_TOKEN_FILE; a bot account's token
is recommended for a product that turns this on. GitHub's answers map to a
reason on the card: github-token (401, 403, 404: the token may not write there),
github-refused (422), github-rate, github-error.
On a GitLab repository (D-114) the same review is a note, or an unresolved thread for a medium or worse finding. It is advisory: it blocks no merge, and GAOS never approves, resolves or merges. Every text GAOS sends there has its quick actions, mentions and closing keywords neutralised; see GitLab.
The settings
| Setting | Meaning |
|---|---|
GAOS_GITHUB_TOKEN_FILE | A file, mode 600, holding a token with pull_requests: write on the product's repositories. A Brain Town or GAOS token is refused. Unset or empty: no review is posted and no fork check is made. Surrounding whitespace, including a trailing blank line, is trimmed. The installed token is the operator's classic personal token, accepted for now; a fine-grained token limited to pull-request access on the product repositories is the recommended replacement. |
GAOS_STAGING_BASIC_AUTH_FILE | A file, mode 600, one line per product: productId:user:password, password of at least 12 characters. Unset or empty: the callback answers 503. |
GAOS_UNIT_RESULTS_BASIC_AUTH_FILE | Jenkins’ unit-results credential (D-106): the same format, its own lines, a password of at least 32 characters (openssl rand -base64 32). Unset or empty: the unit-results route answers 503. |
GAOS_JENKINS_ORIGIN | Optional: the https origin of the organisation’s Jenkins; only a build link of that origin is shown as a link on the Auto-fix page. |
GAOS_WA_URL | The WhatsApp gateway's address. https by default, no default host. An http address is refused unless GAOS_WA_ALLOW_HTTP=1; any other scheme always is. Unset: no notifications. |
GAOS_WA_ALLOW_HTTP | 1 lets the gateway be http on a private link only (loopback, RFC 1918, CGNAT, link-local), checked on every connection. any also allows a public address, which sends the login in clear text. The status always says the link is unencrypted. Unset: https only. |
GAOS_WA_ALERT_FINDINGS_OVER_HTTP | 1, with GAOS_WA_ALLOW_HTTP=any only, lets the high or critical review alert carry its findings over the public-http gateway, in clear text (D-131). Unset: such a gateway gets the alert’s line alone. |
GAOS_WA_CONFIRM_LINK_OVER_HTTP | 1, with GAOS_WA_ALLOW_HTTP=any only, lets a merge confirmation link travel over the public-http gateway, in clear text: anyone who reads it on the way can make the one development-done write on the developer’s behalf (D-132). Unset: such a gateway sends no link, and the author is told the gateway is not private enough. |
GAOS_PUBLIC_URL | The dashboard’s public address, for the card link in a line (D-109): https with a host and any path, no userinfo, query or fragment; http only for localhost and 127.0.0.1; a trailing / is trimmed. The log says notify: card links on when it is accepted. Unset or refused: lines carry no card link. |
GAOS_WA_PRODUCTS | The products the notifier serves, group and contacts alike, comma separated. Empty: none, and it stays silent. With none linked, the boot group check (which would send the login) is skipped. A v0.48 deployment that sets GAOS_WA_URL must now set this too. |
GAOS_QA_APPROVAL_WAIT_HOURS | The total time one QA job may wait for a person to approve its spec. Default 24, at most 720. |
GAOS_WA_BASIC_AUTH_FILE, GAOS_WA_GROUP_FILE | Files, mode 600: the gateway login user:password and the pinned group id (…@g.us). |
GAOS_PR_MAX_OPEN, GAOS_PR_ALLOW_FORKS | The cap on open PR cards (5) and whether forks open cards (no). The Pull requests page shows each product’s count against the cap; see When the card cap is full. |
In production the files are deploy/stacks/prod.pr-github-token, prod.pr-staging-auth,
prod.pr-wa-auth, prod.pr-wa-group and, for defect auto-fix,
prod.pr-github-write-token and prod.pr-autofix-admins (mounted as /run/secrets/pr-github-write-token and pr-autofix-admins). They are gitignored and must exist before
up; an empty one leaves that part off.
The pull requests GAOS opens itself for an easy defect are a separate flow with its own write token: see Defect auto-fix.
A low finding fixed by an agent
A low finding can become a review fix: the fixer agent edits the files the pull request already changes,
and GAOS opens a draft pull request into the reviewed pull request’s own branch,
on top of the commit the reviewer read. The fix follows the source’s root branch: a branch cut from
staging gets its fix in that branch, and the fix reaches staging when the branch merges.
GAOS posts one line on the reviewed pull request linking the draft.
It happens only when a fixer is assigned to the product, auto-fix is on, the branch matches one of the auto-fix
setting reviewFixHeads (patterns such as feature/*; * alone is refused), the
repository is an auto-fix target, and the day’s reviewFixCap (default 3) is not reached. Before the
agent runs, and again before any branch exists, GAOS refuses the fix when the pull request closed, its head moved, it
comes from a fork, its branch is the default, the auto-fix base, an allowed retarget base or a protected branch, its
file list is incomplete, it changes .github/, or the fixer was unassigned. A refused card is Blocked with
the reason. GAOS never merges a pull request, and closes only its own superseded or duplicate drafts (D-108); a review fix is never retargeted.
When the author is an agent: the revision loop
A pull request an agent opened can close its own review loop (D-112, BR-69). When a review lands on it — from GAOS’s reviewer or from a person with write access — GAOS changes the pull request as the review asks, pushes one commit onto the pull request’s own branch, and reviews again, until nothing is left, a person takes over, or the cap is reached.
pr.reviewed- An agent’s pull request carries the label
ai-assisted, or GAOS opened it on its owngaos/fix-branch. Removing the label stops the loop at the next review. Its branch must matchreviewFixHeads(addgaos/fix-*to revise GAOS’s own pull requests). - Brain Town’s
pr.reviewedis only a signal: GAOS reads the pull request and its reviews from GitHub itself. The reader asks forpr.opened,pr.merged,pr.reviewedby default; the Brain Town consumer must be subscribed topr.reviewedtoo. - What counts. A review newer than the last one answered (on round 1, of the current head), in state changes requested or commented: GAOS’s own at low or medium (read from a hidden marker, honoured only on the review account’s own reviews), or a person’s whose permission is write, maintain or admin — a commented one only with inline comments. A GAOS review at high or critical hands the pull request to a person. One round at a time per pull request.
- The round is a review defect (
revise:r<k>:<repo>#<n>) with the findings, newest first, and the source of the changed files at the head the review read. The fixer edits only those files, or adds a test beside them. - The push is a fast-forward of the pull request’s own branch, on top of the reviewed commit, with the
GAOS-Defect:trailer — never forced, never the default or a protected branch, refused if a secret-using workflow would run on that branch. A person who pushed meanwhile ends the round (review-base-moved). GAOS then posts one comment naming the reviews it answered. - The next review is a new reviewer card (
pr-reviewer-r<k+1>) that starts by itself. It ends the loop with severity none; atreviseCapGAOS posts a notice that a person takes over instead.
On an agent’s pull request the reviewer only comments (no request for changes, nothing to dismiss) and a
low finding opens no draft: the loop answers it. Reviewer cards of a product listed in
GAOS_API_AUTORUN_PRODUCTS with the reviewer role assigned start unattended, once their pull request’s
diff is fetched (BR-56).
| Setting | Meaning |
|---|---|
reviseCap (Auto-fix form) | Revision rounds per pull request. 0 is off (the default), at most 10. Needs a fixer assigned, auto-fix on, a matching reviewFixHeads pattern and the repository among the targets. Rounds count against the day’s reviewFixCap. |
BRAIN_TOWN_CONSUMER_TYPES | Must include pr.reviewed (the default does). |
GAOS_API_AUTORUN_PRODUCTS | Lists the products whose reviewer cards start unattended; the daily cap GAOS_API_AUTORUN_DAILY is shared with API and bundle cards. |
After a restart
| The process died… | What happens at the next start |
|---|---|
| after reading the event, before planning | Brain Town sends it again; the answered review ids make it a no-op. |
| after the review reply, before the post | A boot sweep posts it; the marker on GitHub stops a second post. |
| after the fixer reply, before the push | The stored reply is pushed; no second agent turn. |
| after the push, before it was recorded | The commit is recognised by its trailer and adopted; nothing is pushed twice. |
| before the comment or the next review | A boot job finishes them; the comment’s marker stops a duplicate. |
| while a reviewer card waited for its diff | The diff is fetched again outside the store’s lock before the card starts. |
The staging callback
Jenkins calls GAOS when the staging deploy has finished:
POST /api/v1/products/{id}/staging
Authorization: Basic base64(user:password)
Content-Type: application/json
{"repo":"acme-org/sample-service","branch":"staging","commit":"0123456789abcdef","environment":"staging"}
| Answer | When |
|---|---|
202 {"accepted":true,"taskId":…} | The e2e run card was planned. |
200 {"duplicate":true,…} | The same commit again: nothing new was planned. |
401 with WWW-Authenticate: Basic realm="gaos" | No credential, or a wrong one. |
404 | A credential that belongs to another product, or a product that does not exist. |
422 | The repository is not one of the product's, the commit is not a full 40- or 64-character hex sha, or the environment is not staging. |
429 with Retry-After | Five failed attempts from one source lock it for five minutes. |
409 | The product already holds its cap of open PR cards. |
503 | The callback is not configured. |
This is one of the two machine routes that answer HTTP Basic instead of a bearer token, because a Jenkins credential
step speaks Basic; the other is the unit-results route, with its own
credential file (D-106). The credential is per product and is compared in constant time. Since v0.68.0 the five-failure
lock is keyed on the address the edge sets (X-Real-IP), never on a caller-written X-Forwarded-For hop or the path’s product id.
Unit tests come from the repository’s CI
Since v0.67.0 a product can read a fix-target repository’s own unit-test check instead of planning the agent unit-test card (D-105): the owner adds one GitHub Actions workflow, GitHub runs it on each merge commit, and GAOS reads that workflow’s check. GAOS runs no test. A failing check becomes a unit defect whose triage card waits, Blocked, for an auto-fix admin; a missing, unread or inconclusive check is never a pass. It is off for every product until an auto-fix admin turns it on. Its notices use the kind unit:failure and go to the group. Since v0.68.0 the result can instead come from the organisation’s Jenkins, which posts it with the product’s own credential (D-106, the Jenkins stage). The flow, the outcomes, the workflow template and the Jenkins stage are on Agents, severity and review fixes.
The QA tool does the e2e work
The QA tool already writes, runs, repairs and pushes an automation spec in its own automation repository. GAOS
does not repeat that with a model: a job runner calls POST /api/v1/gaos/automation with
{product, caseCode, mode}, polls GET /api/v1/gaos/jobs/{id} every 15 seconds for up to
40 minutes, and closes the card from the job's own status. A new automation names its case with a line
QA-case: <code> in the pull request description; without one the card waits, blocked, for a person,
and since v0.74.0 the automation planner is asked to decide the case
first, when its role is assigned (D-111). Its decision still waits for a
person to move the card to Ready. A staging run asks for every automated case.
When the job's status is awaiting_approval, a person must approve the spec in the QA tool. That is a
human wait: the card moves to Needs you with a reason carrying qa-job:<id>, and the 40-minute work
clock stops. The wait budget is cumulative per job (GAOS_QA_APPROVAL_WAIT_HOURS, 24 hours by default, at
most 720); past it the card fails with qa-approval-timeout, after the last poll has been read, so an approval
given in the final interval is seen. One notice of kind e2e:approval is sent per job, always to the pinned
group and never to a committer. More than five waits fail the card with qa-job-flapping. After a restart GAOS
re-adopts a running or waiting e2e card from the job id in its reason and starts no second job. Whenever GAOS gives up on a job (the
work timeout, the approval timeout, the flapping cap) or an operator cancels the card, it cancels the job at the QA tool
(POST /api/v1/gaos/jobs/{id}/cancel), which stops the run and rejects the open approval, so nothing can be
approved later and no pull request opens. It is best effort: a failed cancel is logged and never keeps the card open. The
case in flight inside a run-all is not interrupted.
A card id carries 12 characters of the commit; an id already held by a card with another key gets a suffix.
The two routes live in the QA tool
They are a change in the QA tool's repository, not in GAOS. Until they exist the e2e card fails with
qa-routes-missing, which is visible and harmless (OQ-38).
WhatsApp and the contacts
A review finding of medium or worse, a held review, a failed test or e2e run, a defect that needs a
person, and a card a person must review — an operator’s pr-review:manual or
pr-review:needs-manual (D-101) — send one line
and its links. A client that asks the API for a manual review is announced to the group, naming the client. The
findings stay on the card; no code is pasted into a chat. A high or critical review is the exception
(since v0.88.0, D-130): it goes to the product’s default recipient with its
findings, as below.
The Notifications page
Since v0.86.0 (D-128) every line above is also kept in GAOS, whether or
not WhatsApp is on, as one NoticeRaised event. A bell in the back-office bar counts the ones this browser has
not seen, and Notifications lists the newest 200 with a link to the card and the pull request; both update
live. The kept text is one line with no URL, screened for secrets, at most 300 characters. A notice is product
information: every back-office account can read it.
What is never sent, and what stays in GAOS
No news is good news (since v0.83.0, D-123, BR-75). WhatsApp carries only an error, a need-you (a person must act) or an important warning. A routine outcome is quiet: GAOS records it on its card and never sends it. Since v0.87.0 a third class sits between the two (D-129): a GAOS-only notice is kept on the Notifications page and counted by the bell, but never sent to WhatsApp — a ready test plan is the first.
| Notice | Sent? | Why |
|---|---|---|
Automation plan none or automate (automation:routine) | Never | Nothing for a person to do: the decision is on the planner card and the e2e card. |
Automation plan catalog, or the planner could not plan (automation:planned) | Yes | A catalog pull request waits for a person’s review, or something failed. |
Review medium (to the author), high or critical (to the default recipient, D-130), manual review, held review | Yes | A person must read or take over the review. A low finding was never sent. |
e2e, unit or test-plan failure; defect:complex | Yes | An error, or a defect too hard to fix automatically. |
e2e:approval, fix:pr | Yes | A spec or a draft fix waits for a person. |
A test plan is ready (bundle:planned) | GAOS only | Kept on the Notifications page and counted by the bell; never sent to WhatsApp, neither to the task’s QA nor to the group (D-129). |
Template alerts (pr:no-task-code, pr:unknown-task-code) | Yes | A warning the author must fix. |
A merged pull request’s task (pr:merged, since v0.89.0) | To the author only | The outcome of the merge write-back, or a confirmation link the author must answer. It goes only to the author’s own person destination — their contact when it is a person, else their number in the task tracker — never to a group and never to the default recipient; with neither, it stays in the bell. It is not a Contacts choice (D-132). |
A quiet notice is dropped before routing: it reaches no contact, no default recipient and not the
group, whatever a contact’s Notify on says. There is no opt-in: a quiet kind is not on the
Contacts page, and the API refuses a contact that names one. It leaves no ContactNotified event; the
dashboard log has one line, wa: quiet automation:routine not sent.
The line and its links
Since v0.74.0 (D-109, BR-68) a line is one line of text followed by at most three link lines, each on its own line. A link line is a GitHub pull-request URL or GAOS’s card link, nothing else.
| The line is about | Its text ends | Then, one per line |
|---|---|---|
| A card | · card <id> | The pull request’s URL when the card is about one, then the card link |
| A pull request | · <owner>/<repo>#<n> | The pull request’s URL, then the card link when there is a card |
| A unit-test notice | · card <id>, or · PR #<n> with no card | The card link only: a unit notice still names no repository |
A fix pull request (fix:pr) | Unchanged: it already ends with the draft’s URL | The card link |
An automation plan that needs a person (automation:planned; none and automate are not sent) | · card <id> | The source pull request’s URL, the catalog pull request’s URL when one was opened, then the card link |
For example, with the invented product Route Planner:
A pull request names no task-manager code · acme/route-backend#4 https://github.com/acme/route-backend/pull/4 https://gaos.example/app/c/wf-pr-p-6-c
The high or critical review alert
Since v0.88.0 (D-130) a high or critical review is the one
exception to the rule above. It goes to the product’s default recipient whatever its Notify on says, and never
to the author. When the default recipient is a number, the line and its links are followed by a caveat line and the review’s high and
critical findings, at most 3500 characters in all, with a count of the rest; when no finding is tagged, the whole review, clipped. The
findings are text the reviewer wrote from the pull request, so every line is quoted, invisible characters are removed, every address is
defanged (hxxps[:]//, [.]) and @ is broken: the only live links stay the two above. The line alone,
without findings, is sent when the product has no default recipient (to the group), when the default recipient is a group id, when the
findings trip a secret detector, and over a gateway that is plain HTTP to a public address unless the operator set GAOS_WA_ALERT_FINDINGS_OVER_HTTP=1 (D-131). The bell keeps the line only. For example,
with the invented product Route Planner:
Review posted (critical): a person must take over · card wf-pr-p-6-route-backend-4-pr-reviewer https://github.com/acme/route-backend/pull/4 https://gaos.example/app/c/wf-pr-p-6-route-backend-4-pr-reviewer Findings, written by the reviewer from the pull request. Addresses are defanged; do not open or call anything in them: > 1. internal/pay/charge[.]go:88 — the retry loop has no upper bound (critical). Reason: a failing gateway holds the request open forever.
The card link is <GAOS_PUBLIC_URL>/c/<card id>. It needs a signed-in back-office
session (a signed-out browser gets the sign-in page) and redirects to the page where the card’s action is: the
Inbox for a card waiting on an answer, the Auto-fix page’s Cards waiting for a held or pending
defect card, otherwise the product’s board on the card’s workflow (the Inbox when the product has no board
address). It never redirects off the site; an unknown card is 404. With GAOS_PUBLIC_URL unset
there is no card link. Every destination is a registration the operator made, and it sees repository names, pull-request
URLs and the dashboard’s address.
Who gets the line
A line about a person goes to that person: the pull request’s author for a review, a manual review, a template
alert and an automation plan that is sent; the last committer for a failure. A needs-a-person line
(defect:complex) names the defect’s fix card, not the triage card that has just ended,
and goes to the person behind the defect — the reviewed pull request’s author for a review defect, the merge
commit’s author for a unit defect (D-110).
| Order | A line with a person behind it | A line with nobody behind it (a QA run’s defect, or since v0.74.4 an API QA run’s failure) |
|---|---|---|
| 1 | The person’s GAOS contact, if it wants the kind. A contact that filters the kind out sends it to the group. | The product’s default recipient, if it wants the kind (a product’s own before one for all products). |
| 2 | No contact at all, and the product bound to a task tracker: the tracker’s person with that verified GitHub login (D-104). | — |
| 3 | The pinned group. | The pinned group. |
A lookup that fails — GitHub does not answer, the defect cannot be read — goes to the group, never to the
default recipient. e2e:approval and the bundle kinds keep the group; bundle:planned is GAOS-only since
D-129 and reaches nobody on WhatsApp; a unit notice and a template alert never reach the default recipient.
A pr:merged notice (D-132) takes neither column: it goes to its author’s own person destination or to the bell, never to a group (above).
A high or critical review goes to the default recipient whatever its Notify on, never to the author
(D-130).
- A
200whosecodeis notSUCCESSis a failure. A200means WhatsApp accepted the message, never that it was delivered. - The group is the pinned id from its file, checked once at boot against the device's group list. A group that is not there turns notifications off; a group is never found by its name.
- One retry after two seconds, for a transport error only. A
400and a429are never retried. - A failed send never fails the card. The failure is one
ContactNotifiedevent carrying the contact's alias, the kind and the outcome — never the destination and never the text.
The Contacts page
Since v0.74.0 the contacts have their own page, Contacts, in the back office’s top-level menu;
the Integrations view only counts them. The table shows each contact’s account (Default recipient for
*), name, product (or All products), destination (masked, or From the task tracker) and the kinds it
wants. Only an auto-fix admin (GAOS_AUTOFIX_ADMINS) may add, change or remove a contact;
anyone else is answered 403 and sees the table without the form
(BR-68).
| Field | What to put there |
|---|---|
| Product | Which product’s lines this contact receives. All products applies when a product has no contact of its own for this person. |
| Default recipient | Tick it for the contact that receives the lines with no person behind them, such as a defect found by a QA test run. The account field is then ignored and the login stored is *. |
| GitHub account | The account that opens pull requests. An admin can pick from the bound trackers’ people linked to a GitHub account (logins and names only), which also fills the name. |
| Name | Shown on the page and in logs; never sent to a model. |
| Destination | A WhatsApp number in international form (62812…; spaces, dashes, brackets and a leading + are removed, a leading 0 is refused), a group id (…@g.us), or tracker. tracker uses the number the person has in the product’s bound task tracker, read when the line is sent and never stored, logged or shown (BR-63); a person the tracker does not have, or an inactive number, sends the line to the group. It is refused on the default recipient. |
| Notify on | Everything, or a box per kind: review:medium, review:manual, review:needs-manual, pr:no-task-code, pr:unknown-task-code, e2e:failure, e2e:approval, unit:failure, bundle:failure, automation:planned, defect:complex, fix:pr. A review severity includes the worse severities, and the manual kinds match only themselves. Everything means every kind in this list; a quiet or GAOS-only notice is not in it and is never sent (a contact that ticked bundle:planned before v0.87.0 keeps the tick, which no longer sends anything). review:high is retired since v0.88.0 (D-130): a high or critical review goes to the default recipient whatever its opt-in, and an old tick is kept and does nothing. pr:merged is not a box: it always goes to the author alone (D-132). |
The registry is its own Contact record: it is not part of the product, so it is never rendered into a
Blueprint or a workspace, and it is in no event.
Bundles from the PR template
For a product listed in GAOS_PR_TEMPLATE_PRODUCTS (off by default), GAOS reads the body of every
pull request it follows as the team’s PR template (D-100). It
reads the ticked source box, the code after Kode (jika dari task manager), the pull-request links in
Cross-repo checklist and Dependency terhadap PR lain, and the section Apa saja yang perlu
dites oleh QA?. Placeholders and the template’s hints are never values, and notes that look like a
credential are dropped.
- A bundle is the pull requests that share a key. The key is
task:<code>when a pull request names a code, and otherwisepr:<owner/repo#n>of the pull request that links the others. A linked pull request with no code of its own joins its linker’s bundle, and a pull request opened later joins through the stored links. A link to a repository the product does not follow, or a stranger’s pull request, is listed as a reference only and never holds the bundle back. - When it is complete. Every member is merged or closed and at least one is merged. Ten
minutes after the newest member joined, GAOS plans one Test plan card (role
test-planner). The agent reads the members’ titles, changed file names, the authors’ notes and the product’s epics, all fenced as data, and proposes the cases QA should create or link. GAOS checks each one against the QA tool’s values and its own catalog, and sends them to the QA tool’sPOST /api/v1/gaos/case-proposals. That route creates draft cases and links existing ones to the pull-request URLs. A planned bundle is final, and at most two test plans are open per product. When no epic fits, the test planner may hand the bundle to the automation planner instead, which may propose a new epic as a draft pull request in the automation repository (BR-67); nothing else is written there. - A missing code. A pull request that uses the template with no code and no other source
ticked (after ten minutes), or that uses no template and is linked by no other pull request (after an hour),
gets one GitHub comment and one WhatsApp line, once: “A pull request names no task-manager code” or
“A pull request does not use the PR template”, both of kind
pr:no-task-code. The Pull requests page shows the chip no task code. Since v0.74.0 the code is read when it is bold, in brackets, followed by its link, or given only as a…/tasks/<code>link (D-110). - An unknown code (D-104). For a product bound to
a task tracker, a code the tracker does not know, a deleted or archived task, or another
product’s task gets one
unknown-task-codecomment and line — one text for every case — even when the row was alerted for a missing code before. The bundle is unchanged. When the test plan ends DONE, abundle:plannednotice appears on GAOS’s Notifications page (not on WhatsApp, D-129) and the tracker’s task gets one note.
When the card cap is full
A product holds at most GAOS_PR_MAX_OPEN open pull-request cards (D-120,
BR-74). The count is cards, not pull requests: an opened pull
request plans two (review and e2e), so a cap of 20 is about ten pull requests in flight. It counts review, e2e,
unit-test, re-review and staging-run cards that are not done, failed or canceled — a blocked card counts.
Defect, API, bundle and automation-planner cards do not.
- At the cap a newly opened pull request plans no card. It is not dropped: its row on the Pull requests page shows the chip waiting for room.
- In order. A pull request that opens while others wait joins the queue behind them, even if a slot is free; GAOS checks every 15 seconds and plans the oldest waiting one, one per product at a time.
- Re-checked first. Before planning, GAOS reads the pull request again; one that closed, merged, became a draft or comes from a stranger stops waiting.
- A merge is never refused. Its unit-test card or review at merge is planned whatever the count. A merge in an automation repository (the QA specs) plans no unit-test card at all (D-121).
- A merge frees its slots. Pending review and e2e cards are canceled as before, and now so is a blocked e2e card — unless a catalog pull request is in review, a planned case waits to be moved to Ready, or an automation planner is still at work.
The page shows, per product, open / max, the room left or the waiting count with the oldest’s age.
A growing waiting count means cards are stuck: open the board’s blocked cards, or raise the cap.
When something is down
| Failure | What happens |
|---|---|
| Brain Town is down | No events, no cards; nothing else is affected. |
| The GitHub token may not write | The review card fails with github-token; it is not closed silently. |
| The QA tool is down or lacks the routes | The e2e card fails with qa-job-timeout or qa-routes-missing. |
| WhatsApp is down | The card is unchanged; one failed ContactNotified is recorded. |
| Jenkins never calls back | No staging card; the Integrations view shows the last callback per product. |
| GAOS restarts | The reader resumes from its cursor and the card keys make the replay a no-op; the cursor passes an event only after its cards are committed. A review that was never posted, a revision that was never pushed or finished, and a reviewer card without its diff are resumed (After a restart). |
| GitHub rate-limits a review event | The event is skipped (revise: rate-limited) rather than holding the reader; the next review of that pull request reads the same state again. |