Repository navigation
fix: Git updates fail on abandoned plugin runtime staging - #158338
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: blocked before merge. Reviewed September 25, 2026, 6:36 PM ET / 22:36 UTC (Revision 3). ClawSweeper reviewWhat this changesThe Git updater now excludes incidental UUID-named runtime staging directories from plugin dependency snapshots, retains explicitly linked inputs, and documents manual recovery for older installed updaters. Merge readiness⛔ Blocked before merge - 4 items remain The patch remains useful: current main still has the reported failure path, and the PR now has a real CLI before-and-after trace. Recovery for installations already running the affected older updater remains an unaccepted upgrade tradeoff. Priority: P1 Review scores
Verification
How this fits togetherDuring an update, OpenClaw inventories plugin files and dependencies for a private candidate copy before activating the new runtime. Git runtime promotion creates temporary candidate and rollback directories that can remain in that inventory after an interrupted update. flowchart LR
A[Installed updater] --> B[Plugin dependency inventory]
C[Plugin paths and links] --> B
D[Git transaction directories] --> B
B --> E{Incidental staging?}
E -->|Yes| F[Preserve outside snapshot]
E -->|No or explicitly linked| G[Validate and copy dependency]
G --> H[Candidate checks and activation]
Decision needed
Why: The installed updater performs the failing scan before candidate code can change it; accepting operator action for that first hop is an upgrade-policy choice. Before merge
Agent review detailsSecurityNone. PR surfaceSource +31, Tests +86, Docs +12. Total +129 across 5 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep one updater-owned staging namespace and validate explicitly linked dependencies while preserving abandoned transaction contents; provide an accepted, verified recovery route for installations whose old driver fails first. Do we have a high-confidence way to reproduce the issue? Yes. The contributor's isolated source-built main Is this the best way to solve the issue? Yes for the candidate-side defect: the change uses the existing inventory and runtime-promotion owners without adding a competing path. The first upgrade from an affected installed driver still needs a verified and accepted recovery route. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 8d19854879f5. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (2 earlier review cycles)
|
|
ClawSweeper revision 3 has no actionable code or security findings. Its four remaining checklist entries repeat two concerns; here is the disposition on unchanged reviewed head
The raw new harness status remains failed: its final exact-path assertion expected the numeric UUID tail that the released driver's diagnostic redaction replaces with The PR body contains release provenance, commands, results, and limitations, with the new proof narrative and its verified 11-file bundle. Testbox The distinct historical incident binary, npm-distributed runtime execution, and managed-service restart remain untested. The earlier removed-entry negative failed its expectation, and the internal-link follow-up was inconclusive; real-CLI refusal of an explicit external missing dependency remains an evidence gap. Those limits remain disclosed. |
Backport #158451 from 5836021. Backport #158422 from 6ee9eb3. Backport #158338 from 8c29090. Use child-only config-reader admission and byte-framed stdout without changing the frozen TypeScript generator contract. Preserve fresh dependencies, operation-selected environments, diagnostics and rollback reads. Compare Windows tasks using omitted-default semantics without inventing missing triggers/principals or weakening explicit disable/deletion controls. Preserve all existing CI list entries and add the new Windows regression once. Exclude only incidental UUID-v4 Git transaction directories from plugin inventory. Keep explicit dependencies, transaction bytes and existing promotion rollback ordering intact; do not import newer streaming/lookup architecture. All 13 integrated postimages match the independently reviewed worker tree. Original failures reproduced; 42 focused tests and owning lint/ratchets pass. Real Bun and Windows qualification remain open. The Bun E2E preflight did not enter because the host's runtime-publication guard refused; no bypass occurred. Publication remains held by the prepared PR size-policy decision. Co-authored-by: Peter Steinberger <[email protected]> Co-authored-by: Josh Lehman <[email protected]> Co-authored-by: RomneyDa <[email protected]> Co-authored-by: vyctorbrzezowski <[email protected]> Co-authored-by: steipete <[email protected]> Co-authored-by: jalehman <[email protected]>
Closes #158320
What Problem This Solves
Fixes Git updates failing before activation when dependency copying enters abandoned runtime staging whose relocated links do not resolve.
User Impact
Plugin rehearsal and retained-updater preparation preserve incidental candidate and rollback directories without treating them as live dependencies. Ordinary temporary directories and explicitly referenced dependencies still undergo normal validation. An affected older installed updater needs a manual bootstrap before it can use this fix: candidate code cannot change the earlier scan running in that driver.
Why This Change Was Made
Share the Git runtime producer's exact UUID transaction namespace with the existing dependency inventory. Skip incidental real directories in that namespace, while explicitly linked inputs retain normal copying and validation. The updater neither deletes nor repairs existing transactions. The existing capture and copy owners remain in place.
Evidence
Actual updater CLI proof ran on Linux through Crabbox's
blacksmith-testboxprovider, leasetbx_01m3d59qtvmy7vh04x4pyy9bj9(Testbox run). A2A remained inactive. The synthetic active plugin imports a real required dependency and has an unused installed path link to A2A; its abandoned staging reproduces the reported relative SDK link.openclaw update1533f4ee1feetargeting this PRv2026.9.5Git driverec9c1a13db89targeting this PRsnapshot/candidate-snapshot-failed, with the abandoned SDK-link ENOENT. Installed source/build/package and frozen inputs stayed unchanged; the original Gateway identity persisted through all 577 healthy HTTP samples. Raw harness status remains failed because its final literal-path assertion did not account for diagnostic redaction; see below.3ca12540d0b0succeeded. Runtime retention, candidate state snapshot, plugin checks, candidate Gateway startup, and cleanup completed. Separately activated Gateway served the exact target build and loaded the synthetic plugin.succeeded. Installation replacement then shut down the incumbent; no continuity or preservation claim applies.The fixed-driver update targets unpublished commit
5acb84c32f20b7161b95e2e4fa6daddc8fdc6a12, whose tracked tree is exactly this PR'sf27998e7afe663277fc2ef4d4cf27534bd6b82ad. A distinct commit forces the real update path. The served build was2026.9.6-5acb84c32f20-2026-09-25T21-46-15.360Z.All three cells restored/verified the original 20-entry frozen manifest, SHA256
c09f6eafeb2d71a934d0d741252eb68894411e25909a8d1cfc6ad27165c124ca, including abandoned candidate and rollback sentinels.The failed negative fixture targeted a different contract: source inspection records missing module imports as unresolved, and candidate rehearsal records attributed plugin-load errors as observations. The package directory/manifest remained present. This result does not prove capture staleness or that the candidate loaded the missing dependency. A separate, stable-before-start explicit-link CLI probe was cancelled after source inspection found that its dangling target stayed inside the copied owner, where dangling links are intentionally preserved. That probe is inconclusive. Real-CLI rejection of an explicit external missing dependency remains an evidence gap. Ordinary and lookalike directory refusal remains covered by the focused regressions. The failed cell also recorded 654 settled readiness samples of the preceding successful build before installation replacement.
The original comparison uses a source-built main baseline; the follow-up below adds the published-release Git driver. Neither executes the distinct historical incident binary. The main baseline first reaches the shared copier during retained-updater preparation, before plugin rehearsal. The successful cell intentionally stops its owned foreground Gateway before
--no-restart, uses the documented external service policy, and activates the result manually. Managed-service restart and production deployment were not exercised. Doctor emitted budget/disposal warnings; final post-update lint exited 0.Proof narrative and fixture limits · Artifact manifest with logs, hashes, scripts, and corrected cleanup receipt. All 23 artifacts and the manifest were fetched and verified byte-for-byte after upload. Signed links expire after seven days; the essential outcomes remain in this PR body.
The Testbox is stopped (
completed). The final process check inspected 164 processes and found no task-owned survivors. Its receipt explicitly supersedes an earlier invalid scan; the evidence preserves that correction.Published-driver follow-up and review disposition
ClawSweeper revision 3 identified no actionable code or security findings. Its four checklist entries repeat two concerns: published-driver first-hop evidence and acceptance of manual bootstrap for already affected installations.
A separate Linux
blacksmith-testboxrun, leasetbx_01m3dewdpkcw3cqg2hrvqgp4v9(run), executed one first-hop update from a Git installation built from published stablev2026.9.5to this PR's exact head. The live annotated tagce2a56d4f41a756662328f4098e303014fdbb38cresolves toec9c1a13db8938e5a3eaa51fca2e981cde2395a9, independently corroborated by the npm package's embedded build metadata. The source-built initiating runtime served build2026.9.5-ec9c1a13db89-2026-09-25T23-43-37.983Z. This exercises the affected Git installation route; npm-distributed runtime bytes and the distinct historical incident build remain untested.The actual updater rejected the same abandoned staging link before candidate code could run: exit 1,
runtime-verification-failed, durable runfinished/failed. Source/build/package hashes and all 20 frozen inputs remained unchanged (manifest SHA25688d422e78a90197bc5cfa0c5bf85e3d41493ad5f829c0fc6f5c8349c7f5bfe98). All 577 health/readiness samples returned HTTP 200, the original incumbent PID/start identity remained present in every sample, and RPC passed before and after. Additional transient workers appeared; this does not claim an unchanged whole process set.Harness limitation: raw campaign/cell status remains
failed. The final literal-path assertion expected the full UUID, but the released driver's snapshot error wrapper callsredactSupportString, whose long-decimal rule replaces the UUID's numeric tail with<redacted-id>. Applying that rule to the unique frozen SDK-link path gives the reported path exactly. Earlier rejection, preservation, and continuity assertions passed. Raw results are preserved; no assertion edits, reruns, or product fixes followed.Released-driver proof and limitations · 11-file artifact manifest. Every uploaded file and the manifest were fetched and verified byte-for-byte and against recorded SHA256. Links expire after seven days; essential outcomes remain here. The final process scan inspected 160 processes and found no task-owned survivors; native Testbox status is
completed.Disposition: the published Git-driver first-hop evidence gap is addressed. Keep the documented one-time bootstrap: the failing scan belongs to the already-installed updater and precedes candidate Doctor and the repaired inventory. This limitation predates the PR. Another candidate-side change cannot repair that earlier execution; automatic recovery would require a separately scoped installer path reachable outside the failing driver. This is a recommendation, not a claim of maintainer acceptance or a successful automatic first hop. The earlier fixed-driver success remains separate evidence. No code change, merge, or deployment is included in this follow-up.
Additional validation:
openclaw/ci-gate, on3ca12540d0b00fb24867f0fb3206f808801cbe48.