Skip to content

fix(diagnostics): clear stale session activity#87550

Closed
clawsweeper[bot] wants to merge 9 commits into
mainfrom
clawsweeper/automerge-openclaw-openclaw-87374
Closed

fix(diagnostics): clear stale session activity#87550
clawsweeper[bot] wants to merge 9 commits into
mainfrom
clawsweeper/automerge-openclaw-openclaw-87374

Conversation

@clawsweeper

@clawsweeper clawsweeper Bot commented May 28, 2026

Copy link
Copy Markdown
Contributor

Makes #87374 merge-ready for the ClawSweeper automerge loop.
The edit pass should inspect the live PR diff, review comments, and failing checks; rebase if needed; keep the contributor branch credited; and stop only when validation is green or an external blocker is proven.

ClawSweeper 🐠 replacement reef notes:

  • Repair fallback: GitHub rejected the repair branch push because it updates workflow files and the ClawSweeper app token does not have workflows permission

Inherited issue-closing references from the source PR:
Closes #87310

Co-author credit kept:

fish notes: model gpt-5.5, reasoning high; reviewed against dce1dc0.

@clawsweeper clawsweeper Bot added size: M clawsweeper:automerge Maintainer opted this PR into bounded ClawSweeper-reviewed automerge proof: supplied External PR includes structured after-fix real behavior proof. proof: sufficient ClawSweeper judged the real behavior proof convincing. P1 High-priority user-facing bug, regression, or broken workflow. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 🚀 automerge armed This PR is in ClawSweeper's automerge lane. clawsweeper Tracked by ClawSweeper automation labels May 28, 2026
@clawsweeper

clawsweeper Bot commented May 28, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the context here. I swept through the related work, and this is now duplicate or superseded.

Close: this replacement PR is now superseded by the newer, mergeable, proof-positive fix at #90750, while this branch is conflicting and based on an older cleanup shape.

Canonical path: Close this conflicting replacement PR and continue the fix review on #90750.

So I’m closing this here and keeping the remaining discussion on #90750.

Review details

Best possible solution:

Close this conflicting replacement PR and continue the fix review on #90750.

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

Yes. Source inspection shows current main leaves tool/model markers untouched when the reply-run wrapper ends with clearRunActivity: false, and the newer canonical PR supplies before/after runtime logs showing the blocked_tool_call path disappearing.

Is this the best way to solve the issue?

No. This PR was a plausible early repair, but current main and the newer clean PR make the narrower owner-less reply-run cleanup the better maintainable path.

Security review:

Security review cleared: No concrete security or supply-chain concern was found in this superseded diff; it touches runtime diagnostics/session cleanup and tests, not dependencies, workflows, secrets, or install scripts.

AGENTS.md: found and applied where relevant.

What I checked:

  • Repository policy read: Read the full root AGENTS.md and the gateway-scoped AGENTS.md; the review-depth and gateway hot-path guidance apply because the PR touches gateway/session recovery code. (AGENTS.md:1, 663fabbe30eb)
  • This PR is no longer a clean landing target: Live GitHub status for this PR reports mergeStateStatus DIRTY, mergeable CONFLICTING, and failed dependency-guard/checks-node-agentic-agents checks at head e32fc45. (e32fc453ae5a)
  • Current main already has newer recovery-owned cleanup plumbing: Current main applies mutating recovery outcomes through clearDiagnosticEmbeddedRunActivityForSession in the recovery coordinator, so the older recovery/reset cleanup branch no longer matches the current owner boundary cleanly. (src/logging/diagnostic-session-recovery-coordinator.ts:135, 663fabbe30eb)
  • Remaining source gap is the owner-less reply-run path: Current main still ends reply-run diagnostic work with clearRunActivity: false, and markDiagnosticEmbeddedRunEnded leaves tool/model markers untouched in that opt-out path; this is the narrower path targeted by the newer PR. (src/auto-reply/reply/reply-run-registry.ts:353, 663fabbe30eb)
  • Canonical replacement is viable: The newer PR at fix(diagnostics): evict orphaned tool/model activity on owner-less run end #90750 closes the same issue, is MERGEABLE/CLEAN, has green checks including Real behavior proof, and supplies before/after runtime diagnostic logs for the same blocked_tool_call leak. (83c3212755ca)
  • Related PR search: The live PR search for the linked issue shows this PR, the closed source PR, and the newer open canonical PR; no other active landing path was found for the same central fix.

Likely related people:

  • 849261680: Authored the newer open PR that closes the same issue with a narrower owner-less reply-run cleanup and stronger runtime proof. (role: canonical follow-up PR author; confidence: high; commits: 83c3212755ca; files: src/logging/diagnostic-run-activity.ts, src/auto-reply/reply/reply-run-registry.test.ts, src/infra/diagnostic-events.ts)
  • iloveleon19: Current-main blame attributes the central markDiagnosticEmbeddedRunEnded and reply-run diagnostic wrapper lines to this recent commit. (role: recent area contributor; confidence: medium; commits: 4892bbc10f46; files: src/logging/diagnostic-run-activity.ts, src/auto-reply/reply/reply-run-registry.ts)
  • Vincent Koc: The latest release commit in this checkout carries the current diagnostics, recovery coordinator, reset cleanup, and gateway reset service files. (role: current source provenance; confidence: medium; commits: 8c802aa68351; files: src/logging/diagnostic-run-activity.ts, src/logging/diagnostic-session-recovery-coordinator.ts, src/gateway/session-reset-service.ts)
  • sandieman2: Recently changed reply-run session-lane behavior in the same area that controls follow-up admission and queued reply delivery. (role: adjacent reply/session-lane contributor; confidence: medium; commits: c67dc59b02b0; files: src/auto-reply/reply/reply-run-registry.ts)

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

@openclaw-barnacle openclaw-barnacle Bot removed the proof: supplied External PR includes structured after-fix real behavior proof. label May 28, 2026
@clawsweeper

clawsweeper Bot commented May 28, 2026

Copy link
Copy Markdown
Contributor Author

ClawSweeper PR egg: ✨ hatched 🥚 common Cosmic Crabkin. Rarity: 🥚 common. Trait: guards the happy path.

Details

Share on X: post this hatch
Copy: My PR egg hatched a 🥚 common Cosmic Crabkin in ClawSweeper.
Hatchability:

  • Merged PRs are hatchable.
  • Open PRs are hatchable when they are status: 👀 ready for maintainer look, status: 🚀 automerge armed, or labeled clawsweeper:automerge.
  • Closed unmerged PRs are hatchable only when one of those hatchable labels is still present in the durable record.

About:

  • Eggs appear after real-behavior proof passes. They are collectible flavor only.
  • Review momentum changes the shell state: follow-up work warms it, re-review makes it wobble, and a clean final review lets it hatch.
  • The hatch is seeded from this repository and PR number, so the same PR keeps the same creature; the reviewed head SHA can only change safe visual details.
  • Rarity is just collectible sparkle: 🥚 common, 🌱 uncommon, 💎 rare, ✨ glimmer, and 🌈 legendary.

@clawsweeper

clawsweeper Bot commented May 28, 2026

Copy link
Copy Markdown
Contributor Author

🦞🔧
ClawSweeper saw the passing review, but the PR needs another repair pass before merge.

Source: clawsweeper[bot]
Feedback: structured ClawSweeper verdict: pass (sha=e32fc453ae5aa22221d6f1590e445bf3df8615b9); current checks are failing: dependency-guard:FAILURE, checks-node-agentic-agents:FAILURE
Action: repair worker queued. Run: https://github.com/openclaw/clawsweeper/actions/runs/26618443543
Model: gpt-5.5

I will update this PR branch, or open a safe credited replacement, if the repair worker finds a narrow CI fix.

Automerge progress:

  • 2026-05-28 18:34:41 UTC merge check queued e32fc453ae5a (GitHub checks failed: checks-node-agentic-agents:FAILURE)
  • 2026-05-28 18:43:02 UTC review queued e32fc453ae5a (queued)
  • 2026-05-28 19:09:31 UTC merge check queued e32fc453ae5a (GitHub checks failed: checks-node-agentic-agents:FAILURE)
  • 2026-05-29 04:42:37 UTC review passed e32fc453ae5a (structured ClawSweeper verdict: pass (sha=e32fc453ae5aa22221d6f1590e445bf3df861...)

@clawsweeper clawsweeper Bot added the merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. label May 28, 2026
@clawsweeper
clawsweeper Bot force-pushed the clawsweeper/automerge-openclaw-openclaw-87374 branch from 6c204a4 to 1bd8516 Compare May 28, 2026 07:05
@clawsweeper clawsweeper Bot added the proof: supplied External PR includes structured after-fix real behavior proof. label May 28, 2026
@openclaw-barnacle openclaw-barnacle Bot removed the proof: supplied External PR includes structured after-fix real behavior proof. label May 28, 2026
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. labels May 28, 2026
@clawsweeper
clawsweeper Bot force-pushed the clawsweeper/automerge-openclaw-openclaw-87374 branch 2 times, most recently from 2bca356 to 99b4d3d Compare May 28, 2026 07:41
@clawsweeper clawsweeper Bot added proof: supplied External PR includes structured after-fix real behavior proof. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. labels May 28, 2026
@openclaw-barnacle openclaw-barnacle Bot removed the proof: supplied External PR includes structured after-fix real behavior proof. label May 28, 2026
@clawsweeper clawsweeper Bot added rating: 🌊 off-meta tidepool PR readiness rating does not apply to this item. and removed proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. labels May 28, 2026
@clawsweeper
clawsweeper Bot force-pushed the clawsweeper/automerge-openclaw-openclaw-87374 branch from 99b4d3d to 5dda835 Compare May 28, 2026 08:23
@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label May 28, 2026
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. labels May 28, 2026
TurboTheTurtle and others added 9 commits May 28, 2026 17:31
Co-authored-by: Andy Ye <[email protected]>

Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com>
Co-authored-by: Andy Ye <[email protected]>

Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com>
Co-authored-by: Andy Ye <[email protected]>

Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com>
@clawsweeper
clawsweeper Bot force-pushed the clawsweeper/automerge-openclaw-openclaw-87374 branch from d72c7d5 to e32fc45 Compare May 28, 2026 17:31
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels May 28, 2026
@clawsweeper clawsweeper Bot added rating: 🌊 off-meta tidepool PR readiness rating does not apply to this item. clawsweeper:human-review Needs maintainer review before ClawSweeper can continue and removed proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels May 29, 2026
@clawsweeper

clawsweeper Bot commented May 29, 2026

Copy link
Copy Markdown
Contributor Author

🦞✅
ClawSweeper is pausing this repair loop for human review.

Source: clawsweeper[bot]
Reason: structured ClawSweeper verdict: needs-human (sha=e32fc453ae5aa22221d6f1590e445bf3df8615b9)

Why human review is needed:
ClawSweeper found a blocker that should be resolved or accepted by a maintainer before the repair or automerge loop continues.

What the maintainer can do as a next step:
If the maintainer accepts the current risk and wants ClawSweeper to continue merge gates, comment @clawsweeper approve. If more work is needed, resolve the blocker first, then comment @clawsweeper automerge to re-review and continue. If automation should stay paused, leave clawsweeper:human-review in place or comment @clawsweeper stop.

I added clawsweeper:human-review and left the final call with a maintainer.

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed rating: 🌊 off-meta tidepool PR readiness rating does not apply to this item. labels Jun 15, 2026
@clawsweeper

clawsweeper Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor Author

ClawSweeper applied the proposed close for this PR.

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

Labels

clawsweeper:automerge Maintainer opted this PR into bounded ClawSweeper-reviewed automerge clawsweeper:human-review Needs maintainer review before ClawSweeper can continue clawsweeper Tracked by ClawSweeper automation gateway Gateway runtime merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. P1 High-priority user-facing bug, regression, or broken workflow. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: L status: 🚀 automerge armed This PR is in ClawSweeper's automerge lane.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Stale diagnostic tool_call activity can survive recovery/reset and re-block sessions as blocked_tool_call

2 participants