Skip to content

test(qa): cover agent session reconnect dedupe - #119013

Merged
vincentkoc merged 1 commit into
mainfrom
test-qa-agent-session-dedup-reconnect
Aug 4, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
test-qa-agent-session-dedup-reconnect

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Aug 3, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

The Gateway's agent idempotency contract had unit coverage built around a mocked
agentCommand, but no product-boundary proof that a real embedded turn survives
client disconnect and reconnect without duplicated model work or transcript rows.

Why This Change Was Made

Add one QA Lab scenario and one focused E2E test. The test starts a real child
Gateway and a gated loopback OpenAI Responses provider, then:

  • starts a fixed-session agent RPC from client A and disconnects after acceptance;
  • reconnects as client B and replays the same idempotency key while the provider is paused;
  • releases the single provider response and resolves the run through agent.wait;
  • replays changed message text under the same key and verifies cached terminal truth;
  • verifies exactly one user turn and one terminal assistant turn.

No production or QA-internal code changes.

User Impact

This locks in the reconnect contract operators depend on: retrying an accepted
agent request after transport loss does not run the model twice, append duplicate
turns, or let changed replay text overwrite the original request.

Evidence

  • node scripts/run-vitest.mjs test/e2e/qa-lab/runtime/agent-session-dedup-reconnect.e2e.test.ts
    • pass on rebased head 11acb412b3dfddcbae35872add068290e3086f24: 1 file, 1 test
  • QA coverage match:
    • scenario: session-dedup-reconnect
    • execution: vitest
    • primary IDs: agent-runtime.session-dedup, agent-runtime.session-reconnect
  • Direct Codex gpt-5.6-sol / high autoreview:
    • clean, no accepted or actionable findings
    • patch correct, confidence 0.99
  • Production LOC: +0
  • QA LOC: +348 across exactly two new files

The path-scoped changed gate is running on Blacksmith Testbox; this PR will be
updated with its final result before merge.

@vincentkoc vincentkoc self-assigned this Aug 3, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review August 3, 2026 23:57
@vincentkoc
vincentkoc force-pushed the test-qa-agent-session-dedup-reconnect branch from 9e019c8 to 11acb41 Compare August 4, 2026 00:01
@vincentkoc
vincentkoc merged commit 945597b into main Aug 4, 2026
170 of 172 checks passed
@vincentkoc
vincentkoc deleted the test-qa-agent-session-dedup-reconnect branch August 4, 2026 00:25
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Aug 4, 2026
* origin/main: (54 commits)
  test(qa): cover agent session streaming (#119028)
  test(qa): cover sandbox workspace isolation (#119038)
  test(qa): cover progress followthrough evidence (#119039)
  fix(auth): cooldown inline api key billing failures (#88709)
  chore(gateway): cover update and setup RPCs
  test(qa): prove ClawHub catalog discovery (#118934)
  chore(qa): cover plugin testing harness contracts (#118933)
  test(qa): prove failure recovery visibility (#119034)
  test(qa): cover direct tool invocation (#119025)
  test(qa): close external app SDK proof gaps (#118978)
  test(qa): prove container health endpoints (#119012)
  test(qa): claim sessionless heartbeat coverage (#119027)
  fix(gateway): keep plugin model allowlists static (#118854)
  fix(plugins): refresh bundled channel skills (#119020)
  test(qa): cover ClawHub package compatibility (#118985)
  test(qa): cover agent session reconnect dedupe (#119013)
  test(qa): prove gateway chat RPCs (#118988)
  test(ui): cover Control UI auth transports (#118866)
  fix(auth): do not admit ambient environment credentials behind declared profiles (#118458)
  test(ui): cover operator administration flows (#118836)
  ...
vincentkoc added a commit that referenced this pull request Aug 4, 2026
* commit '25e3b6c9b79dadb912195d86fbff968602d58798': (54 commits)
  fix(cli): honor local port in gateway call (#119046)
  fix(gateway): honor external status target context (#119015)
  test(qa): cover agent session streaming (#119028)
  test(qa): cover sandbox workspace isolation (#119038)
  test(qa): cover progress followthrough evidence (#119039)
  fix(auth): cooldown inline api key billing failures (#88709)
  chore(gateway): cover update and setup RPCs
  test(qa): prove ClawHub catalog discovery (#118934)
  chore(qa): cover plugin testing harness contracts (#118933)
  test(xai): cover playback mark overflow
  fix(xai): bound realtime playback marks
  test(qa): prove failure recovery visibility (#119034)
  test(qa): cover direct tool invocation (#119025)
  test(qa): close external app SDK proof gaps (#118978)
  test(qa): prove container health endpoints (#119012)
  test(qa): claim sessionless heartbeat coverage (#119027)
  fix(gateway): keep plugin model allowlists static (#118854)
  fix(plugins): refresh bundled channel skills (#119020)
  test(qa): cover ClawHub package compatibility (#118985)
  test(qa): cover agent session reconnect dedupe (#119013)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant