Skip to content

armgit / axuse

Public Imported from GitHub
0

Accessibility-first browser & computer use for AI agents — one MCP server for every harness (Codex, Claude Code, OpenCode, Antigravity). Instruments the DOM/accessibility tree via CDP instead of screenshot loops: diffed snapshots, stable element refs, trusted input, typed errors. Zero dependencies

Round 10 — drift visibility and a CI-pinned mismatch detector

CTOL Team BJc0681000ea44
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 1190e02..e9d8077 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -184,3 +184,15 @@ jobs:
run: env -u DISPLAY node src/cli.js posture --json
- name: Posture egress verification (the exit IP's geo vs the persona; INFO-safe on network gaps)
run: env -u DISPLAY node src/cli.js posture --verify-egress | tail -4
+ - name: Egress mismatch detector (a Tokyo persona through a US runner exit must WARN)
+ run: |
+ set -euo pipefail
+ env -u DISPLAY AXUSE_TIMEZONE=Asia/Tokyo node src/cli.js posture --verify-egress > /tmp/posture-mismatch.txt || true
+ # The check MUST run: either the mismatch warning (geo answered)
+ # or the honest unreachable/info line (network gap). Never silent.
+ grep -qE "egress: (exit IP|echo unreachable)" /tmp/posture-mismatch.txt
+ # When geo answers (the common case), the mismatch must be CALLED OUT.
+ if grep -q "exit IP" /tmp/posture-mismatch.txt; then
+ grep -q "does not match the exit" /tmp/posture-mismatch.txt
+ echo "detector fired:" $(grep "does not match the exit" /tmp/posture-mismatch.txt)
+ fi
diff --git a/docs/server-mode.md b/docs/server-mode.md
index a7b5a74..ed98d71 100644
--- a/docs/server-mode.md
+++ b/docs/server-mode.md
@@ -387,7 +387,15 @@ browser** (through the proxy when configured) and warns when the exit's
geography contradicts the persona clock — the misconfiguration challenge
pages would otherwise catch (caught a real one during development: a
Swiss exit behind an `America/New_York` persona). Echo/geo endpoints are
-configurable (`AXUSE_EGRESS_ECHO_URL`, `AXUSE_EGRESS_GEO_URL`).
+configurable (`AXUSE_EGRESS_ECHO_URL`, `AXUSE_EGRESS_GEO_URL`). The CI
+`linux-server` lane pins the detector itself: a deliberately mismatched
+persona (Tokyo clock through the runner's US exit) must produce the
+warning whenever the geo service answers.
+
+`doctor` also reports **browser currency** (best-effort, INFO on offline
+hosts): the running major vs the current CfT stable — a persona several
+majors behind is its own signal (distro Chrome drifts with
+unattended-upgrades; `install-browser --version` pins deliberately).
## Verify it (all commands runnable on the server)
diff --git a/src/cli.js b/src/cli.js
index adc4d0e..6e4f998 100644
--- a/src/cli.js
+++ b/src/cli.js
@@ -329,6 +329,23 @@ async function doctor() {
const mv = managedVersion();
if (mv) out(`managed browser: ${mv} at ${MANAGED_ROOT_DEFAULT()} (axuse install-browser --version ${mv} pins a fleet)`);
}
+ // Best-effort drift visibility (network INFO, never a failure): what the
+ // current CfT stable channel is vs what this box runs. A persona on a
+ // browser several majors behind is its own signal; pinned fleets
+ // (install-browser --version) upgrade deliberately.
+ try {
+ const ctrl = new AbortController();
+ const t = setTimeout(() => ctrl.abort(), 3500);
+ const res = await fetch("https://googlechromelabs.github.io/chrome-for-testing/last-known-good-versions-with-downloads.json", { signal: ctrl.signal });
+ clearTimeout(t);
+ const j = await res.json();
+ const latest = j?.channels?.Stable?.version;
+ if (latest && ver) {
+ const major = (s) => Number(/(\d+)\./.exec(s)?.[1] ?? 0);
+ const drift = major(ver) && major(latest) ? major(latest) - major(ver) : null;
+ out(`browser currency: running ${major(ver) || "?"}, CfT stable ${major(latest) || "?"}${drift !== null && drift > 0 ? ` — ${drift} major(s) behind (managed installs pin deliberately; distro Chrome drifts with unattended-upgrades)` : ""}`);
+ }
+ } catch { /* offline or slow: currency is INFO, never a failure */ }
} else {
out("browser: not found — run `axuse install-browser` (pins Chrome for Testing under ~/.cache — no sudo), or install distro Chrome, or set AXUSE_BROWSER");
}