@oxy-hq/cli 0.13.0 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +439 -16
- package/dist/main.mjs +17040 -8399
- package/dist/main.mjs.map +1 -1
- package/dist/{mcp-vlYd5Bms.mjs → mcp-bxf7JBJu.mjs} +2 -2
- package/dist/mcp-bxf7JBJu.mjs.map +1 -0
- package/json-schemas/agent-test.json +69 -1
- package/json-schemas/agentic.json +6 -3
- package/json-schemas/flow-test.json +11 -2
- package/package.json +8 -4
- package/skills/oxy-agents/SKILL.md +72 -31
- package/skills/oxy-agents/references/quick-reference.md +18 -14
- package/skills/oxy-agents/templates/agentic-template.yml +32 -89
- package/skills/oxy-airway-pipelines/SKILL.md +12 -4
- package/skills/oxy-automations/SKILL.md +3 -3
- package/skills/oxy-custom-apps/SKILL.md +122 -2
- package/skills/oxy-evals/SKILL.md +54 -12
- package/skills/oxy-evals/references/diagnosis.md +11 -16
- package/skills/oxy-evals/references/results-json.md +7 -3
- package/skills/oxy-evals/references/writing-expected.md +2 -2
- package/skills/oxy-semantic-modeling/SKILL.md +2 -2
- package/dist/mcp-vlYd5Bms.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ manages customer workspace repos.
|
|
|
10
10
|
- **Customer workspaces** — `list`, `new`, `import`, `doctor`, `update`, `adopt`, `launch`
|
|
11
11
|
- **Your workspace's repository** — `workspace clone`
|
|
12
12
|
- **Custom apps** — `publish`, `init-ci`, `proxy`, `apps`
|
|
13
|
-
- **Checks** — `checks run`
|
|
13
|
+
- **Checks** — `checks run`, `checks show`
|
|
14
14
|
- **Sandboxes** — `env`, `fn dev`, `fn call`, `invocations`, `logs`
|
|
15
15
|
- **Workspace previews** — `preview`
|
|
16
16
|
- **The CI compile gate** — `compile`
|
|
@@ -698,6 +698,10 @@ oxyc oltp deprovision --org <slug|uuid|url> [--writer app:<slug>|pipeline:<sourc
|
|
|
698
698
|
oxyc oltp audit --org <slug|uuid|url> [--json]
|
|
699
699
|
oxyc oltp rotate --org <slug|uuid|url> --role app:<slug>|pipeline:<source> --yes [--json]
|
|
700
700
|
oxyc oltp apply --org <slug|uuid|url> [--workspace <id>] --yes [--json]
|
|
701
|
+
oxyc oltp changes resync <org-slug>/<app-slug> [--table <name>] [--app-env production] --yes [--json]
|
|
702
|
+
oxyc oltp changes interval <org-slug>/<app-slug> --seconds <n> | --clear [--json]
|
|
703
|
+
oxyc oltp changes sync <org-slug>/<app-slug> [--json]
|
|
704
|
+
oxyc oltp changes status <org-slug>/<app-slug> [--backlog] [--json]
|
|
701
705
|
```
|
|
702
706
|
|
|
703
707
|
`status` lists every org, with a database or without; with `--org` it shows
|
|
@@ -751,6 +755,29 @@ naming what landed): a re-run resumes at the first file the database has not
|
|
|
751
755
|
run. It is audited on the server (a row before the DDL and
|
|
752
756
|
one after), and replaced the Rust `oxy oltp apply`.
|
|
753
757
|
|
|
758
|
+
`changes resync` re-baselines an app's captured tables in the OLTP change stream
|
|
759
|
+
(`--table` for one, else every captured table) and removes the holds that
|
|
760
|
+
resolves. The unshipped log rows of a held table are discarded, since its new
|
|
761
|
+
baseline replaces them, and each table with its row count is printed; a writer
|
|
762
|
+
held past the relay's ceiling is baselined whole, whichever table is named. It
|
|
763
|
+
exits `8` without `--yes` and sends nothing. Only production has a change
|
|
764
|
+
stream (`--app-env production`, the default); a `409` means the org's
|
|
765
|
+
`oltp_changes` flag is off or a generation bump is re-stamping.
|
|
766
|
+
|
|
767
|
+
`changes interval` paces the app's org's change-stream passes to at least
|
|
768
|
+
`--seconds` apart (0 to 86400), so a busy store ships fewer, larger commits;
|
|
769
|
+
`--clear` goes back to the relay's own cadence (a pass about every 10 seconds
|
|
770
|
+
while the store is written). The interval is the org's, for every app it has.
|
|
771
|
+
A write after the store sat idle past the interval still ships at the next
|
|
772
|
+
sweep. One of `--seconds` and `--clear` is required (exit `2`, nothing sent).
|
|
773
|
+
It can be set before the org's `oltp_changes` flag is on. `changes sync`
|
|
774
|
+
queues a pass now, whatever the interval; a `409` means the flag is off.
|
|
775
|
+
`changes status` prints the org's relay mark (its interval, last change, last
|
|
776
|
+
drain, how long work has waited, failures) and the app's holds; `--backlog`
|
|
777
|
+
also counts the rows waiting in the org's store by table, which opens the store
|
|
778
|
+
and so wakes a suspended compute. All three are staff only; `interval` and
|
|
779
|
+
`sync` are audited on the server.
|
|
780
|
+
|
|
754
781
|
`provision` prints what it will create and asks first, because it calls a paid
|
|
755
782
|
provider; without a terminal it refuses unless `--yes`. It is idempotent — an
|
|
756
783
|
existing database or writer is reconciled, not duplicated. `app:<slug>` is
|
|
@@ -880,8 +907,7 @@ admin; staff act inside a tenant through `oxyc assume`.
|
|
|
880
907
|
|
|
881
908
|
Ask a workspace's agentic agent a question on a deployment, follow and steer
|
|
882
909
|
its run, and read the workspace's runs. These replaced the Rust `oxy agentic`
|
|
883
|
-
(a one-release stub
|
|
884
|
-
`2`), which ran a `.agentic.yml` from a local checkout with the database URL
|
|
910
|
+
(a one-release stub from 2026-11-24, deleted 2026-11-26), which ran a `.agentic.yml` from a local checkout with the database URL
|
|
885
911
|
and the LLM keys in your shell.
|
|
886
912
|
|
|
887
913
|
```bash
|
|
@@ -931,8 +957,7 @@ faster than every 2 s.
|
|
|
931
957
|
## Running SQL and automations
|
|
932
958
|
|
|
933
959
|
Run a `.sql` file or an automation on a deployment. It replaced the Rust
|
|
934
|
-
`oxy run` (2026-11-24
|
|
935
|
-
release.
|
|
960
|
+
`oxy run` (2026-11-24; its one-release stub was deleted 2026-11-26).
|
|
936
961
|
|
|
937
962
|
```bash
|
|
938
963
|
oxyc run <file.sql> [--database <name>] [-v KEY=VALUE ...] [--json] --workspace <id>
|
|
@@ -969,7 +994,7 @@ Write a workspace's `.databases/` schema files (each dataset's DDL and one
|
|
|
969
994
|
`<table>.schema.yml` per table) into your checkout. The server introspects the
|
|
970
995
|
warehouses the **deployed** `config.yml` names, with the workspace's secrets,
|
|
971
996
|
and renders the files; `oxyc` writes them. It replaced the Rust `oxy sync`
|
|
972
|
-
(2026-11-21
|
|
997
|
+
(2026-11-21; its one-release stub was deleted 2026-11-26).
|
|
973
998
|
|
|
974
999
|
```bash
|
|
975
1000
|
oxyc sync [database] --workspace <id> [-d <dataset>]... [--tables <schema.table>]... [-o] [--dry-run] [--dir <checkout>] [--json]
|
|
@@ -994,7 +1019,8 @@ sync outlasted the server's limit (narrow it with `-d`).
|
|
|
994
1019
|
## Looker integrations
|
|
995
1020
|
|
|
996
1021
|
Check a Looker integration's credentials on a deployment. This replaced the
|
|
997
|
-
Rust `oxy looker test` (a one-release stub
|
|
1022
|
+
Rust `oxy looker test` (a one-release stub from 2026-11-21, deleted
|
|
1023
|
+
2026-11-26), which read
|
|
998
1024
|
`config.yml` from a checkout and the credentials from your shell.
|
|
999
1025
|
|
|
1000
1026
|
```bash
|
|
@@ -1252,7 +1278,7 @@ oxyc bootstrap verify poke-house --env dev --json \
|
|
|
1252
1278
|
|
|
1253
1279
|
```bash
|
|
1254
1280
|
oxyc publish [--env <e>] [--dir <path>] [--promote] [--build-only | --prebuilt] [--json] [--allow-function-lint] [--app-env <dev-handle>]
|
|
1255
|
-
oxyc promote <app> [--from staging|dev-<handle>] [--build <id>] [--remove-schedule <fn>]… [--dry-run] [--yes] [--json]
|
|
1281
|
+
oxyc promote <app> [--from staging|dev-<handle>] [--build <id>] [--remove-schedule <fn>]… [--override-checks "<reason>"] [--no-wait] [--dry-run] [--yes] [--json]
|
|
1256
1282
|
oxyc rollback <app> --app-env staging|production [--to <build>] [--remove-schedule <fn>]… [--dry-run] [--yes] [--json]
|
|
1257
1283
|
oxyc init-ci [--app <org>/<app>] [--environment <name>] [--promote] [--force] [--no-register] [--setup-action] [--browser | --no-browser [--approver <email>] [--no-wait]]
|
|
1258
1284
|
oxyc proxy [--app <org>/<app> --app-env staging|dev-<handle>] [--port <n>] [--allow-writes] [--allow-events] [--yes]
|
|
@@ -1292,7 +1318,10 @@ publish to staging and have someone else promote.
|
|
|
1292
1318
|
- **Kit versions**: an app whose `@oxy-hq/sdk` or `@oxy-hq/vite-plugin` is more
|
|
1293
1319
|
than one minor behind the versions this `oxyc` was built beside gets one
|
|
1294
1320
|
warning per package before the build, naming the `pnpm add`. Read from the
|
|
1295
|
-
app's `package.json` (the installed copy when there is one); no network.
|
|
1321
|
+
app's `package.json` (the installed copy when there is one); no network. The
|
|
1322
|
+
same read is sent as the upload's `sdk_version` field (the installed
|
|
1323
|
+
version, else the declared range's floor; left out when the app does not
|
|
1324
|
+
depend on the SDK), which the build's design-system check reads.
|
|
1296
1325
|
- **`--dir`** publishes a pre-built directory instead of building; functions are
|
|
1297
1326
|
still bundled into it. **`--build-only`** stops after building and bundling —
|
|
1298
1327
|
no credential, no network unless the org must come from `--project`.
|
|
@@ -1428,6 +1457,67 @@ rollback to a build production served before is exempt). `--build` names an olde
|
|
|
1428
1457
|
source served (publish id or UUID). Promoting the build already served is
|
|
1429
1458
|
`409 already_serving`.
|
|
1430
1459
|
|
|
1460
|
+
**Where the app's org holds promotes on a build's checks**, a promote to
|
|
1461
|
+
production does three more things. (An org without that gate sees none of
|
|
1462
|
+
this: the plan carries no `checks`, and nothing below prints or waits.)
|
|
1463
|
+
|
|
1464
|
+
1. **The plan lists the build's checks**, in the dry run and before it asks:
|
|
1465
|
+
one line per check of the build's newest staging attempt, the required ones
|
|
1466
|
+
marked, then how many screens differ from production and whether a person
|
|
1467
|
+
has seen them, and the summary a model wrote, marked as a model's.
|
|
1468
|
+
|
|
1469
|
+
```text
|
|
1470
|
+
checks (attempt 2): failed
|
|
1471
|
+
✓ Builds and validates bundle valid
|
|
1472
|
+
✓ required Its checks pass 3 of 3 passed
|
|
1473
|
+
✓ required It loads, desk and phone ready in 0.9s desk, 1.1s phone
|
|
1474
|
+
✗ required Follows the design system assets/index.css:68 restates --card
|
|
1475
|
+
✓ required Every screen opens 14 screens, 0 errors
|
|
1476
|
+
✓ What changed 4 of 28 screens differ
|
|
1477
|
+
4 of 28 screens differ · not seen by a person yet
|
|
1478
|
+
```
|
|
1479
|
+
|
|
1480
|
+
2. **Three blockers come from the checks**, each followed by what to do next
|
|
1481
|
+
(and refused before any act, exit `6`, like every blocker):
|
|
1482
|
+
- `checks_not_passed`: a required check failed, could not run, or the build
|
|
1483
|
+
was never checked. Fix what it found and publish again (`oxyc checks show
|
|
1484
|
+
<app> --build <id>` prints each finding), or run the checks again from the
|
|
1485
|
+
app's Builds page.
|
|
1486
|
+
- `checks_running`: a required check has no verdict yet. `oxyc checks show
|
|
1487
|
+
<app> --build <id> --wait`, then promote again.
|
|
1488
|
+
- `changes_not_seen`: the app needs a person to look at the changed screens
|
|
1489
|
+
first. Open the app's Builds page, look, mark them seen, promote again.
|
|
1490
|
+
|
|
1491
|
+
**`--override-checks "<reason>"`** promotes past those three and nothing
|
|
1492
|
+
else. It is for an owner or admin of the app's org (or Oxy staff acting in
|
|
1493
|
+
an assume session); a publish token, a CI token and a service account are
|
|
1494
|
+
answered `403 override_not_allowed`. The reason is kept in the audit log, so
|
|
1495
|
+
one under 10 characters is refused before any request (exit `2`), and the
|
|
1496
|
+
plan then shows `overridden` with it. The checks themselves stay as they
|
|
1497
|
+
are. The override is offered in the "next" line only when the plan says the
|
|
1498
|
+
caller may use it. A rollback is exempt from all three and takes no such
|
|
1499
|
+
flag.
|
|
1500
|
+
|
|
1501
|
+
3. **After the move it waits for production's own check.** The platform checks
|
|
1502
|
+
production once it serves the build ("Production opens after promote": every
|
|
1503
|
+
screen opened, against what production showed before). The command reads
|
|
1504
|
+
that attempt (`GET …/builds/{build}/checks?environment=production`) every
|
|
1505
|
+
5 s for up to 5 minutes, prints it as `checks show` would, and **exits `9`
|
|
1506
|
+
when it failed**, naming `oxyc rollback <app> --app-env production`. The
|
|
1507
|
+
move has happened either way: `9` says production serves the build and its
|
|
1508
|
+
check failed. `--no-wait` skips the wait. If no production check was
|
|
1509
|
+
started within 30 s (the app has it turned off), or none had a verdict in
|
|
1510
|
+
time, a warning says which and the exit is `0`. With `--json` the plan is
|
|
1511
|
+
printed once, after the wait, with `production_check: { state, attempt }`
|
|
1512
|
+
added (`state` is `passed`, `failed`, `running`, `none` or `unreadable`).
|
|
1513
|
+
|
|
1514
|
+
**Exit codes of `promote`:** `0` the move happened (and production's check
|
|
1515
|
+
passed, was not waited for, or had no verdict in time), or `--dry-run`
|
|
1516
|
+
printed the plan; `9` the move happened and production's check failed; `6` a
|
|
1517
|
+
blocker, or a request the server refused (`target_moved`, `already_serving`);
|
|
1518
|
+
`8` not confirmed; `4` not authenticated, or an override this caller may not
|
|
1519
|
+
use; `2` a bad flag, including a reason under 10 characters.
|
|
1520
|
+
|
|
1431
1521
|
**`rollback`** moves `--app-env` (staging or production; never a sandbox) back
|
|
1432
1522
|
to the build it served before its current one — twice swaps back — or `--to`
|
|
1433
1523
|
one it served earlier. Same plan, prompt and `--yes`. A rollback never reverses
|
|
@@ -1723,6 +1813,340 @@ missing one); `2` a bad
|
|
|
1723
1813
|
the deployment answered the OIDC exchange without an `app_id`, meaning it
|
|
1724
1814
|
predates trusted checks.
|
|
1725
1815
|
|
|
1816
|
+
### A build's promote checks: `checks run --build`
|
|
1817
|
+
|
|
1818
|
+
```bash
|
|
1819
|
+
oxyc checks run <app-id> --build <build> --attempt <n> --report --env dev
|
|
1820
|
+
oxyc checks run acme/store --build 9087d7b --report --json # a person, by hand: the newest attempt
|
|
1821
|
+
oxyc checks run <app-id> --build <build> --attempt <n> --environment production --report # after a promote
|
|
1822
|
+
```
|
|
1823
|
+
|
|
1824
|
+
Every build that reaches an app's staging gets its checks (the ones `checks
|
|
1825
|
+
show` prints, below): four of them everywhere, and two more where the app's
|
|
1826
|
+
org holds promotes on its checks. The platform keeps the rows and the console;
|
|
1827
|
+
a runner drives them with this one command. The platform starts that runner
|
|
1828
|
+
itself, a GitHub Actions run per attempt
|
|
1829
|
+
(`.github/workflows/custom-app-build-checks.yaml`), and a person may run the
|
|
1830
|
+
same command by hand. The command runs **only what the claim leaves open**, so
|
|
1831
|
+
an attempt with four checks is driven exactly as before.
|
|
1832
|
+
|
|
1833
|
+
`--build` is the build's row id or its `build_id`; `--attempt` is which attempt
|
|
1834
|
+
of its checks, the newest when absent. **`--report` is required**: this mode
|
|
1835
|
+
writes verdicts to the platform, and without the flag it refuses before any
|
|
1836
|
+
request (`checks show --build` is the way to read them).
|
|
1837
|
+
**`--environment`** is `staging` (the default) or `production`: a build has
|
|
1838
|
+
staging attempts, and, once a promote moved production to it, production
|
|
1839
|
+
attempts with one check of their own (below). What a staging attempt does:
|
|
1840
|
+
|
|
1841
|
+
1. **Claims** the attempt (`POST …/builds/{build}/checks/claim`), naming the
|
|
1842
|
+
runner: the GitHub Actions run and its link, or "run by hand". The platform
|
|
1843
|
+
keeps that name only from its own checker; anyone else's run is stored as
|
|
1844
|
+
"<who>, by hand" from who the platform knows them to be, and each of their
|
|
1845
|
+
reports is audited. The platform
|
|
1846
|
+
then writes **Builds and validates** and starts the build's `"check": true`
|
|
1847
|
+
functions. An attempt whose every check already has a verdict answers `409
|
|
1848
|
+
attempt_closed`: the command says nothing is left to check and exits `0`.
|
|
1849
|
+
2. **Its checks pass** is the platform's verdict. The command asks for it every
|
|
1850
|
+
2 s (`POST …/checks/functions/settle`), for at most 6 minutes, while it
|
|
1851
|
+
does the next step.
|
|
1852
|
+
3. **It loads, desk and phone**: headless Chromium opens the build's staging
|
|
1853
|
+
page at 1440x900 and 390x844, one fresh context each, and waits up to 30 s
|
|
1854
|
+
for the runtime's `oxy-app-ready` beacon. It fails on a navigation error, a
|
|
1855
|
+
page served by another environment or another build, no beacon, or an
|
|
1856
|
+
uncaught page error; a failed request, or one the check refused to send
|
|
1857
|
+
(below), is a warning. The verdict is written at once (`POST
|
|
1858
|
+
…/checks/report`).
|
|
1859
|
+
4. **Follows the design system**: the build's `index.html` and CSS (`GET
|
|
1860
|
+
…/checks/stylesheets`) go through the SDK's theme guard, the one
|
|
1861
|
+
`@oxy-hq/sdk/testing` gives an app's own tests, read as built CSS. Any
|
|
1862
|
+
finding fails the build, and so does an SDK below the platform's floor; a
|
|
1863
|
+
build with no recorded SDK version and a clean guard is `skipped`. Written
|
|
1864
|
+
at once too, so the console fills in as each check finishes.
|
|
1865
|
+
5. **Every screen opens** (`smoke`, where the attempt has it): each screen of
|
|
1866
|
+
the build at 1440x900 and 390x844, held to the rule step 3 holds the root
|
|
1867
|
+
to. The screens are the ones the build declares (`checks.screens` in
|
|
1868
|
+
`oxy-app.json`, app-relative paths, `""` the root, each with the query it
|
|
1869
|
+
was declared with: `?module=waste` is opened as written and named so in
|
|
1870
|
+
the detail and in its files); a build that declares
|
|
1871
|
+
none has its root page's links read once it is ready: every same-app `<a
|
|
1872
|
+
href>` target, each once, query and hash dropped, the root first, at most
|
|
1873
|
+
the claim's `limits.screens` (30). **Nothing is clicked**, a link that
|
|
1874
|
+
downloads or points at a file is no screen, and a `fn/` path is never
|
|
1875
|
+
opened. One browser for the check, one fresh context per viewport, the two
|
|
1876
|
+
viewports side by side. The summary reads `14 screens, 0 errors` or `2 of
|
|
1877
|
+
14 screens have errors`; the detail says whether the list was `discovered`
|
|
1878
|
+
and how many screens the cap left out. Each opened screen's links are read
|
|
1879
|
+
at desk width too, and the detail names the screens of the app they point
|
|
1880
|
+
to that the list does not hold (`screens_unlisted`, the first 50, and
|
|
1881
|
+
`screens_unlisted_total`): none of them is opened, and `oxyc checks show`
|
|
1882
|
+
and the app's Builds page say how many, so "every screen" is never read as
|
|
1883
|
+
more than the list. Reported as soon as staging has been opened, before
|
|
1884
|
+
production is.
|
|
1885
|
+
6. **What changed** (`changes`, where the attempt has it): each of those
|
|
1886
|
+
screens is pictured on staging and on production (the full page, cut at
|
|
1887
|
+
4,000 px tall, animations off, once its requests have gone quiet and its
|
|
1888
|
+
fonts have loaded), and the two pictures are compared pixel by pixel
|
|
1889
|
+
**inside that browser** (a canvas in a blank page; no image library). A
|
|
1890
|
+
pixel differs when a channel differs by more than 3 of 255; `ratio` is the
|
|
1891
|
+
share of differing pixels, and a screen is `changed` past `0.001`, or when
|
|
1892
|
+
the two pictures' sizes differ. The check **passes whenever it ran** (it
|
|
1893
|
+
informs; `4 of 28 screens differ`) and is `skipped` when production serves
|
|
1894
|
+
nothing, or this same build. The staging pictures are the ones taken in
|
|
1895
|
+
step 5: staging is opened once.
|
|
1896
|
+
|
|
1897
|
+
The evidence is kept **on the platform** (`PUT …/checks/files/{name}`),
|
|
1898
|
+
never on the runner's disk and never in its log:
|
|
1899
|
+
`shot-<environment>-<slug>-<viewport>.png` for both pictures of every
|
|
1900
|
+
screen, `diff-<slug>-<viewport>.png` where it changed, and for a changed
|
|
1901
|
+
screen `text-<environment>-<slug>-<viewport>.json` (`{"text": …}`, the
|
|
1902
|
+
page's visible text, at most 4,000 characters), which the platform's
|
|
1903
|
+
advisory notes read. `<slug>` is the path with `/` as `--` and the root as
|
|
1904
|
+
`root`, lower-cased, any other character as `-`. Once per attempt,
|
|
1905
|
+
`css-digest.json`: the declarations of the build's CSS that set a literal
|
|
1906
|
+
colour or a font size (`{"rules": [{"file", "selector", "within"?,
|
|
1907
|
+
"declarations": ["color: #1a1a1a"]}], "omitted": n}`, at most 64 KB; the
|
|
1908
|
+
SDK theme's own names, Tailwind's palette and the SDK's `.oxy-…` rules are
|
|
1909
|
+
left out). A file over the claim's `limits.file_bytes`, one past
|
|
1910
|
+
`limits.files`, or one the platform would not take is **a warning in the
|
|
1911
|
+
detail, not a failed check**; its name is then `null` in its row.
|
|
1912
|
+
|
|
1913
|
+
**A production attempt** (`--environment production`) has one check,
|
|
1914
|
+
**Production opens after promote** (`production_smoke`), which the platform
|
|
1915
|
+
queues when a promote or a rollback moves production:
|
|
1916
|
+
|
|
1917
|
+
1. The claim names `"environment": "production"`. A deployment that answers a
|
|
1918
|
+
staging attempt instead is refused (exit `1`): it predates production
|
|
1919
|
+
checks.
|
|
1920
|
+
2. **It waits until production serves the build**: the root page is re-read in
|
|
1921
|
+
a fresh browser context every 5 s, each signed read asking for an uncached
|
|
1922
|
+
copy, until `window.__OXY_APP__.buildId` is the attempt's build. A page of
|
|
1923
|
+
the build before, still cached somewhere, is never judged. Three minutes
|
|
1924
|
+
without it is `error`.
|
|
1925
|
+
3. Every screen is opened as in step 5 above, and compared with the claim's
|
|
1926
|
+
`baseline` (what the build's **What changed** run saw on production before
|
|
1927
|
+
the move). It is `failed` when a screen has an error the baseline did not
|
|
1928
|
+
have for that screen and viewport, or was ready in the baseline and is not
|
|
1929
|
+
now. With no baseline (a promoting publish moves staging and production
|
|
1930
|
+
together, so **What changed** never ran; or a build was promoted before it
|
|
1931
|
+
did) nothing can be called new: production's errors are listed as warnings
|
|
1932
|
+
and the check is `skipped` (`3 errors on 2 of 14 screens, and no baseline
|
|
1933
|
+
from before the move to tell new ones apart`), so an error production
|
|
1934
|
+
already had neither tells anyone nor rolls production back. **The same
|
|
1935
|
+
holds screen by screen**: an error is called new only against the
|
|
1936
|
+
baseline's own entry for that screen and viewport. Where the baseline has
|
|
1937
|
+
none (its pass ran out of time before that screen, or production links to
|
|
1938
|
+
other screens now), what the screen shows is a warning (`… (not in the
|
|
1939
|
+
baseline: not called new)`), and a check with no new error but some of
|
|
1940
|
+
those is `skipped` (`2 errors on 1 of 14 screens the baseline from before
|
|
1941
|
+
the move cannot tell apart: not called new`), never `failed`. A baseline
|
|
1942
|
+
keeps at most ten errors a screen and viewport, so against an entry whose
|
|
1943
|
+
list is full an uncaught error it does not hold is not called new either
|
|
1944
|
+
(`… (the baseline's list of errors is full: not called new)`); a document
|
|
1945
|
+
that fails now, and a screen that was ready and is not, still are. A failed
|
|
1946
|
+
request or a refused one never fails it. The summary reads `14 screens, no
|
|
1947
|
+
new errors` or `2 new errors on 1 of 14 screens`, and `new_errors` lists
|
|
1948
|
+
each as `{path, viewport, error}`. No picture is taken and no file is kept.
|
|
1949
|
+
|
|
1950
|
+
On production **no environment header is sent** (production is what the URL
|
|
1951
|
+
serves unnamed), and the requests that carry the credential are exactly the
|
|
1952
|
+
ones a staging attempt signs. Every other rule below is the same on both.
|
|
1953
|
+
|
|
1954
|
+
**The page is opened as a reader.** The credential and `X-Oxy-App-Env: staging`
|
|
1955
|
+
go only to reads under the app's base path, the ready beacon, and the app's own
|
|
1956
|
+
data reads (`/api/projects/<its workspace>/query` and `/semantic-query`, which
|
|
1957
|
+
also name the app). Any other read on the deployment's origin goes unsigned,
|
|
1958
|
+
as an anonymous visitor's would. **A write the page attempts is never sent**:
|
|
1959
|
+
a `/fn` call, a form post, an `/api` write. Each is recorded as a warning
|
|
1960
|
+
(`write-refused`, `refused_writes` in the viewport's detail), and a page that
|
|
1961
|
+
needed one to mount fails on the beacon, not silently. So a screen that loads
|
|
1962
|
+
its data through a function shows that call refused: a warning, never a
|
|
1963
|
+
failure by itself.
|
|
1964
|
+
|
|
1965
|
+
**The page reaches the deployment's own origin and nothing else.** It can read
|
|
1966
|
+
the app's data as the checker, so it is given nowhere to send what it read: a
|
|
1967
|
+
request to any other origin is never sent, whatever its method and whatever
|
|
1968
|
+
it is for (a script, a font, an image, a `fetch`, a beacon, a frame, a popup,
|
|
1969
|
+
a navigation), on staging and on production alike. Each is recorded as a
|
|
1970
|
+
warning (`off-origin-refused`, `refused_off_origin` in the viewport's detail)
|
|
1971
|
+
and never fails a check by itself. A loopback, private or internal-only
|
|
1972
|
+
address is refused by a rule of its own. **So an app that loads a font, a
|
|
1973
|
+
script or a tag from another host is checked without it.** A font falls back,
|
|
1974
|
+
on staging and on production alike, so **What changed** compares the two
|
|
1975
|
+
fallbacks. An app that cannot mount without a script from another host fails
|
|
1976
|
+
**It loads** and **Every screen opens**, and the failure names what was not
|
|
1977
|
+
sent (`…; not sent: GET https://cdn.example.com/lib.js (another origin)`):
|
|
1978
|
+
serve it from the app's own bundle. A document redirected to another origin
|
|
1979
|
+
(a sign-in on another host) is not followed, and is named as that.
|
|
1980
|
+
|
|
1981
|
+
Nothing a page showed reaches the job log or the runner's disk: no trace, no
|
|
1982
|
+
response body, only statuses, URLs and the first line of an error. The
|
|
1983
|
+
pictures and text of **What changed** are held in memory and sent to the
|
|
1984
|
+
platform, where the app console shows them to people who may open that app's
|
|
1985
|
+
staging.
|
|
1986
|
+
|
|
1987
|
+
**The page is a tenant's code, and the checker's token can read every org's
|
|
1988
|
+
staging**, so five more things hold in this mode:
|
|
1989
|
+
|
|
1990
|
+
- **Chromium's sandbox is on.** Playwright starts Chromium without it unless
|
|
1991
|
+
told. A browser that cannot have one (on Linux it needs unprivileged user
|
|
1992
|
+
namespaces, and a user that is not root) makes each check that needs the
|
|
1993
|
+
browser an `error` that names the sandbox. It is never started without one.
|
|
1994
|
+
- **The browser's environment holds no credential.** It is started with only
|
|
1995
|
+
what a browser needs (`PATH`, `HOME`, the temp directories, the display and
|
|
1996
|
+
locale variables, fonts and certificates, Playwright's own settings, a
|
|
1997
|
+
proxy's address without a password). `OXY_API_KEY`, `OXY_TOKEN`, whatever
|
|
1998
|
+
`--api-key-env` or `--token-env` named, and a CI's own tokens are not passed
|
|
1999
|
+
on.
|
|
2000
|
+
- **A redirect never carries the credential, and its next hop is judged
|
|
2001
|
+
first.** Every request the check sends, signed or passed, is sent once, from
|
|
2002
|
+
outside the page, with redirects off, and its answer is handed to the
|
|
2003
|
+
browser whole. A `3xx` goes back as a `3xx`, and the browser follows it as
|
|
2004
|
+
its own request with none of the checker's headers. Before it is handed
|
|
2005
|
+
over, its next hop is held to the rules above: a hop to another origin or a
|
|
2006
|
+
private address, or one that would repeat a write (a `307` or `308` of a
|
|
2007
|
+
`POST`), is refused and recorded, and the page's request fails instead. So
|
|
2008
|
+
a sign-in redirect on the deployment is unsigned, and so is a hop that lands
|
|
2009
|
+
under the app's base again. The hops after that one are the browser's own:
|
|
2010
|
+
they are reads, and the browser can find no host for them but the
|
|
2011
|
+
deployment's (below).
|
|
2012
|
+
- **No socket is opened.** A `WebSocket` a page or a frame constructs is
|
|
2013
|
+
handed to the check, which ends it (close code `1008`) before anything is
|
|
2014
|
+
sent, on the deployment's own origin too, and records it like any other
|
|
2015
|
+
refused request (`WS /api/live`, or `WS wss://… (another origin)`). That
|
|
2016
|
+
needs Playwright 1.48 or later; with an older one no page is opened, and
|
|
2017
|
+
each check that needs the browser is an `error` that says so.
|
|
2018
|
+
`WebSocketStream`, the other way to the same socket, is switched off in the
|
|
2019
|
+
browser. One socket is left: a worker's own `WebSocket` to the deployment's
|
|
2020
|
+
origin, which Playwright does not hand over. It reaches the platform as an
|
|
2021
|
+
anonymous visitor's would, and no other host.
|
|
2022
|
+
- **The browser cannot find another host.** Not every way a page reaches the
|
|
2023
|
+
network is a request the check is shown: Chromium follows a redirect, opens
|
|
2024
|
+
a WebSocket from a worker or a WebTransport session, and acts on a
|
|
2025
|
+
speculation rule, a `preconnect` or a `dns-prefetch` without asking. Each
|
|
2026
|
+
needs an address, so Chromium is started with a resolver that answers only
|
|
2027
|
+
for the deployment's own host and port (`--host-resolver-rules`, and
|
|
2028
|
+
`--no-proxy-server` so that no proxy resolves in its place). An IP literal
|
|
2029
|
+
goes through the same resolver and fails the same way, as does the same
|
|
2030
|
+
host on another port. A peer connection (WebRTC) needs no name: its
|
|
2031
|
+
constructors are taken out of every frame before the page's code runs, and
|
|
2032
|
+
UDP that is not proxied is off
|
|
2033
|
+
(`--force-webrtc-ip-handling-policy=disable_non_proxied_udp`). The browser
|
|
2034
|
+
uses no system or environment proxy.
|
|
2035
|
+
|
|
2036
|
+
A check that throws here is written as `error` with why, so a row is never left
|
|
2037
|
+
open by a crash. A request the platform could not take (the network, a 5xx, a
|
|
2038
|
+
429) is sent again up to three times, 1 s, 2 s and 4 s apart (a file, once).
|
|
2039
|
+
|
|
2040
|
+
**How long it takes.** Each pass over the screens stops opening them after
|
|
2041
|
+
2.5 minutes and says how far it got: a screen it never opened is not called
|
|
2042
|
+
fine (`smoke` is then `error` unless a screen it did open failed). A staging
|
|
2043
|
+
attempt's own waits end inside 9 minutes, a production attempt's inside 6.5.
|
|
2044
|
+
|
|
2045
|
+
Human mode prints one line per check to stderr as it lands; `--json` prints one
|
|
2046
|
+
summary object to stdout (`checks[]` with each check's `kind`, `by`
|
|
2047
|
+
(`platform` or `runner`), `status`, `summary` and, for a runner's check,
|
|
2048
|
+
whether it was `reported`; then the platform's `state` and what is still
|
|
2049
|
+
`open`). `--timeout`, `--app-env`, `--browser` and `--expect-selector` belong
|
|
2050
|
+
to the other mode; the last three are refused with `--build`.
|
|
2051
|
+
|
|
2052
|
+
**Auth.** The platform's checker: its service token in `OXY_API_KEY`, sent as
|
|
2053
|
+
`X-API-Key` when no bearer resolves (the workflow passes `--token-env` a
|
|
2054
|
+
variable that is never set, so none does). Or a person who may open the app's
|
|
2055
|
+
staging, on their own login. With an app id there is no lookup at all, which
|
|
2056
|
+
is what lets the checker run it: that token may not list apps. `<org>/<app>`
|
|
2057
|
+
is resolved by the app listing, so it needs a person. A sandbox agent token is
|
|
2058
|
+
refused before any request. Playwright is resolved from the working directory,
|
|
2059
|
+
as for `--browser`.
|
|
2060
|
+
|
|
2061
|
+
**Exit codes:** `0` every check has a verdict and none failed, or the attempt
|
|
2062
|
+
was already closed; `9` (`CHECK_FAILED`) a check's verdict is `failed` or
|
|
2063
|
+
`error`; `2` `--build` without `--report`, `--report`, `--attempt` or
|
|
2064
|
+
`--environment` without `--build`, a bad `--attempt`, or an `--environment`
|
|
2065
|
+
that is neither `staging` nor `production`; `4`, `5`, `6` a refused request (no or a
|
|
2066
|
+
rejected credential, an unknown app, build or attempt, a malformed request);
|
|
2067
|
+
`7` the platform was unreachable, a verdict could not be written after the
|
|
2068
|
+
repeats, or the check functions had no verdict within 6 minutes. A verdict
|
|
2069
|
+
that could not be written outranks `9`: the run broke, whatever the checks say.
|
|
2070
|
+
|
|
2071
|
+
### What the checks found on a build: `checks show`
|
|
2072
|
+
|
|
2073
|
+
```bash
|
|
2074
|
+
oxyc checks show <org-slug>/<app-slug> # the build staging serves
|
|
2075
|
+
oxyc checks show acme/store --build 9087d7b # a build by its build_id (or row id)
|
|
2076
|
+
oxyc checks show acme/store --attempt 1 # an earlier attempt of the checks
|
|
2077
|
+
oxyc checks show acme/store --wait --timeout 900 # poll until nothing is queued or running
|
|
2078
|
+
oxyc checks show acme/store --environment production # the check that followed a promote
|
|
2079
|
+
```
|
|
2080
|
+
|
|
2081
|
+
Every build that reaches an app's staging is checked, and the results stay on
|
|
2082
|
+
the build: **Builds and validates**, **Its checks pass** (the
|
|
2083
|
+
`"check": true` functions), **It loads, desk and phone**, and **Follows the
|
|
2084
|
+
design system** (the theme guard over the bundle's CSS, and the SDK version
|
|
2085
|
+
`oxyc publish` recorded). A runner the platform starts drives them (`checks run
|
|
2086
|
+
--build`, above). `checks show` reads them back from
|
|
2087
|
+
`GET /api/customer-apps/{id}/builds/{build}/checks`; without `--build` the build
|
|
2088
|
+
is the one staging serves (the `is_draft` row of `GET …/builds`). It prints who
|
|
2089
|
+
ran the checks (with the link to the run when there is one), one line per
|
|
2090
|
+
check, the findings under one that failed or could not run, and the result:
|
|
2091
|
+
|
|
2092
|
+
```text
|
|
2093
|
+
acme/store · build 9087d7b · staging · attempt 2
|
|
2094
|
+
run by GitHub Actions run #1482 · https://github.com/…/actions/runs/123
|
|
2095
|
+
✓ Builds and validates bundle valid
|
|
2096
|
+
✓ Its checks pass 3 of 3 passed
|
|
2097
|
+
✓ It loads, desk and phone desk 1.2s · phone 1.4s
|
|
2098
|
+
✗ Follows the design system src/index.css:68 restates --card
|
|
2099
|
+
src/index.css:68 restates --card, which theme.css defines; remove it
|
|
2100
|
+
failed · 1 failed, 3 passed
|
|
2101
|
+
```
|
|
2102
|
+
|
|
2103
|
+
`✓` passed, `✗` failed, `!` the check could not run (error), `-` skipped, `…`
|
|
2104
|
+
queued or running. Where the app's org holds promotes on its checks, the list
|
|
2105
|
+
also has **Every screen opens** and **What changed**, and rows a model wrote:
|
|
2106
|
+
|
|
2107
|
+
```text
|
|
2108
|
+
✓ Every screen opens 14 screens, 0 errors
|
|
2109
|
+
✓ What changed 4 of 28 screens differ · not seen by a person yet (advisory)
|
|
2110
|
+
note by a model (claude-…):
|
|
2111
|
+
Looks intended: /reorder.
|
|
2112
|
+
Look here first: /stores at phone.
|
|
2113
|
+
summary by a model (claude-…): Adds a reorder screen; the stores table moved a column.
|
|
2114
|
+
```
|
|
2115
|
+
|
|
2116
|
+
**What changed** says how many screens differ from production and whether a
|
|
2117
|
+
person has seen them (`seen by <who>` once someone marked them in the app
|
|
2118
|
+
console). A **note** is a model's advice under a check, and the build's
|
|
2119
|
+
summary is a model's too: each is marked as one, and neither is a verdict.
|
|
2120
|
+
`checks show` does not say which checks hold a promote: that is the plan's to
|
|
2121
|
+
say, `oxyc promote <app> --dry-run`.
|
|
2122
|
+
|
|
2123
|
+
**`--environment production`** reads the attempts that follow a promote
|
|
2124
|
+
instead: one check, **Production opens after promote**, on the build
|
|
2125
|
+
production serves (the `is_published` row of `GET …/builds`) unless `--build`
|
|
2126
|
+
names one. The request adds `environment=production`.
|
|
2127
|
+
|
|
2128
|
+
When no runner picked an attempt up, or one stopped before it finished, the
|
|
2129
|
+
platform closes its open checks as errors and `checks show` says so in one
|
|
2130
|
+
line: `! the runner did not answer (…): run the checks again from the app's
|
|
2131
|
+
Builds page`.
|
|
2132
|
+
`--json` prints the server's body as it came, one object on stdout.
|
|
2133
|
+
`--wait` re-reads the same build every few seconds while any check is queued or
|
|
2134
|
+
running, up to `--timeout` seconds (default 600), and prints only the final
|
|
2135
|
+
answer.
|
|
2136
|
+
|
|
2137
|
+
**Auth.** The checks are a staging build's evidence, so the server answers
|
|
2138
|
+
only a caller who may open the app's staging (Oxy staff holding `develop_apps`
|
|
2139
|
+
over its org): a person's login, or a token carrying that standing. A publish
|
|
2140
|
+
token is answered not-found (exit 5), as when it reads back a run queued in
|
|
2141
|
+
staging; a sandbox agent token is refused before any request.
|
|
2142
|
+
|
|
2143
|
+
**Exit codes:** `0` the checks passed, are still running, or none have run; `9`
|
|
2144
|
+
(`CHECK_FAILED`) they failed; `7` with `--wait`, `--timeout` passed with checks
|
|
2145
|
+
still running (they carry on server-side); `5` the app or build was not found,
|
|
2146
|
+
or the environment serves no build; `2` a bad `--attempt`, `--timeout` or
|
|
2147
|
+
`--environment`, or a slug where the credential needs a UUID; `4` no
|
|
2148
|
+
credential, or the API rejected it.
|
|
2149
|
+
|
|
1726
2150
|
## Sandboxes
|
|
1727
2151
|
|
|
1728
2152
|
```bash
|
|
@@ -2030,8 +2454,8 @@ oxyc exit-codes
|
|
|
2030
2454
|
|
|
2031
2455
|
**`validate`** checks workspace YAML against `json-schemas/*.json`, which are
|
|
2032
2456
|
generated from the Rust config types, and then as the runtime checks each file
|
|
2033
|
-
once it has loaded. No network, no token. It replaced `oxy validate`,
|
|
2034
|
-
|
|
2457
|
+
once it has loaded. No network, no token. It replaced `oxy validate`, whose
|
|
2458
|
+
one-release stub was deleted 2026-11-26.
|
|
2035
2459
|
|
|
2036
2460
|
| File | Schema |
|
|
2037
2461
|
| --- | --- |
|
|
@@ -2158,8 +2582,8 @@ oxyc proxy --app acme/store --app-env dev-a1 # then open the printed URL
|
|
|
2158
2582
|
under `path` (default `.`) to `*.automation.yml`, then rewrites references to
|
|
2159
2583
|
the old extensions — `src:`, `workflow_ref:`, glob includes — in every `.yml` /
|
|
2160
2584
|
`.yaml` / `.sql` file. Local only: no network, no token. `--dry-run` prints the
|
|
2161
|
-
rename plan and writes nothing. It
|
|
2162
|
-
|
|
2585
|
+
rename plan and writes nothing. It replaced the Rust `oxy migrate-automations`,
|
|
2586
|
+
whose one-release stub was deleted 2026-11-26.
|
|
2163
2587
|
|
|
2164
2588
|
- **It never overwrites.** A file whose `.automation.yml` target already exists,
|
|
2165
2589
|
or two files that map to one name (`x.procedure.yml` beside `x.workflow.yml`),
|
|
@@ -2232,8 +2656,7 @@ written in `skills/` here; see `internal-docs/platform-skills.md`.
|
|
|
2232
2656
|
6 the request was malformed (4xx other than 401/403/404)
|
|
2233
2657
|
7 unavailable — 5xx, a timeout, or the network failed. Retryable.
|
|
2234
2658
|
8 refused — the operation would have destroyed or overwritten something
|
|
2235
|
-
9 a check ran and
|
|
2236
|
-
`oxyc validate`)
|
|
2659
|
+
9 a check ran and the answer was no (`oxyc checks run`, `oxyc checks show`, `oxyc bootstrap verify`, `oxyc looker test`, `oxyc evals run --min-accuracy`, `oxyc validate`; `oxyc promote` when production moved and its check after the promote failed)
|
|
2237
2660
|
```
|
|
2238
2661
|
|
|
2239
2662
|
`4` almost always means the wrong `--env`. A person logs in again. An agent on
|
|
@@ -2246,7 +2669,7 @@ its own token (`tokens create --agent` or `--sandbox-agent`) does not: there,
|
|
|
2246
2669
|
| Variable | Default | Meaning |
|
|
2247
2670
|
| --- | --- | --- |
|
|
2248
2671
|
| `OXY_TOKEN` | — | any credential, sent as a bearer; overrides the login cache and GitHub OIDC. `from-proxy`: an egress proxy adds it, so none is sent ([A token the proxy adds](#a-token-the-proxy-adds)) |
|
|
2249
|
-
| `OXY_API_KEY` | — | an API token, for the `/external/api` surface and for `checks run` (the name is historical: it held a legacy API key until those were removed) |
|
|
2672
|
+
| `OXY_API_KEY` | — | an API token, for the `/external/api` surface and for `checks run`; with `checks run --build`, the platform checker's service token (the name is historical: it held a legacy API key until those were removed) |
|
|
2250
2673
|
| `OXY_SERVICE_ACCOUNT` | — | the **ID** of the service account a trusted-access exchange acts as (`--service-account`); never `<org>/<name>` |
|
|
2251
2674
|
| `OXY_OIDC_TOKEN_FILE` | — | a file holding a token from an OIDC issuer the org registered, traded at the exchange instead of GitHub's ([A service on another platform without a stored secret](#a-service-on-another-platform-without-a-stored-secret)) |
|
|
2252
2675
|
| `OXY_AGENT` | detected | the name of the agent driving `oxyc`, sent in the user agent — see below |
|