Skip to content

feat(obs): surface OpenClaw 2026.9.3 update-pipeline state in adapter (#5749) - #5763

Draft
vivekchand wants to merge 2 commits into
mainfrom
bot-fix/issue-5749-openclaw-update-pipeline-state
Draft

feat(obs): surface OpenClaw 2026.9.3 update-pipeline state in adapter (#5749)#5763
vivekchand wants to merge 2 commits into
mainfrom
bot-fix/issue-5749-openclaw-update-pipeline-state

Conversation

@vivekchand

@vivekchand vivekchand commented Sep 9, 2026

Copy link
Copy Markdown
Owner

Summary

OpenClaw 2026.9.3's safer-update pipeline rehearses core/plugin changes in isolated candidate state before activation and can recover abandoned update records without stopping a healthy Gateway. These state transitions were logged by the Gateway but invisible to ClawMetry — an agent stuck in a half-activated or abandoned update state showed no signal on health surfaces.

This PR adds a targeted gateway-event scanner for update-pipeline state, following the exact same pattern as the 2026.9.1/2 scanners landed in #5547, #5548, and #5618.

Changes

  • clawmetry/adapters/openclaw.py: add _openclaw_update_pipeline_state(events) — scans already-fetched gateway log events for candidate-state transitions (candidate + update/activat), abandoned-update recovery (abandon + update/recover), and activation events (activation + update). Returns updatePipelineStateDetected, optionally updatePipelineCandidateState, updatePipelineAbandoned, updatePipelineMsg, updatePipelineTs. Wired into detect() immediately after the _backup_outcome_events call.
  • tests/test_obs_gap_openclaw_update_pipeline_5749.py: 13 regression tests — candidate-state, abandoned-recovery, both-in-session, activation keyword, no-match, empty list, None msg, missing ts field, exception safety (None + non-list), and non-interference with the existing migration-warning scanner.

Test plan

  • python3 -m pytest tests/test_obs_gap_openclaw_update_pipeline_5749.py -v — 13 passed
  • python3 -c 'import ast; ast.parse(open("clawmetry/adapters/openclaw.py").read())' — syntax OK
  • Confirm updatePipelineStateDetected surfaces in /api/overview meta when a 2026.9.3 Gateway logs a candidate or abandoned-update event

Bot meta

Draft PR opened autonomously based on the plan in #5749. Marked draft for human review — mark Ready for Review once happy.

No-PRD: autofix bot implementing harness-gap issue #5749, which was filed by the automated audit script; the audit finding itself is the product record for this observability addition

Closes #5749

🤖 Generated with Claude Code

https://claude.ai/code/session_01Ge18wEETZ88yfsvaxF7J5a

…#5749)

OpenClaw 2026.9.3 rehearses core/plugin changes in candidate state before
activation and recovers abandoned update records without stopping the Gateway.
These events were invisible to ClawMetry: an agent stuck in a half-activated
or abandoned state showed no signal on health surfaces.

Adds _openclaw_update_pipeline_state() — same gateway-event-scan pattern as
the 2026.9.1/2 scanners (#5547, #5548, #5618) — and wires it into detect().
13 regression tests cover candidate-state, abandoned-recovery, both-in-session,
no-match, empty list, None msg, missing ts, and exception safety.

Closes #5749

Co-Authored-By: ClawMetry Autofix Bot <bot-autofix@clawmetry.dev>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ge18wEETZ88yfsvaxF7J5a

Copy link
Copy Markdown
Owner Author

Bot note: tests/test_obs_gap_openclaw_update_pipeline_5749.py needs to be added to the explicit test file list in .github/workflows/ci.yml (per CLAUDE.md — CI runs file lists, not pytest tests/). The bot cannot touch workflow files, so this one line needs a human touch before the test is executed in CI. The test runs and passes locally (python3 -m pytest tests/test_obs_gap_openclaw_update_pipeline_5749.py -v, 13 passed).


Generated by Claude Code

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[obs-gap:openclaw] openclaw: update/migration candidate-state and abandoned-update recovery not observed

1 participant