Skip to content

test(usage): self-checking local e2e harness for the gateway OBO flow (ENG-19115) - #199

Merged
insomnius merged 1 commit into
boonfrom
ariefrahman/eng-19115-obo-e2e-harness
Sep 4, 2026
Merged

insomnius merged 1 commit into
boonfrom
ariefrahman/eng-19115-obo-e2e-harness

Conversation

@insomnius

@insomnius insomnius commented Sep 4, 2026 •

Copy link
Copy Markdown

Follow-up to #198 (test tooling only — no runtime change).

scripts/boon/obo-e2e-local.sh drives one chat turn through the local stack (boon-core → anychat-boon-web → openclaw pnpm dev gateway → local boon-llm-gateway → back to boon-core) with boon agent thread create / send / poll, and asserts every hop from the logs it can read — never printing a token:

  • A2 boon-core minted + attached: account=<org> internal_test=true
  • A3 plugin gatewayOboPresent:true
  • WIRE openclaw's names-only header log includes x-boon-gateway-obo-token with obo=present (needs logging.level: debug)
  • A4 gateway GET boon-core's per-org signing-key endpoint → 200 — tier-1 only. A cache hit inside the gateway's 5-min TTL (its key cache) is reported inconclusive, not PASS, so a broken build can't ride a warm cache.
  • A5 llm_request_logs carry internal_test=true

Reads log slices via snapshot files instead of tail | grep -q: under pipefail, grep's early exit SIGPIPEs tail (141) and reads as a false failure — that bit me during development.

Results

Red on the origin/boon (pre-#198) versions of agent-runner-utils.ts + run.ts:

  FAIL  WIRE openclaw built headers WITHOUT the OBO: … obo=absent
  SKIP  A4 inconclusive: … cached 
== result: 10 passed, 1 failed   exit=1

Green on boon with #198 (fresh gateway process, cache cold):

  PASS  WIRE openclaw attached x-boon-gateway-obo-token (obo=present)
  PASS  A4 gateway fetched org 2 signing key from boon-core → 200 (OBO arrived + verified)
== result: 12 passed, 0 failed

Not covered: the gateway's [usage] … source (signed vs getboon_email) lives only on the gateway's stdout — the script says so at the end.

.design/tasks.json check manifest now points A1 at the script; the trace ledger records the harness red/green.


Summary by cubic

Adds a self-checking local e2e harness that drives one chat turn through the gateway OBO flow and asserts every hop from logs — without ever printing a token.

Written for commit fc6cd3e. Summary will update on new commits.

Review in cubic

… (ENG-19115)

scripts/boon/obo-e2e-local.sh drives one chat turn through the local stack
with boon-cli and asserts every hop from the logs it can read, without ever
printing a token: boon-core mint, plugin gatewayOboPresent, openclaw's
names-only header log (obo=present), the gateway's signing-key fetch from
boon-core (tier-1 only; a cache hit inside 5 min is reported inconclusive
rather than passing), and the request logs carrying internal_test=true.
Reads log slices via snapshot files rather than tail | grep -q, which under
pipefail dies with SIGPIPE on the first match and read as false failures.

Red on the origin/boon versions of agent-runner-utils.ts and run.ts
(WIRE FAIL obo=absent, exit 1); green with this branch (12 passed). The
.design check manifest now points A1 at the script.
@insomnius
insomnius requested a review from a team September 4, 2026 14:04
@insomnius
insomnius enabled auto-merge (squash) September 4, 2026 14:04
@insomnius
insomnius merged commit 842cb8d into boon Sep 4, 2026
120 of 122 checks passed
@insomnius
insomnius deleted the ariefrahman/eng-19115-obo-e2e-harness branch September 4, 2026 14:05

@gandalfboon gandalfboon Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Solid harness — approving.

A few small observations, none blocking:

  • ss -ltn in preflight is Linux-only — on macOS (ss doesn't exist) it silently fails all three port checks and exits 2 before doing anything else. Not a bug given who runs this today (you, on Linux), but a one-line fallback (command -v ss >/dev/null && ss -ltn || lsof -iTCP -sTCP:LISTEN -P -n 2>/dev/null) would keep it portable if anyone else picks it up.
  • recent_fetch uses date -d which is GNU-only (also breaks on macOS date). Same audience note as above.
  • The A4-inconclusive → SKIP path is exactly right — a warm obosign:<org> cache riding a broken build was the trap worth designing around, and reporting inconclusive-not-PASS is the correct call.
  • Snapshot-to-file instead of tail | grep -q — good SIGPIPE catch, worth the extra 3 lines.
  • 12/12 green on #198, WIRE red + exit 1 on origin/boon — that's the actual proof this harness discriminates.
  • Cutting boon.37 with #198 in flight is fine; this PR itself is inert until someone runs the script.

Approving.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants