feat(model-guard): protect presets and deploy SOURCE builds - #83
Closed
Fernandez81 wants to merge 13 commits into
Closed
feat(model-guard): protect presets and deploy SOURCE builds#83Fernandez81 wants to merge 13 commits into
Fernandez81 wants to merge 13 commits into
Conversation
- 使用 RAII 所有权封装接收外部 BMRuntime - 覆盖空句柄和失败释放路径,避免重复释放与泄漏 Signed-off-by: Fernandez <yuanhaon81@gmail.com>
- 固定正式 Guard 动态库、公开头文件、ABI、依赖和 release 清单 - 增加 SDK 一致性验证器,不包含 Guard 源码、provisioner 或私密材料 Signed-off-by: Fernandez <yuanhaon81@gmail.com>
- 由 ModelLoadPolicy 识别 preset CEMC 并统一经四个 CMG_2.0 接口加载 - 接入 Graph、推理组件和 Qwen 路径,不选择或传递逐模型 license Signed-off-by: Fernandez <yuanhaon81@gmail.com>
- 将两个 BM1688 preset 替换为正式 CEMC 分发制品 - 保持仓库仅包含预期的受保护模型二进制 Signed-off-by: Fernandez <yuanhaon81@gmail.com>
- 验证正式签名归档并通过不可变 release 目录完成原子激活 - 提供 bootstrap、健康检查、失败回滚和事务恢复测试 Signed-off-by: Fernandez <yuanhaon81@gmail.com>
- PacketUpgrade 仅接收正式签名发布归档并交给受信事务入口 - 同步系统服务、前端上传规则、双语提示和接口测试 Signed-off-by: Fernandez <yuanhaon81@gmail.com>
- 保留 public-runtime 与 production-release 配置并固定正式 Guard SDK - 在 Sophon Docker 中生成、审计受保护包和完整测试制品 Signed-off-by: Fernandez <yuanhaon81@gmail.com>
- 提供仅含 install/status 的 SOURCE 直接安装和启动入口 - 不保留旧应用或回滚状态,也不访问 Guard 证书目录 Signed-off-by: Fernandez <yuanhaon81@gmail.com>
- 归并 Guard v2.3、单设备证书、正式签名发布和 SOURCE 流程 - 更新中英文部署、排障和 API 说明 Signed-off-by: Fernandez <yuanhaon81@gmail.com>
- 删除持久状态、失败自动恢复和 payload 摘要的过期描述 - 明确无备份安装、失败保留新树以及 status 的实际输出 Signed-off-by: Fernandez <yuanhaon81@gmail.com>
- 删除依赖快照、SDK/ABI 清单和非密码学文件状态门禁 - SOURCE 与 production-release 只消费实际 Guard 接口和必要产物 - 保持设备证书、CEMC 认证及正式发布签名流程不变 Signed-off-by: Fernandez <yuanhaon81@gmail.com>
- 统一 SOURCE 可部署包的构建、安装和状态说明 - 记录单设备证书授权全部 preset 的操作与错误处理 - 补充中英文部署、排障及无备份行为说明 Signed-off-by: Fernandez <yuanhaon81@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add the public CosmoEdge side of Model Guard v2.3 and make source-modified
BM1688 builds directly deployable as SOURCE packages.
The runtime uses one device-bound certificate for all current and future preset
models. It does not use per-model licenses, model allowlists, dependency
snapshots, or SDK admission manifests. Signed production releases remain a
separate supported workflow.
Related issue
Closes #59
Closes #63
Root cause
Preset models previously had no uniform protected loading path, while modified
source builds could not be installed without going through production release
signing. Earlier iterations also accumulated admission metadata and deployment
state that were not needed to protect models.
Scope
In scope
CMG_2.0loading for protected preset models;installandstatus;Out of scope
Risk tags
Type of change
Area
Candidate identity
b3fcd6cdd565681d1db8b0fe23fc228bfbeffb724e618bc9a865a4368effec66d7155b293986b67c2e19085f27d1d2576d1b059f96ef15f657854ecf3bc92e25d0898b83e5afed92f7979c4ebe4be677a849157d2509cca09448ba0003ed0d5d5c2076ec411690af25e9068d0d750d20e29c47021428d7cdaa3d583bThe branch was rebased onto the listed base before this evidence was collected.
It was not amended, rebased, or merged afterward.
Verification
Parent baseline
PASS: the protected runtime, installer, and bundled Guard SDK paths are absent
from
origin/main; the feature is newly introduced rather than a regressionfix.
Candidate checks
Risk-based evidence
added.
candidate is not yet recorded.
provisioning, private trust, bootstrap, and obsolete SDK manifest entries are
absent.
Documentation impact
Compatibility and deployment impact
deployment scripts, or model artifacts.
The public Guard ABI remains
CMG_2.0with SONAMElibcosmo_model_guard.so.2. Protected preset loading requires a validdevice-bound certificate.
Third-party code and assets
generated assets.
documented.
The two added protected preset artifacts are first-party distributable
artifacts, not third-party or plaintext model weights.
Security and release checklist
Signed-off-by:according to theDCO-style requirement in
CONTRIBUTING.md.CONTRIBUTING.mdandCODE_OF_CONDUCT.md.Acceptance and cleanup
candidate
checks.
packages are included.
Notes for reviewers
Suggested review order follows the 11 commits:
This is intentionally a draft until candidate-specific BM1688 evidence is
attached.