Skip to content

refactor: share channel fork test fixtures - #190955

Merged
roboclaw-bot merged 1 commit into
mainfrom
refactor/channel-fork-fixtures
Nov 3, 2026
Merged

roboclaw-bot merged 1 commit into
mainfrom
refactor/channel-fork-fixtures

Conversation

@roboclaw-bot

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

Copy link
Copy Markdown
Collaborator

What Problem This Solves

The threaded-fork tests repeat isolated source-session setup in four scenarios.

User Impact

No runtime or user-visible behavior changes. All 10 shared-command cases and all 49 assertion statements remain, including acknowledgment failure, active-source prefix selection, retained native failures, and private-audience recovery.

Why This Change Was Made

Use one local fixture helper while preserving automatic-reply configuration and the refusal fixture without that setting.

The prerequisite #190783 is merged. This incremental follow-up now targets main at 1b1ef47, based on landed b515cc7. The original core fixture blob is identical; two Telegram isolation explanations are already in the parent and no longer part of this diff.

Evidence

  • Current integrated head: 10/10 core cases passed with --maxWorkers=1 and a unique local worker cache. Wall time 463.86s, including cold worker preparation; Vitest duration 250.28s. Hosted CI seconds are separate and unobserved.
  • All 49 assertion statements are byte-identical to the landed parent; case definitions remain unchanged. Refusal scenarios retain createForkSource(state, false), omitting automatic replies rather than enabling them by default.
  • Canonical core-test-messaging types passed in 2.93s; scoped lint, format and whitespace checks passed.
  • Exact pinned-parent mock, test-line and line-cap ratchets passed with no waiver or budget increase.
  • Prior independent P0–P2 clean review is reused because the complete core test blob is unchanged. No substantive post-review edit occurred.
  • Only src/auto-reply/reply/commands-fork.test.ts changes: +29/-60, net -31 test lines. No production, dependency, configuration or schema change.
  • Original pre-integration proof remains historical: 10 core cases and three Telegram adapter cases passed. Cold-start deadline failures are retained separately and are not test passes.

@clawsweeper

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

@openclaw-barnacle openclaw-barnacle Bot added channel: telegram Channel integration: telegram size: S labels Nov 2, 2026
@clawsweeper clawsweeper Bot added 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. labels Nov 2, 2026
@clawsweeper

clawsweeper Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR consolidates repeated fork-test session setup into one local helper and documents two existing Telegram mocks.

Example: Run the fork-refusal tests without automatic group replies.

  • Before: Each test repeats configuration and source-session creation.
  • After: createForkSource(state, false) produces the same configuration and source session.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The patch is focused and source-equivalent; validation evidence consists of reported harness runs rather than independently inspected execution artifacts.
Proof confidence 🦐 gold shrimp (3/6) This collaborator-authored test-only refactor changes no shipped behavior; the body reports focused suite passes, and source comparison preserves the exercised scenarios.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
Reason: The collaborator-authored direction removes repeated setup while preserving meaningful failure scenarios and configuration differences.

Merge readiness

✅ Ready for maintainer review

Keep open: this collaborator-authored draft makes a focused test-only simplification, preserves coverage, and introduces no actionable defect.

Priority: P3
Reviewed head: a594e19c0924040bd6356a476b39044e69a92bd5

Before merge

None.

Findings

None.

Agent review details

How this fits together

The fixture supplies isolated configuration, a source session, and transcript scope to shared-command tests; Telegram adapter tests separately isolate native topic creation and binding.

flowchart TD
  A[Isolated test state] --> B[Local source fixture]
  B --> C[Existing session creation service]
  C --> D[Fork command scenarios]
  D --> E[Transcript and delivery assertions]
  F[Telegram adapter mocks] --> E
Loading

Technical review

Best possible solution:

Retain the local fixture extraction with its explicit refusal configuration and unchanged scenario assertions.

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

This PR reports duplicated test setup rather than a product bug; the repeated base blocks and their equivalent replacements are directly inspectable.

Is this the best way to solve the issue?

Applying pr-simplify steps 1–3, the invariant is unchanged scenario inputs and coverage; one local helper removes duplication without introducing another state owner or test seam.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against ea6f8af98782.

Provenance checked

  • Fork source-session test setup keeps the original intent (bb6c4c2: The prerequisite introduced isolated coverage for acknowledgment failure, retained native failures, completed-prefix selection, and private-audience recovery.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

  • Pinned change preserves test inputs and assertions: The four fixture replacements preserve configuration, snapshot installation, session creation arguments, and scope; the refusal scenario explicitly disables automatic replies. All 49 expect calls and 10 command cases remain. (src/auto-reply/reply/commands-fork.test.ts:192, a594e19c0924)
  • Telegram changes are explanatory comments: The adapter's mocks, implementations, and assertions are unchanged; the added comments explain storage and transport isolation. (extensions/telegram/src/conversation-fork.test.ts:5, a594e19c0924)
  • Open prerequisite owns runtime behavior: feat: fork threaded conversations with Telegram support #190783 remains an open draft and supplies both test files. This PR targets that feature branch; fetched main contains neither file. The body explicitly defers retargeting until the prerequisite lands. (bb6c4c29b07f)
  • Validation scope: The full body reports passing command and adapter suites plus scoped checks. Hosted checks contain five successes and 80 skips; the successful checks do not establish hosted execution of the changed suites. No target code was executed during this read-only review. (a594e19c0924)
  • Policy and feature history: Read the root and applicable extension guides, complete changed tests, original blobs, and prerequisite discussion. No maintainer-notes directory exists. Path history traces these tests to the prerequisite; current-main fixture history identifies shared contributors. Older fixture blob inspection encountered a local missing-object limit, so its original introduction is not attributed. (src/test-utils/openclaw-test-state.ts:46, ea6f8af98782)

PR surface

Tests -29. Total -29 across 2 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 2 31 60 -29
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 31 60 -29

Labels

Label changes:

  • add P3: This is a low-risk test-maintenance change with no runtime behavior change.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P3: This is a low-risk test-maintenance change with no runtime behavior change.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed November 2, 2026, 2:45 AM ET / 07:45 UTC.

@roboclaw-bot
roboclaw-bot force-pushed the feat/channel-fork-command branch from cffb3f7 to 70dd219 Compare November 2, 2026 17:12
Base automatically changed from feat/channel-fork-command to main November 2, 2026 17:41
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation channel: discord Channel integration: discord channel: matrix Channel integration: matrix size: XL and removed size: S labels Nov 2, 2026
@roboclaw-bot
roboclaw-bot force-pushed the refactor/channel-fork-fixtures branch from a594e19 to 1b1ef47 Compare November 3, 2026 08:08
@openclaw-barnacle openclaw-barnacle Bot added size: S and removed docs Improvements or additions to documentation channel: discord Channel integration: discord channel: matrix Channel integration: matrix channel: telegram Channel integration: telegram size: XL labels Nov 3, 2026
@roboclaw-bot
roboclaw-bot marked this pull request as ready for review November 3, 2026 08:09
@roboclaw-bot
roboclaw-bot enabled auto-merge (squash) November 3, 2026 08:19
@roboclaw-bot
roboclaw-bot merged commit 08feee2 into main Nov 3, 2026
192 of 193 checks passed
@roboclaw-bot
roboclaw-bot deleted the refactor/channel-fork-fixtures branch November 3, 2026 08:20
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

Merged via squash auto-merge.

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. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant