Product
How GAOS and the QA tools work together
GAOS plans and tracks the work; the QA tools hold the test catalog and the scripts. They exchange one thing in both directions: the test cases of a product. This page explains who owns what, what moves on its own, what the two sync buttons do, how to set it up and what to look at when it does not work. The exact request and response shapes are in The QA sync API.
The idea in one picture
A product such as the sample product exists in both systems. In GAOS it is a product with a board: one card per test epic, each card showing how many of its test cases are automated. In the QA tools it is a product whose test cases are read from its automation repository, and whose scripts run in Playwright. Neither system is the whole truth, so each owns the part it is good at and tells the other.
Two flows connect the two boxes on the right. QA tools to GAOS runs by itself after every knowledge sync and carries new cases and which of them have a script. GAOS to QA tools is started by an operator with two buttons on the product's QA tab and carries GAOS's decisions out and the QA tools' script facts back in.
Who owns what
Every test case has two halves, and each half has exactly one writer. That is what makes it safe to sync in both directions at once: the two flows never write the same field.
| Half | Fields | Owner |
|---|---|---|
| Planning | case id, epic, module, features, user story, scenario, polarity (+ or −), level, priority, decision (planned, blocked, manual-only, wont) and its reason | GAOS. The QA tools may create a case, never change one that exists. |
| Automation | is there a script (implemented), its path (spec), and, when they exist, the last result, its time and a run reference | The QA tools. Inside this half the newest run wins, and an older one is refused as stale. |
A case is shown as automated when its decision is planned and it has a script. If a script exists for a case GAOS has parked (blocked, manual-only or wont), the case is listed as needs a decision and GAOS never changes the decision by itself. The rules behind this are BR-51 to BR-54.
QA tools to GAOS: automatic
This direction needs no one to press anything.
- The product's automation repository changes (a case is added or a script lands).
- The QA tools' knowledge sync reads the repository, on its schedule or when someone starts it, and updates the product's test cases.
- If the product is flagged integrated with GAOS and the sync succeeded, the QA tools start a push to GAOS in the background. It never blocks or fails the knowledge sync.
- The push sends the cases in batches of 200: first the cases themselves (create-only), then the script facts of every case it sent, and, for every case that has one, its latest run result (pass, fail or skipped, when it ran and a run reference).
Turning the flag on also starts a full push; so does uploading a test report that stored results (see Getting test results in); and the product's page has a Sync to GAOS now button for a push on demand. What the push does and does not send:
- Sent: cases whose status is planned or automated and whose code looks like
TC-AUTH-001. - Skipped, and counted: blocked, manual-only and wont cases (the QA side may not park or
retire a case in GAOS) and local drafts, whose codes start with
L-. - Informational: a case that already exists in GAOS with different planning fields comes
back as
exists-differs. GAOS keeps its own values. The result shows the count; it is not a failure. - Retried: GAOS allows one write at a time per token, so a busy answer
(
429) is waited out and retried, up to three times.
The outcome (ok, partial or failed, with a note such as
sent 1146 cases, unchanged 1067, exists-differs 79, skipped 554) is stored on the product and shown
in its GAOS card in the QA tools.
What happens when someone adds a test case
This is the path of a brand-new case, end to end, with nobody touching GAOS:
- A test author adds a row to an epic file in the automation repository and merges it.
- The next knowledge sync in the QA tools picks the row up as a new test case.
- The push creates the case in GAOS as a planned case and bumps its revision. If the case already
has a script,
implementedand the spec path travel with it; otherwise the script facts follow when the script is written and the next sync runs. - On the sample product's board the epic's card now counts one more case. When the script exists, the card's automated number rises. Nothing is written to the card's task: the numbers are read from the catalog every time the board is drawn.
If the case belongs to an epic GAOS has not seen, GAOS creates the epic too, and adds one new card to the board. That card is always born Blocked, with the reason added by the QA catalog; plan its design and review before unblocking. The reason is the design gate (BR-46): work the QA side adds must not start without a person releasing it. Only an operator moving the card releases it. If the product has no workflow yet, or the floor is being replayed at that moment, the epic is recorded without a card and the QA tab lists it.
What never happens
Data from the QA tools never moves an existing card, never changes a decision, never changes the BRD or a policy, and never reaches another product. The QA token is scoped to the products the GAOS operator listed for it. At most 5 new epics per request, 100 epics and 5,000 cases per product.
Getting test results in
Pass and fail come from the automation repository's own Playwright runs, not from the QA tools' exploratory
runs. The QA tools ingest the JSON report of a run (results.json); a test counts
for a catalog case when its title starts with the case id, for example TC-CHMGMT-010 .... There are
two doors:
- From CI, one
curlstep after the tests. The product id here is the QA tools' id for the product (the sample product is3there), not GAOS'sp-6:curl -sS -X POST -H @header-file --data-binary @results.json \ "https://qa.example.org/api/v1/results/playwright?product=<QA_PRODUCT_ID>&run_ref=<CI_RUN_ID>" # header-file holds one line: Authorization: Bearer <RESULTS_INGEST_TOKEN> # keep the token in the CI system's secret store - By hand, on the product's page in the QA tools: the Test results card takes the same file (Admin, DevOps, Developer, QA and QC roles).
The QA tools keep the latest run per case, judged by the report's start time; an older report never overwrites a newer result. The answer to an upload says how many cases it stored and how many test codes matched no case. A code that is not an active case of the product is ignored.
The results then reach GAOS on their own: a stored upload starts a push, and a few seconds later the product's QA tab shows the new pass and fail counts. The board's epic cards show a failing marker when a case's last run failed, and the QA tab lists the epic as regressed. The Pull button reads the same results if you want them immediately. GAOS keeps one run per case: the latest it has been told about.
GAOS to QA tools: the two buttons
On a product's QA tab in GAOS there are two buttons. They are an operator's tool, for the times when you want GAOS and the QA tools to compare notes now rather than after the next knowledge sync.
| Button | What GAOS does | What it changes |
|---|---|---|
| Pull from QA tools | Asks the QA tools for the script facts of the product's cases, page by page (up to 200 cases a page, up to 20 pages a click), and applies them like any inbound result. | Only the automation half in GAOS: implemented, spec and the run record (result, runAt, runRef) of every case that has one. An older run than the one GAOS holds is refused as stale. |
| Push to QA tools | Sends GAOS's planning data (decision, reason, scenario, module, features and the rest) for every case that changed since the last push, in batches of 200. | Only the QA tools' gaos_decisions table. It never writes the synced test cases, which stay read-only there. A newer revision wins; an older push leaves the stored row alone. |
After a click the tab shows a last-sync line for each button: ok or failed, how long ago, how many items, and a note. A push also lists up to 20 case ids the QA tools refused.
Some limits you will meet:
- One sync at a time, and 30 seconds between starts, across the whole of GAOS. A second click answers the last sync started moments ago; wait 16s (HTTP 409).
- A click lasts at most 60 seconds. The first push of a whole catalog (1,700 cases) takes two clicks, because each batch of 200 takes the QA tools about 15 seconds. GAOS remembers where it stopped, so the second click carries on; later pushes only send what changed.
- The buttons are disabled, with the reason printed beside them, when the QA tools are not
connected (
GAOS_QA_URLunset), when the product is not in the list of products allowed to exchange data (GAOS_API_QA_PRODUCTS) or while the floor is in replay.
What you see on the board
The sample product's board has one card per test epic ("Automate: ..."), a design card, a review card and a release card. Each epic card carries a small badge: automated / cases with a bar, and a failing marker if the last run of one of its cases failed. The badge is a live view of the catalog; it is not stored on the task. Cards start in Blocked because GAOS's design gate holds all implementation work until a design has been written and reviewed; running those two cards is the first thing to do on a new product. The QA tab next to Board shows the whole catalog: totals, the per-epic table, epics with a regression, the cases that need a decision, and the two sync lines.
Setting it up
Both systems run on the same machine (rnd-v3-vpn) and talk over the tunnel, so no token has to cross the
shared public edge. Three tokens exist on the GAOS side, one per purpose, and the three must differ (if two
are equal GAOS disables its whole API). A token is the text gaos_ followed by 32 or more letters
and digits.
| Purpose | Held in GAOS (a file, mode 600) | Held in the QA tools (env) |
|---|---|---|
| The QA tools call GAOS | deploy/stacks/prod.api-qa (GAOS_API_QA_TOKEN_FILE) | GAOS_API_TOKEN |
| GAOS calls the QA tools | deploy/stacks/prod.api-qa-out (GAOS_QA_TOKEN_FILE) | GAOS_INBOUND_TOKEN |
| Seeding and catalog import (an operator, not the QA tools) | deploy/stacks/prod.api-admin (GAOS_API_ADMIN_TOKEN_FILE) | not used |
| CI uploads a test report to the QA tools | not used (GAOS never sees it) | RESULTS_INGEST_TOKEN; also the CI system's secret. It must differ from the GAOS tokens. |
| Setting | Where | Example value |
|---|---|---|
GAOS_API_URL | QA tools | http://<tunnel-ip>:18301/api/v1 (the tunnel; the public one is https://gaos.example.org/api/v1) |
GAOS_QA_URL | GAOS, at deploy time | http://<tunnel-ip>:8140 (the public one is https://qa.example.org) |
GAOS_API_QA_PRODUCTS | GAOS, at deploy time | p-6: GAOS product ids, comma separated. Unset means the QA token reaches nothing. |
| Integrated flag and GAOS product id | QA tools, /products, the product's GAOS card (Admin or DevOps) | on, and p-6 |
The step-by-step tutorial, with every token and variable on both sides, is in Webhooks and external clients. The order that works, for a new product:
- Seed the product in GAOS (
deploy/seed/seed.sh --dir <seed dir> --base <api url>;deploy/seed/README.mddocuments the files). It prints the product id. - Put that id in
GAOS_API_QA_PRODUCTSand redeploy GAOS. The deploy command is the one in the environments page, with the extra variables. - Create the token files before the deploy (the deploy refuses a production tag without them), and put the matching values in the QA tools' env without printing them.
- Deploy the QA tools (run their migration first), then switch the product's integration on.
To revoke a token, empty its file (GAOS) or remove it from the env (QA tools) and restart that side. A
token that is unset stops working at once: a caller with it gets 401 from GAOS (and
503 when no GAOS token is set at all), and the QA tools answer 503 when their
inbound token is unset.
Checking that it works
- In GAOS: the product's QA tab. The totals should match the QA tools' product. The two last-sync lines say when each button last ran and how it went.
- In the QA tools: the product's GAOS card shows the last push, its status and note. A healthy push reads rejected 0.
- From a shell on the VM (the token is read from its file and never printed):
GET /api/v1/products/p-6/qa/summarywith the QA token returns the same totals as the tab.
When it does not work
| You see | It means | What to do |
|---|---|---|
| A GAOS button is disabled, "the QA tools are not connected" | GAOS_QA_URL or the outbound token file is empty or invalid. | Set it and redeploy GAOS. The boot log says qa sync: outbound to ... or why it is off. |
| "this product is not listed in GAOS_API_QA_PRODUCTS" | The product id is missing from that variable. | Add the id and redeploy. |
| 409 "the last sync started moments ago" or "a sync is already running" | The 30 second cooldown, or a sync in progress. | Wait; nothing is wrong. |
| Push or pull ends "context deadline exceeded" | The 60 second budget ran out; the cursor was kept. | Press again. A first push of a full catalog needs two clicks. |
| QA tools: "answered 200 with an unreadable body" | The two sides disagree on a response shape (a contract bug). | Compare the live response with the API page; GAOS answers cardsDeferred as a string. |
| 401 or 403 from either side | A wrong, missing or wrongly scoped token. | Check which of the three tokens the caller presents. A QA token cannot call admin routes. |
| 404 on a product | The product id is not in the token's scope, or the product is not flagged on the QA side. | Check GAOS_API_QA_PRODUCTS and the product's GAOS card. |
| 503 from GAOS's API | No token is configured, or two tokens are equal. | Read the GAOS boot line api: disabled (...). |
exists-differs on many cases | GAOS already holds that case with different planning fields (often the module or features). GAOS keeps its values. | Informational. The QA tools' GAOS decisions view shows which fields differ. To change a case's planning fields, import through the admin catalog route or re-seed. |
| A report was uploaded but GAOS shows no new results | The upload stored nothing (no test title starts with a case id, or the report is older than what is stored), the product is not flagged, or the push failed. | Read the upload's answer (stored, unmatched, stale), then the product's GAOS card in the QA tools; press Sync to GAOS now, or press Pull in GAOS. Rows younger than a minute are held back from a pull. |
| A push says "results older than GAOS's" | GAOS already holds a newer run for those cases. Not an error. | Nothing to do; the newest run wins. |
| A new epic has no card | The product has no workflow with a review task yet, or the floor was in replay. | The epic is on the QA tab's list of epics without a card; plan the workflow first. |
Security in short
- Tokens live in files (GAOS) or the server env (QA tools), mode 600, never in the repository or in a log. A request is checked in constant time and an unset token closes the surface.
- Everything a caller sends is size-limited (200 items, 1 MiB) and strictly decoded: an unknown field is a refusal. Text from either side is screened for secrets and stripped of markup before it is stored.
- Each side ignores the half it does not own, and the QA token cannot reach a product it was not given.
- GAOS refuses redirects when it calls the QA tools and bounds the response; the destination is set by the operator in configuration, never taken from a request.
- The back office signs in for real (D-079) but has no roles (OQ-37), so the two buttons can be pressed by any signed-in account; the cooldown and the product scope bound the damage.
What is not built yet
- Run history. Both sides keep only the latest run per case. There is no trend, no list of earlier runs and no flaky-test view.
- Deleting a case. Nothing deletes a case in GAOS; one is retired with decision
wont. A case removed from the automation repository now reaches GAOS as no script (the
QA tools send
implemented: falsefor it) and stays in the catalog. - Settling the
exists-differscases. The QA tools' product page has a GAOS decisions view that lists what GAOS sent and which fields differ from what the QA tools would send, so the differences can be found; changing a case's planning fields is still done on the GAOS side (the admin catalog route or a re-seed).
The tombstones and the decisions view are merged in the QA tools and become visible with their next deploy.
The decisions behind all of this are D-072 to
D-076; the design is docs/designs/qa-catalog-sync.md, and the QA
tools' own side is docs/designs/GAOS_INTEGRATION.md and docs/designs/GAOS_INBOUND.md
in the qa-automation-tools repository.