Skip to content

test(extensions): remove type-only probe contracts - #124190

Merged
steipete merged 1 commit into
mainfrom
test/remove-channel-type-contract-tests
Aug 15, 2026
Merged

steipete merged 1 commit into
mainfrom
test/remove-channel-type-contract-tests

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Removes channel tests that only ask TypeScript whether a declared channel-specific result type is assignable to the base type it directly extends.

Three complete probe-contract files and the type-only cases inside Discord, Telegram, and Slack directory suites re-stated production declarations such as SignalProbe = BaseProbeResult & ... and DiscordTokenResolution = BaseTokenResolution & .... They had no runtime input or independent protocol/schema source.

Why This Change Was Made

Production typechecking already enforces these relationships at the declarations and every typed owner return/caller boundary. Substantive owner tests remain for probe behavior, token resolution, status/setup surfaces, directory filtering, unresolved SecretRefs, live Slack identity, and Discord intents.

The six cases originated together as coverage relocation rather than a demonstrated behavior regression. Keeping them adds maintenance churn whenever private type organization changes without increasing failure detection.

User Impact

No behavior change. Extension tests remain focused on runtime behavior and independently meaningful contracts.

Evidence

  • Discord, iMessage, LINE, Telegram, Signal, and Slack owner suites: 200 tests passed across 6 Vitest shards.
  • The extensionTests changed gate passed through the documented trusted-source local fallback because no Crabbox/Testbox provider was ready. Typecheck, formatting, lint, dead-export scans, plugin boundaries, and architecture guards passed.
  • git diff --check passed.
  • Fresh structured autoreview reported no accepted/actionable findings.

Production delta: 0. Tests: +3/-61, net -58. No docs, config, schema, protocol, dependency, or changelog change.

AI-assisted: yes.

@clawsweeper

clawsweeper Bot commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@openclaw-barnacle openclaw-barnacle Bot added channel: discord Channel integration: discord channel: imessage Channel integration: imessage channel: line Channel integration: line channel: signal Channel integration: signal channel: slack Channel integration: slack channel: telegram Channel integration: telegram size: S labels Aug 15, 2026
@steipete
steipete marked this pull request as ready for review August 15, 2026 14:52
@openclaw-barnacle openclaw-barnacle Bot added the maintainer Maintainer-authored PR label Aug 15, 2026
@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 Aug 15, 2026
@clawsweeper

clawsweeper Bot commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 15, 2026, 10:58 AM ET / 14:58 UTC.

ClawSweeper review

What this changes

The PR removes six compile-time-only extension tests that restate probe and token types’ direct inheritance from shared channel contracts.

Merge readiness

⚠️ Ready for maintainer review - 1 item remains

Keep open for normal maintainer handling. This is a narrow, source-supported test-value cleanup, and the protected maintainer label prevents automated cleanup closure.

Priority: P3
Reviewed head: bcb1885fd3d94f8a4754ac704e700e6265d84f7c

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, behavior-neutral cleanup with source-backed rationale and retained owner-level behavior coverage.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-authored test-only cleanup has no changed real user behavior to demonstrate.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-authored test-only cleanup has no changed real user behavior to demonstrate.
Evidence reviewed 5 items Direct type relationship: Current main defines Discord probe and token types as intersections with the shared base types, so the removed one-way assignability assertions restate the declarations.
Shared contract remains independently guarded: The public SDK subpath re-exports the base types and separately checks that those public exports align with their core definitions.
Behavior coverage remains: Current extension suites retain concrete probe, token-resolution, transport, and directory tests; the changed assertions have no runtime input or observable assertion.
Findings None None.
Security None None.

How this fits together

Channel extensions define probe and token result types used by channel health and setup flows. Shared SDK contracts provide their common fields, while extension suites cover concrete runtime probing, token resolution, and directory behavior.

flowchart LR
  A[Shared channel contracts] --> B[Extension probe and token types]
  B --> C[Channel health and setup flows]
  B --> D[Compile-time checks]
  C --> E[Runtime behavior tests]
  D --> E
Loading

Before merge

  • Complete next step (P2) - No repair is needed; route this maintainer-labelled cleanup through normal review and merge handling.
Agent review details

Security

None.

PR surface

Tests -55. Total -55 across 6 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 6 3 58 -55
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 6 3 58 -55

Review metrics

Metric Value Why it matters
Production vs test LOC production 0; tests +3/-58 (net -55) The patch only removes type-only test code and leaves runtime, configuration, SDK, and protocol surfaces unchanged.

Technical review

Best possible solution:

Remove the redundant extension-local assertions while retaining the shared SDK export contract checks and runtime-focused owner tests.

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

Not applicable: this PR removes compile-time-only checks rather than repairing a runtime failure; source shows the assertions repeat direct type intersections.

Is this the best way to solve the issue?

Yes. Removing tests that only restate their own type declarations is the narrowest maintainable cleanup, while public SDK export and runtime behavior coverage remain.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P3: This is a low-risk test-maintenance cleanup with no user-visible 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-authored test-only cleanup has no changed real user behavior to demonstrate.

Label justifications:

  • P3: This is a low-risk test-maintenance cleanup with no user-visible 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-authored test-only cleanup has no changed real user behavior to demonstrate.

Evidence

What I checked:

Likely related people:

  • steipete: Blame attributes the shared base types, concrete type declarations, and removed Discord checks to the same commit. (role: introduced the shared contract and original coverage relocation; confidence: high; commits: ee6556141033; files: src/channels/plugins/types.core.ts, extensions/discord/src/directory-contract.test.ts, extensions/imessage/src/probe.ts)

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

Copy link
Copy Markdown
Contributor Author

Land-ready proof for bcb1885fd3d94f8a4754ac704e700e6265d84f7c:

Production delta: 0. Tests: +3/-61, net -58. No behavior, docs, config, schema, protocol, dependency, or changelog change.

@steipete
steipete merged commit c0824d2 into main Aug 15, 2026
212 checks passed
@steipete
steipete deleted the test/remove-channel-type-contract-tests branch August 15, 2026 15:02
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: discord Channel integration: discord channel: imessage Channel integration: imessage channel: line Channel integration: line channel: signal Channel integration: signal channel: slack Channel integration: slack channel: telegram Channel integration: telegram 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