Commit Graph

37 Commits

Author SHA1 Message Date
Peter Steinberger
5ab7a458ba test: tighten session write lock assertions 2026-05-09 15:42:37 +01:00
Shakker
0517b54942 test: tighten agents array assertions 2026-05-09 05:46:22 +01:00
Peter Steinberger
995d2af036 test: dedupe session lock absence assertions 2026-05-09 02:05:49 +01:00
Peter Steinberger
bbd6d9e254 test: stabilize node 26 full-suite edge cases 2026-05-08 16:52:23 +01:00
Peter Steinberger
f7ed29e118 fix: thread session write-lock timeout config 2026-05-02 14:54:54 +01:00
Peter Steinberger
3ee41deba9 test(agents): preserve session lock pid mock 2026-05-02 12:48:43 +01:00
Cedric
2f2bb7dac6 fix(agents): reclaim untracked self-owned session locks (#75822)
Summary:
- The PR refactors session-lock inspection to reclaim untracked current-process locks with matching starttime during acquisition and startup cleanup, adds regression tests, and adds a changelog entry.
- Reproducibility: yes. A high-confidence code-level reproduction is to create a fresh `.jsonl.lock` with `pid ... eLock or cleanStaleLockFiles on current main and observe that acquisition waits or cleanup leaves the lock.

ClawSweeper fixups:
- Included follow-up commit: docs: add session lock changelog entry
- Included follow-up commit: refactor(agents): distill session lock reclaim policy

Validation:
- ClawSweeper review passed for head 2eae2c93b1.
- Required merge gates passed before the squash merge.

Prepared head SHA: 2eae2c93b1
Review: https://github.com/openclaw/openclaw/pull/75822#issuecomment-4361741599

Co-authored-by: Cedric <86914379+cdznho@users.noreply.github.com>
Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-05-02 03:07:19 +00:00
Peter Steinberger
8de02c318b fix: reclaim orphan session write locks 2026-04-27 06:54:43 +01:00
Peter Steinberger
844f1dd87a test: dedupe session lock symlink fixtures 2026-04-23 18:46:42 +01:00
Peter Steinberger
35ec4a9991 fix: make session write locks non-reentrant by default 2026-04-23 04:57:30 +01:00
Peter Steinberger
a07b9fc840 test: trim runtime import surfaces 2026-04-18 19:51:22 +01:00
Peter Steinberger
ca1aa08709 test: tighten async wait boundaries 2026-04-18 17:42:28 +01:00
Vincent Koc
f00f0a9596 fix(agents): stop leaking session lock exit listeners (#65469)
* fix(agents): stop leaking session lock exit listeners

* Update src/agents/session-write-lock.ts

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

---------

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2026-04-12 18:22:12 +01:00
Peter Steinberger
1628217114 test: avoid real signal exit in lock tests 2026-04-10 16:09:46 +01:00
Peter Steinberger
2d2fe2bf47 test: trim more agent partial mocks 2026-04-03 20:06:42 +01:00
Peter Steinberger
6b6ddcd2a6 test: speed up core runtime suites 2026-03-31 02:25:02 +01:00
Peter Steinberger
2833b27f52 test: continue vitest threads migration 2026-03-24 08:37:00 +00:00
Peter Steinberger
e9905fd696 fix: avoid fd warnings in lock exit cleanup 2026-03-24 01:01:59 +00:00
Peter Steinberger
90fab48416 ci: stabilize sharded channel lanes 2026-03-24 00:21:50 +00:00
Peter Steinberger
b4656f193a test: strengthen regression coverage and trim low-value checks 2026-03-22 07:38:01 +00:00
Peter Steinberger
a3b674cc98 refactor(tests): dedupe agent lock and loop detection fixtures 2026-03-03 01:37:12 +00:00
Peter Steinberger
ab8b8dae70 refactor(agents): dedupe model and tool test helpers 2026-03-02 21:31:36 +00:00
bmendonca3
4985c561df sessions: reclaim orphan self-pid lock files 2026-03-02 19:53:41 +00:00
Peter Steinberger
45d77cac16 test(agents): dedupe remaining tool and lock test scaffolds 2026-03-02 07:13:11 +00:00
Vincent Koc
5a2200b280 fix(sessions): harden recycled PID lock recovery follow-up (#31320)
* fix: detect PID recycling in session write lock staleness check

The session lock uses isPidAlive() to determine if a lock holder is
still running. In containers, PID recycling can cause a different
process to inherit the same PID, making the lock appear valid when
the original holder is dead.

Record the process start time (field 22 of /proc/pid/stat) in the
lock file and compare it during staleness checks. If the PID is alive
but its start time differs from the recorded value, the lock is
treated as stale and reclaimed immediately.

Backward compatible: lock files without starttime are handled with
the existing PID-alive + age-based logic. Non-Linux platforms skip
the starttime check entirely (getProcessStartTime returns null).

* shared: harden pid starttime parsing

* sessions: validate lock pid/starttime payloads

* changelog: note recycled PID lock recovery fix

* changelog: credit hiroki and vincent on lock recovery fix

---------

Co-authored-by: HirokiKobayashi-R <hiroki@rhems-japan.co.jp>
2026-03-01 21:42:22 -08:00
Peter Steinberger
ad1072842e test: dedupe agent tests and session helpers 2026-02-22 17:11:54 +00:00
Peter Steinberger
1becebe188 fix: harden session lock contention and cleanup 2026-02-22 13:40:55 +00:00
Peter Steinberger
50c7aef22f test: stabilize session lock tests and move out of e2e 2026-02-22 11:28:20 +00:00
Peter Steinberger
9131b22a28 test: migrate suites to e2e coverage layout 2026-02-13 14:28:22 +00:00
cpojer
6614c3f932 chore: Fix lint. 2026-02-09 09:58:58 +09:00
cpojer
f06dd8df06 chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
Peter Steinberger
9a7160786a refactor: rename to openclaw 2026-01-30 03:16:21 +01:00
Peter Steinberger
6d16a658e5 refactor: rename clawdbot to moltbot with legacy compat 2026-01-27 12:21:02 +00:00
Vignesh
b151b8d196 test: stabilize CLI hint assertions under CLAWDBOT_PROFILE (#2507) 2026-01-26 19:20:54 -08:00
Gustavo Madeira Santana
66a5b324a1 fix: harden session lock cleanup (#2483) (thanks @janeexai) 2026-01-26 21:16:05 -05:00
Shadow
d8e5dd91ba fix: clean up session locks on exit (#2483) (thanks @janeexai) 2026-01-26 19:48:46 -06:00
Peter Steinberger
fdc50a0feb fix: normalize session lock path 2026-01-23 18:34:33 +00:00