Skip to content

fix(publish): preserve shallow state fetches - #708

Merged
hxy91819 merged 1 commit into
mainfrom
feature/incident-shallow-state-fetch
Jul 19, 2026
Merged

hxy91819 merged 1 commit into
mainfrom
feature/incident-shallow-state-fetch

Conversation

@hxy91819

Copy link
Copy Markdown
Member

Incident

PR #700 introduced server-side immutable-ledger merges and PR #701 enabled them in production. PR #705 stopped new merge-DAG growth, while PR #707 bounded stalled publisher fetches, but ordinary refreshes from depth-1 state checkouts can still hydrate the historical merge ancestry and consume every publication slot.

Fix

  • Detect whether the publication state checkout is already shallow.
  • Keep each refresh at --depth=1 only for shallow checkouts.
  • Preserve ordinary fetch semantics for complete repositories so tuple reconciliation retains full ancestry.
  • Retain the existing 60-second fetch timeout and retry classification.

Production proof

Against a fresh depth-1 clone of openclaw/clawsweeper-state/state, the new fetch shape completed in 5.09 seconds and retained a one-commit shallow boundary.

Validation

  • three TypeScript builds passed
  • focused timeout and helper tests passed
  • 10 publish/reconcile race regressions passed after proving that unconditional depth truncation was unsafe
  • git diff --check passed
  • autoreview finding about options.cwd rejected because GitRunOptions has no cwd; both commands resolve the same publishRoot()

This does not rewrite state history, change queue protocol, weaken tuple/CAS guards, pause sweep, or run live apply/close.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@hxy91819
hxy91819 merged commit 3beb5f0 into main Jul 19, 2026
9 checks passed
@hxy91819
hxy91819 deleted the feature/incident-shallow-state-fetch branch July 19, 2026 16:35
azaj01 pushed a commit to azaj01/clawsweeper that referenced this pull request Sep 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant