Commit Graph

212 Commits

Author SHA1 Message Date
Vincent Koc
e2501b2d6d fix(diagnostics): export Talk metrics after SDK refactor
Adds bounded Talk lifecycle/audio diagnostics and session recovery metrics for OTEL, Prometheus, and stability snapshots after the Talk SDK/session refactor. Includes changelog/docs updates and Testbox/live proof.
2026-05-06 02:01:52 -07:00
Peter Steinberger
538605ff44 [codex] Extract filesystem safety primitives (#77918)
* refactor: extract filesystem safety primitives

* refactor: use fs-safe for file access helpers

* refactor: reuse fs-safe for media reads

* refactor: use fs-safe for image reads

* refactor: reuse fs-safe in qqbot media opener

* refactor: reuse fs-safe for local media checks

* refactor: consume cleaner fs-safe api

* refactor: align fs-safe json option names

* fix: preserve fs-safe migration contracts

* refactor: use fs-safe primitive subpaths

* refactor: use grouped fs-safe subpaths

* refactor: align fs-safe api usage

* refactor: adapt private state store api

* chore: refresh proof gate

* refactor: follow fs-safe json api split

* refactor: follow reduced fs-safe surface

* build: default fs-safe python helper off

* fix: preserve fs-safe plugin sdk aliases

* refactor: consolidate fs-safe usage

* refactor: unify fs-safe store usage

* refactor: trim fs-safe temp workspace usage

* refactor: hide low-level fs-safe primitives

* build: use published fs-safe package

* fix: preserve outbound recovery durability after rebase

* chore: refresh pr checks
2026-05-06 02:15:17 +01:00
Peter Steinberger
e428a2dfe2 test: add focused seams for faster isolated tests 2026-05-06 00:53:05 +01:00
Peter Steinberger
761e668acf fix: recover stuck diagnostic sessions safely 2026-05-05 04:01:37 +01:00
Peter Steinberger
e0fafdcc1d fix(agents): observe post-compaction guard live 2026-05-05 02:15:42 +01:00
Peter Steinberger
3ba0f588ad fix(agents): observe matched post-compaction tool outcomes 2026-05-05 02:15:42 +01:00
Eduardo Piva
4c4825679b fix(agents): make post-compaction guard config valid + observation trim-resilient
Two correctness fixes from code review.

1. Zod schema (src/config/zod-schema.agent-runtime.ts) was strict and
   rejected tools.loopDetection.postCompactionGuard.* keys at validation
   time, making the guard's documented configurability inaccessible at
   gateway startup. Adds ToolLoopPostCompactionGuardSchema with both
   optional fields and wires it into ToolLoopDetectionSchema.

2. The runner observation cursor in pi-embedded-runner/run.ts used
   absolute indices into state.toolCallHistory, but that array is
   trimmed at historySize (default 30). Once the buffer was full, new
   records shifted out from under the cursor and the guard silently
   missed every loop in long-running sessions. Replaces the index
   cursor with a monotonic toolOutcomeSeq on SessionState that
   recordToolCallOutcome bumps on each observable push (unmatched
   branch only, mirroring the prior cursor's effective semantics).
   The runner now reads the most recent (currentSeq - lastSeq) entries
   from the tail of toolCallHistory, which is trim-resilient.

Adds zod parse tests for the new config keys (valid, empty, unknown
key, non-positive, non-integer) and a runner regression test that
seeds toolCallHistory at the trim cap before triggering a
post-compaction loop, asserting the abort still fires.

Refs #77474
2026-05-05 02:15:42 +01:00
Vincent Koc
ce8bc1a3e3 fix(lint): cover diagnostic phase events 2026-05-04 15:40:00 -07:00
Peter Steinberger
e84d4b27f4 feat: add gateway stall diagnostics 2026-05-04 23:26:25 +01:00
Vincent Koc
f2d9b2c493 fix(tests): restore progress draft changed gate 2026-05-03 21:53:22 -07:00
Peter Steinberger
1360cec546 fix: narrow diagnostic session tail 2026-05-04 05:53:03 +01:00
Peter Steinberger
65f2c2a0db fix: enrich stalled session recovery logs 2026-05-04 05:39:47 +01:00
Peter Steinberger
9c37cfcbdb fix: harden gateway install recovery paths 2026-05-04 01:28:17 +01:00
Peter Steinberger
2b7e8dacd3 fix: quiet nonblocking diagnostic logs 2026-05-03 19:24:38 +01:00
Peter Steinberger
a989d248e9 fix: throttle long-running diagnostic warnings 2026-05-03 18:39:57 +01:00
Peter Steinberger
9a22473916 fix: recover stalled embedded diagnostic runs 2026-05-03 18:13:15 +01:00
Peter Steinberger
1e8de7661e fix: canonicalize diagnostic session aliases 2026-05-03 16:58:05 +01:00
Peter Steinberger
bec83c5116 fix(gateway): include redacted startup bundle errors 2026-05-02 08:56:14 +01:00
Peter Steinberger
78010b65ed refactor: async export file io 2026-05-02 05:03:02 +01:00
Peter Steinberger
c89da2a606 fix: reduce idle liveness warning noise 2026-05-02 04:56:47 +01:00
Peter Steinberger
2d8d50d418 fix: track diagnostic progress before stuck warnings 2026-05-02 00:35:17 +01:00
Peter Steinberger
f8a454e95e refactor: extract diagnostic session classifier 2026-05-02 00:17:16 +01:00
Peter Steinberger
66c58e6d54 fix: preserve queued session recovery diagnostics 2026-05-02 00:13:58 +01:00
Peter Steinberger
32db81ca5c fix: classify session liveness diagnostics 2026-05-02 00:13:58 +01:00
Peter Steinberger
e165b75958 refactor: trim logging helper exports 2026-05-02 00:01:20 +01:00
Peter Steinberger
42d73fd955 refactor: remove dead private helpers 2026-05-01 06:55:26 +01:00
stain lu
84920fad4e security(logging): redact payment credential fields (#75230)
Summary:
- The PR adds payment-credential redaction patterns and a key-aware structured field redaction helper, wires it into tool payload sanitization, and updates focused tests, logging docs, and the changelog.

ClawSweeper fixups:
- No separate fixup commits were needed after automerge opt-in.

Validation:
- ClawSweeper review passed for head 5f5f1fadbb.
- Required merge gates passed before the squash merge.

Prepared head SHA: 5f5f1fadbb
Review: https://github.com/openclaw/openclaw/pull/75230#issuecomment-4355538755

Co-authored-by: stainlu <stainlu@newtype-ai.org>
2026-05-01 05:45:28 +00:00
gavyngong
0260903f7f fix(logging): add redaction patterns for Tencent Cloud, Alibaba Cloud, HuggingFace and Replicate API keys (#58162)
Merged via squash.

Prepared head SHA: 5227c30713
Co-authored-by: gavyngong <267269824+gavyngong@users.noreply.github.com>
Co-authored-by: hxy91819 <8814856+hxy91819@users.noreply.github.com>
Reviewed-by: @hxy91819
2026-05-01 11:13:54 +08:00
Peter Steinberger
36ff8d78e4 fix: explain stuck session diagnostics 2026-04-29 22:55:27 +01:00
Peter Steinberger
61d53f98d3 fix(cron): clean up timed out agent runs 2026-04-29 16:54:22 +01:00
ethanclaw
492e2a3060 fix(logs): find active log file across date boundaries (#42904)
* fix(logs): find active log file across date boundaries

Fixes #42875

When gateway runs across midnight, openclaw channels logs was looking
for today's log file instead of the active one. This change makes
the CLI find the most recently modified log file as a fallback.

(cherry picked from commit fba6b88e86)

* fix(channels): resolve active log file for channel logs

(cherry picked from commit ee87397a43)

---------

Co-authored-by: vincentkoc <25068+vincentkoc@users.noreply.github.com>
2026-04-28 19:11:14 -07:00
Vincent Koc
8e5fcfff50 fix(test): stabilize core runtime infra shard 2026-04-28 17:31:35 -07:00
Peter Steinberger
c500e8704f fix(gateway): recover stale session lanes 2026-04-28 20:37:29 +01:00
Peter Steinberger
df4d3fa5a9 fix(logging): redact subsystem console output before colorizing 2026-04-28 07:36:50 +01:00
edwin-rivera-dev
f2df49ab4b fix(logging): redact secrets at subsystem console sink (#73284)
createSubsystemLogger writes through writeConsoleLine, which intentionally
bypasses the patched console.* capture handler in src/logging/console.ts to
avoid recursion. That bypass also skipped the sink-boundary
redactSensitiveText() gate, so secrets reaching subsystem loggers as
message strings or formatted meta could appear verbatim on the terminal —
a follow-up to the file-transport redaction landed in #67953, tracked
under #64046.

Apply redactSensitiveText() at the writeConsoleLine() exit, immediately
after the existing Windows surrogate sanitization and before dispatching
to the rawConsole sink. This covers all subsystem console paths
(trace/debug/info/warn/error/fatal and .raw) because they share the same
writeConsoleLine() exit, matching the redact-at-sink-boundary pattern
already used in console.ts and the file transport.

Closes #73284
2026-04-28 07:36:50 +01:00
Peter Steinberger
738f5f7508 fix: prevent channel login exec wedges 2026-04-28 05:16:43 +01:00
Peter Steinberger
e1acb61317 refactor: expose SDK test helper subpaths 2026-04-28 03:28:17 +01:00
EVA
1adaa28dc8 [plugin sdk] Add generic plugin host-hook contracts (#72287)
Merged via squash.

Prepared head SHA: 68e5f2ce19
Co-authored-by: 100yenadmin <239388517+100yenadmin@users.noreply.github.com>
Co-authored-by: jalehman <550978+jalehman@users.noreply.github.com>
Reviewed-by: @jalehman
2026-04-27 17:07:02 -07:00
volcano303
f3e8c50df3 fix(agents): redact Control UI tool payload secrets (#72319)
Fixes #72283.

- Redacts Control UI tool start args, partial/final result payloads, derived exec output, and patch summaries before event emission.
- Forces tool/UI payload redaction to include built-in patterns plus configured custom `logging.redactPatterns`.
- Covers object, details-only, primitive string, and top-level array tool-result shapes.

Tests:
- `pnpm test src/agents/pi-embedded-subscribe.tools.test.ts src/agents/pi-embedded-subscribe.handlers.tools.test.ts`
- `pnpm check:changed`

Co-authored-by: volcano303 <75143900+volcano303@users.noreply.github.com>
Co-authored-by: Val Alexander <bunsthedev@gmail.com>
2026-04-27 23:30:50 +01:00
Peter Steinberger
6a55a00da4 fix(agents): scope loop detection to runs 2026-04-27 12:59:54 +01:00
Peter Steinberger
7f3f108521 refactor(config): migrate plugin config access 2026-04-27 12:35:58 +01:00
Peter Steinberger
a4b97075ae fix: align support URL redaction 2026-04-27 11:00:42 +01:00
Peter Steinberger
a0023f4978 fix(logging): redact URL query secrets 2026-04-27 10:56:47 +01:00
Peter Steinberger
e7432ae01d fix: redact URL query credentials in diagnostics 2026-04-27 10:55:22 +01:00
Peter Steinberger
531a0ddfe4 fix(config): repair retired llm timeout key 2026-04-27 10:39:56 +01:00
Peter Steinberger
a95da5b52d fix(models): enrich local transport failure diagnostics 2026-04-27 09:25:38 +01:00
Vincent Koc
d9e9e61e77 fix(logging): skip unserializable file log message parts 2026-04-26 15:01:19 -07:00
Vincent Koc
e8df081a1f feat(logging): add file log correlation fields 2026-04-26 15:01:19 -07:00
Vincent Koc
3ae6f01d61 feat(logging): propagate request trace scopes 2026-04-26 14:13:14 -07:00
Vincent Koc
c6e9849351 feat(diagnostics): capture model call size timing 2026-04-26 13:43:22 -07:00