Skip to content

test(tooling): deduplicate updater deployment fixtures - #124304

Merged
steipete merged 1 commit into
mainfrom
test/deduplicate-updater-deployment-fixtures
Aug 15, 2026
Merged

steipete merged 1 commit into
mainfrom
test/deduplicate-updater-deployment-fixtures

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Three adjacent live-updater tests repeated the same maintenance lock path, LaunchAgent plist creation and mode, and managed gateway deployment object. The tests protect distinct recovery outcomes, but their deployment setup was maintenance-only duplication.

Why This Change Was Made

A file-local createManagedLaunchAgentFixture now creates a fresh deployment object and plist for each test. The successful post-timeout recovery, live POSIX process-group fail-closed path, and Windows indeterminate-cleanup manual-recovery path remain separate and retain all outcome, ordering, process, and lock assertions.

User Impact

None. This is test-only fixture deduplication; updater behavior and production code are unchanged.

Evidence

  • Three focused timeout/recovery cases — passed.
  • Changed-file gates — passed through the documented local fallback because no remote provider was ready.
  • Root test typecheck, formatting, Docker E2E boundary lint, and raw HTTP/2 import guard — passed.
  • git diff --check and structured autoreview — clean.
  • Test delta: -17 lines. No production, workflow, docs, changelog, schema, protocol, migration, or operator-state change.

@clawsweeper

clawsweeper Bot commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@openclaw-barnacle openclaw-barnacle Bot added size: S maintainer Maintainer-authored PR labels Aug 15, 2026
@steipete
steipete marked this pull request as ready for review August 15, 2026 23:03
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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 Aug 15, 2026
@clawsweeper

clawsweeper Bot commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 15, 2026, 7:45 PM ET / 23:45 UTC.

ClawSweeper review

What this changes

The PR replaces repeated managed-LaunchAgent setup in three live-updater recovery tests with one file-local fixture factory.

Merge readiness

⚠️ Ready for maintainer review - 1 item remains

No blocking findings: this is a coherent test-only consolidation that preserves the three distinct updater recovery scenarios. It should remain open for normal maintainer handling.

Priority: P3
Reviewed head: 39c3029fd92fdf65781caaacd69566845fd98004

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, behavior-preserving test refactor with no identified correctness or security defect.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-authored, test-only PR does not require external contributor real-behavior proof.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-authored, test-only PR does not require external contributor real-behavior proof.
Evidence reviewed 4 items Changed test boundary: The helper creates a fresh plist, lock path, and deployment object for each invocation; the three callers retain their separate timeout, live-process-group, and Windows manual-recovery assertions.
Owner and caller map: The test-local maintainFixture wrapper injects dependencies into the updater owner; production maintainMain consumes the inspected deployment before restart and recovery decisions.
Current-main provenance: Current main still contains the inline deployment setup, so the central cleanup is not already implemented there; blame attributes the surrounding test harness to the recent updater-test maintenance commit.
Findings None None.
Security None None.

How this fits together

The live-updater test suite supplies isolated checkout and LaunchAgent fixtures to the updater’s maintenance flow, then verifies lock retention, service recovery, and fail-closed cleanup outcomes. This PR changes only that test setup layer; the updater runtime remains unchanged.

flowchart LR
  A[Isolated updater test] --> B[LaunchAgent fixture]
  B --> C[Updater maintenance flow]
  C --> D[Recovery or fail-closed path]
  D --> E[Lock and service assertions]
Loading

Before merge

  • Complete next step (P2) - No repair lane is needed because the patch has no actionable review finding.
Agent review details

Security

None.

PR surface

Tests -17. Total -17 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 25 42 -17
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 25 42 -17

Review metrics

Metric Value Why it matters
Production versus test LOC production 0; tests -17 net The PR removes duplicated test setup without changing runtime, workflow, configuration, or persisted-state code.

Technical review

Best possible solution:

Keep the fixture factory local to this test module and merge it once normal exact-head checks complete.

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

Not applicable: the PR changes test fixture structure rather than reporting a user-facing failure; the retained tests cover the affected recovery paths.

Is this the best way to solve the issue?

Yes: one local factory removes repeated setup while returning fresh mutable fixture data for each independent recovery case.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against bf4ec4b58af0.

Labels

Label changes:

  • add P3: This is low-risk test-maintenance cleanup with no user-visible behavior change.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-authored, test-only PR does not require external contributor real-behavior proof.

Label justifications:

  • P3: This is low-risk test-maintenance cleanup with no user-visible behavior change.
  • 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: This maintainer-authored, test-only PR does not require external contributor real-behavior proof.

Evidence

What I checked:

Likely related people:

  • steipete: Peter Steinberger authored the current-main updater-test maintenance commit that owns the fixture wrapper and nearby setup. (role: recent area contributor; confidence: high; commits: aad64693ba10; files: test/scripts/openclaw-live-updater.test.ts)

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.

@steipete

Copy link
Copy Markdown
Contributor Author

Land-ready proof for 39c3029fd92fdf65781caaacd69566845fd98004:

A recovery review started only because the PR comment publisher failed; the first durable exact-head artifact is complete and finding-free.

Test delta: -17 lines. One file-local helper now owns the identical lock, plist, and deployment setup; successful recovery, live process-group lock retention, and Windows manual-recovery outcomes remain separate with all assertions intact. Production is unchanged. No behavior, docs, changelog, schema, protocol, migration, or operator-state change.

@steipete
steipete merged commit 5626a79 into main Aug 15, 2026
210 checks passed
@steipete
steipete deleted the test/deduplicate-updater-deployment-fixtures branch August 15, 2026 23:49
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S 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