[Feature] 将 Viva 插件 scheme 与函数 ID 校验下沉 Rust Core
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 18/100
Research direction
Start with desktop/internal/pluginservice/hostcontent.go, where validScheme, validFunctionID and reservedSchemes define the rules, then check their callers in hostcommands.go, hostcodelens.go, hostactions.go, hostproviders.go and toolwindows.go. Moving the rules into the Rust Core needs boundary-value contract fixtures and a Go bridge, and it must leave session ownership and callback checks in the host. Done means the same inputs are accepted and rejected as before across all callers.
Written by the indexing model from the issue text.
Description
Problem to solve / 要解决的问题
Viva 的通用插件输入校验仍由 Go 层持有:desktop/internal/pluginservice/hostcontent.go 的 validScheme、validFunctionID、reservedSchemes 定义 URI scheme 字符集、长度、保留名单以及函数 ID 字符集和长度。这些不依赖平台 I/O,应按当前架构由 Rust Core 提供唯一规则。
以 preview 修订 607f00967d70a7017d49805183d0d2e6ffdf1c0d 为基线,对 desktop、scripts、.github 检索这些符号,函数 ID 校验还用于 hostcommands.go、hostcodelens.go、hostactions.go、hostproviders.go、toolwindows.go;不是无调用代码。保留代价是契约规则由宿主自行维护,其他宿主或 SDK 演进时容易出现不同的接受范围。当前没有证据表明这些字符集已造成错误拒绝。
Proposed solution / 建议方案
把上述确定性校验迁入 Core,补充契约 fixture 后由 Go 桥接调用。保留当前合法/非法输入、长度和保留 scheme 行为;会话所有权、已注册回调查验与资源释放仍由宿主执行。应先覆盖边界值,再检查所有调用方,避免迁移改变授权行为。
Target platform / 目标平台
Cross-platform / 跨平台
Area / 模块
Extensions / 扩展
Priority / 优先级
P2 / 后续考虑:目前不着急,可安排到后续版本
Alternatives considered / 已考虑的替代方案
继续在每个宿主维护校验会扩大契约漂移风险;本次 Java 预发布核验不顺手改这些规则,以免混入无关兼容性变化。
Additional context / 补充信息
静态归属检查;不是 .class 跳转失败的根因。已查重 contentProvider、虚拟文档 Core、validFunctionID,并阅读 #1662:该旧双端清单没有覆盖当前 Viva hostcontent 的这组规则。本报告不包含用户源码、路径、诊断包或业务类。
Checklist / 提交前检查
- I searched existing issues for duplicates. / 我已搜索现有 Issue,确认没有重复建议。
- Dominant language
- TypeScript
- Stars
- 1.8k
- Forks
- 151
- Avg merge
- 3h 48m
- Merged PRs (30d)
- 571
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from 1lck/Lithe-IDEA
-
review: medium
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
1lck/Lithe-IDEA#2432 ·
Maintainers usually reply within 1 day
-
review: medium
Difficulty 1/5 Under an hour Newbie friendliness 82/100
1lck/Lithe-IDEA#2431 ·
Maintainers usually reply within 1 day
-
refactor review: high
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
1lck/Lithe-IDEA#2376 ·
Maintainers usually reply within 1 day
-
area:ui enhancement P2 platform:cross-platform refactor review: high
Difficulty 1/5 Under an hour Newbie friendliness 84/100
1lck/Lithe-IDEA#2365 ·
Maintainers usually reply within 1 day
-
review: medium
Difficulty 3/5 1-2 days Newbie friendliness 57/100
1lck/Lithe-IDEA#2434 ·
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
rel: fix
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Deltares/fews-web-oc#2400 ·
Maintainers usually reply within 1 day
-
Command bar: Tab-to-search on claude.ai falls back to Google site: search instead of opening a prompt on ClaudePossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
ardia-browser/ardia#4426 ·
Maintainers usually reply within 1 day
-
Bug report: isValidISODateDashOnly accepts text before or after the date-timePossibly taken @bardrop claimed this today. Open
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
pnp/cli-microsoft365#7713 ·
Maintainers usually reply within 1 day
-
Diagram: Journey Type: Bug / Error
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
mermaid-js/mermaid-v13#1293 ·
Maintainers usually reply within 1 day