Commit Graph

28 Commits

Author SHA1 Message Date
Peter Steinberger 4249df34b4 improve(code-mode): call tools as global functions (#126262)
* feat(code-mode): expose tools as global functions

* fix(code-mode): harden callable tool composition

* fix(code-mode): reserve private guest globals

* fix(cron): migrate legacy code-mode triggers

* fix(code-mode): align final tool result contracts
2026-08-20 12:18:23 -07:00
Ayaan Zaidi b7b7eec5ee feat(qa): run Mantis Telegram proof on local desktop (#126220)
Move Mantis Telegram Desktop proof from the remote AWS/Crabbox lane to a recorder-driven local Docker desktop. Keep proof scenarios agent-authored, cache trusted build outputs, and publish exact visible Telegram evidence without writing the QA bot token to artifacts.

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-08-20 11:12:51 +00:00
Peter Steinberger 980b07f4a2 refactor(agents): replace tool-failure warning heuristics with a two-rule policy (#126542)
* refactor(agents): reduce tool failure warnings to two rules

* test(agents): remove obsolete tool recovery receipt proof

* refactor(agents): drop unused meta param from buildToolMutationState

* test(agents): remove stale tool warning assertions

* test: export runtime source snapshot from closed runtime-snapshot mocks

Heal the main breakage introduced by 9441e3fe6e / #126531, which added a runtime source-snapshot read to provider model route resolution. Closed Vitest factories now return null for that source snapshot, preserving their pre-projection behavior.

* test(gateway): make compaction read-error faults order-immune

Generation-2 CI failure in run 32342180898, job 96343444772 showed that the mock factory initialized while shared gateway-server importers remained bound to the real transcript reader.

The dedicated isolated project fixes normal shards. Complete its ownership by adding it to the root project matrix and excluding the test from the non-isolated OPENCLAW_GATEWAY_PROJECT_SHARDS=0 fallback.
2026-08-20 01:11:05 -07:00
Ayaan Zaidi 8c6976e1fc fix(agents): report recovered tool retries (#125078)
Preserve attempt-local recovery state so successful mutation retries emit a redacted terminal receipt without stale failure warnings.

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-08-17 14:35:00 +05:30
Peter Steinberger 2fa9a29c77 test(plugins): add Agent Plugins gateway e2e with model-driven MCP tool call (#120303)
* test(plugins): add Agent Plugins gateway e2e with model-driven MCP tool call

* fix(test): wire Agent Plugins gateway E2E and assert activation
2026-08-07 11:47:07 -07:00
Ayaan Zaidi 4bd56b8ad8 test(e2e): tag the mock Responses preamble with its wire phase
The mock streamed pre-tool assistant text on the Responses path without `phase: "commentary"`, the field the API sets and the transport reads, so the draft-proof scenario ran green while never exercising the preamble lane on that transport. Proven live on Telegram: the preamble now renders as the status headline, and as a commentary line when progress.commentary is on.
2026-07-30 16:34:38 +09:00
Ayaan Zaidi d8d77ffbae test(e2e): delay the draft-proof final answer past the start gate
A progress draft only exists while the agent is working, and OpenClaw's exec
returns instantly for a mock tool call, so the whole turn finished in ~86ms —
inside the 1.5s draft gate. No draft was created, which is correct behavior but
proves nothing about rendering.

The draft-proof scenario now holds its final answer (MOCK_DRAFTPROOF_FINAL_DELAY_MS,
default 6s) so the turn straddles the gate. That is what made the live Discord
recording possible: draft created, edited with the status headline above the
tool line, replaced by the final answer, then deleted.
2026-07-30 13:36:21 +09:00
Ayaan Zaidi dcb0ad5c29 fix(ci): satisfy docs formatting, lint, and the SDK API baseline
Three gates my own changes broke:

- docs/channels/telegram.md needed a blank line before </Note>; I formatted the
  TypeScript but never ran the docs formatter over the pages I edited.
- The mock harness matched a literal with a regex, which oxlint's prefer-includes
  rejects.
- Widening resolveChannelPreviewStreamMode's defaultMode to StreamingMode and
  adding rendersRollingLinesNatively changes the exported plugin-SDK surface, so
  the API baseline hash had to be regenerated.
2026-07-30 13:36:21 +09:00
Ayaan Zaidi 436557b8e9 test(e2e): add a progress-draft scenario to the mock provider
Proving headline-plus-tool-line composition needs assistant text emitted
*before* a tool call: that leading text is what gets tagged as commentary and
rendered as the draft's status headline. The mock could only echo a single token,
so the draft path was unreachable without a live model.

Trigger `OPENCLAW_E2E_DRAFTPROOF` now serves two turns — preamble plus a shell
call, then the final answer — on both /v1/responses and /v1/chat/completions.
Only the completions transport tags commentary today, which is why the
completions path matters here.

Used to record the draft live on real Telegram: one message carrying the
headline above the tool line, the final answer, then the draft edited to its
receipt.
2026-07-30 13:36:21 +09:00
Peter Steinberger 45bad50e26 fix(qa): harden Mantis Telegram proof harness (#114429)
* fix(qa): harden Mantis Telegram proof harness

* fix(qa): require explicit Mantis dispatch
2026-07-27 04:33:06 -04:00
Jason (Json) baa8b9b24f test(telegram): add MCP App Funnel proof fixture (#111238) 2026-07-19 00:14:36 -06:00
Vincent Koc 796fc409f6 fix(e2e): echo dynamic mobile markers 2026-07-12 15:22:19 +02:00
Peter Steinberger fa77fe10d5 chore: migrate active GPT-5.5 references to GPT-5.6 (#104452)
* chore(models): migrate active GPT-5.5 references

* test(workboard): expect GPT-5.6 Sol default

* chore: keep release notes in PR body

* test(models): align picker fixtures with Sol default

* test: update PDF default model expectation

* test(qa): migrate thinking smoke to Luna

* test(gateway): align mock catalog with Sol default

* ci: retrigger exact-head PR checks

* test(gateway): document default catalog invariant
2026-07-11 06:30:57 -07:00
Dallin Romney e7b5946da0 refactor(scripts): share regexp literal escaping (#99778) 2026-07-03 20:20:28 -07:00
Vincent Koc 317919ec52 fix(e2e): reject invalid mock fixture ports 2026-06-18 20:28:20 +02:00
Peter Steinberger cb5bb9b936 docs: document e2e helpers 2026-06-05 00:04:03 -04:00
Vincent Koc 61d16dd173 fix(e2e): fail mock openai request log errors 2026-06-04 06:37:24 +02:00
Vincent Koc b2b9fbe033 fix(test): bound mock OpenAI request bodies 2026-06-01 04:48:32 +02:00
Peter Steinberger b653d94918 chore(lint): enable no-useless-assignment 2026-05-31 22:40:48 +01:00
Peter Steinberger e681569536 feat: add code-mode MCP API files
* feat: add code-mode MCP API files

* fix: satisfy code-mode MCP lint
2026-05-31 21:29:06 +01:00
Peter Steinberger 2df95c0b10 chore(lint): enable no-misused-promises 2026-05-31 20:42:13 +01:00
Vincent Koc be6cac375a refactor: share e2e mock http helpers 2026-05-29 22:26:17 +02:00
Vincent Koc c903b271cf fix(e2e): reject loose mock config limits 2026-05-29 02:38:29 +02:00
Vincent Koc 29664863a5 fix(qa): stream mock response text deltas 2026-05-18 14:16:27 +08:00
Peter Steinberger ebd829cffd test: add release qa docker lanes 2026-05-13 20:57:44 +01:00
Ayaan Zaidi fcc0f4996c test(e2e): measure telegram normal reply rtt 2026-05-01 20:52:28 +05:30
Peter Steinberger 6b3e4b88d6 test: update QA parity fixtures for GPT-5.5 2026-04-25 18:05:28 +01:00
Peter Steinberger 11ad1919ed test: stabilize Docker MCP lanes under load 2026-04-24 17:41:37 +01:00