Skip to content

test(discord,gateway,wizard,agents,heartbeat,cron): remove low-value tests (batch d085) - #160481

Merged
steipete merged 11 commits into
mainfrom
tcr/land-d085-1790594784
Sep 28, 2026
Merged

steipete merged 11 commits into
mainfrom
tcr/land-d085-1790594784

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Duplicate test cases and repeated fixtures make the Discord, Gateway, wizard, prepared-model runtime, heartbeat, and cron suites harder to maintain. This is maintainer-requested test-reduction batch d085.

User Impact

No user-visible behavior or production code changes. The batch retains distinct authorization, lifecycle, recovery, delivery, and configuration regressions while removing overlapping proof and consolidating test setup.

Why This Change Was Made

Replays ten coverage-gated campaign commits onto current main. Every shard's recorded covered-statement and covered-branch loss is below 1%; these are historical in-shard comparisons, not a claim that coverage was remeasured after replay.

All ten commits were applied; none were skipped. Two replay conflicts were resolved in favor of current main's behavior:

  • src/wizard/setup.finalize.test.ts: keep the newer gateway-probe assertions, current health-check assertions, and skipped-service readiness case; apply the fixture consolidation and remove only the intended redundant readiness rows.
  • src/infra/heartbeat-runner.typing.test.ts: keep the newer two-second keepalive regression, interval-only fake timers, and separate failure cleanup case; retain shared fixture consolidation instead of replacing that regression with the older success table row.

No production seam was removed. config/max-lines-baseline.txt only drops two obsolete entries. No changed path matches the current CODEOWNERS rules. The heartbeat cron-carried-task prompt regression remains in heartbeat-runner.isolated-key-stability.test.ts.

Evidence

  • Local pnpm install --frozen-lockfile --prefer-offline, targeted oxfmt --write, plain oxlint -c .oxlintrc.json (exit 0), and git diff --check passed.
  • Blacksmith Testbox: CI=1 pnpm install --frozen-lockfile --prefer-offline && CI=1 pnpm test <all 50 surviving changed test files> passed 640 tests across 50 files, with no failures or skips. Source hashes were verified before execution. Lease tbx_01m3kwteh91yrq51yg7zk75h9r; run; stopped after success. The wrapper exit code and timing record establish success; external lease cleanup can change the linked Actions lifecycle status.
  • OPENCLAW_TESTBOX=1 node scripts/check-changed.mjs -- <all 57 changed paths> passed the structural guards and 24 core test graphs, then failed with TS18048 in run.tools-allow.test.ts: its always-present policy fixture had an optional indexed-access type. The follow-up commit narrows that fixture to NonNullable<CronStoredJob["scheduledToolPolicy"]> without changing runtime behavior. The failed run's lease tbx_01m3ky6q8vxtb967zg27kfaxgg was stopped; run.
  • Independent autoreview of the full pinned-base diff, including the cron type fix, completed all three review parts with zero findings at the skill's default P0 threshold. No findings were accepted or rejected.
  • The repaired cron files passed all 11 tests; the failed core-test-services-cron graph, remaining core-test-ui-components graph, extension test typecheck, coercion/deprecated-API guards, and all dead-export scans passed in the continuation. Its broad core lint then found an unrelated max-lines error in untouched ui/src/lib/sessions/session-roster-observations.ts (713 > 700). Main had already fixed that in f8ae4fc466a; this branch was rebased onto 465fdd5adba67a2b8cef72fcc8c7fd688b7c9967. git range-diff confirms all 11 patches are identical across that rebase. Continuation lease tbx_01m3m0vbqxzrfkyqjwf6gtnc94 was stopped; run. No lint exception was added.
  • Final refreshed-head validation passed: all 640 tests across 50 files, pnpm lint:core (28,909 files), pnpm lint:extensions (10,535 files), and pnpm lint:scripts (1,249 files), each with exit 0 and lint reporting zero warnings/errors. Testbox verified head a2eabf5fdb92e6a8388a43800c5a5cfa93338225. Lease tbx_01m3m33qsjz3byyc1e2xpgtfmg; run; stopped successfully.
  • Validation completed in phases: the initial changed-file invocation stopped at the cron type error; its failed and remaining checks were subsequently completed as described above. This does not claim that the original invocation exited 0. The only temp-fixture advisory points to an explicit afterAll cleanup. All task-owned leases are stopped.
Shard inventory, line counts, and original coverage evidence

Replayed diff: tests +5,480/−18,089 (net −12,609); production +0/−0; baseline configuration +0/−2. Static test declarations: 810 → 510 (−300). Declarations count each registration once, including generic table declarations; executed table rows are not separate declarations.

Shard Test LOC delta Static declarations Original in-shard covered totals
t0072 -121 2 → 2 (+0) statements 430 → 430; branches 146 → 146; functions 53 → 53
t0059 -5,448 302 → 168 (-134) statements 8,662 → 8,628 (−0.39%); branches 6,528 → 6,492 (−0.55%); functions 1,432 → 1,426
t0073 -1,415 160 → 118 (-42) covered statements 1513 -> 1510 (-3); branches 1057 -> 1050 (-7); functions 246 -> 245 (-1)
t0079 -612 63 → 51 (-12) statements 9664 → 9658 (-6); branches 5605 → 5588 (-17); functions 1684 → 1683 (-1)
t0069 -1,065 58 → 44 (-14) statements 1,954 → 1,946; branches 1,457 → 1,451; functions 373 → 368
t0070 -1,683 68 → 33 (-35) statements 1522 → 1516 (−6, 0.39%); branches 1143 → 1137 (−6, 0.52%); functions 317 → 316
t0068 -549 36 → 15 (-21) statements 5,843 → 5,830 (−0.22%); branches 3,396 → 3,381 (−0.44%); functions 1,105 → 1,102
t0077 -636 59 → 48 (-11) covered statements 6388 -> 6380 (-8); branches 3988 -> 3966 (-22); functions 1337 -> 1336 (-1)
t0080 -723 41 → 22 (-19) Statements 4094 → 4088 (−0.15%); Branches 2616 → 2601 (−0.57%); Functions 841 → 843 (+2)
t0088 -357 21 → 9 (-12) statements 1705 → 1705; branches 1173 → 1174; functions 267 → 267

t0080 uses the final repair report, which restored inline-provider coverage and a config-change row; its earlier report was superseded. All coverage groups were included. Current-head test/check results are listed above separately.

t0072 files: extensions/discord/src/monitor/message-handler.route-owner-admission.test.ts, extensions/discord/src/monitor/message-handler.routing-preflight.test.ts.

t0059 files: config/max-lines-baseline.txt, src/gateway/session-utils.fs.test.ts, src/gateway/session-utils.perf.test.ts, src/gateway/session-utils.plugin-runtime.test.ts, src/gateway/session-utils.queued-collector.test.ts, src/gateway/session-utils.search.test.ts, src/gateway/session-utils.single-row-cache.test.ts, src/gateway/session-utils.subagent.test.ts, src/gateway/session-utils.telegram-recreate.test.ts, src/gateway/session-utils.test.ts.

t0073 files: src/wizard/setup.app-recommendations.test.ts, src/wizard/setup.completion.test.ts, src/wizard/setup.default-agent.test.ts, src/wizard/setup.finalize.test.ts, src/wizard/setup.gateway-config.test.ts, src/wizard/setup.inference-verification.test.ts, src/wizard/setup.memory-import.test.ts, src/wizard/setup.migration-import.test.ts, src/wizard/setup.migration-resources.test.ts, src/wizard/setup.migration-stage.test.ts, src/wizard/setup.migration-transaction.test.ts.

t0079 files: src/agents/prepared-model-runtime.published-resources.test.ts, src/agents/prepared-model-runtime.registry-borrow.test.ts, src/agents/prepared-model-runtime.reload-auth.test.ts, src/agents/prepared-model-runtime.reply-fallback.test.ts, src/agents/prepared-model-runtime.run-resources.test.ts, src/agents/prepared-model-runtime.scoped-refresh.test.ts, src/agents/prepared-model-runtime.sources.test.ts, src/agents/prepared-model-runtime.stale-resources.test.ts.

t0069 files: extensions/discord/src/monitor/message-handler.context-history.test.ts, extensions/discord/src/monitor/message-handler.context.test.ts, extensions/discord/src/monitor/message-handler.draft-preview.rest.test.ts, extensions/discord/src/monitor/message-handler.draft-preview.visibility.test.ts, extensions/discord/src/monitor/message-handler.hydration.test.ts, extensions/discord/src/monitor/message-handler.ingress-recovery.test.ts, extensions/discord/src/monitor/message-handler.preflight-owned-threads.test.ts.

t0070 files: extensions/discord/src/monitor/message-handler.preflight.acp-bindings.test.ts, extensions/discord/src/monitor/message-handler.preflight.test.ts.

t0068 files: src/infra/heartbeat-runner.tool-response.test.ts, src/infra/heartbeat-runner.typing.test.ts.

t0077 files: src/agents/prepared-model-runtime.auth-recovery.test.ts, src/agents/prepared-model-runtime.auth-store.test.ts, src/agents/prepared-model-runtime.auth-usage.test.ts, src/agents/prepared-model-runtime.auto-selection.test.ts, src/agents/prepared-model-runtime.batch.test.ts, src/agents/prepared-model-runtime.cancelled-admission.test.ts, src/agents/prepared-model-runtime.catalog-owner.test.ts, src/agents/prepared-model-runtime.catalog-publication.test.ts, src/agents/prepared-model-runtime.catalog-sharing.test.ts, src/agents/prepared-model-runtime.configured-catalog.test.ts, src/agents/prepared-model-runtime.configured.test.ts.

t0080 files: src/agents/prepared-model-runtime.startup-static.test.ts, src/agents/prepared-model-runtime.test.ts.

t0088 files: src/cron/isolated-agent/run.tools-allow.test.ts, src/cron/isolated-agent/run.usage-accounting.test.ts.

Remove duplicate context projections, thread-policy and preview matrix rows,
reply-hydration variants, and mocked core binding/retry replays. Reuse local
hydration and durable-recovery fixtures. Keep both original Vitest projects.

Tests: 103 -> 65 (-36.9%). Test LOC: 3294 -> 2229 (-32.3%).
Coverage: statements 1954 -> 1946 (-0.41%); branches 1457 -> 1451 (-0.41%);
functions 373 -> 368. Both groups included; no file loses >3 statements.
The requested 50% reduction was not reached. Retention rationale follows.

R1 = distinct covered owner statements/branches; R2 = verified regression;
R3 = security boundary. Table rows below remain separate executed cases.

ack-policy:
- Current policy, account undefined/off (2): R1 global fallback/account override;
  R2 1b3da64 acknowledgement changes without reconnecting.
bot-self-filter:
- Skip own messages before debounce: R1 early self-filter completion branch.
debounce-policy:
- Change timing without losing queued messages: R1 multi-original flush and
  cancellation of pending entries.
debounce-reply-target:
- Separate ordinary batch and another-message reply: R1 reply-key partition;
  R2 09f9e53.
preflight-channel-context:
- Unicode display names preserve matching slug: R2 d419bcf.

context:
- Batched/singleton identities (2): R1 both source-ID projection branches.
- Bot sender, host builder and live owner authority: R2 984f5a5,
  34f29ed, 286ff4f; R3 revocation and opaque route authority.
- Canonical guild ID: R2 8668aeb.
- PluralKit remains human: R2 984f5a5; R1 proxy sender branch.
- Forwarded media recorded once: R1 room-event recording and frozen provenance.
- Forwarded command text stays ordinary content: R2 fc5e53d; R3 provenance.
- Missing attachment notice: R2 a68ff99; R1 singular notice.
- Escaped malicious transcript: R2 97fe326; R3 untrusted framing.
- Plural notice/resolved attachment: R1 plural and resolved-media branches.

context-history:
- Quiet ingress/debounced originals: R1 native recovery entry and exclusions;
  R2 6e5f6f9.
- Pagination: R1 second physical REST page.
- Allowlisted identities: R1 filtering; R3 sender visibility.
- Cold role lookup: R1 native guild-member read.
- Unchanged/replaced cached media (2): R1 both media-identity branches.
- REST failure without stale fallback: R1 catch; R3 stale context exclusion.
- Zero history: R1 no-fetch history branch.
- Bound-session reset cutoff: R1 bound scope/cutoff; R3 reset isolation.
- Existing tombstone: R1 no-recovery state; R3 reset isolation.
- Abort/policy/reset/tombstone during REST (4): R1 distinct invalidation guards;
  R3 authority and lifecycle revalidation.
- Active thread/cross-room/future rows: R1 filtering; R3 conversation isolation.
- Auto-thread parent history and parent ID: R1 auto-thread exclusion;
  R2 0b85966.
- Other-bot history excluding self: R2 b078de4.

preflight-owned-threads:
- Schema overrides/default/type rejection: R1 restoring this case recovered
  45 config-schema statements and 17 branches in the measured comparison.
- Explicit relaxed policy/automatic thread/guild override (3): R1 distinct
  mention-policy resolution paths.
- Strict explicit mention/implicit reply (2): R1 acceptance and rejection.
- Human-owned thread: R1 ownership mismatch.
- Disallowed sender: R3 sender authorization.

draft-preview.rest:
- Accepted/refused handoff (2): R1 adoption branches; R2 24a03ac.
- Late handoff with queued preview: R1 changed-message-ID ownership branch.
- Retained preamble after final gate: R1 delayed publication; R2 24a03ac.
- Missing ID/failed edit (2): R1 distinct unconfirmed-receipt guards.
- Authority revoked while awaiting receipt: R3 live authority.
- Block-mode plan retract/resume: R1 chunker, progress deletion and reset.
- Error final retains draft: R1 final-delivery retention lifecycle.
- Late queued preview/teardown with repeated delete failure (2): R1 distinct
  cleanup paths; R2 d27b0e9.

hydration:
- Partial internal message/getters: R1 partial reconstruction and metadata.
- Failed current-message hydration: R1 unavailable outcome.
- Empty bot reply in referenced channel: R1 empty nested payload;
  R2 5cd1d13 and b078de4.
- Mismatched nested reply success/failure (2): R1 invalid payload recovery and
  discard branches; R3 exclusion of unrelated reply context.
- Missing reply fetch failure: R1 original-message fallback.
- Deleted/forwarded references: R1 intentional no-hydration branches.

ingress-recovery:
- Cancellation routes and replacement: R1 dispatch/buffer/preflight cancellation
  and exhausted-row settlement; R2 5af3d49.
- Pending admission shutdown: R1 active admission ownership and draining.
- Exhausted queued processing failure: R1 queued abandonment and follower release.
- Started job returns/throws after cancellation (2): R1 success/catch cancellation;
  R2 286ff4f.
- Queued job skipped on deactivation: R1 skipped-job cleanup; R2 286ff4f.

Removed core stale-binding replays are owned by get-reply.binding-route-owner,
dispatch-from-config.binding-activity, dispatch-from-config.ordinary-hook-route-change,
and ingress-retry-policy tests; the removed Discord hooks built the route and
context themselves. Removed visibility-only mock proof is covered through
message-handler.process.draft-progress's unacknowledged-preamble case.

No production or shared support edits. Baseline tests were green. Restored
schema coverage after the first comparison and reverted a shared-helper reuse
that orphaned an out-of-scope export. No test retries, skips, timeout increases,
weakened assertions, or config/ratchet changes.

Validation: full remaining shard 65/65 passed (44.42s); final hydration
7/7 passed (42.66s) after the behavior-neutral mock-reference lint fix.
Both coverage groups passed; the snapshot remains applicable across that
reference-only change. Final check:changed exited 0, including types,
boundaries, dead exports, and extension lint (0 warnings, 0 errors).
Local oxfmt, plain oxlint, and diff checks passed. No hosted CI or autoreview
was run under this shard workflow. Lease-expiry retries only affected source
preparation; completed failing gate attempts were stopped before blind retry.
Port t0068 onto the campaign lane while retaining the interval-only fake timers and both typing cases updated on main.

Validation: Testbox passed all 18 tests (14 tool-response, 4 typing), with no skips. oxlint, oxfmt --check, and git diff --check passed. Independent review found no actionable issues.
@clawsweeper

clawsweeper Bot commented Sep 28, 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: discord Channel integration: discord gateway Gateway runtime agents Agent runtime and tooling size: XL labels Sep 28, 2026
@steipete
steipete enabled auto-merge (squash) September 28, 2026 13:53
@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 28, 2026
@clawsweeper

clawsweeper Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 28, 2026, 10:07 AM ET / 14:07 UTC (Revision 2).

ClawSweeper review

What this changes

The branch consolidates and removes tests for Discord, Gateway sessions, onboarding, prepared models, heartbeat, and cron, and removes two line-limit baseline entries.

Merge readiness

⛔ Blocked before merge - 6 items remain

This cleanup remains useful because current main still contains the tests it removes. Two distinct onboarding regression checks lose focused coverage, so the branch is not ready to merge.

Priority: P3
Reviewed head: a2eabf5fdb92e6a8388a43800c5a5cfa93338225

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The branch has substantial focused validation, but two distinct regression checks need to survive the cleanup.
Proof confidence 🐚 platinum hermit (4/6) Not applicable: This maintainer test-only branch changes no production behavior or stored-data contract. The PR body reports pinned-head Testbox execution of the surviving suite; that run does not establish retention of the two removed regression checks.
Patch quality 🦐 gold shrimp (3/6) Security review found an item that needs attention.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer test-only branch changes no production behavior or stored-data contract. The PR body reports pinned-head Testbox execution of the surviving suite; that run does not establish retention of the two removed regression checks.
Evidence reviewed 10 items Per-provider check removed: The introduced diff deletes the test that required the hosted memory-import authority guard immediately before each of two provider applies, as well as a single-provider rejection test.
Guard remains on the production path: The memory-import step invokes beforeApply inside its loop, directly before each provider apply.
Surviving authority test has narrower scope: The remaining migration-resource test verifies rejection before one provider's first apply; it does not check a second authorization after an earlier provider finishes.
Findings 2 actionable findings [P2] Restore the per-provider memory-import authority check
[P2] Keep the committed-import recovery case after config edits
Security Needs attention Per-provider authorization check loses focused coverage: The hosted memory-import caller supplies a live authority and config guard, but the deleted two-provider test was the focused check that the guard runs again before the second copy.

How this fits together

These suites exercise OpenClaw behavior at channel, agent, Gateway, and setup boundaries. Their assertions feed the test and CI results maintainers use to detect regressions before merging.

flowchart LR
A[Product behavior] --> C[Focused test suites]
B[Test fixtures] --> C
C --> D[Assertions]
D --> E[Test and CI results]
E --> F[Maintainer review]
Loading

Before merge

  • Restore the per-provider memory-import authority check (P2) - The deleted case was the focused check that beforeApply runs immediately before each selected provider copy. The surviving failure case covers only one provider, so validating once and then copying from a second provider after authority changes would pass. This is a late finding on the unchanged previously reviewed head.
  • Keep the committed-import recovery case after config edits (P2) - This deletion removes the positive check that a committed promotion can resume after a legitimate later config edit. The remaining positive case uses the original target config, so a new hash requirement for committed journals could block recovery without failing tests. This is a late finding on the unchanged previously reviewed head.
  • Resolve security concern: Per-provider authorization check loses focused coverage - The hosted memory-import caller supplies a live authority and config guard, but the deleted two-provider test was the focused check that the guard runs again before the second copy.
  • Resolve merge risk (P1) - Without a two-provider check, the test suite would miss a change that authorizes once and then copies from a later provider after hosted authority or configuration changes.
  • Resolve merge risk (P1) - Without the positive committed-journal case, the test suite would miss recovery becoming blocked after a legitimate later configuration edit.
  • Complete next step (P2) - Restore the per-provider authority-order check and the committed-recovery-after-config-edit check before merge.

Findings

  • [P2] Restore the per-provider memory-import authority check — src/wizard/setup.memory-import.test.ts:198-200
  • [P2] Keep the committed-import recovery case after config edits — src/wizard/setup.migration-stage.test.ts:399-400
  • [medium] Per-provider authorization check loses focused coverage — src/wizard/setup.memory-import.test.ts:200
Agent review details

Security

Needs attention: No production authority or supply-chain code changes, but the branch removes a distinct authorization-boundary regression check.

PR surface

Tests -11858, Other -2. Total -11860 across 57 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 56 5128 16986 -11858
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 0 2 -2
Total 57 5128 16988 -11860

Review metrics

None.

Merge-risk options

Maintainer options:

  1. Retain the distinct regression checks (recommended)
    Restore the two-provider authorization-order check and the committed-recovery-with-config-edit check within the consolidated suites.
Copy recommended automerge instruction
@clawsweeper automerge

Special instructions:
Restore focused tests proving beforeApply runs before each selected memory-import provider's apply and committed migration recovery accepts a later legitimate config edit; keep the production code unchanged and run the two affected test files.

Technical review

Best possible solution:

Keep the reduced suite while retaining one focused check for authorization before every provider copy and one for committed-import recovery after a valid config edit.

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

Not applicable: this PR maintains tests rather than reporting a runtime bug. The coverage gaps are visible by comparing the deleted cases with the surviving tests and production branches.

Is this the best way to solve the issue?

No, not yet. Fixture consolidation is a reasonable approach, but these two distinct regression checks should survive it.

Full review comments:

  • [P2] Restore the per-provider memory-import authority check — src/wizard/setup.memory-import.test.ts:198-200
    The deleted case was the focused check that beforeApply runs immediately before each selected provider copy. The surviving failure case covers only one provider, so validating once and then copying from a second provider after authority changes would pass. This is a late finding on the unchanged previously reviewed head.
    Confidence: 0.9
    Late finding: first raised on code an earlier review cycle already covered.
  • [P2] Keep the committed-import recovery case after config edits — src/wizard/setup.migration-stage.test.ts:399-400
    This deletion removes the positive check that a committed promotion can resume after a legitimate later config edit. The remaining positive case uses the original target config, so a new hash requirement for committed journals could block recovery without failing tests. This is a late finding on the unchanged previously reviewed head.
    Confidence: 0.87
    Late finding: first raised on code an earlier review cycle already covered.

Overall correctness: patch is incorrect
Overall confidence: 0.86

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 3e0def1451b3.

Labels

Label changes:

  • add merge-risk: 🚨 security-boundary: Deleting the two-provider guard check weakens CI's ability to detect a later unauthorized hosted memory copy.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🐚 platinum hermit and patch quality is 🦐 gold shrimp.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: This maintainer test-only branch changes no production behavior or stored-data contract. The PR body reports pinned-head Testbox execution of the surviving suite; that run does not establish retention of the two removed regression checks.
  • remove rating: 🐚 platinum hermit: Current PR rating is rating: 🦐 gold shrimp, so this older rating label is no longer current.
  • remove status: 👀 ready for maintainer look: Current PR status label is status: ⏳ waiting on author.

Label justifications:

  • P3: This is internal test maintenance with no production behavior change.
  • merge-risk: 🚨 security-boundary: Deleting the two-provider guard check weakens CI's ability to detect a later unauthorized hosted memory copy.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🐚 platinum hermit and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: This maintainer test-only branch changes no production behavior or stored-data contract. The PR body reports pinned-head Testbox execution of the surviving suite; that run does not establish retention of the two removed regression checks.

Evidence

Security concerns:

  • [medium] Per-provider authorization check loses focused coverage — src/wizard/setup.memory-import.test.ts:200
    The hosted memory-import caller supplies a live authority and config guard, but the deleted two-provider test was the focused check that the guard runs again before the second copy.
    Confidence: 0.9

Acceptance criteria:

  • [P1] node scripts/run-vitest.mjs src/wizard/setup.memory-import.test.ts src/wizard/setup.migration-stage.test.ts.
  • [P1] node scripts/check-changed.mjs --dry-run -- src/wizard/setup.memory-import.test.ts src/wizard/setup.migration-stage.test.ts.
  • [P1] git diff --check.

What I checked:

Likely related people:

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

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Restore the two focused checks and report the affected test files' results.

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.

History

Review history (1 earlier review cycle)
  • reviewed 2026-09-28T13:58:14.409Z sha a2eabf5 :: blocked before merge. :: none

@clawsweeper clawsweeper Bot added merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed 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 28, 2026
@steipete
steipete merged commit 7ceb563 into main Sep 28, 2026
166 of 168 checks passed
@steipete
steipete deleted the tcr/land-d085-1790594784 branch September 28, 2026 14:26
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 29, 2026
…tests (batch d085) (openclaw#160481)

* test(discord): deslop t0072 tests

* test(gateway): deslop t0059 tests

* test(wizard): deslop t0073 tests

* test(agents): deslop t0079 tests

* test(discord): deslop t0069 tests

Remove duplicate context projections, thread-policy and preview matrix rows,
reply-hydration variants, and mocked core binding/retry replays. Reuse local
hydration and durable-recovery fixtures. Keep both original Vitest projects.

Tests: 103 -> 65 (-36.9%). Test LOC: 3294 -> 2229 (-32.3%).
Coverage: statements 1954 -> 1946 (-0.41%); branches 1457 -> 1451 (-0.41%);
functions 373 -> 368. Both groups included; no file loses >3 statements.
The requested 50% reduction was not reached. Retention rationale follows.

R1 = distinct covered owner statements/branches; R2 = verified regression;
R3 = security boundary. Table rows below remain separate executed cases.

ack-policy:
- Current policy, account undefined/off (2): R1 global fallback/account override;
  R2 695e50f acknowledgement changes without reconnecting.
bot-self-filter:
- Skip own messages before debounce: R1 early self-filter completion branch.
debounce-policy:
- Change timing without losing queued messages: R1 multi-original flush and
  cancellation of pending entries.
debounce-reply-target:
- Separate ordinary batch and another-message reply: R1 reply-key partition;
  R2 21bcb7c.
preflight-channel-context:
- Unicode display names preserve matching slug: R2 5e837c1.

context:
- Batched/singleton identities (2): R1 both source-ID projection branches.
- Bot sender, host builder and live owner authority: R2 f6bd064,
  e0e72a8, 17b26dc; R3 revocation and opaque route authority.
- Canonical guild ID: R2 ffb2614.
- PluralKit remains human: R2 f6bd064; R1 proxy sender branch.
- Forwarded media recorded once: R1 room-event recording and frozen provenance.
- Forwarded command text stays ordinary content: R2 ff56fbb; R3 provenance.
- Missing attachment notice: R2 0644c5f; R1 singular notice.
- Escaped malicious transcript: R2 15cc80f; R3 untrusted framing.
- Plural notice/resolved attachment: R1 plural and resolved-media branches.

context-history:
- Quiet ingress/debounced originals: R1 native recovery entry and exclusions;
  R2 ddca0dd.
- Pagination: R1 second physical REST page.
- Allowlisted identities: R1 filtering; R3 sender visibility.
- Cold role lookup: R1 native guild-member read.
- Unchanged/replaced cached media (2): R1 both media-identity branches.
- REST failure without stale fallback: R1 catch; R3 stale context exclusion.
- Zero history: R1 no-fetch history branch.
- Bound-session reset cutoff: R1 bound scope/cutoff; R3 reset isolation.
- Existing tombstone: R1 no-recovery state; R3 reset isolation.
- Abort/policy/reset/tombstone during REST (4): R1 distinct invalidation guards;
  R3 authority and lifecycle revalidation.
- Active thread/cross-room/future rows: R1 filtering; R3 conversation isolation.
- Auto-thread parent history and parent ID: R1 auto-thread exclusion;
  R2 0aafd7e.
- Other-bot history excluding self: R2 b312707.

preflight-owned-threads:
- Schema overrides/default/type rejection: R1 restoring this case recovered
  45 config-schema statements and 17 branches in the measured comparison.
- Explicit relaxed policy/automatic thread/guild override (3): R1 distinct
  mention-policy resolution paths.
- Strict explicit mention/implicit reply (2): R1 acceptance and rejection.
- Human-owned thread: R1 ownership mismatch.
- Disallowed sender: R3 sender authorization.

draft-preview.rest:
- Accepted/refused handoff (2): R1 adoption branches; R2 6573afc.
- Late handoff with queued preview: R1 changed-message-ID ownership branch.
- Retained preamble after final gate: R1 delayed publication; R2 6573afc.
- Missing ID/failed edit (2): R1 distinct unconfirmed-receipt guards.
- Authority revoked while awaiting receipt: R3 live authority.
- Block-mode plan retract/resume: R1 chunker, progress deletion and reset.
- Error final retains draft: R1 final-delivery retention lifecycle.
- Late queued preview/teardown with repeated delete failure (2): R1 distinct
  cleanup paths; R2 7e91c2d.

hydration:
- Partial internal message/getters: R1 partial reconstruction and metadata.
- Failed current-message hydration: R1 unavailable outcome.
- Empty bot reply in referenced channel: R1 empty nested payload;
  R2 da471a8 and b312707.
- Mismatched nested reply success/failure (2): R1 invalid payload recovery and
  discard branches; R3 exclusion of unrelated reply context.
- Missing reply fetch failure: R1 original-message fallback.
- Deleted/forwarded references: R1 intentional no-hydration branches.

ingress-recovery:
- Cancellation routes and replacement: R1 dispatch/buffer/preflight cancellation
  and exhausted-row settlement; R2 2cd1614.
- Pending admission shutdown: R1 active admission ownership and draining.
- Exhausted queued processing failure: R1 queued abandonment and follower release.
- Started job returns/throws after cancellation (2): R1 success/catch cancellation;
  R2 17b26dc.
- Queued job skipped on deactivation: R1 skipped-job cleanup; R2 17b26dc.

Removed core stale-binding replays are owned by get-reply.binding-route-owner,
dispatch-from-config.binding-activity, dispatch-from-config.ordinary-hook-route-change,
and ingress-retry-policy tests; the removed Discord hooks built the route and
context themselves. Removed visibility-only mock proof is covered through
message-handler.process.draft-progress's unacknowledged-preamble case.

No production or shared support edits. Baseline tests were green. Restored
schema coverage after the first comparison and reverted a shared-helper reuse
that orphaned an out-of-scope export. No test retries, skips, timeout increases,
weakened assertions, or config/ratchet changes.

Validation: full remaining shard 65/65 passed (44.42s); final hydration
7/7 passed (42.66s) after the behavior-neutral mock-reference lint fix.
Both coverage groups passed; the snapshot remains applicable across that
reference-only change. Final check:changed exited 0, including types,
boundaries, dead exports, and extension lint (0 warnings, 0 errors).
Local oxfmt, plain oxlint, and diff checks passed. No hosted CI or autoreview
was run under this shard workflow. Lease-expiry retries only affected source
preparation; completed failing gate attempts were stopped before blind retry.

* test(discord): deslop t0070 tests

* test(heartbeat): deslop t0068 tests

Port t0068 onto the campaign lane while retaining the interval-only fake timers and both typing cases updated on main.

Validation: Testbox passed all 18 tests (14 tool-response, 4 typing), with no skips. oxlint, oxfmt --check, and git diff --check passed. Independent review found no actionable issues.

* test(agents): deslop t0077 tests

* test(agents): deslop t0080 tests

* test(cron): deslop t0088 tests

* test(cron): narrow the scheduled policy fixture type
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling channel: discord Channel integration: discord gateway Gateway runtime merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: XL status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant