feat(offline_check): add the offline check that proves the egress block and probes each capability

Adds the offline check: an Ansible role and playbook that test a deployment from inside its hosts and write one results.json. It answers two questions for any track. Is the deployment really cut off from the internet? And do Core, Orbit, Secrets Manager, the AI Gateway (Duo Agent Platform) and backup and restore still work with no internet? The check is experimental, like the tracks it tests.

A "pass" from a check that cannot fail tells you nothing, so the check is built around two rules:

  • It proves the egress block first. A run with no proven block reports every capability as inconclusive and never as a pass.
  • Each probe has a check that must come out the other way, so a green result means the probe can tell working from broken.
flowchart TD
  A["Egress block: internet targets must fail<br/>(TCP, HTTPS, DNS)"]
  B["Mirror and registry targets must succeed<br/>(shows the host still has a network)"]
  C{"Block proven?"}
  X["Every capability: INCONCLUSIVE"]
  subgraph P["Probe, then check that must fail"]
    P1["Core: sign-in returns 200<br/>block was proven"]
    P2["Orbit: seeded project returns 1 row<br/>project in a non-enabled group returns 0"]
    P3["Secrets Manager: job reads the secret<br/>job without the grant fails"]
    P4["AI Gateway: completion has choices<br/>closed model endpoint returns none"]
    P5["Backup and restore: other probes pass again<br/>restoring a missing id fails"]
  end
  V["Verdict per capability:<br/>PASS, FAIL, INCONCLUSIVE or SKIPPED"]
  M["results.json, validated against a schema,<br/>rendered as the results matrix on Pages"]
  A --> B --> C
  C -- "no" --> X --> M
  C -- "yes" --> P --> V --> M

What changed

  • ansible/roles/offline_check and ansible/offline-check.yml run the check. It creates and changes nothing, except the backup and restore probe, which is off by default.
  • A probe is PASS only when its checks and its control pass. A missing piece (no model backend, no runner, no credentials) is INCONCLUSIVE, not FAIL. After a restore, an inconclusive probe stays open instead of failing.
  • ansible/roles/offline_check/files/results.schema.json defines the result file, and the role validates against it before writing. The file never holds a token or a secret value.
  • An idempotent seed script (offline_check_seed_secrets_manager) prepares the Secrets Manager test project, with a job that has the grant and a job that does not, and the Orbit control project.
  • scripts/results_matrix.py renders this result shape. A run whose block is not proven never shows a pass cell.
  • results/19.6.0-ee.0-track2.json is the result of a run on the Track 2 hosts. docs/runbook/10-offline-check.md and the role README describe the procedure and the limits.
  • CI runs the new unit tests (scripts/test_offline_check.py) and installs jsonschema for them. ansible.utils joins ansible/requirements.yml for the schema check.

Checklist

  • Verified on a deployment, or the reason it was not: see below.
  • Runbook and README updated if a step, variable or default changed: docs/runbook/10-offline-check.md, docs/runbook/README.md and the role README.
  • No secrets, hostnames or account IDs committed; certs stay in the git-ignored certs/. The admin token is passed at run time and is never written to a file.
  • Release and service image pins changed in ansible/group_vars/all/versions.yml; other pins edited where they sit: no image pin changes. The jsonschema CI pin and the ansible.utils range sit beside what uses them.

Verified on a deployment

The check ran against two AlmaLinux 9 hosts: GitLab 19.6.0-ee.0 (Omnibus) and an add-on host, with outbound internet access blocked on both. All five capabilities passed, each with its control. The result file is committed.

The earlier runs show that the check can fail and can say "unknown":

  • The first run reported NOT_SEALED. The cloud resolver still answered public names. After the resolver on both hosts pointed at loopback, the block held.
  • With no model backend and no runner, Duo and Secrets Manager reported INCONCLUSIVE, and so did backup and restore, because its Secrets Manager leg was open. Each became a pass only after the missing piece existed and its control came out the right way.
  • Fixes the runs found are separate commits in this branch: the Orbit info line, project ids and the Orbit row count in the 19.6 response shape, string values for the probe toggles, and an unauthenticated AI Gateway completion reported as inconclusive.

What the run does not show:

  • The lab GitLab served HTTP only, because the instance builder has no HTTPS virtual host. The check did not exercise TLS.
  • Duo ran against a stub model inside the blocked network. The pass proves the request path and the Gateway. It does not test a real model.
  • The lab used a test licence. Its Orbit and Secrets Manager entitlements are test entitlements, so the runbook tells readers to treat those two results as assessed, not proven.
  • yamllint --strict and ansible-lint pass over ansible/, and the unit tests for the seal rule, the probe helpers, the schema and the matrix pass.
Results by capability
Capability Result Check that must come out the other way
Core Pass The block was proven before the probe ran.
Orbit Pass A seeded project returns one row. A project in a group that is not enabled for Orbit returns none.
Secrets Manager Pass The job with the grant reads the seeded secret. The job without the grant fails.
Duo Agent Platform Pass The Gateway returns a completion from the stub model. The same request with the model endpoint closed returns a 500 and no completion.
Backup and restore Pass Backup and restore complete, and Core, Orbit and Secrets Manager pass afterwards. Restoring a missing backup id exits 1.

An AI coding assistant wrote this change and ran the checks above on test VMs.

Merge request reports

Loading
Loading