Commit Graph

50125 Commits

Author SHA1 Message Date
Shakker
405535d4ce fix: polish gateway restart diagnostics 2026-05-16 17:50:36 +01:00
samzong
92fe2a8f5f fix(gateway): improve restart readiness diagnostics 2026-05-16 17:50:36 +01:00
Peter Steinberger
597b7b0628 fix(skills): default codex review to yolo mode 2026-05-16 17:47:38 +01:00
Peter Steinberger
38cf54593e fix: accept device identity dashboard probes 2026-05-16 17:42:16 +01:00
Vincent Koc
6ed16d9356 test(extensions): harden plugin prerelease shards 2026-05-17 00:40:42 +08:00
Vincent Koc
deaf46a07d fix(auth): avoid keychain creation for oauth profile secrets 2026-05-17 00:31:30 +08:00
Vincent Koc
fddac1c507 test(extensions): align mocks with runtime contracts 2026-05-17 00:23:23 +08:00
Peter Steinberger
4526b44778 fix: preserve generated media completion attachments 2026-05-16 17:13:30 +01:00
Peter Steinberger
15b0d43412 docs: clarify plugin gateway auto-restart 2026-05-16 17:11:53 +01:00
Peter Steinberger
777d289979 fix(matrix): avoid state-after sync opt-in 2026-05-16 16:57:24 +01:00
Peter Steinberger
2fcaab0010 fix: clean up approval handler PR landing (#82482) 2026-05-16 16:41:07 +01:00
Feelw00
a2f1f73107 docs(plugins): note cancelDelivered in channel plugin interactions list
ClawSweeper R3 flagged that the previous follow-up added the
`cancelDelivered` hook to the public approval-handler runtime interaction
surface but left the channel plugin docs describing `interactions` as
only bind/unbind/clear-action hooks. Extend the bullet so plugin authors
whose `deliverPending` registers in-process or persistent state know
when to implement the cancellation hook.

AI-assisted: drafted with claude code (claude-opus-4-7).
2026-05-16 16:41:07 +01:00
Feelw00
ea9793b2e1 fix(approvals): release Matrix reaction target on mid-flight cancel
Address the ClawSweeper R2 finding that the pre-bind stopped guard
introduced in this PR drops a delivered entry without any cleanup. The
prior PR comment block was correct only for adapters whose deliverPending
has no in-process side effects; Matrix registers a reaction target in
both an in-memory Map and a persistent store inside deliverPending, so
the entry would leak until the 24h TTL (or process restart) every time
stop() landed between deliverPending and bindPending.

Add an optional cancelDelivered interaction hook on the runtime types,
forward it through both the spec-to-adapter wrapper
(createChannelApprovalNativeRuntimeAdapter) and the lazy adapter wrapper
(createLazyChannelApprovalNativeRuntimeAdapter), and invoke it from the
two stopped guards in deliverTarget: the pre-bind guard always calls it,
and the post-bind guard calls it on the branch where bindPending
returned no handle (so unbindPending cannot run). Matrix implements the
hook by calling unregisterMatrixApprovalReactionTarget on the entry's
roomId + reactionEventId, which is the exact key
registerMatrixApprovalReactionTarget uses inside deliverPending.

The other native runtime adapters (Slack, Discord, Telegram, qqbot)
leave the hook unimplemented because their deliverPending paths only
emit remote messages and keep no in-process state to drop.

Regression coverage:
- invokes cancelDelivered when stop() fires between deliverPending and
  bindPending (Deferred-gated deliverPending, asserts bindPending /
  unbindPending never run and cancelDelivered receives the entry)
- invokes cancelDelivered when stop() fires after bindPending returned
  null (asserts unbindPending stays uncalled while cancelDelivered fires)

AI-assisted: drafted with claude code (claude-opus-4-7).
2026-05-16 16:41:07 +01:00
Feelw00
851b9271a5 fix(infra): skip unbindPending without a binding handle (dts build)
The previous commit invoked unbindPending in the deliverPending→bindPending
race path before any binding existed; nativeRuntime.interactions.unbindPending
requires a binding, so the dts build failed with TS2345. In production the
race window that PROOF-CAND-040 measured is always after bindPending (3/3
trials had bindPending=1), so dropping the pre-bindPending unbindPending
call does not change observed cleanup behavior: that branch now just nulls
out the in-flight delivery. The post-bindPending branch keeps the
unbindPending call (binding handle present) and remains the only path
required to fix the leak.

The regression test is updated to park bindPending (not deliverPending)
before invoking stop(), matching the production race window.

AI-assisted: drafted with claude code (claude-opus-4-7).
2026-05-16 16:41:07 +01:00
Feelw00
06dfa6f160 fix(infra): drop in-flight approval delivery after onStopped
createChannelApprovalHandlerFromCapability shares a closure-scoped
activeEntries Map across deliverTarget / finalizeResolved /
finalizeExpired / onStopped, with no synchronization primitives in the
file. deliverTarget's two awaits (transport.deliverPending then
interactions.bindPending) bracket a read-modify-write on activeEntries;
if onStopped clears the map between those awaits, the wrapped entry is
inserted into an already-cleared map and never reaches unbindPending —
the native side keeps its listener / channel binding open forever.
Production-faithful e2e measured this 3/3 trials: bindPending=1,
unbindPending=0 per request.

Track a closure-scoped `stopped` flag set by onStopped, and have
deliverTarget call unbindPending and bail to null on each await when
stopped becomes true. nativeRuntime contracts (transport / interactions
signatures) are untouched.

AI-assisted: drafted with claude code (claude-opus-4-7).
2026-05-16 16:41:07 +01:00
Gio Della-Libera
2c59ea8a2e fix(sessions): estimate local transcript usage
Fixes #73990.\n\nAdds a transcript-derived token estimate for local/OpenAI-compatible session transcripts that have real content but no provider usage telemetry, preserving provider-reported usage when available and gating estimation on assistant model identity.\n\nVerification:\n- CI run 25965717279: success\n- Real behavior proof run 25965716561: success\n- Azure Crabbox clean-clone proof: pnpm test src/gateway/session-utils.fs.test.ts src/status/status-message.test.ts; pnpm check:changed; pnpm exec tsx /tmp/openclaw-transcript-proof.mts; git diff --check origin/main...HEAD
2026-05-16 08:40:09 -07:00
Peter Steinberger
575936473d fix(auto-reply): log suppressed message-tool-only finals (#82609)
* fix(auto-reply): fallback group finals when message tool is missed

* fix(auto-reply): log suppressed message-tool finals

* docs(auto-reply): clarify message-tool finals stay private

# Conflicts:
#	CHANGELOG.md

* docs(auto-reply): fix group visible reply examples
2026-05-16 16:30:07 +01:00
Kagura
ffdc7aa7a6 fix(slack): route DM thread replies to main session instead of thread-scoped session (#82418)
* fix(slack): route DM thread replies to main session instead of thread-scoped session

DM thread replies (user replies inside a thread under a bot message in a
DM) were routed to a thread-specific session key instead of the user's
main DM session.  This caused the agent to never receive the inbound on
the expected session, making the bot appear unresponsive.

The root cause was in prepare-routing.ts: canonicalThreadId for
isDirectMessage was set to threadTs when isThreadReply was true, creating
a session key like agent:main:slack:direct:u3🧵<ts>.  DM threads
are a UI affordance — not a session boundary — so all DM messages should
route to the main DM session regardless of thread_ts.

Also adds a diagnostic logVerbose warning when assistant_app_thread
message_changed events fail sender resolution (Case 2 of #82390),
which was previously completely silent.

Fixes #82390

* chore(slack): polish DM thread routing PR

* test(slack): update DM thread routing contract

* test(slack): flatten non-main DM thread expectations

* fix(slack): preserve bound DM thread routes

* test(slack): align DM thread session fixtures

* fix(slack): keep flattened DM thread metadata scoped

* fix(slack): preserve DM thread delivery routes

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-05-16 16:24:36 +01:00
Peter Steinberger
cc22c2ad79 docs: add codex app-server timeout changelog 2026-05-16 16:21:34 +01:00
Peter Steinberger
2074cde6cf test: stabilize codex app-server waits 2026-05-16 16:21:34 +01:00
Peter Steinberger
18cbc7bc48 test: repair current CI drift 2026-05-16 16:21:34 +01:00
Peter Steinberger
21c5f8dc6d fix(codex): keep run lane timeout progress-aware 2026-05-16 16:21:34 +01:00
Peter Steinberger
a641a27bd4 fix(codex): harden app-server progress watchdog 2026-05-16 16:21:34 +01:00
Peter Steinberger
efe3790dd3 fix(codex): preserve queued turn-start progress 2026-05-16 16:21:34 +01:00
Peter Steinberger
6778da05d6 fix(codex): scope app-server request watchdog progress 2026-05-16 16:21:34 +01:00
Eva (agent)
d7d597cfd8 fix: scope codex attempt watchdog to turn progress 2026-05-16 16:21:34 +01:00
Eva (agent)
722161271e fix: make codex app-server timeout progress-aware 2026-05-16 16:21:34 +01:00
Peter Steinberger
55439fe34b fix(agents): observe detail-less responses failures 2026-05-16 16:21:01 +01:00
Gio Della-Libera
0eca3a92e3 fix(auto-reply): preserve session model display for heartbeat usage (#82267)
* Preserve session model display for heartbeat usage
* Refresh checks after proof update
* chore: refresh CI after main repairs
2026-05-16 08:09:49 -07:00
Peter Steinberger
1769e6a2f0 fix(agents): log detail-less responses failures (#82593)
* fix(agents): log detail-less responses failures

* fix(github-copilot): guard device login fetches

* test(ci): refresh stale cron and session expectations

* test(ci): keep cron legacy string fixture

* fix(agents): redact array response failure ids

* fix(agents): classify empty response failures
2026-05-16 15:57:40 +01:00
Gio Della-Libera
0b708a2574 OC Path: restore YAML support (#81436)
* OC Path: restore YAML support
* fix(oc-path): guard yaml writes and empty sequences
* fix(oc-path): guard yaml insertion keys
* fix(oc-path): guard yaml object key
* fix(oc-path): classify yaml root insertions
* style(oc-path): format yaml branch after rebase
* fix(oc-path): reject malformed yaml edits
* docs(oc-path): clarify yaml file support
* fix(ci): refresh yaml branch after rebase
* fix(ci): clean shared blockers for yaml path PR
* fix(changelog): keep yaml path note scoped
* fix(ci): preserve current shared contracts


---------

Co-authored-by: Gio Della-Libera <giodl73@gmail.com
2026-05-16 07:52:08 -07:00
Gio Della-Libera
f7b1148bed Strip inbound metadata from replayed user turns (#82614) 2026-05-16 07:45:56 -07:00
Vincent Koc
fa9a22b960 changelog: credit TUI fallback model display fix (#82296) 2026-05-16 22:42:43 +08:00
Vincent Koc
0b24ffb91f fix(ci): keep performance artifacts on report publish failure 2026-05-16 22:41:34 +08:00
Gio Della-Libera
22858769e4 fix(tui): update model display during fallback (#82296)
* fix(tui): update fallback model display

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Refresh checks after proof update

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* chore: refresh CI after main repairs

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-16 07:35:43 -07:00
Peter Steinberger
9dedc4d95c fix: honor Codex auth order for OpenAI PI (#82605)
* fix: honor Codex auth order for OpenAI PI

* docs: add PR reference for OpenAI PI auth fix
2026-05-16 15:26:27 +01:00
Peter Steinberger
16e5d6692d fix(gateway): bound traced channel startup handoff (#82592)
* fix(gateway): bound traced channel startup handoff

* fix(github-copilot): guard device login fetches

* fix(gateway): skip stopped traced channel handoffs

* test(net): keep guarded fetch mocks hermetic
2026-05-16 15:15:57 +01:00
吴杨帆
eebdbabae9 fix: omit Ollama think for non-reasoning models
Preserve native Ollama thinking controls for supported models and explicit think=false, but avoid sending truthy think payloads for models marked reasoning=false.\n\nCo-authored-by: 吴杨帆 <85487201+leno23@users.noreply.github.com>
2026-05-16 15:10:12 +01:00
Gio Della-Libera
caf8fa2ebf Revert "Fix bundled channel dist-runtime setup roots" (#82612)
This reverts commit 1bd10cfee6.

Co-authored-by: Gio Della-Libera <giodl@microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-16 07:07:39 -07:00
Peter Steinberger
58083866d0 fix: sync codex app-server protocol drift 2026-05-16 15:03:51 +01:00
Kyzcreig
8092761d7b fix: mark codex compaction events completed 2026-05-16 15:03:51 +01:00
njuboy11
6a65ea8c3a fix: preserve post-compaction session token freshness (#82578)
Fixes #82576.

Keeps post-compaction token totals fresh across stale usage updates and adds regression coverage for the repeated auto-compaction loop. Also includes maintainer fixups needed to keep the touched CI lanes green: guarded GitHub Copilot device-flow fetches, dead-session metadata recreation, and current cron stale-data expectations.

Co-authored-by: njuboy11 <njuboy11@users.noreply.github.com>
2026-05-16 14:47:57 +01:00
Ayaan Zaidi
b9921e21b9 docs(changelog): note telegram final reply fix 2026-05-16 18:50:10 +05:30
Ayaan Zaidi
0fb0b5197e test(telegram): cover truncated progress finals 2026-05-16 18:50:10 +05:30
Ayaan Zaidi
20c3580394 fix(telegram): deliver transcript-backed final replies 2026-05-16 18:50:10 +05:30
Gio Della-Libera
1bd10cfee6 Fix bundled channel dist-runtime setup roots
* Fix bundled channel dist-runtime setup roots

Resolve bundled channel generated entries from dist-runtime before falling back to source paths, and select the dist-runtime plugin root as the boundary root for packaged setup modules. This keeps the fs-safe module open boundary check intact while preventing packaged bundled setup entries from being checked against the source extensions root.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Repair session store validation test fixtures

Update current-main tests that wrote persisted session entries without valid session IDs after session store loading started filtering invalid entries. Keep the fixture-only repair separate from the bundled channel loader fix.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Repair pairing and cron validation fixtures

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-16 06:05:34 -07:00
Vincent Koc
394f61b8ce changelog: broaden auth-profile lock bullet to cover all providers 2026-05-16 21:02:58 +08:00
Vincent Koc
a93283337e test(auth): mock locked auth profile upserts 2026-05-16 20:59:57 +08:00
Peter Steinberger
e71d10fd4d fix(webchat): show manual compaction progress
Add first-class session.operation start/end events for manual compaction and render the existing WebChat compaction indicator from those events.

Co-authored-by: Conan Scott <271909525+Conan-Scott@users.noreply.github.com>
2026-05-16 13:58:44 +01:00
Vincent Koc
f410a95081 fix(providers): lock auth setup profile writes 2026-05-16 20:52:12 +08:00