fix(json): retry on transient File changed during read race condition#85029
Conversation
…ly, no-unnecessary-type-assertion)
|
Codex review: passed. Workflow note: Future ClawSweeper reviews update this same comment in place. How this review workflow works
Summary Reproducibility: yes. Source inspection shows fs-safe throws PR rating Rank-up moves:
What the crustacean ranks mean
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 Risk before merge
Maintainer options:
Next step before merge Security Review detailsBest 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 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:
What I checked:
Likely related people:
Codex review notes: model gpt-5.5, reasoning high; reviewed against b33deb41594e. |
|
🦞✅ Source: What merged:
Automerge notes:
The automerge loop is complete. Automerge progress:
|
|
ClawSweeper PR egg ✨ Hatched: 🥚 common Neon Shellbean Hatch commandComment Hatchability rules:
Rarity: 🥚 common. What is this egg doing here?
|
…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>
…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>
…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>
…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>
…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>
…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>
…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>
…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>
…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>
…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>
…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>
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:
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.