Skip to content

fix(channels): honor trusted plugin activation contracts - #114492

Merged
steipete merged 5 commits into
mainfrom
codex/auto-qa-e2e-regression-fixes
Aug 26, 2026
Merged

steipete merged 5 commits into
mainfrom
codex/auto-qa-e2e-regression-fixes

Conversation

@steipete

@steipete steipete commented Jul 27, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Partially configured channel credentials could falsely activate Slack, Teams, SMS, LINE, or Zalo, while installed official channels and explicit configured intent were mishandled.

Repair

Keep credential-completeness decisions in their channel owners and apply the same trusted activation contract to bundled and officially installed plugin packages. Preserve explicit configuration when ambient credentials are incomplete.

Verification

237 focused owner/sibling tests passed. A clean hosted machine completed a full source build, tarball integrity verification, separately packed Slack plugin installation, onboarding, channel add/status, Doctor, and an agent turn. Independent review and touched-file lint passed.

@openclaw-barnacle openclaw-barnacle Bot added channel: line Channel integration: line channel: msteams Channel integration: msteams channel: nextcloud-talk Channel integration: nextcloud-talk channel: slack Channel integration: slack channel: zalo Channel integration: zalo app: web-ui App: web-ui gateway Gateway runtime scripts Repository scripts commands Command implementations docker Docker and sandbox tooling agents Agent runtime and tooling channel: feishu Channel integration: feishu extensions: openai channel: qqbot channel: qa-channel Channel integration: qa-channel extensions: qa-lab channel: synology-chat extensions: openrouter channel: sms Channel integration: sms size: XL maintainer Maintainer-authored PR labels Jul 27, 2026
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. labels Jul 27, 2026
@clawsweeper

clawsweeper Bot commented Jul 27, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge. Reviewed August 26, 2026, 1:36 AM ET / 05:36 UTC.

ClawSweeper review

What this changes

The PR moves channel activation checks to trusted channel-plugin packages and requires complete credentials before ambient environment variables activate a channel.

Regression provenance

Possible regression — suspected (reviewed change). No predecessor PR is attributed.

Merge readiness

⚠️ Ready for maintainer review - 4 items remain

Keep open: the latest head still regresses established Microsoft Teams blank-config environment fallback behavior, so a runnable channel can be hidden from activation.

Priority: P1
Reviewed head: 088949c9c70eda294da11c0d010854ee96a15b86

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The owner-boundary direction is sound, but an established Teams credential fallback is regressed.
Proof confidence 🌊 off-meta tidepool Not applicable: This member-authored PR is exempt from the external-contributor proof gate; the source-proven functional regression still blocks merge.
Patch quality 🦐 gold shrimp (3/6) 1 actionable review finding remain.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This member-authored PR is exempt from the external-contributor proof gate; the source-proven functional regression still blocks merge.
Evidence reviewed 4 items Runtime credential contract: The current Teams resolver treats blank app ID, tenant ID, certificate path, and password values as absent and falls back to the corresponding environment values.
Introduced activation mismatch: The new checker treats any own config property as authoritative; blank values suppress the runtime fallback, and the added test explicitly asserts that false-negative result.
Feature provenance: The blank certificate fallback was introduced by the Teams fix commit, establishing that blank values are intentionally non-authoritative in this credential path.
Findings 1 actionable finding [P1] Mirror Teams blank-value fallback in the activation checker
Security None None.

Live Verification

Command: node scripts/run-vitest.mjs src/channels/plugins/configured-state.test.ts src/config/channel-configured.test.ts

Result: PASS (completed)

[test] starting test/vitest/vitest.unit-fast.config.ts

 RUN  v4.1.10 /tmp/clawsweeper-live-proof-114492-aIrdIj/target

 ✓  unit-fast  src/channels/plugins/configured-state.test.ts (25 tests) 2699ms
     ✓ resolves Discord, Slack, Telegram, and IRC env probes without full plugin loads  2529ms

 Test Files  1 passed (1)
      Tests  25 passed (25)
   Start at  05:37:45
   Duration  5.24s (transform 1.79s, setup 99ms, import 2.28s, tests 2.70s, environment 0ms)

[test] starting test/vitest/vitest.runtime-config.config.ts

 RUN  v4.1.10 /tmp/clawsweeper-live-proof-114492-aIrdIj/target

 ✓  runtime-config  src/config/channel-configured.test.ts (9 tests) 2502ms
     ✓ requires both Slack identity and transport tokens through the package metadata seam  2386ms

 Test Files  1 passed (1)
      Tests  9 passed (9)
   Start at  05:37:50
   Duration  5.29s (transform 2.02s, setup 59ms, import 2.40s, tests 2.50s, environment 0ms)

[test] passed 2 Vitest shards in 23.36s
[test] starting test/vitest/vitest.unit-fast.config.ts

 RUN  v4.1.10 /tmp/clawsweeper-live-proof-114492-aIrdIj/target

 ✓  unit-fast  src/channels/plugins/configured-state.test.ts (25 tests) 2567ms
     ✓ resolves Discord, Slack, Telegram, and IRC env probes without full plugin loads  2401ms

 Test Files  1 passed (1)
      Tests  25 passed (25)
   Start at  05:38:08
   Duration  3.76s (transform 512ms, setup 34ms, import 1.01s, tests 2.57s, environment 0ms)

[test] starting test/vitest/vitest.runtime-config.config.ts

 RUN  v4.1.10 /tmp/clawsweeper-live-proof-114492-aIrdIj/target

Assertions:

  • PASS expect_output: Test Files

How this fits together

Channel discovery turns configuration and environment signals into activation candidates for installed and bundled channel plugins. Those candidates affect onboarding, status, and which channel integrations OpenClaw treats as configured.

flowchart LR
  A[Config and environment] --> B[Channel discovery]
  B --> C[Trusted plugin metadata]
  C --> D[Channel-owned credential check]
  D --> E[Activation policy]
  E --> F[Onboarding and channel status]
Loading

Before merge

  • Mirror Teams blank-value fallback in the activation checker (P1) - The runtime resolves blank appId, tenantId, certificate-path, and password fields through the corresponding MSTEAMS_* values, but this checker treats every own config field as an override. A valid config-plus-environment installation is therefore hidden from activation; use the same nonblank fallback contract and reverse the regression assertion at src/channels/plugins/configured-state.test.ts:115.
  • Resolve merge risk (P1) - Merging would hide an otherwise runnable Teams channel when blank stored fields are combined with valid MSTEAMS_* credentials.
  • Resolve merge risk (P1) - The bug-fix branch has a net positive production delta across activation paths; retain only the owner-specific logic needed after the Teams parity repair.
  • Complete next step (P2) - The remaining P1 is a narrow mechanical parity repair in the new Teams lightweight checker.

Findings

  • [P1] Mirror Teams blank-value fallback in the activation checker — extensions/msteams/configured-state.ts:14-18
Agent review details

Security

None.

PR surface

Source +306, Tests +206, Config -9, Generated 0, Other +3. Total +506 across 22 files.

View PR surface stats
Area Files Added Removed Net
Source 7 331 25 +306
Tests 4 211 5 +206
Docs 0 0 0 0
Config 8 23 32 -9
Generated 1 6 6 0
Other 2 21 18 +3
Total 22 592 86 +506

Review metrics

Metric Value Why it matters
Production versus test delta production +355/-57, tests +211/-5, generated +26/-24 The channel activation repair adds owner-specific artifacts, so compatibility coverage must prove the existing fallback contract.
Channel activation contracts 8 channel contracts changed These contracts decide which existing channel setups appear configured to onboarding and status flows.

Stored data model

Persistent data-model change detected: unknown-data-model-change: src/config/bundled-channel-config-metadata.generated.ts, vector/embedding metadata: src/channels/plugins/package-state-probes.ts, vector/embedding metadata: src/config/channel-configured.test.ts. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Restore Teams fallback parity (recommended)
    Treat blank Teams config fields as absent so valid MSTEAMS_* values preserve existing channel activation behavior.

Technical review

Best possible solution:

Make the lightweight Teams probe preserve the runtime’s nonblank config-or-environment fallback contract, then keep the activation checks plugin-owned and lazy.

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

Yes — source reproducible: blank Teams config fields plus complete environment credentials activate in the current resolver but return false in the new checker.

Is this the best way to solve the issue?

No — plugin-owned lightweight discovery is the right boundary, but it must match the existing runtime fallback instead of treating blank fields as overrides.

Full review comments:

  • [P1] Mirror Teams blank-value fallback in the activation checker — extensions/msteams/configured-state.ts:14-18
    The runtime resolves blank appId, tenantId, certificate-path, and password fields through the corresponding MSTEAMS_* values, but this checker treats every own config field as an override. A valid config-plus-environment installation is therefore hidden from activation; use the same nonblank fallback contract and reverse the regression assertion at src/channels/plugins/configured-state.test.ts:115.
    Confidence: 0.99

Overall correctness: patch is incorrect
Overall confidence: 0.99

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P1: The patch can hide a runnable Teams channel from the normal configured-channel workflow.
  • merge-risk: 🚨 compatibility: It changes how stored channel configuration combines with pre-existing MSTEAMS_* environment values.
  • merge-risk: 🚨 message-delivery: A channel excluded from activation cannot receive or deliver configured messages.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool 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 member-authored PR is exempt from the external-contributor proof gate; the source-proven functional regression still blocks merge.

Evidence

Acceptance criteria:

  • [P1] node scripts/run-vitest.mjs src/channels/plugins/configured-state.test.ts src/config/channel-configured.test.ts.

What I checked:

  • Runtime credential contract: The current Teams resolver treats blank app ID, tenant ID, certificate path, and password values as absent and falls back to the corresponding environment values. (extensions/msteams/src/token.ts:100, f61ae1193d0c)
  • Introduced activation mismatch: The new checker treats any own config property as authoritative; blank values suppress the runtime fallback, and the added test explicitly asserts that false-negative result. (extensions/msteams/configured-state.ts:14, 088949c9c70e)
  • Feature provenance: The blank certificate fallback was introduced by the Teams fix commit, establishing that blank values are intentionally non-authoritative in this credential path. (extensions/msteams/src/token.ts:113, 8bcbc3178bf2)
  • Current-main and release check: Current main contains the resolver fallback; the checked latest release commit predates this PR and does not contain its new configured-state artifact, so this PR is not obsolete or implemented on main. (extensions/msteams/configured-state.ts:14, f61ae1193d0c)

Likely related people:

  • steipete: Recent and substantial history covers the Teams credential and channel configuration surfaces, including the current branch. (role: recent area contributor; confidence: high; commits: 7cce91cda984, 3fffb34ba0c0; files: extensions/msteams/src/token.ts, extensions/msteams/src/channel-config.ts)
  • wahaha1223: Authored the merged Teams change that established blank certificate values falling back to environment configuration. (role: introduced blank-value behavior; confidence: high; commits: 8bcbc3178bf2; files: extensions/msteams/src/token.ts)
  • HDYA: Authored the merged federated Teams credential implementation whose resolution contract the new lightweight checker mirrors. (role: feature introducer; confidence: medium; commits: 26f633b604fd; files: extensions/msteams/src/token.ts)

Rank-up moves

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

  • Make the Teams activation checker use nonblank config-or-environment fallback for each credential field.
  • Replace the false-negative fixture with a runtime-compatible regression case.
  • Refresh focused exact-head tests and CI after the fix.

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 (21 earlier review cycles; latest 8 shown)
  • reviewed 2026-08-13T06:15:01.680Z sha a05fa58 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-14T13:13:18.349Z sha a05fa58 :: found issues before merge. :: [P1] Preserve activation for installed official plugins
  • reviewed 2026-08-16T11:27:56.330Z sha a05fa58 :: needs changes before merge. :: [P1] Preserve activation for installed official plugins
  • reviewed August 20, 2026, 3:46 AM ET / 07:46 UTC sha unknown :: needs changes before merge. :: [P1] Preserve activation for installed official plugins
  • reviewed 2026-08-20T07:46:25.060Z sha a05fa58 :: needs changes before merge. :: [P1] Preserve activation for installed official plugins
  • reviewed 2026-08-26T00:20:12.899Z sha 1f82183 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-26T03:35:58.652Z sha 9a8aaf51d252ffafbc9071af3eb9f1da3a93fa4c :: found issues before merge. :: [P1] Preserve Teams environment fallback for blank config fields
  • reviewed 2026-08-26T05:17:25.849Z sha 6f2ae39 :: found issues before merge. :: [P1] Mirror Teams blank-value fallback in the activation checker

@steipete
steipete force-pushed the codex/auto-qa-e2e-regression-fixes branch from 5dd5dfa to 978b78d Compare July 27, 2026 10:16
@steipete
steipete marked this pull request as ready for review July 27, 2026 10:21
@steipete
steipete requested a review from a team as a code owner July 27, 2026 10:21
@clawsweeper clawsweeper Bot added 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 Aug 12, 2026
@RomneyDa
RomneyDa force-pushed the codex/auto-qa-e2e-regression-fixes branch 2 times, most recently from 387c265 to 2ad6746 Compare August 12, 2026 21:54
@openclaw-barnacle openclaw-barnacle Bot added the scripts Repository scripts label Aug 12, 2026
@RomneyDa
RomneyDa force-pushed the codex/auto-qa-e2e-regression-fixes branch from 2ad6746 to 4e55533 Compare August 12, 2026 22:05
@clawsweeper clawsweeper Bot added status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 12, 2026
@RomneyDa
RomneyDa force-pushed the codex/auto-qa-e2e-regression-fixes branch 6 times, most recently from 83e9a5e to a05fa58 Compare August 13, 2026 06:07
@openclaw-barnacle openclaw-barnacle Bot removed the docs Improvements or additions to documentation label Aug 13, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

Land-ready exact head 088949c: Incomplete bundled channel credentials were accepted and trusted installed external plugins were misclassified. Use manifest-owned channel credential probes and canonical installed-plugin provenance, preserving complete account contracts and current generated metadata. Incomplete LINE, Synology, Zalo and sibling credentials fail honestly while genuinely trusted installed plugin packages remain recognized. 219 owner/account/plugin sibling tests, real external package installation, generated catalog and metadata checks, full exact hosted TypeScript and CI gate, and fresh full-branch P1 review pass.

@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: feishu Channel integration: feishu channel: line Channel integration: line channel: msteams Channel integration: msteams channel: nextcloud-talk Channel integration: nextcloud-talk channel: slack Channel integration: slack channel: sms Channel integration: sms channel: synology-chat channel: zalo Channel integration: zalo maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. P1 High-priority user-facing bug, regression, or broken workflow. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. scripts Repository scripts size: L 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