Repository navigation
fix(e2e): published upgrade cell fails after update advisory rewording - #161079
Conversation
The published-driver upgrade-survivor cell (legacy-operator-state) failed at legacy-operator-update-noop for every candidate built after #160056. That change reworded the managed-service rerun guidance, and the already-current assertion hardcoded the full advisory text, so the only difference was advisory.message. Project each step's advisory to its kind plus a non-empty explanation. The check still requires an already-current, repair-free result with no steps or exactly one unexecuted managed-service-reconciliation entry (same name, command, cwd, duration, exit code, and advisory kind). Product text is unchanged.
|
🦞👀 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 29, 2026, 7:39 PM ET / 23:39 UTC (Revision 3). ClawSweeper reviewWhat this changesThe PR changes the published-upgrade test to accept a nonempty service advisory explanation regardless of its wording and adds acceptance and rejection cases. Regression provenancePossible regression — probable (reviewed change; failure trace). No predecessor PR is attributed. Merge readiness⛔ Blocked before merge - 1 item remains Keep open. Current main still requires obsolete advisory wording in the published-upgrade check, and this PR addresses that mismatch without an actionable patch defect. The previous request for stored-data compatibility proof does not apply to this test-harness change. Priority: P2 Review scores
Verification
How this fits togetherThe published-upgrade survivor test installs a released OpenClaw version and updates it to a candidate. It checks a second update’s JSON receipt before verifying that the Gateway and operator state survived. flowchart LR
A[Published installation] --> B[Candidate update]
B --> C[Second update]
C --> D[JSON receipt]
D --> E[No-op check]
E --> F[Gateway and state checks]
Before merge
Agent review detailsSecurityNone. PR surfaceTests +29, Other -2. Total +27 across 2 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Keep the no-op check tied to stable receipt fields, with advisory wording verified by the service owner’s tests. Do we have a high-confidence way to reproduce the issue? Yes, at source level: current main requires the former advisory sentence while the service owner emits the revised one. This read-only review did not execute the Docker cell. Is this the best way to solve the issue? Yes. The proposed check preserves the no-op receipt constraints while allowing guidance prose to change; the service owner retains a separate wording test. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 55bb2ccf0a08. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
|
On the remaining "data-model compatibility proof" item: this PR changes no stored data or migration. The upgrade-compatibility proof for this path is the published-driver cell itself: |
|
Merged via squash.
|
The published-driver upgrade-survivor cell (legacy-operator-state) failed at legacy-operator-update-noop for every candidate built after #160056. That change reworded the managed-service rerun guidance, and the already-current assertion hardcoded the full advisory text, so the only difference was advisory.message. Project each step's advisory to its kind plus a non-empty explanation. The check still requires an already-current, repair-free result with no steps or exactly one unexecuted managed-service-reconciliation entry (same name, command, cwd, duration, exit code, and advisory kind). Product text is unchanged. (cherry picked from commit 4e52570)
…aw#161079) The published-driver upgrade-survivor cell (legacy-operator-state) failed at legacy-operator-update-noop for every candidate built after openclaw#160056. That change reworded the managed-service rerun guidance, and the already-current assertion hardcoded the full advisory text, so the only difference was advisory.message. Project each step's advisory to its kind plus a non-empty explanation. The check still requires an already-current, repair-free result with no steps or exactly one unexecuted managed-service-reconciliation entry (same name, command, cwd, duration, exit code, and advisory kind). Product text is unchanged.
What Problem This Solves
Fixes: the published-driver upgrade-survivor Docker cell (
legacy-operator-state) fails atlegacy-operator-update-noopfor every candidate built after #160056, because the harness compared the exact wording of the service-management advisory.User Impact
No user-visible change. The published-upgrade cell passes again, and future rewording of update advisories no longer breaks it.
Why This Change Was Made
The already-current update check hardcoded the full advisory text. #160056 legitimately reworded the rerun guidance (
OPENCLAW_HOME either unset or pointing at that same home), so the second update's only step differed inadvisory.messageand the lane reported "second update executed mutations or unexpected maintenance".The check keeps its real contract: an already-current, repair-free result with either no steps or exactly one
managed-service-reconciliationentry foropenclaw gateway install --forcethat did not run (durationMs: 0,exitCode: 0) and carries arecoverable-maintenanceadvisory with a non-empty explanation. The advisory text itself is no longer compared. Product text is unchanged.Evidence
test/scripts/upgrade-survivor-update-noop.test.tsruns the exact heredoc payload extracted fromrun.sh. The new "accepts reworded service guidance" case fails against the previous assertion and passes now. New rejection cases cover a different step name/command, a different advisory kind, and a blank advisory message. The existing mutation, executed-service, failed-receipt, repeated-maintenance, repair-request, and skip-reason cases still reject.pnpm test test/scripts/upgrade-survivor-update-noop.test.ts --maxWorkers=1took 9 s wall (Vitest shard 7.0 s) on a heavily loaded host; the three new cases each spawn one short Node process (~120 ms).OPENCLAW_UPGRADE_SURVIVOR_SCENARIOS=legacy-operator-state pnpm test:docker:published-upgrade-survivorpassed atf20a7e37fb6on Blacksmith Testboxtbx_01m3p3a61d5n82p15phnvvvf2f(run):published-upgrade-survivor-legacy-operator-statepass in 395 s, lane exit 0. The command first asserted that the patched check and the reworded product text were both present in the synced tree.update-noop.jsonisskipped/already-currentwith one unexecutedmanaged-service-reconciliationstep carrying the reworded advisory. Replaying the previous assertion against that same file reproduces the original failure (AssertionError: second update executed mutations or unexpected maintenance, with onlyadvisory.messagediffering); the new assertion accepts it.