Skip to content

fix(qa): ignore appended prompt updates when selecting tasks - #198177

Merged
roboclaw-bot merged 5 commits into
mainfrom
roboclaw/main-ci-qa-prompt-update
Nov 13, 2026
Merged

roboclaw-bot merged 5 commits into
mainfrom
roboclaw/main-ci-qa-prompt-update

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Two main failures in run https://github.com/openclaw/openclaw/actions/runs/43385708900 follow #198100 (bf0b8002c2), which made appended user-role "System prompt update" messages normal:

  • QA Smoke CI (profile 2/6): the QA mock OpenAI provider treated the prompt update as the user's task, so the silent subagent was never spawned.
  • checks-node-compact-large-20: server.subagent-prompt-recent.gateway.test.ts asserted that the entire later request lacked ## Active Subagents. Earlier runtime snapshots now legitimately stay in history.

User Impact

None at runtime; QA mock and test changes only.

Why This Change Was Made

  • The QA mock now skips system-prompt-update messages when choosing the current task, exactly as it already skips internal runtime-context carriers. A new HTTP routing regression covers a prompt update after a silent-worker request.
  • The gateway test now inspects only the context appended after the last assistant reply, which is what it was meant to check. The completed-child, run-ID and child-key assertions are unchanged.
  • Account-history tests inspect the transcript window plus current runtime context while preserving append-only historical snapshots. Explicit presence assertions narrow captured compaction requests before parsing.

Neither change reverts #198100 or weakens what the scenarios assert.

Evidence

  • Independent Codex autoreview of the behavioral changes and final type repair found no actionable P0–P2 findings; syntax, formatting and whitespace checks pass.
  • Exact head f552a0b889042c65dde5ef0bd011915caada0120, CI run 43405924002, attempt 1: all 80 jobs completed. The changed mock routing regression, both recent-subagent cases and both account-history cases pass. Test typechecks, lint and security-fast pass.
  • Two unrelated failures remain: checks-node-changed-17 fails the timeout-recovery child-completion assertion at gateway-timeout-recovery-subagent.e2e.test.ts:375:49 (parent/parent instead of parent/child); checks-node-changed-8 fails Telegram fixture bootstrap with Could not resolve built prepared-model-runtime- module at resolveBuiltModule:234:9. The aggregate openclaw/ci-gate fails downstream; CI is not green.
  • Both signatures match independent PR #198186 CI run 43394352976, attempt 1, timeout job 131782766094 and Telegram job 131782765624, on a post-fix(agents): keep every session prefix append-only on every route #198100 baseline. The timeout test uses its own provider, and Telegram fails resolving a built module before its controlled Gateway starts. This PR changes neither path. The native authorized pre-existing-failure route retains the exact failed attempt, checkout and unchanged source inputs; it does not waive reviews or security.
  • No broad suites or browser/container tests were run on the production Team Gateway host; exact-head PR CI supplies broad proof.

Worked on by

Work sessions

Linked for team reference; these sessions aren’t public.

@clawsweeper

clawsweeper Bot commented Nov 13, 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.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 13, 2026
@clawsweeper

clawsweeper Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: stale review; fresh review needed.

Summary
The latest durable ClawSweeper review was for head cf880e4f83857ccc6f2fcbb8a3776f6027cac27a, but the PR head is now d59faef4b2b5fb63b546d38214fe8df6cb70f109. Its old verdict and PR readiness labels are no longer current.

Next step
Comment @clawsweeper re-review when the current head is ready; pushes after the first review are not reviewed automatically.

Review history (1 earlier review cycle)
  • reviewed 2026-11-13T08:24:07.487Z sha cf880e4 :: needs maintainer review before merge. :: none

@clawsweeper clawsweeper Bot removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Nov 13, 2026
roboclaw-bot and others added 2 commits November 13, 2026 09:26
Check authored history and current runtime context while permitting retained snapshots from earlier turns. Keep system text in scope and preserve the original per-channel-peer fixture and assertion arguments.

Co-authored-by: obviyus <[email protected]>
Co-authored-by: steipete <[email protected]>
Assert each captured compaction request is defined before passing it to
historyWindow, satisfying indexed-access types without weakening history checks.

Co-authored-by: obviyus <[email protected]>
Co-authored-by: steipete <[email protected]>
@roboclaw-bot
roboclaw-bot merged commit 4a24e68 into main Nov 13, 2026
133 of 137 checks passed
@roboclaw-bot
roboclaw-bot deleted the roboclaw/main-ci-qa-prompt-update branch November 13, 2026 10:29
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

Merged via explicitly authorized admin squash with attributed pre-existing CI failures.

fuller-stack-dev added a commit that referenced this pull request Nov 13, 2026
* test(qa): find built Gateway chunks by exported bindings

The Telegram model-picker replacement proof located its hashed dist
chunks by whitespace-sensitive export text. #197801 (d8eca04)
switched the build to compact codegen, so chunks now read
`export{startGatewayServer,truncateCloseReason}` and the markers no
longer match: the case failed with "Could not resolve built
prepared-model-runtime- module" before starting a Gateway.

Parse the candidate chunks and match the names the bootstrap script
imports, so formatting, export order and unrelated exports no longer
decide which module is found. Product behavior is unchanged; the case
passes again with its assertions untouched.

* test(qa): read the whole current turn in timeout-recovery mock

The mock provider in the timeout-recovery subagent proof treated the
last Responses input item as the current turn. #198100 (bf0b800)
pins the system prompt on every route and appends prompt updates after
the turn's input, so the completion event was no longer last. The mock
answered the delivery turn as a plain retry and the reply sequence
assertion failed, although the Gateway still delivered the child
completion once.

Read everything after the previous assistant reply, the same rule
#198177 applied to the other subagent prompt tests. Assertions are
unchanged.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 14, 2026
…w#198177)

* fix(qa): ignore appended prompt updates when selecting tasks

Co-authored-by: obviyus <[email protected]>
Co-authored-by: steipete <[email protected]>

* test(gateway): scope subagent prompt assertions to the current turn

Co-authored-by: obviyus <[email protected]>
Co-authored-by: steipete <[email protected]>

* style(qa): format prompt-update routing regression

Co-authored-by: obviyus <[email protected]>

Co-authored-by: steipete <[email protected]>

* test(gateway): scope account history checks to active context

Check authored history and current runtime context while permitting retained snapshots from earlier turns. Keep system text in scope and preserve the original per-channel-peer fixture and assertion arguments.

Co-authored-by: obviyus <[email protected]>
Co-authored-by: steipete <[email protected]>

* test(gateway): narrow captured compaction requests before parsing

Assert each captured compaction request is defined before passing it to
historyWindow, satisfying indexed-access types without weakening history checks.

Co-authored-by: obviyus <[email protected]>
Co-authored-by: steipete <[email protected]>

---------

Co-authored-by: obviyus <[email protected]>
Co-authored-by: steipete <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 14, 2026
* test(qa): find built Gateway chunks by exported bindings

The Telegram model-picker replacement proof located its hashed dist
chunks by whitespace-sensitive export text. openclaw#197801 (2721e3d)
switched the build to compact codegen, so chunks now read
`export{startGatewayServer,truncateCloseReason}` and the markers no
longer match: the case failed with "Could not resolve built
prepared-model-runtime- module" before starting a Gateway.

Parse the candidate chunks and match the names the bootstrap script
imports, so formatting, export order and unrelated exports no longer
decide which module is found. Product behavior is unchanged; the case
passes again with its assertions untouched.

* test(qa): read the whole current turn in timeout-recovery mock

The mock provider in the timeout-recovery subagent proof treated the
last Responses input item as the current turn. openclaw#198100 (709602d)
pins the system prompt on every route and appends prompt updates after
the turn's input, so the completion event was no longer last. The mock
answered the delivery turn as a plain retry and the reply sequence
assertion failed, although the Gateway still delivered the child
completion once.

Read everything after the previous assistant reply, the same rule
openclaw#198177 applied to the other subagent prompt tests. Assertions are
unchanged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extensions: qa-lab gateway Gateway runtime P2 Normal backlog priority with limited blast radius. size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant