Repository navigation
Conversation
Reject and preserve oversized unapplied results with a durable repairable outcome. Move patch construction into the Git worker and replace quadratic conflict retention with ancestor membership. Accepted receipts and rollback journals remain recoverable.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review in progressClawSweeper is reviewing this revision. This supersedes any previous blocked status. |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Classify quota errors before reading a possibly stale projection after a committed publication update. Keep unrelated recovery errors intact, distinguish the worker patch adapter export, and correct benchmark lint.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4e0a58539e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Recapture a corrected canonical source during explicit sandbox preparation while unchanged rejected inputs remain parked. Preserve guest edits and the rejected Git result; prove both sync directions and keep base-refresh recovery intact.
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
fisallllll280-code
left a comment
There was a problem hiding this comment.
The reconciliation improvements are a valuable contribution, particularly the reduction in main-thread CPU time and heartbeat gaps under large workspace workloads.
One important aspect is the durable handling of rejected reconciliation results through checkpoint receipts and recovery mechanisms.
It would be useful to document the operational behavior at the 50,000-path admission limit, including recovery guarantees, retry semantics, and observability when the limit is reached.
The published benchmarks are promising. Additional production-scale measurements would help validate their generalizability.
Thank you for the detailed engineering work.
* fix: keep ignored build outputs out of worker results Apply standard Git exclusions at local and remote result capture while preserving tracked source, admitted paths, and accepted custody. Reuse the same capture owner during overflow recovery. Keep the result byte cap and recovery behavior from #194475 and #194642 unchanged. * fix(workspaces): retain ignored artifacts and break capture cycle * fix(workspaces): select capture scope at the caller * fix(workspaces): preserve staged-input capture eligibility
…penclaw#194475) * fix(gateway): prevent stalls from oversized workspace reconciliation Reject and preserve oversized unapplied results with a durable repairable outcome. Move patch construction into the Git worker and replace quadratic conflict retention with ancestor membership. Accepted receipts and rollback journals remain recoverable. * fix(gateway): preserve publication errors during workspace settlement Classify quota errors before reading a possibly stale projection after a committed publication update. Keep unrelated recovery errors intact, distinguish the worker patch adapter export, and correct benchmark lint. * fix(gateway): allow repair of rejected canonical workspace imports Recapture a corrected canonical source during explicit sandbox preparation while unchanged rejected inputs remain parked. Preserve guest edits and the rejected Git result; prove both sync directions and keep base-refresh recovery intact.
* fix: keep ignored build outputs out of worker results Apply standard Git exclusions at local and remote result capture while preserving tracked source, admitted paths, and accepted custody. Reuse the same capture owner during overflow recovery. Keep the result byte cap and recovery behavior from openclaw#194475 and openclaw#194642 unchanged. * fix(workspaces): retain ignored artifacts and break capture cycle * fix(workspaces): select capture scope at the caller * fix(workspaces): preserve staged-input capture eligibility
…penclaw#194475) (cherry picked from commit c1bf1cc) Release adaptation: Only retainedConflictPaths ancestor membership optimization and an equivalent-output 10,000-entry regression. Preserves existing workspacePathAncestors and blocking-conflict filtering. Excludes quarantine, routing, receipts, reconciliation state redesign and generated code. Companion audit found broader redesign unnecessary for this standalone loop replacement. Co-authored-by: RomneyDa <[email protected]> (cherry picked from commit 525f67d24bb0f4eb6ecf3881bb9ecce8ab524749)
What Problem This Solves
Fixes: a large worker workspace result can stall the Gateway main thread during local reconciliation and repeatedly fail recovery without a durable rejected outcome.
User Impact
Oversized unapplied results now fail visibly with exclusion/splitting guidance and a preserved recovery reference. Local agents can correct retained files and checkpoint again; a corrected canonical source can be imported during explicit sandbox preparation. Automatic settlement leaves rejected results parked. Accepted receipts and rollback journals remain recoverable. No configuration or database schema change is required.
Why This Change Was Made
Conflict retention scanned every conflict for each applied path, causing quadratic main-thread work and transient string allocation. One ancestor set preserves the same conflict result with linear path processing. Patch creation, tree preparation, rollback-pack hashing, and recovery diff collection use the existing Git worker and transfer owned buffers.
Historical unapplied results now receive publication's 50,000 changed-path admission limit before materialization, alongside existing byte limits. Local rejection is recorded by the database owner in the existing checkpoint receipt; cloud recovery retires only an unaccepted, durably staged result without a mutation journal. Disposable local output should be moved to checkout-root
.openclaw/tmp/or removed before a new explicit checkpoint;.gitignorealone does not exclude already admitted local sandbox files.Release-note context: keep the Gateway responsive while reconciling large worker workspaces, report oversized results once with repair guidance, and preserve rejected work for recovery.
Evidence
Production-shaped synthetic btrfs proof uses real Git and
applyStagedWorkerWorkspace: 20,000 changed files / 491.52 MB with a controlled concurrent writer, producing exactly the same 20,000 conflicts before and after. Five runs per arm, including A/A controls:A 65,000-file / 1.10 GB synthetic result rejects at the apply owner in 0.995 ms, with an 11.05 ms maximum heartbeat gap and actionable error. CPU profiles locate the baseline stall in the nested conflict scan. After the existing worker idle GC runs, retained RSS is approximately 3% higher, while main live heap is approximately 1% lower. Patch-only generation did not reproduce the spin; these measurements demonstrate the owner defect, not the duration or exact stack of an uncaptured production incident.
Final lifecycle suites: 95 passed (two platform/environment skips); checkpoint store/manifest/CAS consumers: 39 passed; patch/recovery/worker siblings: 37 passed (one macOS broker skip, covered on the Linux rig). The new admission, durable quarantine, and terminal recovery regressions all fail on exact parent
2ab781210c6f. Codex autoreview is scoped-clean at P0–P2.pnpm check:changedcompleted: typechecks, formatting, structural/database guards, and all dead-export scans passed. Its PR-caused import-form and benchmark-brace lint errors were corrected and pass targeted lint. The remaining local changelog attribution failure reproduces on exact branch parent2ab781210c6f(20 historical bot-thanks entries), introduced by266a7aa0fe69(#194364). No changelog is changed here.Initial CI exposed a real error-propagation regression: a committed publication update could leave the projection snapshot stale, and the new rejection catch masked the original publication error. The catch now checks the quota error code before reading state; the existing publication boundary test is red before and green after, alongside the quarantine regression. The worker adapter now has a distinct exported name; the export-collision guard passes. Hosted review also found that rejected canonical-to-sandbox imports needed an explicit repair path. Both directions now have red/green coverage that preserves guest edits and the original Git ref; unchanged source stays parked. Four final focused cases pass, including base-refresh recovery and publication-error preservation. Final full-diff Codex autoreview is scoped-clean P0–P2; targeted lint, production/test types, format, line caps and test-line budgets pass.
Full Linux
pnpm buildcompleted in 7m 11.6s, including unified declarations, 102 plugin distributions, SDK export checks and Control UI. The build printed non-blocking UI bundle-budget warnings; no UI-imported module is changed. The subsequent catch/import/naming corrections are covered by focused compiled-worker proof and targeted checks.Initial CI's architecture failure is inherited from its exact main parent
dd11a9c2da98(#191935): that commit adds the type back-edgecontrol-ui-static.ts→server-control-ui-root.ts. The native Madge guard passes on branch ancestor2ab781210c6fand reproduces the identical single cycle ondd11a9c2da98. This is a newly introduced main regression, reported for separate repair. The second CI run passed all PR-owned runtime, export and lint jobs. It also exposed an unrelated fresh-browser heading assertion on the newer main parent; exact-parent reproduction is in progress. Final exact-head CI is pending.Final-head CI qualification
Final reviewed head
9c7ad689bc2ac59d665e0415ec3772ed8bfd43cf, CI 42343228061, attempt 1. Actual tested mergee1db18c724a2a2b287acf54ba93db5cc18f6f9c5has main parentf231ad6693d808e8da6008ca2643058072ebbb3aand this PR head. All PR-owned runtime/type/lint checks and security-fast pass. Three inherited failures plus their aggregate remain, each reproduced on that exact main parent:control-ui-static.tsandserver-control-ui-root.ts, introduced by fix(ui): keep Gateway downtime visible without losing drafts #191935 /dd11a9c2da98.287443696644; exact-parent browser proof and screenshot confirm the stale heading. Local source-map coordinates differ from CI; assertion type, source and screen agree.f231ad6693d8adding 13 lines without allocation. Exact main against its parent fails with +13; self-comparison reports the debt but exits zero under the guard's explicit no-growth rule. This PR adds exactly 174 lines and 174 allocation, leaving the same seven-line debt.These are main regressions for separate repair, not ignored noise. The authorized native inherited-failure landing route retains failed CI and exact-head evidence; it does not claim green CI. No production deployment is part of this PR.