Skip to content

test(e2e): select prerelease companions, keep failed outcomes, retain Doctor diagnostics in the upgrade survivor - #149705

Merged
steipete merged 2 commits into
mainfrom
upd/survivor-harness-prerelease
Sep 16, 2026
Merged

steipete merged 2 commits into
mainfrom
upd/survivor-harness-prerelease

Conversation

@steipete

@steipete steipete commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes upgrade-survivor matrix fixtures that fail before testing a prerelease update, misreport failed updates as successful, or discard the Doctor evidence needed to diagnose a failure.

User Impact

No application behavior changes. Maintainers get version-correct baseline fixtures, explicit unavailable-companion coverage, accurate update outcomes, and retained migration evidence. Product production LOC: 0. This is maintainer-requested update-reliability campaign work.

Why This Change Was Made

Use the baseline's moving prerelease tag and advance that tag to the candidate, preserving ordinary external-plugin updates. Confirm exact companion availability with npm: only a published-registry E404 skips the legacy companion, with a recorded reason; other registry failures still fail setup, and the remaining operator-state and external-plugin migration assertions stay enabled. Separately model July's keyed agent roster and August's explicit ownership boundary.

Unset update outcomes remain unknown; an attempted update starts failed and becomes successful/recoverable only after its existing assertions accept it. The diagnostics owner retains the latest complete session migration manifest and issue report privately (2 MiB each, within the existing 8 MiB snapshot budget), then publishes validated, sanitized per-agent histograms and explicit omissions.

The matrix download overlap came from the caller's success/failure download mapping, not the survivor. Document distinct destinations and task-owned elevated archive collection for container-owned observation directories; retain their permissions.

Evidence

Rebased onto c97ddb6e63c98f3a3544cce03a0e7b09f8a2f5ad; current head: 94419c2f8fd245f9780e114da99522e1cd173025.

  • Resolved conflicts in run.sh by retaining cleanup of both backup/rollback and companion receipts; in diagnostics.mjs by retaining main's migration/Doctor IPC/SQLite admission logic alongside the bounded latest-report capture and both omission allowlists; and in upgrade-survivor-first-hop.test.ts by retaining both rollback and migration evidence suites. Main's worker-scenario additions remain intact.
  • Re-ran all 564 survivor cases. The initial run had 536 passes and exposed 25 inline-Bash fixture failures plus three diagnostic timeout failures. All 43 cases in the three repaired fixture files then passed. Nine shared diagnostic-publication cases also passed: 573 distinct relevant cases covered successfully across these runs.
  • Materialized injected shell fixtures so main's Darwin Bash guard can replay them. The installed-version fixture uses the real source redactor through the existing hook, avoiding repeated built-SDK startup (measured 4.8s versus 1.1s per import). Timeouts and assertions were preserved.
  • node scripts/check-changed.mjs passed, including types, unused-export scans, and script/test lint. Bash syntax, formatting, and git diff --check passed.
  • Fresh isolated autoreview --mode branch --base origin/main --max-priority P1: scoped-clean (0.86), no actionable findings; all review outputs are outside the repository.
  • CI run 35059659816 is attached to this exact head (status at verification: in_progress). REST confirms mergeable: true; CI completion and landing belong to the lead.
  • Retained regression-first proof covers prerelease selectors, historical roster boundaries, false-success summaries, unpublished companions, and migration-report retention. The volume case preserves all 4,791 synthetic issues after runtime deletion and publishes the histogram without private session details. npm confirms the July beta.7 Discord companion exists and August beta.1 returns E404.

Live proof gap: the single requested 2026.7.2-beta.7 / legacy-operator-state Docker command reached its 25-minute limit (exit 124) during candidate plugin SDK declaration generation, before baseline installation. Candidate build time was 24m52s, including 15m57s for unified declarations. No published-driver update or live companion installation is claimed, and no second row was run. Product source was ef93dfcbb0daf5d5bda66b79b52f635bd4abee02; the working-tree harness contained this change.

LOC split: application production 0; harness support +243/-25; tests +413/-116; documentation +17/-0. No dependencies, product options, SQLite schemas, suppressions, or expected-failure exceptions were introduced.

Matrix source evidence: .claude/worktrees/upd-matrix-L{2,4,5,6,7,8,9}/.local/matrix/report.md.

Adopted prepared harness work from upd-matrix-L7 (prerelease selectors, registry tags, provenance assertion and tests), upd-matrix-L8 (roster boundaries and tests), and upd-matrix-L9 (failed outcome and regression), extending the latter for failures before update starts. L7 subsumes upd-matrix-L5's beta-only selector. Availability and diagnostics repairs implement the findings from upd-matrix-L4 and upd-matrix-L6.

Left out upd-matrix-L2's post-core completion and deferred-import receipt repairs, plus the Doctor production/test proposals from upd-matrix-L5, upd-matrix-L6, and upd-matrix-L7: they change or validate product behavior and belong to their separate owners. No product fix or matrix passing result is claimed here.

@clawsweeper

clawsweeper Bot commented Sep 16, 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 docs Improvements or additions to documentation scripts Repository scripts size: L maintainer Maintainer-authored PR labels Sep 16, 2026
@steipete
steipete marked this pull request as ready for review September 16, 2026 04:54
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 16, 2026
@clawsweeper

clawsweeper Bot commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 16, 2026, 3:27 AM ET / 07:27 UTC (Revision 3).

ClawSweeper review

What this changes

Repairs historical upgrade-test fixtures, distinguishes unknown and failed update outcomes, and preserves bounded Doctor migration diagnostics.

Merge readiness

⛔ Blocked before merge - 2 items remain

Keep open: the harness repairs remain useful and are absent from current main. No actionable correctness or security defect was found in the introduced changes; the protected maintainer campaign remains active.

Priority: P2
Reviewed head: 9ff59a17428fa80f4fd02eed0cdfbca0e9e26261

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused harness repair with meaningful regression coverage and no blocking code finding; the explicitly requested campaign row remains unfinished.
Proof confidence 🌊 off-meta tidepool Not applicable: The supplied maintainer campaign context exempts this PR from the external-contributor proof gate. Injected harness tests support outcome and diagnostic behavior, but the reported July beta.7 Docker run ended during build and does not establish companion installation or published-driver upgrade behavior.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The supplied maintainer campaign context exempts this PR from the external-contributor proof gate. Injected harness tests support outcome and diagnostic behavior, but the reported July beta.7 Docker run ended during build and does not establish companion installation or published-driver upgrade behavior.
Evidence reviewed 10 items Introduced scope: Reviewed the pinned merge-base-to-head changes. Application source, dependencies, plugin APIs, and database schemas are unchanged; the patch concerns harness behavior, tests, and documentation.
Companion selection and outcome ownership: Only an npm E404 permits the legacy companion omission, with a receipt; other failures stop setup. Moving prerelease tags advance to the candidate. An update attempt starts failed and becomes successful or recoverable only through existing result assertions.
Remaining scenario coverage: The unavailable-companion branch skips the corresponding Discord installation assertion; external-plugin migration, schema checks, cron ownership, agent turns, and rollback verification remain in the scenario.
Findings None None.
Security None None.

How this fits together

The upgrade survivor installs a published OpenClaw baseline, seeds operator state, and runs a candidate update. Its assertions and diagnostic artifacts tell maintainers whether that upgrade preserved the expected behavior.

flowchart TD
  A[Published baseline] --> C[Version-aware fixtures]
  B[Candidate package] --> D[Upgrade survivor]
  C --> D
  D --> E[Migration and survival assertions]
  D --> F[Private diagnostic snapshot]
  E --> G[Outcome summary]
  F --> H[Validated and redacted diagnostics]
Loading

Before merge

  • Resolve merge risk (P1) - Actual prerelease companion installation and the published-driver update remain unverified because the reported Docker row stopped before baseline setup.
  • Complete next step (P2) - Complete the already-requested July beta.7 legacy-operator-state validation and record the redacted companion-installation and update outcome in the PR body.
Agent review details

Security

None.

PR surface

Tests +297, Docs +17, Other +218. Total +532 across 11 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 6 413 116 +297
Docs 1 17 0 +17
Config 0 0 0 0
Generated 0 0 0 0
Other 4 243 25 +218
Total 11 673 141 +532

Review metrics

Metric Value Why it matters
Production versus test growth Application production 0; harness +243/-25; tests +413/-116 Harness growth supplies bounded diagnostic capture and historical fixture handling without changing application runtime behavior.

Stored data model

Persistent data-model change detected: migration/backfill/repair: scripts/e2e/lib/upgrade-survivor/config-recipe.mts, migration/backfill/repair: scripts/e2e/lib/upgrade-survivor/diagnostics.mjs, migration/backfill/repair: scripts/e2e/lib/upgrade-survivor/run.sh, serialized state: scripts/e2e/lib/upgrade-survivor/diagnostics.mjs, unknown-data-model-change: scripts/e2e/lib/upgrade-survivor/diagnostics.mjs, unknown-data-model-change: scripts/e2e/lib/upgrade-survivor/run.sh. Migration or upgrade compatibility proof is recorded; maintainers should verify it before merge.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Keep fixture adaptation and diagnostic projection in their existing harness owners, qualify the historical upgrade path, and leave product Doctor repairs with their separate PR.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Keep fixture adaptation and diagnostic projection in their existing harness owners, qualify the historical upgrade path, and leave product Doctor repairs with their separate PR.

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

Yes, from source: current main can report an unspecified update outcome as success, and the added fixture cases exercise failures before and during update. No tests or live upgrade were executed in this read-only review.

Is this the best way to solve the issue?

Yes: the patch repairs the existing fixture and diagnostics owners while preserving the remaining scenario assertions; the actual historical install/update path still needs its requested campaign validation.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P2: These bounded harness repairs improve upgrade validation and failure diagnosis without changing deployed application behavior.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The supplied maintainer campaign context exempts this PR from the external-contributor proof gate. Injected harness tests support outcome and diagnostic behavior, but the reported July beta.7 Docker run ended during build and does not establish companion installation or published-driver upgrade behavior.

Evidence

What I checked:

  • Introduced scope: Reviewed the pinned merge-base-to-head changes. Application source, dependencies, plugin APIs, and database schemas are unchanged; the patch concerns harness behavior, tests, and documentation. (9ff59a17428f)
  • Companion selection and outcome ownership: Only an npm E404 permits the legacy companion omission, with a receipt; other failures stop setup. Moving prerelease tags advance to the candidate. An update attempt starts failed and becomes successful or recoverable only through existing result assertions. (scripts/e2e/lib/upgrade-survivor/run.sh:758, 9ff59a17428f)
  • Remaining scenario coverage: The unavailable-companion branch skips the corresponding Discord installation assertion; external-plugin migration, schema checks, cron ownership, agent turns, and rollback verification remain in the scenario. (scripts/e2e/lib/upgrade-survivor/run.sh:2191, 9ff59a17428f)
  • Diagnostic privacy and bounds: Capture uses owned-file reads and fixed run filenames rather than manifest-supplied paths. Publication validates report structure, sanitizes permitted text, and emits issue counts and histograms without raw issue messages, session keys, or transcript paths. (scripts/e2e/lib/upgrade-survivor/diagnostics.mjs:717, 9ff59a17428f)
  • Regression coverage: Inspected coverage for 4,791 retained synthetic issues after runtime deletion, malformed/oversized/symlink report omission, unavailable companion receipts, historical roster boundaries, and failures before or during update. These are boundary fixtures, not evidence of a completed published-driver upgrade. (test/scripts/upgrade-survivor-first-hop.test.ts:395, 9ff59a17428f)
  • Current-main necessity: Fetched main still initializes an empty outcome, defaults summaries to success, and configures only latest/beta registry tags; it lacks the introduced unavailable-companion handling. (scripts/e2e/lib/upgrade-survivor/run.sh:154, 05a5bd1c19b7)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Vincent Koc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Complete the already-requested July beta.7 legacy-operator-state row and record its redacted outcome, including any separately owned product failure.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (2 earlier review cycles)
  • reviewed 2026-09-16T05:04:33.204Z sha ec302f1d0e308c202088ed2fd3fcd0b03c068289 :: blocked before merge. :: none
  • reviewed 2026-09-16T05:39:07.378Z sha 94419c2f8fd245f9780e114da99522e1cd173025 :: blocked before merge. :: none

Select published prerelease companion cohorts through moving tags, record
unpublished companions without dropping the remaining operator-state proof,
keep unknown and failed update outcomes, and retain bounded Doctor migration
evidence. Separate historical keyed rosters from explicit ownership.

Consolidates harness work from upd-matrix-L7, upd-matrix-L8, and
upd-matrix-L9, with availability and diagnostics findings from upd-matrix-L4
and upd-matrix-L6. Product code is unchanged.
Materialize injected shell runners so the Darwin Bash guard can replay them. Use the current source redactor in installed-version unit diagnostics so existing build artifacts do not consume the command timeout. Preserve all assertions and timeout values.
@steipete
steipete force-pushed the upd/survivor-harness-prerelease branch from 94419c2 to 9ff59a1 Compare September 16, 2026 07:20
@steipete
steipete merged commit b884e39 into main Sep 16, 2026
84 checks passed
@steipete
steipete deleted the upd/survivor-harness-prerelease branch September 16, 2026 08:40
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 17, 2026
… Doctor diagnostics in the upgrade survivor (openclaw#149705)

* test(e2e): repair upgrade survivor fixtures and diagnostics

Select published prerelease companion cohorts through moving tags, record
unpublished companions without dropping the remaining operator-state proof,
keep unknown and failed update outcomes, and retain bounded Doctor migration
evidence. Separate historical keyed rosters from explicit ownership.

Consolidates harness work from upd-matrix-L7, upd-matrix-L8, and
upd-matrix-L9, with availability and diagnostics findings from upd-matrix-L4
and upd-matrix-L6. Product code is unchanged.

* test(e2e): isolate survivor fixture execution

Materialize injected shell runners so the Darwin Bash guard can replay them. Use the current source redactor in installed-version unit diagnostics so existing build artifacts do not consume the command timeout. Preserve all assertions and timeout values.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts size: L 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