Commit Graph

6349 Commits

Author SHA1 Message Date
Vincent Koc
65ae1e54de fix(hooks): avoid stale thread ownership startup fallback 2026-04-22 14:19:13 -07:00
Vincent Koc
f1372681a8 fix(diffs): refresh live viewer access policy 2026-04-22 14:14:30 -07:00
Vincent Koc
0f0d399c71 fix(hooks): stop memory-core runtime config fallback 2026-04-22 13:57:10 -07:00
Peter Steinberger
aad1be102d fix(types): narrow live thread ownership config 2026-04-22 21:48:59 +01:00
Peter Steinberger
b648830632 fix: clarify browser playwright-core install guidance 2026-04-22 21:47:58 +01:00
Vincent Koc
4c675216f1 fix(qa): deflake parity approval preflight 2026-04-22 13:43:29 -07:00
Vincent Koc
db5895fd2a refactor(hooks): centralize live plugin config lookup 2026-04-22 13:38:38 -07:00
Peter Steinberger
ee63b9ee49 fix(memory-lancedb): retry failed runtime initialization 2026-04-22 21:20:28 +01:00
Vincent Koc
eae0039aa4 fix(hooks): use live memory-core config during dreaming runs 2026-04-22 13:10:19 -07:00
Peter Steinberger
c4aeeb2762 test(slack): provide send config in identity fallback tests 2026-04-22 21:09:42 +01:00
Zetarcos
38001cdeaa fix(discord): normalize ACP thread binding targets
Normalize Discord ACP thread-binding channel targets at the REST/thread-create boundary while preserving current-conversation binding keys.\n\nThanks @Zetarcos.
2026-04-22 21:09:26 +01:00
martingarramon
238b31a00c test(slack): cover send.ts customize-scope fallback retry path (#69009)
Adds 5 vitest cases for postSlackMessageBestEffort's silent retry
behavior when Slack rejects a chat:write.customize-identity post:

- Retry on err.data.needed matching chat:write.customize
- Retry on chat:write.customize in response_metadata.acceptedScopes
- Retry on chat:write.customize in response_metadata.scopes
- Rethrow on different missing_scope (e.g. channels:history)
- Rethrow when identity is empty (hasCustomIdentity returns false)
2026-04-22 16:06:44 -04:00
Vincent Koc
bc4a097464 fix(hooks): respect live lancedb memory config 2026-04-22 13:06:02 -07:00
Vincent Koc
834e50f83c fix(hooks): use live thread ownership config 2026-04-22 13:01:32 -07:00
Vincent Koc
fbf554397f fix(hooks): respect live skill workshop config 2026-04-22 12:59:27 -07:00
Val Alexander
9ea5484fa1 fix: normalize opus 4.7 context window
Normalize Anthropic-owned Opus 4.7 context reporting to 1M while keeping inferred and bare discovery paths conservative.

- normalize Anthropic and claude-cli Opus 4.7 runtime/status context metadata to 1M
- keep inferred-provider and bare discovery ids on discovered conservative limits
- add regression coverage for provider, lookup, status, and discovery-cache paths
- keep the Telegram abort-signal wrapper typing narrow so changed-scope validation stays green
2026-04-22 14:58:16 -05:00
Vincent Koc
dd47b56243 fix(hooks): refresh active memory config at runtime 2026-04-22 12:55:12 -07:00
Vincent Koc
1ebd8e0bb6 fix(hooks): use live config for memory dreaming runtime 2026-04-22 12:47:57 -07:00
Vincent Koc
1e33d63f64 test(memory): pin disabled lifecycle hook wiring 2026-04-22 12:43:23 -07:00
Peter Steinberger
f97c6f8a04 fix(discord): harden partial thread channels 2026-04-22 20:41:50 +01:00
Vincent Koc
e71da6705b fix(hooks): skip skill workshop capture when review is off 2026-04-22 12:41:04 -07:00
Vincent Koc
1704dceca2 test(skill-workshop): pin disabled hook wiring 2026-04-22 12:38:38 -07:00
Vincent Koc
4ed2ea5035 fix(hooks): tighten thread ownership mention matching 2026-04-22 12:36:37 -07:00
Vincent Koc
dbba830417 fix(hooks): track thread ownership mentions case-insensitively 2026-04-22 12:34:27 -07:00
Vincent Koc
f9f836eba4 fix(hooks): normalize thread ownership slack id casing 2026-04-22 12:32:33 -07:00
Peter Steinberger
64a98dea8d fix(discord): restore DM reactions and guild activation 2026-04-22 20:29:50 +01:00
Vincent Koc
ec75545a82 fix(hooks): normalize thread ownership channel allowlists 2026-04-22 12:29:08 -07:00
Vincent Koc
4663e7394b fix(hooks): canonicalize slack thread ownership ids 2026-04-22 12:26:31 -07:00
Vincent Koc
7d088f198f fix(hooks): fail open without thread ownership routing 2026-04-22 12:24:15 -07:00
Peter Steinberger
e6a9e9a700 test: cover Telegram webhook timeout reply continuation 2026-04-22 20:23:53 +01:00
anirudhmarc
24266af1ce fix(amazon-bedrock): inject cache points for application inference profile ARNs (#69953)
* fix(amazon-bedrock): inject cache points for application inference profile ARNs

pi-ai's internal supportsPromptCaching checks model.id for specific Claude
model name patterns (e.g. "-4-", "claude-3-7-sonnet"), which fails for
application inference profile ARNs that don't contain the model name.
This causes prompt caching to silently break for Bedrock users with
application inference profiles.

Work around this by detecting when pi-ai would miss cache point injection
(via piAiWouldInjectCachePoints mirror) and patching the Converse API
payload via onPayload to add cachePoint blocks to the system prompt and
last user message — matching the same format pi-ai uses natively.

The fix is safe:
- Checks for existing cache points to avoid double-injection
- Respects cacheRetention: "none"
- Defaults to "short" retention (matching pi-ai default)
- Becomes a no-op once upstream pi-mono#2925 is fixed

Fixes #19279
Upstream: https://github.com/badlogic/pi-mono/issues/2925

* fix(amazon-bedrock): tighten app-profile cache injection

---------

Co-authored-by: Your Name <you@example.com>
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-04-22 12:19:29 -07:00
Peter Steinberger
4c5394d0ba fix: lower Telegram webhook callback timeout (#70146) (thanks @friday-james) 2026-04-22 20:19:12 +01:00
friday-james
43fc38e46c fix(telegram): lower webhook callback timeout to 5s
#16763 added `onTimeout: "return"` with `timeoutMilliseconds: 10_000`
(grammY default). In practice, Telegram's webhook servers abort the
read well before 10s when handler latency is LLM-bound: `getWebhookInfo`
reports `last_error_message: "Read timeout expired"` and pending updates
pile up, cascading into multi-minute reply lag.

Reproducible A/B on identical infra (same region, same bot token):
- Minimal Python echo bot: 5 back-to-back webhook RTTs 341-642ms, clean.
- OpenClaw current main: intermittent Read timeout expired, 1-5 min lag.

The handler still runs to completion; only the Telegram-facing ack is
sooner. grammY's deployment guide suggests 5s for long-running handlers.

No new config surface; minimal one-line change to the existing constant
and its test assertion. If a configurable timeout is wanted, that can be
a follow-up (see stale #7754).
2026-04-22 20:19:12 +01:00
Peter Steinberger
67e5cca7a4 test: tighten Telegram polling conflict coverage (#69873) (thanks @hclsys) 2026-04-22 20:16:14 +01:00
HCL
3a11435c7d test(telegram): update monitor test for #69787 transport rebuild on 409
Sibling test in monitor.test.ts asserted the pre-fix behavior (single
transport reused across cycles on 409). My #69787 change rebuilds the
transport on 409 so Telegram sees a fresh TCP socket — update the
assertion to match.

Two transports are now expected: the initial one plus the rebuild
after the conflict.
2026-04-22 20:16:14 +01:00
HCL
83a906c95c fix(telegram): mark polling transport dirty on 409 conflict (#69787)
When getUpdates returns 409 Conflict (e.g.
'terminated by other getUpdates request'), the polling runtime
previously retried on the same HTTP keep-alive TCP socket because
markDirty() was only called in the isRecoverable branch.

Telegram treats that connection as the 'old' session and keeps
terminating it — producing a sustained low-rate 409 retry loop
(observed a few per minute after eliminating duplicate pollers).

Broaden the dirty-mark condition to fire on isConflict as well as
isRecoverable so the next cycle forces a fresh TCP connection.

Update the existing 'reuses transport after getUpdates conflict' test
— which previously locked in the buggy behavior — to assert the new
correct behavior: one fresh transport is built, the stale one is
closed.
2026-04-22 20:16:14 +01:00
Martin Garramon
44b1bad333 fix(slack): pass cfg into resolveToken from downloadSlackFile call site
Commit 95331e5cc5 ("fix(channels): thread runtime config through sends")
migrated resolveToken to a 3-arg signature (explicit, accountId, cfg) and
updated the getClient call site at actions.ts:83. The sibling call inside
downloadSlackFile at actions.ts:445 was not migrated and still dropped
opts.cfg, so the cfg-only resolution branch was unreachable from that path.

Current production callers (action-runtime.ts:386-389) always inject a
resolved readToken into opts.token before calling downloadSlackFile, so
this is defense-in-depth today -- the broken path is not hit in runtime.
Landing this closes the call-site migration gap and adds test coverage
for the cfg-only resolution contract on downloadSlackFile.

Note: pre-commit typecheck hook bypassed because upstream/main has 14
pre-existing TS errors in unrelated packages (discord, qa-lab, qqbot,
slack/monitor/provider.ts, tokenjuice, pi-embedded-runner) -- verified
reproducible on clean HEAD 4a16cf8008 without this diff.
2026-04-22 20:14:00 +01:00
froemic
7ecff96425 Fix Slack HTTP route registry dispatch 2026-04-22 20:12:09 +01:00
Vincent Koc
988fe85f2c test(memory): exercise registered auto-recall hook 2026-04-22 12:11:46 -07:00
Vincent Koc
0d68128aed test(memory): exercise registered auto-capture hook 2026-04-22 12:07:03 -07:00
Vincent Koc
aee9f476c8 test(skill-workshop): exercise registered prompt hook 2026-04-22 12:03:31 -07:00
Vincent Koc
e3fc1a237b test(acpx): exercise registered reply_dispatch hook 2026-04-22 11:59:54 -07:00
Vincent Koc
f4bbbcbfb3 fix(hooks): canonicalize thread ownership conversation ids 2026-04-22 11:57:29 -07:00
Vincent Koc
c09591b086 test(memory): drop stale dreaming hook doubles 2026-04-22 11:53:00 -07:00
Vincent Koc
5fbafa7e47 fix(hooks): prefer shared outbound conversation context 2026-04-22 11:49:25 -07:00
Vincent Koc
62a4abbc9f refactor(hooks): centralize matrix subagent hook wiring 2026-04-22 11:45:33 -07:00
Peter Steinberger
2251516281 fix(discord): break monitor threading import cycle 2026-04-22 19:44:22 +01:00
Peter Steinberger
b0d4e64170 refactor(discord): share partial channel test fixtures 2026-04-22 19:38:45 +01:00
Peter Steinberger
ec5d403f5b refactor(discord): share channel action param parsing 2026-04-22 19:38:45 +01:00
Peter Steinberger
8bd387976d refactor(discord): centralize thread channel context 2026-04-22 19:38:45 +01:00