fix(ci): restore channel import guardrails#49378
Conversation
Greptile SummaryThis PR restores CI guardrails for channel import boundaries by redirecting three plugin-sdk files ( Key changes:
One minor style observation: the three Confidence Score: 5/5
Prompt To Fix All With AIThis is a comment left during a code review.
Path: extensions/line/setup-entry.ts
Line: 3-4
Comment:
**Redundant import statements alongside re-exports**
`lineSetupAdapter` and `lineSetupWizard` are imported on lines 3–4 but never used directly in module logic — they're only re-exported via `export { ... } from "..."` on lines 7–8. In ESM (and TypeScript), `export { X } from "./module"` creates the re-export binding directly without needing a prior `import` of the same name. These import statements create unused local bindings and can be safely removed.
The same redundant pattern exists in `extensions/nostr/setup-entry.ts` line 3 (`nostrSetupAdapter, nostrSetupWizard`) and `extensions/synology-chat/setup-entry.ts` line 3 (`synologyChatSetupAdapter, synologyChatSetupWizard`).
```suggestion
import { defineSetupPluginEntry } from "openclaw/plugin-sdk/core";
import { lineSetupPlugin } from "./src/channel.setup.js";
```
How can I resolve this? If you propose a fix, please make it concise.Last reviewed commit: "fix(ci): restore cha..." |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: df21369640
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
Addressed the AI review feedback. What changed:
CI note:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5d9485fb8a
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
Follow-up on the two Codex review comments:
I resolved both review threads because the current branch no longer has the |
|
Please don't make PRs for test failures on main. The team is aware of those and will handle them directly on the codebase, not only fixing the tests but also investigating what the root cause is. Having to sift through test-fix-PRs (including some that have been out of date for weeks...) on top of that doesn't help. There are already way too many PRs for humans to manage; please don't make the flood worse. Thank you. |
Summary
AI-assisted: yes (Cursor). Testing: partially blocked by unrelated upstream validation failures.
mainstill leavessrc/plugin-sdk/channel-import-guardrails.test.tsred after the recent plugin-sdk seam refactors.extensions/*/src/*imports or trip a false-positive regex.line,nostr, andsynology-chatsetup exports onto publicsetup-entry.jsseams; updated the Matrix contract registry to use the publicextensions/matrix/index.jsseam; tightened the extension-to-extension regex so core../../../src/...imports are not misclassified as sibling-extension imports.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
User-visible / Behavior Changes
None.
Security Impact (required)
Yes/No) NoYes/No) NoYes/No) NoYes/No) NoYes/No) NoYes, explain risk + mitigation:Repro + Verification
Environment
Steps
main.bunx vitest run --config vitest.unit.config.ts src/plugin-sdk/channel-import-guardrails.test.ts.src/plugin-sdk/line.ts,src/plugin-sdk/nostr.ts,src/channels/plugins/contracts/registry.ts, plus a false-positive extension-to-extension regex hit.Expected
Actual
mainbecause a few remaining core entrypoints still importextensions/*/src/*directly and one regex still misclassifies core../../../src/...imports.Evidence
Attach at least one:
Human Verification (required)
What you personally verified (not just CI), and how:
bunx vitest run --config vitest.unit.config.ts src/plugin-sdk/channel-import-guardrails.test.tspasses after this change.setup-entry.js/index.jsseams and the regex no longer flags core../../../src/...imports as sibling-extension imports.Review Conversations
If a bot review conversation is addressed by this PR, resolve that conversation yourself. Do not leave bot review conversation cleanup for maintainers.
Compatibility / Migration
Yes/No) YesYes/No) NoYes/No) NoFailure Recovery (if this breaks)
3ac6419e9.setup-entry.ts,src/plugin-sdk/*.ts, andsrc/channels/plugins/contracts/registry.tsfiles.Risks and Mitigations
Unrelated Validation Failures
These came from untouched upstream files and are not caused by this 8-file diff:
pnpm buildcurrently fails inextensions/tlon/src/monitor/media.tswith an unresolved../api.jsimport.pnpm checkcurrently fails on existing formatting drift in untouchedextensions/mattermost/src/*andextensions/tlon/src/*files.pnpm test, but the repo'snode scripts/test-parallel.mjswrapper did not produce a final summary before hanging in this environment, so I am not claiming a full-suite pass here.Made with Cursor