Skip to content

fix: verify deferred activation in package recovery acceptance - #208901

Merged
obviyus merged 2 commits into
mainfrom
test/package-activation-no-restart-v2
Nov 30, 2026
Merged

obviyus merged 2 commits into
mainfrom
test/package-activation-no-restart-v2

Conversation

@obviyus

@obviyus obviyus commented Nov 30, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

The package-publication recovery lane requests openclaw update --no-restart but then requires the original npm installation to contain the prepared version. That contradicts deferred activation and fails the retained 2026.9.8 recovery run.

User Impact

Test-only correction; no product or release changes. Recovery acceptance now distinguishes preparation from the next Gateway start.

Why This Change Was Made

  • Validate a fresh running / activating receipt, future target, completed preparation and candidate checks, and unchanged serving package, recovery evidence, and settings.
  • Reuse the existing Gateway start helper to exercise the resident launcher, then verify the future serving version/build and the same run's finished / succeeded receipt.
  • Remove the in-place installation expectation and migrate the diagnostics consumer without an alias. Only the documented first-conversion forwarding marker is excluded from serving-package byte preservation.

Evidence

  • bash -n and node --check passed for the changed lane helpers.
  • Focused regression CI: all 27 tests in upgrade-survivor-package-activation.test.ts passed (1.56s test execution), including the pending-preparation and activation negative controls.
  • Final-head strict test typechecking and lint jobs passed. Local Vitest could not start because this checkout has no installed dependencies; no local test pass is claimed.
  • Original-artifact acceptance stopped before the injected publication boundary: candidate Doctor reported a missing isOpenAIResponsesApi export from @openclaw/ai/internal/openai-responses-payload-policy. It did not reach the changed assertions. The separate npm 12 installed-tree budget check also failed.
  • Current-source Package Acceptance passed at head d96e550a26c3: the requested 2026.9.8 / package-publication-recovery lane passed, as did the policy-added 2026.9.9 publication-recovery lane and the full acceptance workflow.
  • Local ClawSweeper reviewed 525bd54eb27d..d96e550a26c3: complete, patch correct, no code findings, security cleared. Execution proof was still pending at review time.

- Check a fresh pending preparation receipt without expecting in-place npm replacement.
- Start the prepared release through the existing Gateway helper and verify serving identity and terminal run receipt.
- Preserve recovery evidence and authored settings across preparation and activation.
@clawsweeper

clawsweeper Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Pull request received.

ClawSweeper review complete

ClawSweeper finished reviewing this revision.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts size: M labels Nov 30, 2026
@clawsweeper clawsweeper Bot added the P2 Normal backlog priority with limited blast radius. label Nov 30, 2026
- Keep the incomplete-preparation negative control valid under strict indexed access checks.
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. 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:bug Preliminary submission classification; full source review pending. labels Nov 30, 2026
@clawsweeper

clawsweeper Bot commented Nov 30, 2026

Copy link
Copy Markdown
Contributor

Codex review: passed.

What this changes

This PR verifies package preparation separately from activation at the next Gateway start.

Example: A recovered 2026.9.10 candidate prepares 2026.9.11 with --no-restart.

  • Before: Acceptance requires the original npm package to become 2026.9.11 immediately and rejects valid deferred preparation.
  • After: Acceptance checks unchanged serving bytes and a pending preparation receipt, then starts the Gateway and verifies 2026.9.11 and the same run's successful completion.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A focused, worthwhile correction with no definite findings; confidence is limited by the incomplete acceptance run.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored, test-only correction is exempt from contributor execution proof. Exact-head supporting CI passed, but the supplied acceptance attempt stopped before the changed checks and its replacement remains pending; successful preparation-to-activation execution and a base-red/head-green regression run are not established. No application data model or migration changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Release validation rejects a valid recovered installation because it treats deferred preparation as immediate package replacement.
Reason: The correction restores meaningful historical-upgrade acceptance to the established product contract, and this maintainer-authored PR already supplies direction.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: it corrects an acceptance assertion that contradicts deferred activation, preserves the recovery checks, and introduces no definite correctness or security defect.

Reviewed head: d96e550a26c367f8b4132ef33bf8a87fe0f453cb

Before merge

None.

Findings

None.

Agent review details

How this fits together

The upgrade-survivor release harness drives published updaters through interrupted publication, repair, another update, and Gateway startup, producing recovery evidence consumed by sanitized diagnostics.

flowchart LR
  A[Published updater interruption] --> B[Candidate repair]
  B --> C[Deferred update preparation]
  C --> D[Preparation evidence checks]
  D --> E[Resident launcher Gateway start]
  E --> F[Serving identity and run receipt]
  F --> G[Sanitized acceptance diagnostics]
Loading

Technical review

Best possible solution:

Retain the existing recovery harness and verify preparation, subsequent launcher activation, and preserved recovery evidence as separate stages.

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

Source establishes the contradiction: --no-restart prepares a separate release while current-main acceptance requires immediate replacement of the original package; no target code was executed during this review.

Is this the best way to solve the issue?

The change uses the existing preparation receipt, Gateway start helper, RPC identity, and run reader without introducing another activation owner or compatibility alias.

AGENTS.md: found and applied where relevant.

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

Provenance checked

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

PR surface

Tests +116, Other +63. Total +179 across 4 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 120 4 +116
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 3 79 16 +63
Total 4 199 20 +179

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp 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 readiness starts with the lower of the proof and patch scores. It is capped at 3/6 if the fix is partial, the change offers little benefit, a product decision is still open, or the PR reverses an earlier decision without saying why. ✨ 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.

Reviewed November 30, 2026, 2:07 AM ET / 07:07 UTC.

@obviyus
obviyus merged commit fa62113 into main Nov 30, 2026
182 of 186 checks passed
@obviyus
obviyus deleted the test/package-activation-no-restart-v2 branch November 30, 2026 07:31
@obviyus

obviyus commented Nov 30, 2026

Copy link
Copy Markdown
Collaborator Author

Landed. The package-activation-recovery lane now checks the documented --no-restart result (new run ID, running/activating, target version recorded, serving package unchanged), then starts the prepared release through the resident launcher and checks that the target serves with a finished/succeeded receipt. Proof: Package Acceptance run 46369439092 on this head, 2026.9.8 and 2026.9.9 publication-recovery lanes green.

vincentkoc added a commit that referenced this pull request Nov 30, 2026
…ogic

* commit 'f7ccd914102ab408606c45c0aa3adbd8427051eb': (1290 commits)
  refactor(ios): remove unreachable settings and automation controls (#208958)
  fix: verify deferred activation in package recovery acceptance (#208901)
  improve(ci): avoid unused adaptive scoring work (#208926)
  chore(ui): refresh control ui locales (#208959)
  test(agents): verify user recall and file state across OpenAI compactions (#208909)
  fix(ui): update the sidebar on startup and recovery screens (#207967)
  fix(whatsapp): quote the first queued swipe-reply answer (#208791)
  test(memory-wiki): generate metadata replacement transitions (#208932)
  fix(ui): hide Claude injected context from chat (#207234)
  fix(ui): count people instead of emoji in reaction badges (#207235)
  fix: keep Daybreak when another provider's model list fails (#208883)
  test(telegram): check the registered preload at polling worker startup (#208936)
  fix(qa): test Slack verbosity with one direct shell call (#208023)
  fix(qa): wait for Telegram messages before checking their formatting (#208024)
  feat(ios): show build details at the bottom of Settings (#208944)
  chore(ui): refresh control ui locales (#208937)
  fix: goals stop after native child-result handoffs (#193024)
  fix(ui): show current tool actions in collapsed chat activity (#208925)
  improve(ios): put About last in Settings (#208928)
  test(memory-wiki): generate human-note preservation regressions (#208921)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. scripts Repository scripts size: M 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