Skip to content

test(research): expect lifecycle-only changes to keep transcript jobs - #200245

Merged
jalehman merged 2 commits into
mainfrom
test/deep-research-lifecycle-retention
Nov 16, 2026
Merged

jalehman merged 2 commits into
mainfrom
test/deep-research-lifecycle-retention

Conversation

@jalehman

Copy link
Copy Markdown
Contributor

Related: #200099

What Problem This Solves

Fixes: test/plugins/deep-research-routing.gateway.test.ts fails on main ("expected true to be false" at the lifecycle-only read) because it still expects an edit or rewind to hide a conversation's research jobs.

User Impact

No user-visible change. This is test-only. It aligns the Gateway routing test with #200099 and stops this failure from showing up on unrelated PRs.

Why This Change Was Made

#200099 (edbc5bc) made deep-research job views follow the transcript instead of the lifecycle revision. It lists "Deep-research jobs disappear from the chat after an edit" among the bugs it fixes, and its commit says "Deep-research job views drop the revision compare; the job store stays per transcript". view-state.ts no longer compares lifecycleRevision, and view-api.ts hashes the view token from the session id alone. The test still asserted the old lifecycle fencing.

For a lifecycle-only change that keeps the same session id, the test now asserts that the transcript's jobs stay visible:

  • The completed job's read, the job list and the view token are unchanged.
  • The idempotent start replays the original job.
  • Model-tool result/status still work, and a repeated model start returns its existing job.
  • No extra provider dispatch happens.

The retired-job denial checks (empty list, stale-token start rejected, model-tool result/status/resume/cancel and view resume/cancel denied) now run after the reset that changes the session id, for every earlier job. Foreign-user, role-revocation and cross-session denials are unchanged.

Evidence

  • Red before the change: the file under CI's pinned Bun (1.4.4-canary.1+191755ec1) fails 1 / 3 passed at the line-839 assertion. Earlier triage reproduced this 3 of 3 on main a0423637196f and 964ab5223098.

  • Green after the change: 3 of 3 runs with the CI command below (4/4 tests each, 78–83 s), plus pnpm test test/plugins/deep-research-routing.gateway.test.ts --maxWorkers=1 (4/4).

    OPENCLAW_BUN_PATH=<ci bun> OPENCLAW_VITEST_RUNTIME=bun OPENCLAW_VITEST_MAX_WORKERS=3 CI=true \
      node scripts/run-vitest.mjs run --config test/vitest/vitest.gateway-database-workers.config.ts \
      test/plugins/deep-research-routing.gateway.test.ts
  • oxfmt --check, oxlint, pnpm check:test-types, check:test-lines-ratchet (net +22), check:line-cap-ratchet and check:max-lines-ratchet pass.

  • Independent review: no P0–P2 findings.

  • Note: current main (9e66164c0ce4 and later) does not compile under the test runner. src/agents/auth-profiles/oauth-refresh-peers.ts imports resolveIdentityPathViaExistingAncestor from infra/boundary-path.js, but refactor(paths): keep identity lookup imports passive #200203 moved it to infra/path-existence.js. The local runs above used a one-line uncommitted import shim for that. This PR does not change that file, so any CI failures from that break are inherited.

🦞 Made with OpenClaw

@clawsweeper

clawsweeper Bot commented Nov 16, 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-repro Preliminary submission classification; full source review pending. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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-repro Preliminary submission classification; full source review pending. labels Nov 16, 2026
@clawsweeper

clawsweeper Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: stale review; fresh review needed.

Summary
The latest durable ClawSweeper review was for head 79f4995bf152dfa22fec070de0bcd39158f207d9, but the PR head is now c27da2a2a5a2c827e8f4de67c498072c528b1f16. 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-16T20:23:04.192Z sha 79f4995 :: needs maintainer review before merge. :: none

#200099 made deep-research job views and their view token follow the
transcript (session id) instead of the lifecycle revision, so an edit
or rewind keeps the conversation's research visible. The Gateway
routing test still expected a lifecycle-only change to retire those
jobs. Assert retention there instead, and move the retired-job denial
checks onto the reset that changes the session id.
@jalehman
jalehman force-pushed the test/deep-research-lifecycle-retention branch from 79f4995 to c27da2a Compare November 16, 2026 20:40
@jalehman
jalehman enabled auto-merge (squash) November 16, 2026 20:43
@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 16, 2026
@jalehman
jalehman merged commit 9a1d8f7 into main Nov 16, 2026
71 checks passed
@jalehman
jalehman deleted the test/deep-research-lifecycle-retention branch November 16, 2026 21:44
@jalehman

Copy link
Copy Markdown
Contributor Author

Merged via squash auto-merge.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 17, 2026
…openclaw#200245)

openclaw#200099 made deep-research job views and their view token follow the
transcript (session id) instead of the lifecycle revision, so an edit
or rewind keeps the conversation's research visible. The Gateway
routing test still expected a lifecycle-only change to retire those
jobs. Assert retention there instead, and move the retired-job denial
checks onto the reset that changes the session id.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant