Skip to content

fix(json): retry on transient File changed during read race condition#85029

Merged
clawsweeper[bot] merged 5 commits into
mainfrom
clawsweeper/automerge-openclaw-openclaw-84285
May 21, 2026
Merged

fix(json): retry on transient File changed during read race condition#85029
clawsweeper[bot] merged 5 commits into
mainfrom
clawsweeper/automerge-openclaw-openclaw-84285

Conversation

@clawsweeper

@clawsweeper clawsweeper Bot commented May 21, 2026

Copy link
Copy Markdown
Contributor

Makes #84285 merge-ready for the ClawSweeper automerge loop.
The edit pass should inspect the live PR diff, review comments, and failing checks; rebase if needed; keep the contributor branch credited; and stop only when validation is green or an external blocker is proven.

ClawSweeper 🐠 replacement reef notes:

  • Repair fallback: GitHub rejected the repair branch push because it updates workflow files and the ClawSweeper app token does not have workflows permission

Inherited issue-closing references from the source PR:
Fixes #83657

Co-author credit kept:

fish notes: model gpt-5.5, reasoning high; reviewed against 00602a1.

@clawsweeper clawsweeper Bot added size: M clawsweeper:automerge Maintainer opted this PR into bounded ClawSweeper-reviewed automerge proof: supplied External PR includes structured after-fix real behavior proof. proof: sufficient ClawSweeper judged the real behavior proof convincing. P1 High-priority user-facing bug, regression, or broken workflow. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 🚀 automerge armed This PR is in ClawSweeper's automerge lane. clawsweeper Tracked by ClawSweeper automation labels May 21, 2026
@openclaw-barnacle openclaw-barnacle Bot removed the proof: supplied External PR includes structured after-fix real behavior proof. label May 21, 2026
@clawsweeper

clawsweeper Bot commented May 21, 2026

Copy link
Copy Markdown
Contributor Author

Codex review: passed.

Workflow note: Future ClawSweeper reviews update this same comment in place.

How this review workflow works
  • 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.

Summary
The PR wraps the async JSON file readers in src/infra/json-files.ts with bounded retries for fs-safe File changed during read races, adds regression tests, and adds a changelog entry.

Reproducibility: yes. Source inspection shows fs-safe throws File changed during read, current main re-exports that no-retry path, and the inherited PR proof includes before/after gateway logs; I did not run a new live race harness in this read-only review.

PR rating
Overall: 🐚 platinum hermit
Proof: 🦞 diamond lobster
Patch quality: 🐚 platinum hermit
Summary: Good merge-ready bug fix with convincing log proof and focused tests; patch confidence is limited mainly by the message-based fs-safe retry predicate.

Rank-up moves:

  • none
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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.

Real behavior proof
Sufficient (logs): The source PR body carries after-fix real environment proof with gateway logs, uptime, and unit test output showing the transient read race no longer surfaces.

Risk before merge

  • The retry predicate still depends on the pinned fs-safe error message because @openclaw/fs-safe@0.2.7 does not expose a typed path-mismatch error; that is acceptable for this dependency version but should be revisited if fs-safe changes the contract.

Maintainer options:

  1. Decide the mitigation before merge
    Land this central async JSON-read retry after exact-head checks; if fs-safe later publishes a typed path-mismatch retry, collapse the local wrapper into a dependency bump.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Next step before merge
No repair lane is needed; the automerge-opted replacement PR has no blocking review findings, so exact-head checks and mergeability should gate it.

Security
Cleared: The diff only changes local JSON read retry logic, focused tests, and changelog text; I found no new security or supply-chain concern.

Review details

Best possible solution:

Land this central async JSON-read retry after exact-head checks; if fs-safe later publishes a typed path-mismatch retry, collapse the local wrapper into a dependency bump.

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

Yes. Source inspection shows fs-safe throws File changed during read, current main re-exports that no-retry path, and the inherited PR proof includes before/after gateway logs; I did not run a new live race harness in this read-only review.

Is this the best way to solve the issue?

Yes. The central OpenClaw JSON helper wrapper is the narrowest current-repo fix for paired/config/state callers while preserving parse failures and missing-file semantics; a future upstream typed retry would be cleaner once available.

Label justifications:

  • P1: The PR fixes a source-backed gateway/pairing read race that can close or reconnect active clients during JSON state rewrites.
  • rating: 🐚 platinum hermit: Current PR rating is 🐚 platinum hermit because proof is 🦞 diamond lobster, patch quality is 🐚 platinum hermit, and Good merge-ready bug fix with convincing log proof and focused tests; patch confidence is limited mainly by the message-based fs-safe retry predicate.
  • status: 🚀 automerge armed: This PR is in ClawSweeper's automerge lane. Sufficient (logs): The source PR body carries after-fix real environment proof with gateway logs, uptime, and unit test output showing the transient read race no longer surfaces.
  • proof: sufficient: Contributor real behavior proof is sufficient. The source PR body carries after-fix real environment proof with gateway logs, uptime, and unit test output showing the transient read race no longer surfaces.

What I checked:

  • Current main has no retry wrapper: Current main re-exports readJson, readJsonIfExists, and tryReadJson directly from @openclaw/fs-safe/json, so transient stable-target read races propagate through the OpenClaw helper layer. (src/infra/json-files.ts:4, b33deb41594e)
  • PR diff adds bounded async retries: The PR imports the async fs-safe JSON readers, adds a 3-attempt exponential retry wrapper for nested File changed during read errors, preserves strict/null-returning reader contracts, and adds retry success/exhaustion tests. (src/infra/json-files.ts:21, 00602a1c03ce)
  • Dependency contract checked: @openclaw/fs-safe@0.2.7 declares readJson<T>(): Promise<T>, readJsonIfExists<T>(): Promise<T | null>, and tryReadJson<T>(): Promise<T | null>; its async readRegularFile throws the literal File changed during read error when inode/dev identity changes during open, and the JSON layer wraps read failures in JsonFileReadError.
  • Affected gateway path confirmed: Pairing helpers read devices/paired.json through readJsonIfExists, and gateway websocket authentication calls getPairedDevice, so the current no-retry helper can surface during the reported client handshake path. (src/infra/device-pairing.ts:160, b33deb41594e)
  • Real behavior proof present: The source PR body includes before logs with JsonFileReadError caused by File changed during read, after-fix gateway uptime with no matching errors for 1.5+ hours, and unit test output showing retry success and exhaustion cases passing.
  • Exact-head checks sampled: For head 00602a1c03ce, relevant checks include successful Real behavior proof, checks-node-core-src-security, check-lint, check-test-types, and build-artifacts; only routine cancelled auto-response/proof duplicates appeared in the non-success list. (00602a1c03ce)

Likely related people:

  • @joshavant: Current-line blame attributes the JSON helper facade and the device/node pairing load-state lines in this checkout to commit 40db92f6097c, making this a strong current-main routing candidate. (role: recent area contributor; confidence: high; commits: 40db92f6097c; files: src/infra/json-files.ts, src/infra/device-pairing.ts, src/infra/node-pairing.ts)
  • @steipete: History shows Peter Steinberger introduced the unified device auth and pairing path in 73e9e787b4df and has multiple later device-pairing hardening/refactor commits in the same file history. (role: feature-history owner; confidence: high; commits: 73e9e787b4df, 6c82a91d3dc5, b660493e5466; files: src/infra/device-pairing.ts, src/gateway/server/ws-connection/message-handler.ts)
  • @ngutman: Recent device-pairing history includes Nimrod Gutman-authored work around bootstrap/background-alive behavior, so they are a plausible adjacent reviewer for pairing-state regressions. (role: recent adjacent contributor; confidence: medium; commits: b328c6611527, f3c304917acb, a9140abea6d4; files: src/infra/device-pairing.ts)

Codex review notes: model gpt-5.5, reasoning high; reviewed against b33deb41594e.

@clawsweeper

clawsweeper Bot commented May 21, 2026

Copy link
Copy Markdown
Contributor Author

🦞✅
ClawSweeper merged this PR after the passing review.

Source: clawsweeper[bot]
Feedback: structured ClawSweeper verdict: pass (sha=00602a1c03ce51f72cb276acc4e76c4a82686303)
Merge status: merged by ClawSweeper automerge
Merged at: 2026-05-21T16:56:47Z
Merge commit: 7f943b5d8f83

What merged:

  • The PR wraps the async JSON file readers in src/infra/json-files.ts with bounded retries for fs-safe File changed during read races, adds regression tests, and adds a changelog entry.
  • Reproducibility: yes. Source inspection shows fs-safe throws File changed during read, current main re-exp ... R proof includes before/after gateway logs; I did not run a new live race harness in this read-only review.

Automerge notes:

  • PR branch already contained follow-up commit before automerge: fix(json): preserve strict reader types (Promise for readJson/read…
  • PR branch already contained follow-up commit before automerge: test(json): add retry-success and retry-exhaustion coverage
  • PR branch already contained follow-up commit before automerge: fix(json): resolve lint warnings (prefer-exponentiation-operator, cur…
  • PR branch already contained follow-up commit before automerge: fix(json): retry on transient File changed during read race condition

The automerge loop is complete.

Automerge progress:

  • 2026-05-21 16:47:30 UTC review queued 00602a1c03ce (queued)
  • 2026-05-21 16:56:29 UTC review passed 00602a1c03ce (structured ClawSweeper verdict: pass (sha=00602a1c03ce51f72cb276acc4e76c4a82686...)
  • 2026-05-21 16:56:51 UTC merged 00602a1c03ce (merged by ClawSweeper automerge)

@clawsweeper

clawsweeper Bot commented May 21, 2026

Copy link
Copy Markdown
Contributor Author

ClawSweeper PR egg

✨ Hatched: 🥚 common Neon Shellbean

Hatch command

Comment @clawsweeper hatch when this PR is hatchable.

Hatchability rules:

  • Merged PRs are hatchable.
  • Open PRs are hatchable when they are status: 👀 ready for maintainer look, status: 🚀 automerge armed, or labeled clawsweeper:automerge.
  • Closed unmerged PRs are hatchable only when one of those hatchable labels is still present in the durable record.

Rarity: 🥚 common.
Trait: purrs at green checks.
Image traits: location merge queue dock; accessory commit compass; palette amber, ink, and glacier blue; mood sparkly; pose holding its accessory up for inspection; shell woven fiber shell; lighting subtle sparkle highlights; background tiny shells and proof notes.
Share on X: post this hatch
Copy: My PR egg hatched a 🥚 common Neon Shellbean in ClawSweeper.

What is this egg doing here?
  • Eggs appear after the PR passes real-behavior proof. It is here for vibes, not verdicts: it does not change labels, ratings, merge decisions, or automation.
  • The shell reacts to review momentum: open follow-up work warms it up, re-review makes it wobble, and a clean final review lets it hatch.
  • Hatchability usually comes from sufficient real-behavior proof, no blocking P0/P1/P2 findings, no security attention needed, and clean correctness. A merged PR is already final, so merge makes the egg hatchable independently.
  • The hatch is seeded from this repository and PR number, so the same PR keeps the same creature; the reviewed head SHA can only change safe visual details.
  • Rarity is just collectible sparkle: 🥚 common, 🌱 uncommon, 💎 rare, ✨ glimmer, and 🌈 legendary.

@clawsweeper clawsweeper Bot merged commit 7f943b5 into main May 21, 2026
157 of 169 checks passed
@clawsweeper clawsweeper Bot deleted the clawsweeper/automerge-openclaw-openclaw-84285 branch May 21, 2026 16:56
SebTardif pushed a commit to SebTardif/openclaw that referenced this pull request May 24, 2026
…openclaw#85029)

Summary:
- The PR wraps the async JSON file readers in `src/infra/json-files.ts` with bounded retries for fs-safe `File changed during read` races, adds regression tests, and adds a changelog entry.
- Reproducibility: yes. Source inspection shows fs-safe throws `File changed during read`, current main re-exp ... R proof includes before/after gateway logs; I did not run a new live race harness in this read-only review.

Automerge notes:
- PR branch already contained follow-up commit before automerge: fix(json): preserve strict reader types (Promise<T> for readJson/read…
- PR branch already contained follow-up commit before automerge: test(json): add retry-success and retry-exhaustion coverage
- PR branch already contained follow-up commit before automerge: fix(json): resolve lint warnings (prefer-exponentiation-operator, cur…
- PR branch already contained follow-up commit before automerge: fix(json): retry on transient File changed during read race condition

Validation:
- ClawSweeper review passed for head 00602a1.
- Required merge gates passed before the squash merge.

Prepared head SHA: 00602a1
Review: openclaw#85029 (comment)

Co-authored-by: samson1357924 <98934496+samson1357924@users.noreply.github.com>
Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com>
Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com>
Approved-by: takhoffman
Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
SebTardif pushed a commit to SebTardif/openclaw that referenced this pull request May 24, 2026
…openclaw#85029)

Summary:
- The PR wraps the async JSON file readers in `src/infra/json-files.ts` with bounded retries for fs-safe `File changed during read` races, adds regression tests, and adds a changelog entry.
- Reproducibility: yes. Source inspection shows fs-safe throws `File changed during read`, current main re-exp ... R proof includes before/after gateway logs; I did not run a new live race harness in this read-only review.

Automerge notes:
- PR branch already contained follow-up commit before automerge: fix(json): preserve strict reader types (Promise<T> for readJson/read…
- PR branch already contained follow-up commit before automerge: test(json): add retry-success and retry-exhaustion coverage
- PR branch already contained follow-up commit before automerge: fix(json): resolve lint warnings (prefer-exponentiation-operator, cur…
- PR branch already contained follow-up commit before automerge: fix(json): retry on transient File changed during read race condition

Validation:
- ClawSweeper review passed for head 00602a1.
- Required merge gates passed before the squash merge.

Prepared head SHA: 00602a1
Review: openclaw#85029 (comment)

Co-authored-by: samson1357924 <98934496+samson1357924@users.noreply.github.com>
Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com>
Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com>
Approved-by: takhoffman
Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
SebTardif pushed a commit to SebTardif/openclaw that referenced this pull request May 24, 2026
…openclaw#85029)

Summary:
- The PR wraps the async JSON file readers in `src/infra/json-files.ts` with bounded retries for fs-safe `File changed during read` races, adds regression tests, and adds a changelog entry.
- Reproducibility: yes. Source inspection shows fs-safe throws `File changed during read`, current main re-exp ... R proof includes before/after gateway logs; I did not run a new live race harness in this read-only review.

Automerge notes:
- PR branch already contained follow-up commit before automerge: fix(json): preserve strict reader types (Promise<T> for readJson/read…
- PR branch already contained follow-up commit before automerge: test(json): add retry-success and retry-exhaustion coverage
- PR branch already contained follow-up commit before automerge: fix(json): resolve lint warnings (prefer-exponentiation-operator, cur…
- PR branch already contained follow-up commit before automerge: fix(json): retry on transient File changed during read race condition

Validation:
- ClawSweeper review passed for head 00602a1.
- Required merge gates passed before the squash merge.

Prepared head SHA: 00602a1
Review: openclaw#85029 (comment)

Co-authored-by: samson1357924 <98934496+samson1357924@users.noreply.github.com>
Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com>
Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com>
Approved-by: takhoffman
Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 24, 2026
…openclaw#85029)

Summary:
- The PR wraps the async JSON file readers in `src/infra/json-files.ts` with bounded retries for fs-safe `File changed during read` races, adds regression tests, and adds a changelog entry.
- Reproducibility: yes. Source inspection shows fs-safe throws `File changed during read`, current main re-exp ... R proof includes before/after gateway logs; I did not run a new live race harness in this read-only review.

Automerge notes:
- PR branch already contained follow-up commit before automerge: fix(json): preserve strict reader types (Promise<T> for readJson/read…
- PR branch already contained follow-up commit before automerge: test(json): add retry-success and retry-exhaustion coverage
- PR branch already contained follow-up commit before automerge: fix(json): resolve lint warnings (prefer-exponentiation-operator, cur…
- PR branch already contained follow-up commit before automerge: fix(json): retry on transient File changed during read race condition

Validation:
- ClawSweeper review passed for head 00602a1.
- Required merge gates passed before the squash merge.

Prepared head SHA: 00602a1
Review: openclaw#85029 (comment)

Co-authored-by: samson1357924 <98934496+samson1357924@users.noreply.github.com>
Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com>
Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com>
Approved-by: takhoffman
Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
galiniliev pushed a commit to galiniliev/openclaw that referenced this pull request May 25, 2026
…openclaw#85029)

Summary:
- The PR wraps the async JSON file readers in `src/infra/json-files.ts` with bounded retries for fs-safe `File changed during read` races, adds regression tests, and adds a changelog entry.
- Reproducibility: yes. Source inspection shows fs-safe throws `File changed during read`, current main re-exp ... R proof includes before/after gateway logs; I did not run a new live race harness in this read-only review.

Automerge notes:
- PR branch already contained follow-up commit before automerge: fix(json): preserve strict reader types (Promise<T> for readJson/read…
- PR branch already contained follow-up commit before automerge: test(json): add retry-success and retry-exhaustion coverage
- PR branch already contained follow-up commit before automerge: fix(json): resolve lint warnings (prefer-exponentiation-operator, cur…
- PR branch already contained follow-up commit before automerge: fix(json): retry on transient File changed during read race condition

Validation:
- ClawSweeper review passed for head 00602a1.
- Required merge gates passed before the squash merge.

Prepared head SHA: 00602a1
Review: openclaw#85029 (comment)

Co-authored-by: samson1357924 <98934496+samson1357924@users.noreply.github.com>
Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com>
Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com>
Approved-by: takhoffman
Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
SebTardif pushed a commit to SebTardif/openclaw that referenced this pull request May 26, 2026
…openclaw#85029)

Summary:
- The PR wraps the async JSON file readers in `src/infra/json-files.ts` with bounded retries for fs-safe `File changed during read` races, adds regression tests, and adds a changelog entry.
- Reproducibility: yes. Source inspection shows fs-safe throws `File changed during read`, current main re-exp ... R proof includes before/after gateway logs; I did not run a new live race harness in this read-only review.

Automerge notes:
- PR branch already contained follow-up commit before automerge: fix(json): preserve strict reader types (Promise<T> for readJson/read…
- PR branch already contained follow-up commit before automerge: test(json): add retry-success and retry-exhaustion coverage
- PR branch already contained follow-up commit before automerge: fix(json): resolve lint warnings (prefer-exponentiation-operator, cur…
- PR branch already contained follow-up commit before automerge: fix(json): retry on transient File changed during read race condition

Validation:
- ClawSweeper review passed for head 00602a1.
- Required merge gates passed before the squash merge.

Prepared head SHA: 00602a1
Review: openclaw#85029 (comment)

Co-authored-by: samson1357924 <98934496+samson1357924@users.noreply.github.com>
Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com>
Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com>
Approved-by: takhoffman
Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
SebTardif pushed a commit to SebTardif/openclaw that referenced this pull request May 26, 2026
…openclaw#85029)

Summary:
- The PR wraps the async JSON file readers in `src/infra/json-files.ts` with bounded retries for fs-safe `File changed during read` races, adds regression tests, and adds a changelog entry.
- Reproducibility: yes. Source inspection shows fs-safe throws `File changed during read`, current main re-exp ... R proof includes before/after gateway logs; I did not run a new live race harness in this read-only review.

Automerge notes:
- PR branch already contained follow-up commit before automerge: fix(json): preserve strict reader types (Promise<T> for readJson/read…
- PR branch already contained follow-up commit before automerge: test(json): add retry-success and retry-exhaustion coverage
- PR branch already contained follow-up commit before automerge: fix(json): resolve lint warnings (prefer-exponentiation-operator, cur…
- PR branch already contained follow-up commit before automerge: fix(json): retry on transient File changed during read race condition

Validation:
- ClawSweeper review passed for head 00602a1.
- Required merge gates passed before the squash merge.

Prepared head SHA: 00602a1
Review: openclaw#85029 (comment)

Co-authored-by: samson1357924 <98934496+samson1357924@users.noreply.github.com>
Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com>
Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com>
Approved-by: takhoffman
Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
SebTardif pushed a commit to SebTardif/openclaw that referenced this pull request May 26, 2026
…openclaw#85029)

Summary:
- The PR wraps the async JSON file readers in `src/infra/json-files.ts` with bounded retries for fs-safe `File changed during read` races, adds regression tests, and adds a changelog entry.
- Reproducibility: yes. Source inspection shows fs-safe throws `File changed during read`, current main re-exp ... R proof includes before/after gateway logs; I did not run a new live race harness in this read-only review.

Automerge notes:
- PR branch already contained follow-up commit before automerge: fix(json): preserve strict reader types (Promise<T> for readJson/read…
- PR branch already contained follow-up commit before automerge: test(json): add retry-success and retry-exhaustion coverage
- PR branch already contained follow-up commit before automerge: fix(json): resolve lint warnings (prefer-exponentiation-operator, cur…
- PR branch already contained follow-up commit before automerge: fix(json): retry on transient File changed during read race condition

Validation:
- ClawSweeper review passed for head 00602a1.
- Required merge gates passed before the squash merge.

Prepared head SHA: 00602a1
Review: openclaw#85029 (comment)

Co-authored-by: samson1357924 <98934496+samson1357924@users.noreply.github.com>
Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com>
Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com>
Approved-by: takhoffman
Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
jameslcowan pushed a commit to jameslcowan/openclaw that referenced this pull request Jun 2, 2026
…openclaw#85029)

Summary:
- The PR wraps the async JSON file readers in `src/infra/json-files.ts` with bounded retries for fs-safe `File changed during read` races, adds regression tests, and adds a changelog entry.
- Reproducibility: yes. Source inspection shows fs-safe throws `File changed during read`, current main re-exp ... R proof includes before/after gateway logs; I did not run a new live race harness in this read-only review.

Automerge notes:
- PR branch already contained follow-up commit before automerge: fix(json): preserve strict reader types (Promise<T> for readJson/read…
- PR branch already contained follow-up commit before automerge: test(json): add retry-success and retry-exhaustion coverage
- PR branch already contained follow-up commit before automerge: fix(json): resolve lint warnings (prefer-exponentiation-operator, cur…
- PR branch already contained follow-up commit before automerge: fix(json): retry on transient File changed during read race condition

Validation:
- ClawSweeper review passed for head 00602a1.
- Required merge gates passed before the squash merge.

Prepared head SHA: 00602a1
Review: openclaw#85029 (comment)

Co-authored-by: samson1357924 <98934496+samson1357924@users.noreply.github.com>
Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com>
Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com>
Approved-by: takhoffman
Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
SYU8384 pushed a commit to SYU8384/openclaw that referenced this pull request Jun 3, 2026
…openclaw#85029)

Summary:
- The PR wraps the async JSON file readers in `src/infra/json-files.ts` with bounded retries for fs-safe `File changed during read` races, adds regression tests, and adds a changelog entry.
- Reproducibility: yes. Source inspection shows fs-safe throws `File changed during read`, current main re-exp ... R proof includes before/after gateway logs; I did not run a new live race harness in this read-only review.

Automerge notes:
- PR branch already contained follow-up commit before automerge: fix(json): preserve strict reader types (Promise<T> for readJson/read…
- PR branch already contained follow-up commit before automerge: test(json): add retry-success and retry-exhaustion coverage
- PR branch already contained follow-up commit before automerge: fix(json): resolve lint warnings (prefer-exponentiation-operator, cur…
- PR branch already contained follow-up commit before automerge: fix(json): retry on transient File changed during read race condition

Validation:
- ClawSweeper review passed for head 00602a1.
- Required merge gates passed before the squash merge.

Prepared head SHA: 00602a1
Review: openclaw#85029 (comment)

Co-authored-by: samson1357924 <98934496+samson1357924@users.noreply.github.com>
Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com>
Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com>
Approved-by: takhoffman
Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
sablehead pushed a commit to sablehead/openclaw that referenced this pull request Jun 10, 2026
…openclaw#85029)

Summary:
- The PR wraps the async JSON file readers in `src/infra/json-files.ts` with bounded retries for fs-safe `File changed during read` races, adds regression tests, and adds a changelog entry.
- Reproducibility: yes. Source inspection shows fs-safe throws `File changed during read`, current main re-exp ... R proof includes before/after gateway logs; I did not run a new live race harness in this read-only review.

Automerge notes:
- PR branch already contained follow-up commit before automerge: fix(json): preserve strict reader types (Promise<T> for readJson/read…
- PR branch already contained follow-up commit before automerge: test(json): add retry-success and retry-exhaustion coverage
- PR branch already contained follow-up commit before automerge: fix(json): resolve lint warnings (prefer-exponentiation-operator, cur…
- PR branch already contained follow-up commit before automerge: fix(json): retry on transient File changed during read race condition

Validation:
- ClawSweeper review passed for head 00602a1.
- Required merge gates passed before the squash merge.

Prepared head SHA: 00602a1
Review: openclaw#85029 (comment)

Co-authored-by: samson1357924 <98934496+samson1357924@users.noreply.github.com>
Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com>
Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com>
Approved-by: takhoffman
Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clawsweeper:automerge Maintainer opted this PR into bounded ClawSweeper-reviewed automerge clawsweeper Tracked by ClawSweeper automation P1 High-priority user-facing bug, regression, or broken workflow. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: M status: 🚀 automerge armed This PR is in ClawSweeper's automerge lane.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

JSON file reads should retry on transient race conditions

0 participants