Skip to content

fix: preserve steering after tool-authority checks - #123549

Merged
steipete merged 2 commits into
mainfrom
codex/fix-main-ci-collected-turn-isolation
Aug 14, 2026
Merged

steipete merged 2 commits into
mainfrom
codex/fix-main-ci-collected-turn-isolation

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an issue where main CI failed across four Node shards after authority-aware steering changes. The same regressions could make Gateway chat steering fall back to a new turn and could let a non-user embedded steer emit before its transcript listener was installed.

Why This Change Was Made

The captured reply-operation authority now crosses the Gateway message-injection target when the request has no turn-scoped tool bindings, preserving the exact active authority without widening tool-bound requests. Non-user steering skips the asynchronous pending-question claim path so transcript observation is installed synchronously. Test fixtures now use canonical session ownership, complete reply-operation authority contracts, and narrow heartbeat exports.

The repair keeps the new tool-authority safety boundary intact; it does not add retries, weaken assertions, or bypass mismatches.

User Impact

Gateway chat messages can continue steering an eligible active turn instead of unnecessarily starting another turn. Embedded queued steering reliably observes transcript completion and cancellation again.

Evidence

  • Reproduced the original four execution failures on current main and bisected them to the authority-lifecycle commit range.
  • node scripts/run-vitest.mjs src/gateway/server-methods/chat.directive-tags.test.ts — 192 tests passed.
  • node scripts/run-vitest.mjs src/agents/embedded-agent-runner/run/attempt.queue-message.test.ts — 15 tests passed.
  • Execution-focused routed suites passed; the sole post-rebase heartbeat-mock failure also passed after the fixture repair.
  • Focused media-runner tests — 14 tests passed.
  • node scripts/check-changed.mjs passed on Blacksmith Testbox: https://github.com/openclaw/openclaw/actions/runs/31780502502
  • Changed-file formatting, Oxlint, typechecks, guards, and final structured autoreview passed.

Production LOC: +22/-3 (net +19), required to preserve the active authority binding and synchronous transcript-listener lifecycle. Tests and test support: +41/-11.

Relevant failing main runs: https://github.com/openclaw/openclaw/actions/runs/31776439546, https://github.com/openclaw/openclaw/actions/runs/31776648638, and https://github.com/openclaw/openclaw/actions/runs/31776785997.

@clawsweeper

clawsweeper Bot commented Aug 14, 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 gateway Gateway runtime agents Agent runtime and tooling size: S maintainer Maintainer-authored PR labels Aug 14, 2026
@steipete
steipete merged commit c500ab7 into main Aug 14, 2026
262 of 264 checks passed
@steipete
steipete deleted the codex/fix-main-ci-collected-turn-isolation branch August 14, 2026 08:10
@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

agents Agent runtime and tooling gateway Gateway runtime maintainer Maintainer-authored PR size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant