Skip to content

Test the OpenClaw skill-resolver plugin inside a real gateway, nightly (GST-3133) - #9799

Merged
capy-ai[bot] merged 989 commits into
masterfrom
test/openclaw-skill-resolver-real-gateway
Nov 19, 2026
Merged

capy-ai[bot] merged 989 commits into
masterfrom
test/openclaw-skill-resolver-real-gateway

Conversation

@garrytan

@garrytan garrytan commented Nov 19, 2026 •

Copy link
Copy Markdown
Owner

Nightly CI now starts a real OpenClaw gateway, installs gbrain's skill-resolver plugin with gbrain setup openclaw, and checks what the model receives. A new bench measures how often the plugin's suggestions are right.
Why: until now the plugin was only tested against a stub of OpenClaw's hook API. This proves it works inside the real host, on the OpenClaw versions people run (GST-3133).
Nothing to do: the new job runs on the nightly schedule and on full-corpus dispatches, needs no API key, and pull requests skip it.

What the e2e test covers (17 tests)
  • One relevant-skills block per turn, the pinned block, and the 750-skill case with OpenClaw's two load limits raised.
  • A Telegram direct message and a group message with a mention, sent through a fake Telegram Bot API.
  • --owner-sender: the owner gets suggestions; another sender gets the pinned skills only (skipped_sender); a CLI turn with no sender is skipped too.
  • Cron turns are skipped (skipped_provenance).
  • Model-error retries: each request carries exactly one relevant-skills block on every attempt.
  • Switching skill loading on and off changes the plugin set without restarting the gateway.

All of it runs keyless against a fake OpenAI-compatible model.

OpenClaw versions
OpenClaw Result
2026.11.5 17/17
2026.11.4 16/17 before the retry test was rewritten; the only failure was the old retry assertion, and the rewritten retry test passed on its own here. The full file has not been rerun here since.
2026.10.33 16/17 before the same rewrite, with the same single failure. The rewritten test has not been run here; CI's first nightly run is the check.
2026.4.9 not supported: openclaw agent has no --session-key option, so every test fails. The existing Tier 2 job keeps its 2026.4.9 pin; this job pins its own versions through OPENCLAW_SPEC.

CI runs the job at 2026.11.5, 2026.11.4 and 2026.10.33.

Bench numbers (measured once, on a 4-vCPU machine)

Catalog: the first 750 skills of catalog.jsonl.gz from garrytan/gbrain-evals@20f30c00 (docs/benchmarks/2026-11-07-skill-ranker-offline/data). Requests: test.jsonl plus stress-test.jsonl from the same folder, 320 turns (173 whose right skill is in the catalog, 112 that need no skill, 35 whose skill is outside the catalog). OpenClaw 2026.11.5, default plugin settings: top 3 and the resolver's no-skill gate at its default 0.6 (no top_gate in config). The gate-off column sets skills.resolver.per_harness.openclaw.top_gate 0 with the new --top-gate flag.

Measure Gate 0.6 (default), idle Gate 0.6, 3 busy CPU loops Gate off, idle
Right skill in the block 0.399 (69/173) 0.399 (69/173) 0.399 (69/173)
Best skill in the block 0.281 0.281 not recounted
A block shown when no skill fits 0.83 (93/112) 0.83 (93/112) 0.98 (110/112)
Deadline misses 0/320 0/320 0/320
Plugin time p50 / p95 2 / 9 ms p95 8 ms
Whole turn p95 (CLI wall time) 3189 ms 3546 ms

All 750 skills were listed by setup in every run, and every turn logged an outcome (gate 0.6: 301 suggested, 19 no_match; gate off: 318 suggested, 2 no_match). The gate is active in the real gateway but empties fewer blocks here than on harness-evals' public set P (11.5% of no-skill requests at 351 skills); this PR doesn't explain that gap. For comparison, the offline eval's ungated hit@5 at 750 skills was about 0.555; this bench shows 3 suggestions, not 5. The bench workflow runs nightly at load 0 and 3 and on demand.

Agent notes
  • Plan: exempt (audited-list).
  • Review: one gstack /ship pass (specialists, red team, adversarial, second-model review, targeted). No blockers. Three informational findings were fixed in one round: the gateway port now comes from the OS, bench skill descriptions are JSON-quoted with an all_listed flag, and the bench's load processes are cleaned up on interrupt. Five noted for a follow-up: a missing log line should count against the bench's rates, the bench concurrency group, the npm availability of the three pinned versions, failing the bench when setup lists fewer skills, and labelling the wall-time column.
  • Docs audit: one line added to docs/TESTING.md.
  • CI's stress gate failed the new e2e file, because every test skips where OpenClaw isn't installed. scripts/stress/run.ts now lets a file with zero executed tests through only when one workflow job does three things for it. It runs the file through scripts/run-with-receipt.sh <lane>. It sets every GBRAIN_TEST_REQUIRE_* variable the file reads to 1, in that step's env or the job's, so a missing prerequisite fails the file there instead of skipping. And it runs scripts/require-executed-tests.ts on that same lane, so the job fails if the file executes nothing. Comment lines don't count. A job that only names the file, sets the variable on another step, checks another lane, or runs the file without a receipt claims nothing. test/scripts/test-stress.test.ts has a case for each.
  • Second review round, on e7c19ea with the stress change named to the reviewers: no blockers from the panel. The second-model review flagged that the test gateway ran under setsid, which stock macOS lacks. It now uses setsid only where it exists and otherwise signals the gateway's pid. The same fix round also bound the stress claim to the step and lane, made log reads skip a half-written line, and closed the fake model server's connections. Noted for the follow-up: the bench step timeout under load, the brief port reuse race, and the nightly-only job.
  • gstack: ok 1.101.0.0 for=ship. The /ship receipt is written after full-ci clears the remote gate.

vorflux Bot and others added 30 commits November 18, 2026 09:30
…eyword arm's options as PGLite does

(cherry picked from commit 266edd8)
(cherry picked from commit 2ba77676e021a0b98de15a4c64277f064bfc449e)
…arity); it refuses until the sealed search timeline lands

(cherry picked from commit 8b67480)
(cherry picked from commit 4a3bbd9250c5a1f1fd5ea690e9094d56ecf9ec92)
… a parity case for timelines, the candidate cut, the OR retry and identifiers

(cherry picked from commit 0d2eb38)
(cherry picked from commit f3a568948e70aef9ee78ea27deee8c31fe149fd8)
…s PGLite's trigger does

The trigger form of the rebuilt page search vector now takes coalesce(timeline, timeline_lead, '').
page_body keeps the lead privately, so a stand-in reads NULL until page_body exposes a reader
(follow-up title-vector-segmented-lead). The doc names what the segmented seal must record.

(cherry picked from commit 394f0d9)
(cherry picked from commit 3e54bf083fce64b89be242ee13c8e762a930e7ae)
…tor, as PGLite does

Core item 15 deletes the seal's search timeline on every write that sets the title or timeline.
A new parity case seals a page, re-puts the same input, and finds a timeline entry added after
the seal. Docs close title-vector-reput-after-seal, close the stale question as the shared
dialect rule, and rename the chunk page-filter follow-up to pglite-keyword-chunks-page-filters.

(cherry picked from commit 46b8123)
(cherry picked from commit ac5f43d610292f33b1ad239aae1bb963f1ec3b35)
…ake about 20 ms, not 370 ms

The Rust store rebuilds each chunk's and page's search vector from its text on
every query, which was about 95% of a keyword query's time. Rebuilt vectors now
go into a process-wide cache keyed by the exact input text (text search config,
vector kind and every text part), so a hit is always the vector a rebuild gives
and no write needs to clear it. The cache is bounded at 64 MiB with two
generations. On a 2,000-page, 4,000-chunk brain, searchKeywordChunks went from
365-390 ms per query to about 340 ms for the first query and 16-22 ms after.

(cherry picked from commit 5710334)
(cherry picked from commit 7ba9ad2e14715c040c00bb326e0426cec6db09e0)
The title vector's trigger form now reads the lead the page's last flip
published (page_body::timeline_lead from lane 3), as PGLite's trigger
does with coalesce(timeline, timeline_lead, ''), instead of a NULL
stand-in. Closes follow-up title-vector-segmented-lead.

(cherry picked from commit 97a99fe)
(cherry picked from commit f13e3644118d5152ad687542f9b47ae1ab63c483)
…L 18.6

The stemmer, parser and full-text goldens (english_stem.tsv, ts_parse.json, tsearch.json) came from a probe script that was never committed. This script re-asks PGLite 0.5.16 (PostgreSQL 18.6) for every output in them, reading the inputs from the committed files, and reports any difference. Run with --write to rewrite them. On the committed files it reports no difference.

(cherry picked from commit a1fa8385aa1cce125c93e7964b5749c632a2ce54)
Drop the #9692 consolidation restore from this wave: on a managed brain a consolidate closes fenced members in the entity page's facts fence, and a database-only restore would reopen them in the database while the page still holds them closed. Managed restores keep refusing, as before. The synopsis frontmatter check uses the indexable containment form, and a held move's planning reads share one deadline signal.

Review-Finding: p1/red-team#1 reader=red-team
Review-Finding: p1/red-team#2 reader=red-team
Review-Finding: p1/red-team#3 reader=red-team
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…k reads

Marks the keyword search, title search, title-similarity, chunk page and chunk
window members as served by the Rust engine, and updates the parity case counts.
Produced by test/engine-parity/coverage.ts --write.
…les through the bounded YAML loader

- entity_identity_reviews gets a carried user_data row in the graduation inventory: on a brain with no repository it is
  the only record of a confirm or reject, so graduation must copy it. Without the row graduation refused with an
  unclassified relation.
- An e2e test graduates a PGLite brain with a confirmed and a rejected group to Postgres and checks both decisions,
  the confirm's identity rows and rank_entities counting the confirmed person once survive.
- Decision files are read with loadBoundedYaml (data-frontmatter.ts), the one js-yaml load entry point master now
  enforces.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
With a room declared, the owner's own credential reads private Facts rows,
held rows and takes in get_page, but the room mark judged only the page row
and said the room could read it. get_page results now carry a check the room
marker runs only under a room: remoteReadStrips compares the body the caller
gets with what a world-only read of it keeps, and any difference marks the
page room_access {readable: false, reason: 'private_label'}. The mark is per
page. A member in the same room is marked as before.

Also adds the upgrade-notice row and the changelog fragment, and states the
known limit that an owner's private-row edit through put_page does not stick.

Review-Finding: p3/red-team#1 reader=red-team
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
The Postgres engine read the segmented chunker version from the chunker
module, so loading the engine pulled in the code chunker and its tree-sitter
wasm asset. Node (the OpenClaw host) cannot load that asset, so the reflex's
direct Postgres connection failed and every turn shipped with no entity
pointers. The constant now lives beside SAFE_FENCE_CHUNKER_VERSION in
search/safe-chunks.ts (segment-chunks.ts re-exports it), and the Node-load
guard now also checks src/core/postgres-engine.ts.
…efore

The owner's every-holder default and its graph-hop text exemption now apply
only when no room is declared. In a declared room the owner's credential reads
world takes and gated hop text, as before this change, until GST-3066 adds
room marks to those operations. Its get_page keeps the Facts rows and the room
mark; a segmented page's markdown view in a room reads as before. With no
room nothing changes. The room switch reads the same declaration the room
marker uses, through one internal caller-access flag.

Also corrects the upgrade notice, changelog fragment and runbook to say what
the room mark covers and what it does not (held rows in read-view windows and
in a holders-list owner's segmented markdown, as before), that the local CLI's
--room marks change, and which reads give the owner every take holder.

Review-Finding: p4/fix-check#1 reader=fix-check
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Shortens the owner-read entry and moves the two write-gate entries to the continuation page, which the room note pushed over the 60000-byte cap.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…or and upgrade-replay goldens count the new table

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…ct call

The owner's wider reads (Facts rows as stored on get_page and fetch_page, a
segmented page's markdown view, every take holder for a credential with no
holders list, and graph-hop text) were on wherever a context resolved to the
owner, with each exception switched off by hand; delegated agent jobs were
one nobody had switched off. They are now off by default, and dispatch
switches them on for exactly one case: a direct remote call from an
owner-bound credential speaking for itself with no room declared. Agent jobs,
group chats, stdio, on-behalf-of audiences and attested actors read as before
this change. A census test fails if a second site sets the flag.

An agent job also reads its client's stored takes holders list, read fresh
with the grant, else world takes as before.

Review-Finding: p5/fix-check#1 reader=fix-check
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…o a brain without the pages refuse

A page rename now moves the places the secret redactor recorded on the page, so purging a page that later
takes the old name no longer deletes the renamed page's originals, and purging the renamed page removes them.
The purge also keeps any place whose page id names a live page outside the purge (rows renamed before this fix).

A backup restore now reports originals whose page is not in this brain as skipped_no_page ("skipped because
their page is not in this brain"), with the next step to sync the pages and run the same restore again. When
every entry is skipped that way it refuses with invalid_params and writes nothing.

Also: the next backup is due for entries sealed while a backup ran (database high-water mark, not the host
clock); a spooled duplicate records its commit places on the existing original so a purge keeps it; a restore
groups occurrences by entry once.

Review-Finding: p1/red-team#1 reader=red-team
Review-Finding: p1/specialist-batched#1 reader=state-machines
Review-Finding: p1/specialist-batched#2 reader=data-migration
Review-Finding: p1/specialist-batched#4 reader=performance
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
A host that restores the thin-client tree without its node_modules got a launcher that passed its runtime check and then failed in Bun's module resolver ("Cannot find package 'js-yaml'"). When the CLI runs from a tree with its own bun.lock and node_modules, the launcher now checks that directory and prints the lockfile restore command (bun install --frozen-lockfile --ignore-scripts in that tree).

Reported by @Kkkkkuro; first fixed by @Masashi-Ono0611 in #9666.

Co-Authored-By: Masashi-Ono0611 <98894508+Masashi-Ono0611@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
A rebuilt brain numbers its pages in another order, so a restored occurrence could name an unrelated page; the purge cascade then kept the original when its real page was purged. Restore now looks the page up by source and slug.

Review-Finding: p2/outside-voice#1 reader=outside-voice
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…ript changes (#9648)

A oneshot child that decides correctly to write nothing but answers in prose instead of the skip JSON dead-letters under require_writes and releases its key, so every cycle paid for the same transcript again and doctor reported dream_paid_loop. A dead synthesize child that finished cleanly with no page write now counts as settled for that content key; a changed transcript has a new key and is synthesized again.

Reported by @andreineacsu; first fixed by @Masashi-Ono0611 in #9651.

Co-Authored-By: Masashi-Ono0611 <98894508+Masashi-Ono0611@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Known limits from #9707's final review: the room mark is judged with the caller's own fact grant (GST-3066), and owner tokens minted with gbrain auth create store ['world'].

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
A timestamp like 2026-02-30 or 25:61 used to be accepted by the Rust store and stored as written. The store now checks the calendar: the day must exist in its month, hours, minutes and seconds must be in range, and 24:00:00 and a :60 leap second roll over the same way Postgres does. Page dates (effective_date) use the same check.

Review-Finding: specialist-batched#1 reader=specialist-batched
…d) pages

Three writes could leave a segmented page's search text wrong on the Rust store:
- sealChunks accepted a segmented page and replaced the chunks built from its segments. It now refuses (invalid_state), and a page in an archived source is not found, as on Postgres.
- deleteChunks removed the chunks but kept the page's seal, so a later unsealed write was read as current. It now clears the seal.
- createVersion of a segmented page wrote a version with no body and no reference to one. It now refuses with a typed capability_missing instead of writing an empty version. This changes the store's contract on purpose: the old test that pinned a version of a shell page is rewritten to expect the refusal.

Also adds a test that an impossible effective date is refused and writes nothing.

Review-Finding: adversarial-native#2 reader=adversarial-native
Review-Finding: adversarial-native#3 reader=adversarial-native
Review-Finding: adversarial-native#1 reader=adversarial-native
…ssify the secret store for it

The rebuild's access comparison and the purge preview's member classification read the plain private-pages
fragment; neither serves a remote caller, so both are listed as maintenance sites. The secret store's two purge
tables are rows derived from the old page's text and are classified as such.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
vorflux Bot and others added 15 commits November 19, 2026 10:49
Return the rename's handling of a place with no page id to what master does: it moves with the renamed page, so no page that later takes the old slug can reveal the original. The changelog now says a full copy of the marker still counts as holding it.

Review-Finding: v2/outside-voice#1 reader=outside-voice
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…concept-purge-rebuild

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Review-Finding: p1/specialist-batched#1 reader=testing
Review-Finding: p1/specialist-batched#2 reader=testing
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
… original

The rebuild's purge would delete a sealed original recorded only on the hidden concept's page, which nothing removes
today because the automatic expiry skips a held tombstone. A page-level secret occurrence now keeps the concept
hidden. A concept that only copied a redaction from a live member stays hidden too, until entries can be compared
across pages.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…t its slug with no page

The purge deletes a slug's page-level secret occurrences that name the purged page or no page at all, so the hold
now matches both, as the purge's own predicate does.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…remember-valid-from-starter

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@capy-ai capy-ai Bot added the full-ci Maintainer-only: run the full Test and E2E suite on this PR head label Nov 19, 2026
@github-actions github-actions Bot removed the full-ci Maintainer-only: run the full Test and E2E suite on this PR head label Nov 19, 2026
garrytan and others added 2 commits November 19, 2026 12:29
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…nclaw-skill-resolver-real-gateway

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@capy-ai capy-ai Bot added the full-ci Maintainer-only: run the full Test and E2E suite on this PR head label Nov 19, 2026
@github-actions github-actions Bot removed the full-ci Maintainer-only: run the full Test and E2E suite on this PR head label Nov 19, 2026
@capy-ai
capy-ai Bot merged commit 559311b into master Nov 19, 2026
273 checks passed
garrytan added a commit that referenced this pull request Nov 19, 2026
Master's v326 (pages title hash index) took the number #9684's access
handovers held, so in this local tree access handovers moves to v327 as

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
#9684 will, and this branch's owner-only reads migration moves to v328.
garrytan added a commit that referenced this pull request Nov 19, 2026
… head 49c7246 (access handovers v327, owner-only reads v328)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@garrytan garrytan mentioned this pull request Nov 19, 2026
garrytan pushed a commit that referenced this pull request Nov 19, 2026
What users get from master in this sync:
- gbrain access member handover hands a leaver's pages to the owner (#9684)
- Duplicate-person linking now asks first and confirms people who share an id one at a time (#9762)
- Company-brain tutorial explains how imported calls are kept to their attendees; --propose heading fixed for partly matched calls (#9718)
- One-script install of GBrain Helper on a Mac that keeps its macOS permissions (#9816)
- The brain owner is told when a remote put_page kept private fact rows (#9760)
- The brain owner sees the same private fact rows in as_of and known_as_of reads as in get_page (#9733)
- Turning iMessage sending off cancels a text still on its way, and --off only reports success it can show (#9791)
- Starter MCP clients can date a remembered fact with valid_from (#9802)
- A secret store restore ties an original only to a page that still holds its marker (#9806)
- Concepts hidden by a purged input come back rebuilt from their current members (#9794)
- Nightly test of the OpenClaw skill-resolver plugin inside a real gateway (#9799)
- Version stamps v0.60.746.0 and v0.60.747.0 (#9814, #9828)

Conflict resolution: valid-time-read.ts keeps the trunk's engine-sql imports and adds master's owner fence view. The generated files (migration registry, CLI flag registry, raw-SQL baseline, export and migration goldens) take master's copy for now and are regenerated in the next commit. Master took migration v327 (access handovers), which clashes with the trunk's v327; the renumber follows.
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.

1 participant