Skip to content

fix(test): avoid settings lock writer startup timeouts - #147029

Merged
steipete merged 1 commit into
mainfrom
steipete/upd-settings-lock-test-determinism
Sep 13, 2026
Merged

steipete merged 1 commit into
mainfrom
steipete/upd-settings-lock-test-determinism

Conversation

@steipete

@steipete steipete commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

Related: #146949
Refs #144558

What Problem This Solves

Fixes spurious settings-lock CI failures when starting a second child consumes the independent 10-second budget of the first child, which is deliberately holding the lock until the contender is ready.

User Impact

No user-visible behavior change. This test-only repair keeps the concurrent-first-write regression useful on loaded runners; update, settings storage, locking, and migration behavior are unchanged.

Why This Change Was Made

Both children now share the existing 20-second test deadline through Vitest's cancellation signal, with explicit abort and process-tree joining in finally. The test uses it.for to receive that context. It no longer infers lock ownership from whether the first child's promise has settled.

The test verifies that the first writer entered, the contender actually observed lock contention, the lock remains present, and no settings file exists before release. The contender rejects entry to its write callback before release. Both successful exits, both persisted fields, and lock removal remain required. The test timeout and readiness limits are unchanged.

Evidence

The failures motivating this repair occurred in checks-node-compact-large-14 on #144558, after #146949 was already included:

Local proof on macOS / Node 26.8.2:

  • Temporarily inserted a 2-second startup delay for the first writer and 5 seconds for its contender before their storage imports. The original test failed for both scopes with expected true to be false. The repaired construction passed the identical experiment: global 15.101s, project 14.568s. The delay is not in this diff.
  • Temporarily replaced acquireFileLockSyncWithRetry(path) with a no-op release function. Both revised cases failed with contender entered settings before the first writer was released. Production source was restored before final validation.
  • node scripts/run-vitest.mjs src/agents/sessions/settings-storage.test.ts: ten consecutive runs of the final diff passed all 15 tests each, without retries or --repeat; 391 seconds total, 32–51 seconds per invocation.
  • pnpm check:changed: passed.
  • git diff --check: passed. One independent autoreview round found no actionable P0–P2 findings.

Exact-head CI run 34758096874 passed for a6cebccd55300e8304c1a2a1c7c5e7951ed928f5: 48 checks passed, 54 intentionally skipped, no failures or pending checks. Both checks-node-changed and checks-node-changed-boundary passed. No CI rerun was needed.

Refreshed exact-head CI run 34759062677 also passed after reopening: the canonical watcher reported GREEN, with no pending checks or rerun. The merge ref was verified against the fetched main before accepting this run.

The full repository suite was not run locally; hosted CI selected the changed-test lanes.

ClawSweeper review

ClawSweeper reviewed head a6cebccd55300e8304c1a2a1c7c5e7951ed928f5 and found no actionable correctness or security issues. No findings required changes or skips.

Use the existing test deadline for both writers and assert release ordering while preserving concurrent first-write coverage.

Related: #146949
@clawsweeper

clawsweeper Bot commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: XS maintainer Maintainer-authored PR labels Sep 13, 2026
@steipete
steipete marked this pull request as ready for review September 13, 2026 12:48
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 13, 2026
@clawsweeper

clawsweeper Bot commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 13, 2026, 9:18 AM ET / 13:18 UTC (Revision 3).

ClawSweeper review

What this changes

The settings concurrency test shares its existing deadline between child writers and checks that the second writer cannot enter before release.

Merge readiness

✅ Ready for maintainer review

This remains a useful, focused repair: current main retains the reported timeout race. No actionable correctness or security findings remain, and the previous review recorded no outstanding findings.

Priority: P3
Reviewed head: a6cebccd55300e8304c1a2a1c7c5e7951ed928f5

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) A narrow repair with convincing targeted failure experiments, preserved regression checks, and successful CI for the reviewed head.
Proof confidence 🌊 off-meta tidepool Not applicable: The maintainer-authored test repair is exempt from external-contributor runtime proof; supplied delayed-start child-process experiments, a broken-lock negative control, and verified CI directly support the changed test behavior.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The maintainer-authored test repair is exempt from external-contributor runtime proof; supplied delayed-start child-process experiments, a broken-lock negative control, and verified CI directly support the changed test behavior.
Evidence reviewed 7 items Introduced change and retained assertions: The complete pinned introduction changes only the concurrency test. Both scopes retain contention observation, successful child exits, both persisted fields, and lock removal; the existing 20-second test deadline remains unchanged.
Current main still needs the repair: Fetched main still gives each child an independent 10,000ms timeout and checks firstSettled before releasing the first writer. The earlier merged handshake repair therefore does not supersede this change. The release-file inspection could not retrieve a missing historical blob; no shipped-fix claim is made.
Cancellation reaches the process owner: The managed command owner installs no independent timer when timeoutMs is undefined, handles an already-aborted signal, and joins process finalization before returning. The test’s finally block aborts and awaits both tracked writers.
Findings None None.
Security None None.

How this fits together

OpenClaw’s settings storage serializes updates to global and project settings files. This regression test launches competing processes and checks that both updates survive without overlapping writes.

flowchart TD
  A[Test deadline] --> B[First writer holds lock]
  A --> C[Second writer attempts lock]
  B --> D[Parent observes contention]
  C --> D
  D --> E[Parent releases first writer]
  E --> F[Verify both saved fields and lock removal]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests -4. Total -4 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 11 15 -4
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 11 15 -4

Review metrics

None.

Technical review

Best possible solution:

Keep one test-owned cancellation deadline while preserving real lock contention, successful writes, and verified child cleanup.

Do we have a high-confidence way to reproduce the issue?

Yes: current-main source shows the first child’s independent timeout running while it waits for contender startup, and the supplied delay experiment reproduces that failure. This read-only review did not execute tests.

Is this the best way to solve the issue?

Yes: sharing the existing test deadline removes the competing timer while retaining contention and persisted-state checks; the reported negative control confirms broken locking still fails.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 0a7b7fecfd7f.

Labels

Label justifications:

  • P3: This is a bounded test-reliability repair with no production behavior change.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🌊 off-meta tidepool and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The maintainer-authored test repair is exempt from external-contributor runtime proof; supplied delayed-start child-process experiments, a broken-lock negative control, and verified CI directly support the changed test behavior.

Evidence

What I checked:

  • Introduced change and retained assertions: The complete pinned introduction changes only the concurrency test. Both scopes retain contention observation, successful child exits, both persisted fields, and lock removal; the existing 20-second test deadline remains unchanged. (src/agents/sessions/settings-storage.test.ts:326, a6cebccd5530)
  • Current main still needs the repair: Fetched main still gives each child an independent 10,000ms timeout and checks firstSettled before releasing the first writer. The earlier merged handshake repair therefore does not supersede this change. The release-file inspection could not retrieve a missing historical blob; no shipped-fix claim is made. (src/agents/sessions/settings-storage.test.ts:395, 0a7b7fecfd7f)
  • Cancellation reaches the process owner: The managed command owner installs no independent timer when timeoutMs is undefined, handles an already-aborted signal, and joins process finalization before returning. The test’s finally block aborts and awaits both tracked writers. (scripts/lib/managed-child-process.mts:423, a6cebccd5530)
  • Published Vitest cancellation contract: The changed test directly consumes Vitest’s it.for context, establishing the dependency signal. Read-only inspection of the published vitest 5.0.0 package confirmed that it.for passes the context as the second argument, context.signal belongs to an AbortController, and timeout handling aborts that context. Package metadata identifies vitest-dev/vitest; no dependency commit SHA was available.
  • Targeted before-and-after evidence: The supplied body snapshot, sourceRevision feeff30399fe85a47bd13bb134fe564bc6d4e5381958820a19238a569b80c963, reports macOS/Node 26.8.2 startup-delay failures before the repair and passes afterward in both scopes (15.101s and 14.568s). Disabling locking still failed the revised test, and ten final-diff runs passed all 15 tests. These are supplied execution results, not reviewer-executed tests. (src/agents/sessions/settings-storage.test.ts:326, a6cebccd5530)
  • Verified CI result: GitHub reports run 34758096874 completed successfully for the exact reviewed head: https://github.com/openclaw/openclaw/actions/runs/34758096874. (a6cebccd5530)

Likely related people:

  • vincentkoc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (2 earlier review cycles)
  • reviewed 2026-09-13T12:55:30.692Z sha a6cebcc :: needs maintainer review before merge. :: none
  • reviewed 2026-09-13T13:08:54.446Z sha a6cebcc :: needs maintainer review before merge. :: none

@steipete steipete closed this Sep 13, 2026
@steipete steipete reopened this Sep 13, 2026
@clawsweeper clawsweeper Bot added rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Sep 13, 2026
@steipete
steipete merged commit 1311b42 into main Sep 13, 2026
282 checks passed
@steipete
steipete deleted the steipete/upd-settings-lock-test-determinism branch September 13, 2026 13:28
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Sep 13, 2026
* temp/pr-137049: (110 commits)
  improve: reduce GitHub OAuth maintenance work for large agent rosters (#147021)
  fix(test): avoid settings lock writer startup timeouts (#147029)
  fix(update): correct backup guidance and cover incident regressions (#147023)
  refactor(gateway): share connection lifecycle across transports (#145950)
  refactor(telegram): share HTML text escaping (#146936)
  perf(build): reduce disk use in UI performance checks (#146687)
  refactor(memory-wiki): share freshness result construction (#146935)
  improve(gateway): use metadata projection for presence (#146817)
  test(agents): reuse complete Responses model fixtures (#147015)
  fix(sessions): align the reclamation-memory test with the archive session owner (#147028)
  refactor(terminal): simplify copy-sensitive token checks (#146934)
  refactor(media): remove duplicate spaced path fallback (#146933)
  refactor(cli): reuse command-group names (#146893)
  improve(plugins): reduce JavaScript generation capture work (#146993)
  test: align plugin fixtures with current runtime contracts (#147000)
  refactor(browser): separate session tab tracking from cleanup (#146973)
  fix(tests): make systemd clock fixtures private (#146990)
  fix(linux): retire sleep guards when logind disconnects (#146046)
  refactor(matrix): share draft fallback delivery (#144840)
  fix(sessions): preserve cross-agent replies after reload (#146799)
  ...
vincentkoc added a commit that referenced this pull request Sep 13, 2026
* commit '0ac8a700e43efceef73d92fe8e50b185819e38ad': (27 commits)
  test(acpx): prove targeted turn cancellation (#137049)
  fix(ci): honor realtime meeting live-test opt-in (#147044)
  improve: reduce heartbeat enrollment work for large fleets (#147055)
  fix(gateway): install despite stale Linux session bus addresses (#146569)
  chore(i18n): refresh native locales (#147025)
  fix: avoid Gateway reinstalls when macOS service inspection is inconclusive (#146880)
  fix(pairing): QR setup rejects trusted-proxy gateways without a shared secret (#147036)
  fix(update): bound activation and accept slow Windows identity reads (#147019)
  perf(accounts): avoid materializing avatars for owner checks (#147032)
  improve(status): report external and ArrayBuffer memory (#141902)
  fix(update): preserve linked plugins during post-core sync (#147009)
  fix(channels): keep replies working after hot config reloads (#147001)
  refactor(gateway): defer worker transcript runtime loading (#143495)
  improve: reduce GitHub OAuth maintenance work for large agent rosters (#147021)
  fix(test): avoid settings lock writer startup timeouts (#147029)
  fix(update): correct backup guidance and cover incident regressions (#147023)
  refactor(gateway): share connection lifecycle across transports (#145950)
  refactor(telegram): share HTML text escaping (#146936)
  perf(build): reduce disk use in UI performance checks (#146687)
  refactor(memory-wiki): share freshness result construction (#146935)
  ...

# Conflicts:
#	src/config/sessions/session-accessor.sqlite-reclamation-memory.test.ts
pdonizete added a commit to pdonizete/openclaw that referenced this pull request Sep 13, 2026
Brings in:
- openclaw#146949 (bc6b662) test(agents): coordinate settings lock contention
- openclaw#147028 (d4d3d6c) fix(sessions): align the reclamation-memory test with the archive session owner
- openclaw#147029 (1311b42) fix(test): avoid settings lock writer startup timeouts

Required to clear the 4 failing CI checks on PR openclaw#144507; the PR's
WhatsApp voice-note 16 kHz + WhatsApp-vendor fix is preserved
intact (main did not touch the changed lines).

Co-Authored-By: Claude Code <[email protected]>
obviyus added a commit that referenced this pull request Sep 13, 2026
## What Problem This Solves

Image inference accepts `--agent`, discards the selected identity, and fails in explicit multi-agent fleets—even when the named agent exists.

Supersedes #145188 by @MertBasar0. Reported in #145119 by @jarvis-stephens-bot.

## User Impact

Image description works with the selected agent. Audio and video commands carry the same selected identity and retain their existing successful output behavior.

## Why This Change Was Made

The decision which agent owns the operation stays with `resolveCapabilityProviderAgentId` in `src/cli/capability-cli/shared.ts`. All four CLI call sites now forward that decision alongside its credential directory. Tests check both values at the runtime boundary. Current audio evaluation order and provider/model output are preserved.

## Evidence

With three explicit-owner agents and a synthetic loopback provider, the following commands failed before any HTTP request on main `4394ad538cac`. They succeed on `068dc9c759d9`:

```sh
pnpm openclaw infer image describe --file image.png --prompt describe --agent finance --json
pnpm openclaw infer image describe --file image.png --prompt describe --model stubvision/stub-vision-1 --agent finance --json
pnpm openclaw infer image describe-many --file image.png --file image.png --prompt describe --agent finance --json
```

Sanitized terminal captures:

```text
Before: exit 1; ok=false; AgentSelectionRequiredError; HTTP requests=0
After describe: exit 0; ok=true; SYNTHETIC_IMAGE_DESCRIPTION; requests=1
After explicit model: exit 0; ok=true; SYNTHETIC_IMAGE_DESCRIPTION; requests=1
After describe-many: exit 0; ok=true; two descriptions; requests=2
```

The real Gateway passed its health check. These media commands use local transport. Sole-agent image, configured audio transcription, and configured video description succeed before and after; audio/video are consistency controls, not reproduced failures.

The new registered-command assertions fail nine cases on trusted main `21aaac7ad6e7` and pass after the repair. On merge `e0665878861f` (parents `068dc9c759d9` and main `1692f891b167`), all five selected test files pass: **332 tests**.

<details>
<summary>Validation commands and limits</summary>

```sh
node scripts/run-vitest.mjs run --config test/vitest/vitest.cli.config.ts src/cli/capability-cli.test.ts --testNamePattern 'owner selection'
node --import tsx scripts/ci-run-node-test-shard.mts
pnpm openclaw infer audio transcribe --file audio.wav --agent finance --json
pnpm openclaw infer video describe --file video.mp4 --agent finance --json
```

The CI test runner selected the full capability CLI, local account-secret, media runtime, settings-storage, and proxy lifecycle test files. CLI/account tests: 259; media runtime: 33; settings: 15; proxy: 25. An inherited color setting first affected the settings numeric-output assertion; disabling forced color passed without source or test changes. The successful owner/runtime suites were not repeated.

Formatting, syntax lint, assertion safety, line limits, and unused-export checks pass. [CI run 34784959798](https://github.com/openclaw/openclaw/actions/runs/34784959798) passed at `068dc9c759d99233ed17b668bef97b94ad10ab86`, including production and test typechecks.

The original PR's settings failure was repaired upstream in #147029. Its old proxy child-exit failure remains unexplained; both exact tests passed in its matched main-parent CI. The current tests pass, but this does not waive fresh CI or declare the old proxy failure unrelated.

</details>

**External SDK compatibility:** The same external consumer compiled and ran against the shipped 2026.9.4 package and the packaged candidate at `068dc9c759d9` in one isolated container. Directory-only and `agentId` calls passed for both audio and video: four successful calls per package, with the expected credential directory and loopback-only transport.

## Compatibility

Audio/video SDK parameter types gain optional `agentId` fields. Existing directory-only callers remain valid. There is no new export, config key, schema, migration, protocol, or dependency.

## Consumers

The selected agent identity and its credential directory now reach all four media CLI runtime calls. The existing runtime uses that identity for image model and workspace context. Audio and video retain their existing credential-directory behavior.

The optional audio/video `agentId` fields extend the existing SDK parameter types. Existing directory-only callers remain valid. Browser screenshot description, sticker description, and voice transcription callers are unchanged; this PR does not claim to repair their separate identity-forwarding gaps.

The three image command cases fail before any HTTP request on the recorded main baseline and succeed on the candidate. Configured audio/video and sole-agent image commands pass before and after. Automatic-selection cases were not executed.

The media commands use local transport. The running Gateway is a health control. The 332 passing tests are the selected complete test files on the recorded fresh merge; full CI and typechecking passed in the exact-head run linked above.

No cache or persisted state is added; existing account preparation and request cleanup keep their owners.

Co-authored-by: MertBasar0 <[email protected]>
Co-authored-by: Ayaan Zaidi <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 14, 2026
Fix spurious settings-lock CI failures when contender startup consumes the first writer's independent deadline. Both child writers now share the existing 20-second test deadline, with explicit abort and process-tree joining. The regression still verifies contention, release ordering, both persisted settings fields, and lock removal.

Test-only; no user-visible behavior change. Delayed-start differential proof failed before and passed after the repair; disabling the file lock still fails both revised cases. The author recorded ten successful runs of all 15 settings-storage tests and passing changed checks. Refreshed exact-head CI run 34759062677 passed without reruns. Independent review and ClawSweeper found no actionable findings.

Related: openclaw#146949
Refs openclaw#144558
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 14, 2026
## What Problem This Solves

Image inference accepts `--agent`, discards the selected identity, and fails in explicit multi-agent fleets—even when the named agent exists.

Supersedes openclaw#145188 by @MertBasar0. Reported in openclaw#145119 by @jarvis-stephens-bot.

## User Impact

Image description works with the selected agent. Audio and video commands carry the same selected identity and retain their existing successful output behavior.

## Why This Change Was Made

The decision which agent owns the operation stays with `resolveCapabilityProviderAgentId` in `src/cli/capability-cli/shared.ts`. All four CLI call sites now forward that decision alongside its credential directory. Tests check both values at the runtime boundary. Current audio evaluation order and provider/model output are preserved.

## Evidence

With three explicit-owner agents and a synthetic loopback provider, the following commands failed before any HTTP request on main `bccb84ab286d`. They succeed on `068dc9c759d9`:

```sh
pnpm openclaw infer image describe --file image.png --prompt describe --agent finance --json
pnpm openclaw infer image describe --file image.png --prompt describe --model stubvision/stub-vision-1 --agent finance --json
pnpm openclaw infer image describe-many --file image.png --file image.png --prompt describe --agent finance --json
```

Sanitized terminal captures:

```text
Before: exit 1; ok=false; AgentSelectionRequiredError; HTTP requests=0
After describe: exit 0; ok=true; SYNTHETIC_IMAGE_DESCRIPTION; requests=1
After explicit model: exit 0; ok=true; SYNTHETIC_IMAGE_DESCRIPTION; requests=1
After describe-many: exit 0; ok=true; two descriptions; requests=2
```

The real Gateway passed its health check. These media commands use local transport. Sole-agent image, configured audio transcription, and configured video description succeed before and after; audio/video are consistency controls, not reproduced failures.

The new registered-command assertions fail nine cases on trusted main `d8799ec248a5` and pass after the repair. On merge `e0665878861f` (parents `068dc9c759d9` and main `3642fc8281b9`), all five selected test files pass: **332 tests**.

<details>
<summary>Validation commands and limits</summary>

```sh
node scripts/run-vitest.mjs run --config test/vitest/vitest.cli.config.ts src/cli/capability-cli.test.ts --testNamePattern 'owner selection'
node --import tsx scripts/ci-run-node-test-shard.mts
pnpm openclaw infer audio transcribe --file audio.wav --agent finance --json
pnpm openclaw infer video describe --file video.mp4 --agent finance --json
```

The CI test runner selected the full capability CLI, local account-secret, media runtime, settings-storage, and proxy lifecycle test files. CLI/account tests: 259; media runtime: 33; settings: 15; proxy: 25. An inherited color setting first affected the settings numeric-output assertion; disabling forced color passed without source or test changes. The successful owner/runtime suites were not repeated.

Formatting, syntax lint, assertion safety, line limits, and unused-export checks pass. [CI run 34784959798](https://github.com/openclaw/openclaw/actions/runs/34784959798) passed at `068dc9c759d99233ed17b668bef97b94ad10ab86`, including production and test typechecks.

The original PR's settings failure was repaired upstream in openclaw#147029. Its old proxy child-exit failure remains unexplained; both exact tests passed in its matched main-parent CI. The current tests pass, but this does not waive fresh CI or declare the old proxy failure unrelated.

</details>

**External SDK compatibility:** The same external consumer compiled and ran against the shipped 2026.9.4 package and the packaged candidate at `068dc9c759d9` in one isolated container. Directory-only and `agentId` calls passed for both audio and video: four successful calls per package, with the expected credential directory and loopback-only transport.

## Compatibility

Audio/video SDK parameter types gain optional `agentId` fields. Existing directory-only callers remain valid. There is no new export, config key, schema, migration, protocol, or dependency.

## Consumers

The selected agent identity and its credential directory now reach all four media CLI runtime calls. The existing runtime uses that identity for image model and workspace context. Audio and video retain their existing credential-directory behavior.

The optional audio/video `agentId` fields extend the existing SDK parameter types. Existing directory-only callers remain valid. Browser screenshot description, sticker description, and voice transcription callers are unchanged; this PR does not claim to repair their separate identity-forwarding gaps.

The three image command cases fail before any HTTP request on the recorded main baseline and succeed on the candidate. Configured audio/video and sole-agent image commands pass before and after. Automatic-selection cases were not executed.

The media commands use local transport. The running Gateway is a health control. The 332 passing tests are the selected complete test files on the recorded fresh merge; full CI and typechecking passed in the exact-head run linked above.

No cache or persisted state is added; existing account preparation and request cleanup keep their owners.

Co-authored-by: MertBasar0 <[email protected]>
Co-authored-by: Ayaan Zaidi <[email protected]>
fuller-stack-dev added a commit that referenced this pull request Sep 15, 2026
Keep real lock contention proof while excluding parent fixture scheduling from the bounded production retry loop. The parent releases and joins the first writer before allowing the contender to retry. Production lock limits and storage behavior are unchanged.

Delayed-parent proof reproduces the original timeout and passes with this fixture. Bypassing locking still fails both concurrency cases. Full settings-storage tests pass with CI-like permissions; focused lint, format and independent review pass.

Refs #146949, #147029
fuller-stack-dev added a commit that referenced this pull request Sep 15, 2026
* fix: join outbound lease renewal before cancellation cleanup

* test(agents): join the first settings writer before retrying

Keep real lock contention proof while excluding parent fixture scheduling from the bounded production retry loop. The parent releases and joins the first writer before allowing the contender to retry. Production lock limits and storage behavior are unchanged.

Delayed-parent proof reproduces the original timeout and passes with this fixture. Bypassing locking still fails both concurrency cases. Full settings-storage tests pass with CI-like permissions; focused lint, format and independent review pass.

Refs #146949, #147029

---------

Co-authored-by: Jason (Json) <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 16, 2026
…w#148390)

* fix: join outbound lease renewal before cancellation cleanup

* test(agents): join the first settings writer before retrying

Keep real lock contention proof while excluding parent fixture scheduling from the bounded production retry loop. The parent releases and joins the first writer before allowing the contender to retry. Production lock limits and storage behavior are unchanged.

Delayed-parent proof reproduces the original timeout and passes with this fixture. Bypassing locking still fails both concurrency cases. Full settings-storage tests pass with CI-like permissions; focused lint, format and independent review pass.

Refs openclaw#146949, openclaw#147029

---------

Co-authored-by: Jason (Json) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant