Skip to content

refactor(tests): share independent no-queued-reply expectations - #142845

Merged
steipete merged 1 commit into
mainfrom
codex/test-no-queued-reply-expectations
Sep 9, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/test-no-queued-reply-expectations

Conversation

@steipete

@steipete steipete commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Related: #139428

What Problem This Solves

Fifteen dispatch assertions repeat the same no-queued-reply result shape across related delivery, cancellation and terminal-failure suites.

Why This Change Was Made

Share a pure expected-result constructor that returns fresh literal objects, independently of production and mock inputs. Preserve every existing matcher and companion no-send, terminal-outcome, receipt and operation-ownership assertion. Queue counts alone are not treated as delivery proof.

User Impact

No user-visible behavior change. The five-file cleanup removes 35 net test/support lines without deleting scenarios or changing runtime behavior.

Evidence

  • All four complete suites passed before and after: 256 cases, with identical per-file ordered case names and statuses.
  • Full AST expansion reconstructs the original consumers; all fifteen constructor calls remain expected-only, with exact values/key order and two fresh objects per call.
  • Full mapped changed checks, diff-scoped cleanup and fresh independent P2 review passed with no findings.

No runtime improvement is claimed.

@clawsweeper

clawsweeper Bot commented Sep 9, 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 size: S maintainer Maintainer-authored PR labels Sep 9, 2026
@steipete
steipete marked this pull request as ready for review September 9, 2026 05:10
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 9, 2026
@clawsweeper

clawsweeper Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 9, 2026, 1:14 AM ET / 05:14 UTC.

ClawSweeper review

What this changes

Shares a fresh expected-result constructor across dispatch tests without changing scenarios or runtime behavior.

Merge readiness

✅ Ready for maintainer review

This remains a useful, narrowly scoped part of the maintainer-requested test audit. The assertions retain their values, matcher semantics, and independent delivery checks; no actionable defect was found.

Priority: P3
Reviewed head: 300124b4cef8389800757e6a6575cf660c87a983

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, behavior-preserving cleanup with independent expectations and no identified correctness or security blocker.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer test-only cleanup changes no production owner or runtime behavior; reported suite equivalence is appropriate supplemental validation, and no live behavior demonstration is required.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer test-only cleanup changes no production owner or runtime behavior; reported suite equivalence is appropriate supplemental validation, and no live behavior demonstration is required.
Evidence reviewed 7 items Independent expected values: The new helper has no imports or inputs and creates fresh outer and counts objects containing the original literal values. All fifteen uses are expected arguments in tests.
Cancellation assertions preserved: The complete introduced abort-test diff replaces twelve repeated expected literals while retaining matchers, operation ownership, abort signals, resolver checks, and no-send assertions.
Delivery evidence remains separate: The delivery-order case retains an independent mock result, checks that no visible delivery receipt was recorded for the newer dispatch, and verifies the actual delivery list. ACP suppression and terminal-failure cases likewise retain their companion assertions.
Findings None None.
Security None None.

How this fits together

OpenClaw's reply dispatcher turns incoming messages and configuration into agent work and channel replies. These tests verify delivery ordering, cancellation, suppression, and terminal failures.

flowchart LR
  A[Incoming message and config] --> B[Reply dispatcher]
  B --> C[Agent work and cancellation]
  C --> D[Channel delivery or suppression]
  D --> E[Dispatch result]
  E --> F[Test assertions]
  G[Independent expected result] --> F
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests -35. Total -35 across 5 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 5 25 60 -35
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 5 25 60 -35

Review metrics

None.

Root-cause cluster

Relationship: partial_overlap
Canonical: #139428
Summary: This PR addresses one bounded cleanup within the broader open test-audit campaign.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Technical review

Best possible solution:

Keep the shared expected values independent of production and mock inputs while preserving the existing behavioral scenarios and companion assertions.

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

Not applicable: this refactor reports no runtime defect; source inspection confirms repeated expected literals are the cleanup target.

Is this the best way to solve the issue?

Yes: a pure test-only constructor removes repetition without coupling expectations to production outputs or weakening the retained checks.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P3: This is a low-risk test-maintenance cleanup with no production behavior change.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer test-only cleanup changes no production owner or runtime behavior; reported suite equivalence is appropriate supplemental validation, and no live behavior demonstration is required.

Label justifications:

  • P3: This is a low-risk test-maintenance cleanup with no production behavior change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer test-only cleanup changes no production owner or runtime behavior; reported suite equivalence is appropriate supplemental validation, and no live behavior demonstration is required.

Evidence

What I checked:

  • Independent expected values: The new helper has no imports or inputs and creates fresh outer and counts objects containing the original literal values. All fifteen uses are expected arguments in tests. (src/auto-reply/reply/dispatch-result-expectations.test-support.ts:1, 300124b4cef8)
  • Cancellation assertions preserved: The complete introduced abort-test diff replaces twelve repeated expected literals while retaining matchers, operation ownership, abort signals, resolver checks, and no-send assertions. (src/auto-reply/reply/dispatch-from-config.acp-abort.test.ts:456, 300124b4cef8)
  • Delivery evidence remains separate: The delivery-order case retains an independent mock result, checks that no visible delivery receipt was recorded for the newer dispatch, and verifies the actual delivery list. ACP suppression and terminal-failure cases likewise retain their companion assertions. (src/auto-reply/dispatch.delivery-order.test.ts:344, 300124b4cef8)
  • Current main and merge scope: The four existing consumer files are unchanged between the pinned merge base and fetched main, and the helper is absent from fetched main. The verified test merge has the pinned main and PR head as its two parents; its changes against main are confined to the five test/support paths. No runtime fix or release inclusion is claimed. (3394d427a69b)
  • Campaign context and reported validation: The supplied body links the open maintainer-requested campaign at Test audit: reduce redundant test code and full-suite runtime #139428 and reports 256 passing cases before and after with identical ordered case identities and AST equivalence. These are contributor-reported results; this read-only review did not execute tests. (300124b4cef8)
  • Existing area history: Current-main history identifies Peter Steinberger on prior dispatch settlement and cancellation work. Deeper blame inspection could not complete because a required historical object could not be retrieved; no source-line introduction claim is made. (src/auto-reply/dispatch.delivery-order.test.ts, eb38d5e4863a)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@steipete
steipete merged commit d9216e8 into main Sep 9, 2026
169 checks passed
@steipete
steipete deleted the codex/test-no-queued-reply-expectations branch September 9, 2026 05:22
@steipete

steipete commented Sep 9, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit to LiuwqGit/openclaw that referenced this pull request Sep 9, 2026
…1-prep

* commit 'b04a3f83adad8bd6a2ca8408e7940fc6bcbde212': (636 commits)
  docs(cli): split the doctor command reference by reader job (openclaw#142855)
  fix(ui): explain paused weekly skill reviews (openclaw#142840)
  docs(automations): describe supported schedule options (openclaw#135964)
  fix(image): close registration resources after generation (openclaw#142843)
  fix(slack): keep ack reactions independent of status reactions (openclaw#142595)
  fix(ui): avoid flashes when switching cold sessions (openclaw#134868)
  refactor(tests): share independent no-queued-reply expectations (openclaw#142845)
  perf: reduce generated media reference formatting overhead (openclaw#142836)
  fix: sessions_yield keeps long transcript history available (openclaw#137381)
  fix(music): close registration resources after generation (openclaw#142834)
  fix: update confirmation shows stale commit counts after refresh (openclaw#142837)
  fix(ci): retain Android emulator post-timeout evidence (openclaw#142835)
  fix(talk): retain final delivery across delegation waves (openclaw#142830)
  docs(gateway): run Linux system services as the state owner (openclaw#136266)
  fix(models): align static Anthropic aliases with manifest (openclaw#137376)
  test(gateway): simplify session lifecycle gates and report early rollback failures (openclaw#142833)
  refactor(ai): keep model policy parsing independent of transport host (openclaw#142804)
  refactor: simplify interactive SDK forwarding (openclaw#142824)
  fix(cli): finish pending cleanup before automatic macOS exit (openclaw#142814)
  docs(memory-lancedb): clarify enforced compatibility ranges (openclaw#142827)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. 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