Skip to content

test(ci): verify installed package recovery after interruption - #177381

Merged
vincentkoc merged 30 commits into
mainfrom
test/package-recovery-installed
Oct 29, 2026
Merged

vincentkoc merged 30 commits into
mainfrom
test/package-recovery-installed

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Oct 19, 2026 •

Copy link
Copy Markdown
Member

Related: #143917
Follow-up to #176125
Prerequisite: #185644

What Problem This Solves

Installed-package recovery needs a directly runnable interruption driver and inspectable private failure evidence. Its success publisher also rejected a valid 66-phase/132-event journal at a generic 128-item guard, after recovery had passed.

User Impact

This foundation adds the seven-cut installed-recovery driver, command/watchdog boundaries and private diagnostics. It validates complete phase journals without dropping repeated or overlapping events. Raw exceptions remain private; public failure output uses fixed retrieval guidance.

Product runtime changes: 0. Operational harness/declaration changes are counted below. The seven-cell scheduler, shared-group evidence access and post-join publication remain together in an unpublished dependent change; they are outside this PR.

Why This Change Was Made

  • Run each recovery command under the survivor-selected budget. The installed-recovery Docker argument now follows shared package arguments, so an ambient generic timeout cannot replace the default 900s, explicit 1.5s, or disabled 0 budget. Generic forwarding for sibling lanes and outer limits remain unchanged.
  • Preserve config bytes through recovery/archive, fixture-owned settings through healthy update, and updated config through copied-helper status.
  • Create private 0700/0600 evidence before parsing/execution. Keep raw driver errors separate from the public projection.
  • Validate the complete ordered phase array under existing 256 KiB input and 512 KiB output limits. Keep event validation, native/backup requirements, redaction and unrelated 128-item limits.

Evidence

Exact source and review

Signed local candidate: 27dacebc3b12f0096ed32dc3796422733a827f9d; tree: 1f151c76fa95166087011f083432dd6f0ba3b3ff; native baseline: 56e3422cbb7796e390d389f7268148c388b97f6a.

The native baseline successor 81a014921de9b1c6593f656b2bd7e6b863e8edf0 has ordered parents 4aa5ce6ac3007cadffb19e04e08ad84ba4a7b520 and that baseline. It addresses an observed Darwin failure: the old head lacked a test explicitly requested by the newer workflow. Independent composition review verified all 24 non-Knip A2 postimages and all 25 modes; Knip is the full baseline plus the three driver registrations. All requested Darwin workflow/test/support/runner files match the selected baseline. No copied-test workaround or skipped gate is used.

Area Added Removed
Operational harness/declarations 1,172 14
Tests/support 940 6
Metadata 3 0
Total: 25 paths 2,115 20

The 2,135 changed lines supply the new recovery driver/evidence capability and its tests. Product-runtime delta is zero; the dependent scheduler is separate.

  • Fresh complete P0–P2 assessment of 81a01492: two completed evidence batches, each with all 25 changed-path diffs and 54 intact shared contexts. Full Knip and Docker helper-test files were supplied in their respective batches. The sole finding was timeout argument precedence.
  • Signed correction 8883f1fa: two paths, production +1/−1 and tests +7/−1. Independent exact-delta review passed. A separately bounded P0–P2 correction review completed scoped-clean with both changed paths and 61 intact owner/test contexts in one 940,907-byte prompt.
  • Both assessments used Codex/gpt-6.1-sol/medium, with two and one completed attempts respectively, no partial/unknown attempts or observed fallback, and final source verification. This composes full-candidate source coverage; it is not a claim of live container/package execution.
  • The final test-only 27dacebc replaces filter(...).at(-1) with findLast to satisfy the actual lint rule while preserving the same pure predicate, last-value assertion and all five cases. Independent exact-delta review and five actual-expression equivalence controls passed; production and the running replay's harness are unchanged. No unchanged full autoreview was repeated.
  • Qualified oxfmt 0.74, shell syntax, diff checks and enabled signed commit hooks passed.

Behavior controls

The actual Bash wrapper and shared package helper reproduced three failures before the timeout correction: ambient 23s won over selected 900s, 1.5s, and 0. Five corrected controls passed, including ordinary and published sibling forwarding. This captures fake-Docker argv under Node 24.22.1 and checks Docker/runc last-value semantics; it does not run containers, installed packages or the full Vitest file.

The retained exported-publisher control passed 14 cases on the A2 source: the old owner accepts 128 events and rejects a valid 132-event journal; the corrected owner preserves all 132. Malformed/non-array journals, invalid event 131, oversize input, incomplete native evidence and an unrelated 129-item collection still refuse. This uses synthetic fixtures and an identity sanitizer; it does not supply host CLI/redactor or native E2E proof.

Native prepare-sync-head completed successfully, retaining the 8883f1fa lease and recording identical local/hosted 27dacebc identities. After CI finished, native prepare-gates with OPENCLAW_TESTBOX=1 completed successfully and selected exact-head hosted proof: both the verified and hosted-target fields bind 27dacebc, with no parent reuse. The signed checkout remains clean; no rebase, inherited-failure exception or automatic merge was used.

Fresh exact-head CI 40834072069, build 40834072029 and Darwin 40834071859 all passed. Preflight binds actual tested merge 1d8181e173863419d2b535b5175916e646681ef7 / tree 03f2074690e98c79ae1427ebd1a30b61730eb97b, with ordered parents 50c3ff63fcd42100dbf0bd0ff677c759ffee3178 and 27dacebc3b12f0096ed32dc3796422733a827f9d. All five affected files passed 164/164: Docker helper 124, watchdog 1, diagnostics 13, installed recovery 23 and native assignments 3, on Bun 1.4.4-canary.1+191755ec1/Linux x64 and Vitest 5.0.5. All five ambient-timeout/final-value cases passed. Changed lint reported zero warnings/errors; types and ratchets passed. The Node 24.22.1/pnpm 12.15.0 build executed SDK declarations and dist. Darwin passed with Node 24.22.1/arm64 and Vitest 5.0.5: cache 43, wrappers 103 with 6 skips, anchors 5, operation locks 60, and selected Git 4 with 12 platform skips. Both required CI gate records succeeded; no pending or failed checks remained in the terminal packet.

Historical 8883f1fa CI 40832369748 ran all five affected files successfully: Docker helper 124, watchdog 1, diagnostics 13, installed recovery 23 and native assignments 3 (164/164). All five ambient-timeout/final-value rows passed; build 40832369619 built SDK declarations and dist. Darwin 40832369660 passed on exact 8883f1fa, including the formerly missing selected-Git test (4 passed, 12 platform skips), wrappers (103 passed, 6 skips), anchors (5), operation locks (60) and cache (43). CI still failed on unicorn/prefer-array-find; the final test-only correction addresses that exact diagnostic. These results remain attributed to 8883f1fa, not the new head.

Historical f29e769b had 164 observed passing cases across all five owner test files and a successful cache-miss build with SDK declarations. Required CI still failed on one lint fixture and Darwin's missing requested file. The lint correction preserves identical 132-event fixture values; the native baseline supplies the requested source. These are historical results, not current-head hosted success.

Remaining qualification

Native merge remains on hold for the applicable exact-head Claw review. Fresh exact-head CI/security, build, Darwin and native hosted qualification have passed. The separate 9.4 replay now has a complete published native-assignment receipt, with the scope below. No inherited-CI/admin exception, cap increase or automatic merge is selected.

Doctor companion 186506 remains separate and unqualified at 55de928c20e021a97e98c00b2109f769de301ea6. Its package run 40646385499 observed 9.2/9.4/10.8 cell execution. The 9.4 log reached native recovery, strict Doctor, rollback and lane PASS, then host-publication failure; its structured native receipt is missing. The journal-cardinality contradiction is a reproduced sufficient failure, not proof of the only original exception.

The sole authorized 9.4-only replay 40832617119 completed. Its cell job 123314855137 passed in one 870-second lane attempt, without timeout or rerun. Execution is pinned to harness 8883f1fa318b9000ed85b184f5061548993d352a and Doctor package source 55de928c20e021a97e98c00b2109f769de301ea6. The final 27dacebc test-only expression change leaves the entire replay workflow/harness closure unchanged; this is still 8883 execution evidence, not a claim that the replay ran 27d.

The resolver verified original artifact SHA256 640bf49f605717cdd53765765857804d86ad8e4172dd3c68a5874cfec57ca09a, candidate TGZ SHA256 7e28f620e1a7b55eeb29f725d70d66f68fb439f64c5f2be3f1758c397ce1324d, Doctor source and version. Package integrity, Docker admission, planning and image preparation passed.

The published proof artifact 12880134633 is 25,944 bytes, SHA256 754a4b3612d2fcaee178951139f4a2cbcf353bb12c4756bdd141ba18e71d7b90. Its outer summary reports passed, zero failures and joined cleanup. The complete inner summary is 131,278 bytes, SHA256 1390aea121d733e4627704782ba9871143ca4c1d0643cb705de2e73ea4d597bf. Its structured native receipt records:

{
  "status": "passed",
  "baselineVersion": "2026.9.4",
  "candidateVersion": "2026.10.8",
  "sourceSha": "55de928c20e021a97e98c00b2109f769de301ea6",
  "candidateSha256": "7e28f620e1a7b55eeb29f725d70d66f68fb439f64c5f2be3f1758c397ce1324d",
  "companionSha256": "7cd39802cae353ea9d0e79f1a8e00e7c06eb80fa77a06e76464aa6eaa278a177",
  "source": "published-gateway-agent-native-events",
  "backend": "synthetic-codex-websocket",
  "firstHopImported": true,
  "retainedHistory": true,
  "retainedCompletion": true,
  "unconfirmedClosePreserved": true,
  "confirmedCloseSettled": true,
  "noReplay": true
}

The receipt also binds published @openclaw/[email protected] and its npm integrity, baseline core 2026.9.4 (3a9d69d), and both codex-thread:native-upgrade-running / codex-thread:native-upgrade-complete identities. This supplies the previously missing 9.4 structured publication proof. It uses real installed packages and gateway/native-event paths with an explicitly synthetic Codex WebSocket backend; it is not live-provider proof. Raw diagnostic excerpts retain their bounded redaction/omission policy; the structured native receipt is complete.

The replay aggregate remains failed. Its npm 12.0.2 install succeeded, but the unchanged installed-tree budget failed at 47,608 / 47,500 entries. The exact package and contributor inventory were inspected; no safe removal or budget waiver is established. This scoped 9.4 result does not qualify the Doctor PR or green the aggregate. Doctor's deferred-header/Node-envelope, compatibility and required-CI holds remain independent. Older package and combined-parent results are historical only.

The dependent scheduler waits for foundation landing, retargeting and fresh exact-base/head review and CI. Named follow-ups: native Codex character-limit preflight in Autoreview; GNU/Node zero-unit timeout grammar; completed-lease settlement/association handling. Unknown resource settlement and retained-anchor cleanup warnings remain preserved.

@vincentkoc vincentkoc self-assigned this Oct 19, 2026
@clawsweeper

clawsweeper Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts docker Docker and sandbox tooling size: L labels Oct 19, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:feature Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Oct 19, 2026
@clawsweeper

clawsweeper Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

Adds an installed-package interruption driver, private recovery diagnostics, and support for publishing complete phase journals.

Example: A successful upgrade produces 66 phases with 132 journal events.

  • Before: The success publisher rejects the journal at its generic 128-item limit.
  • After: The publisher preserves all 132 validated events within the existing byte limits.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) The source and exact-head validation are strong, with useful real publisher evidence, but the principal new interruption driver lacks retained end-to-end qualification.
Proof confidence 🦪 silver shellfish (2/6) Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
User problem: Release validation can miss interrupted installed-package recovery failures and reject otherwise successful upgrade evidence.
Reason: Maintainer-authored direction establishes value for this standalone foundation; the added environment selector controls only an isolated test cut, and scheduler integration is explicitly separate.

Merge readiness

✅ Ready for maintainer review

Keep open: this useful maintainer-owned foundation has no identified correctness or security defect, and the pinned head passes CI, build, and Darwin checks.

Priority: P2
Reviewed head: 27dacebc3b12f0096ed32dc3796422733a827f9d

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: The retained evidence does not show the new installed-recovery driver completing all seven interruption cuts and its subsequent healthy update against a source-bound packed writer.
Agent review details

How this fits together

Upgrade Survivor installs package artifacts in disposable Docker environments, exercises updater recovery, and projects private observations into bounded, redacted diagnostic artifacts.

flowchart TD
  A[Docker survivor wrapper] --> B[Installed recovery driver]
  B --> C[Installed updater and recovery helper]
  C --> D[Package trees and operation journal]
  B --> E[Private run evidence]
  E --> F[Existing diagnostics publisher]
  F --> G[Redacted public artifacts]
Loading

Technical review

Best possible solution:

Retain this focused driver and publisher foundation, with scheduler integration handled in its separately reviewed dependent change.

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

The base publisher explicitly rejects arrays above 128 entries, establishing the reported 132-event failure from source; supplied controls report the corresponding before/after result, but no reproduction was executed during this review.

Is this the best way to solve the issue?

The smallest complete approach is the existing bounded publisher repair plus a standalone driver composed from the existing supervisor, package-fixture, observation, and diagnostic owners; the extracted modules serve distinct execution boundaries.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against e3eae277b6c3.

Provenance checked

  • Successful phase-journal publication changes intended behavior with a stated reason (1ac3cf6: Publish detailed successful-upgrade receipts through the existing bounded, redacted host publisher.)
  • Shared watchdog timeout parser keeps the original intent (9491d5a: Consolidate watchdog behavior while preserving host and in-container lifecycle differences; the parser is extracted without changing its existing semantics.)
  • Package-tree witnesses keeps the original intent (73bd213: Provide exact, bounded package-tree comparisons with an explicit canonical permission-tightening transition.)
  • Legacy operator and synthetic native execution policies keeps the original intent (6652f7e: Keep restrictive operator approval specimens separate from the synthetic native agent's full execution policy; the additions explicitly configure those existing fixture intentions.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 9491d5a adds scripts/lib/docker-e2e-watchdog.mjs:1 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 9491d5a5a337; files: scripts/lib/docker-e2e-watchdog.mjs)
  • Shakker: Raw commit 6119c1b adds scripts/lib/docker-e2e-watchdog.mjs:2 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 6119c1b63b1a; files: scripts/lib/docker-e2e-watchdog.mjs)

PR surface

Tests +934, Other +1161. Total +2095 across 25 files. Added test files: 1.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 6 940 6 +934
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 19 1175 14 +1161
Total 25 2115 20 +2095

Labels

Label changes:

  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • remove proof: sufficient: Current real behavior proof status is not_applicable, not sufficient.
  • remove rating: 🐚 platinum hermit: Current PR rating is rating: 🦪 silver shellfish, so this older rating label is no longer current.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P2: Improves installed-updater recovery qualification and fixes rejection of valid release-validation receipts without changing product runtime.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (8 earlier review cycles)
  • reviewed 2026-10-19T14:32:31.633Z sha 1db9f46 :: needs maintainer review before merge. :: none
  • reviewed 2026-10-27T09:35:55.917Z sha 2ff18cd :: needs maintainer review before merge. :: none
  • reviewed 2026-10-27T10:27:27.810Z sha 4cfeba7 :: needs maintainer review before merge. :: none
  • reviewed 2026-10-27T11:16:29.258Z sha 0d16768 :: needs real behavior proof before merge. :: none
  • reviewed 2026-10-27T22:28:10.674Z sha f94fc3c :: blocked before merge. :: none
  • reviewed 2026-10-27T22:35:51.815Z sha f94fc3c :: needs maintainer review before merge. :: none
  • reviewed 2026-10-28T02:25:09.306Z sha 4d364b9 :: needs maintainer review before merge. :: none
  • reviewed 2026-10-28T08:06:43.139Z sha 2e7d9cc :: needs changes before merge. :: none

Reviewed October 29, 2026, 3:41 AM ET / 07:41 UTC (Revision 9).

@vincentkoc
vincentkoc marked this pull request as ready for review October 19, 2026 16:11
@clawsweeper clawsweeper Bot removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 20, 2026
@clawsweeper clawsweeper Bot removed status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 28, 2026
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

Please review exact head 27daceb. The PR body now records fresh required CI/build/Darwin success and the published 9.4 native-assignment receipt from https://github.com/openclaw/openclaw/actions/runs/40832617119/artifacts/12880134633, with all six outcomes true. That replay remains attributed to harness 8883 and Doctor55de; its npm12 aggregate failure and synthetic backend limits remain explicit. No waiver or automatic merge is requested.

@clawsweeper

clawsweeper Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Oct 29, 2026
@vincentkoc
vincentkoc merged commit cdff9b0 into main Oct 29, 2026
131 checks passed
@vincentkoc
vincentkoc deleted the test/package-recovery-installed branch October 29, 2026 07:53
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 30, 2026
…law#177381)

* test: exercise installed package recovery after interruption

* test(e2e): isolate installed recovery lane settings

* test(e2e): clarify recovery driver options and failure handling

* test(e2e): extract sealed recovery helper without buffering

* fix: refresh the reviewed correction baseline

Baseline-Refresh: 0887cd86382cba9a6b7fc0b75ce0c7505e198314

* test(update): preserve installed recovery failure diagnostics

* test(e2e): complete survivor diagnostic fixture closure

* fix: refresh the reviewed correction baseline

Baseline-Refresh: 00ca793c1bcfee23cd99ff62756b4de50d86c687

* test(update): verify canonical recovery permission transitions

* test(update): preserve lexical recovery snapshot ordering

* test(update): expose installed recovery observer boundaries

* fix(e2e): partition installed recovery and retain diagnostics

* fix: refresh the reviewed correction baseline

Baseline-Refresh: 74e355f171473abad8d017b5c9bf96903744d1ec

* test(ci): include recovery cases in frozen fixtures

* test(ci): require braces in recovery harness

* fix(test): preserve survivor command budgets in recovery cells

* fix(test): respect healthy update config ownership

* fix: refresh the reviewed correction baseline

Baseline-Refresh: 2cb488442006b6793c59ed345bd2e3e955c9bb2b

* fix(test): register installed recovery process entries

* fix(test): keep recovery command output private

* fix: refresh the reviewed correction baseline

Baseline-Refresh: d777acbce0f50237b801d473339449fa6e794ce5

* fix(test): keep recovery driver exceptions private

* fix(test): preserve complete upgrade phase journals

* fix: refresh the reviewed correction baseline

Baseline-Refresh: 376bdc3e63e8dced837570d5223a3e6900f4eb42

* refactor(test): separate installed recovery scheduler integration

* test(update): preserve legacy execution policies in survivor fixtures

* test(ci): preserve invalid journal fixture without map spread

* fix: refresh the reviewed correction baseline

Baseline-Refresh: 7e7c997c0f74fe1ae216b14dc6bc65e6b8e13cc5

* fix(test): preserve installed recovery command budget

* test(e2e): use final matching command budget

Co-authored-by: Vincent Koc <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docker Docker and sandbox tooling P2 Normal backlog priority with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. scripts Repository scripts size: XL status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant