Skip to content

fix(embedding): require verified model usability for status - #511

Merged
Grivn merged 1 commit into
mainfrom
codex/fix-494-embedding-probe-status
Oct 28, 2026
Merged

Grivn merged 1 commit into
mainfrom
codex/fix-494-embedding-probe-status

Conversation

@Grivn

@Grivn Grivn commented Oct 28, 2026

Copy link
Copy Markdown
Collaborator

提交 PR 前请阅读贡献指南、Contributing Guide与开发和验证指南 / Development and Verification Guide。
Before opening a PR, read the Contributing Guide, 贡献指南, and the Development and Verification Guide / 开发和验证指南.
PR 标题和提交信息必须使用 Conventional Commits(type(scope): subject),且不得包含 emoji。 / PR titles and commits must use Conventional Commits (type(scope): subject) and must not contain emoji.
本仓库接受 Bug 修复、兼容性适配、现有能力增强、性能或体验优化和维护类 PR。全新能力、Provider、持久化格式或安全边界变更必须先提 Issue 并获得维护者确认。 / This repository accepts bug fixes, compatibility work, improvements to existing capabilities, performance or UX optimization, and maintenance. New capabilities, Providers, persistence formats, or security-boundary changes require prior maintainer approval in an Issue.
外部贡献者的仅文档类 PR 不直接接受;请先提 Issue 讨论。维护者的发布说明与文档维护不受此限制。 / Documentation-only PRs from external contributors are not accepted directly; open an Issue first. Maintainer release notes and documentation maintenance are exempt.

摘要 / Summary

An online embedding server could make Test status claim that a nonexistent model was usable, even with 100% historical vector coverage. Require Mnemon CLI 0.2.13+ for this check, consume its actual embedding_available model probe without falling back to provider reachability, and show model availability accurately in English and Chinese.

关联 Issue 或背景 / Related Issue or Context

Fixes #494. The CLI implementation was already fixed in mnemon-dev/mnemon#173 and released in v0.2.13. This PR handles older installed binaries and the plugin status presentation; it does not duplicate the provider probe.

涉及区域 / Affected Areas

  • Host 激活、Headless 或 bundle / Host activation, Headless, or bundle
  • 运行时记忆 / Runtime Memory
  • 项目档案 / Project Documents
  • 记忆空间或 Provider / Memory Spaces or Providers
  • 子 Agent 或 Agent 工作流 / Subagent or Agent workflow
  • Web UI 或对话交互 / Web UI or conversation interaction
  • 设置、存储或安全 / Settings, storage, or security
  • CLI、RPC、命令或工具 / CLI, RPC, commands, or tools
  • 安装、更新或发布 / Installation, update, or release
  • 测试、构建或文档 / Tests, build, or documentation
  • 其他(请说明)/ Other (explain below)

PR 类型 / PR Type

  • 面向用户的功能或行为变更 / User-facing feature or behavior change
  • Bug 修复 / Bug fix
  • 增强或优化 / Enhancement or optimization
  • 兼容性适配 / Compatibility change
  • 维护或重构 / Maintenance or refactor
  • 测试或构建 / Tests or build

最新代码确认 / Latest Codebase Confirmation

  • 我已基于最新 main 分支开发,或在提交前已 rebase 或合并最新 main。 / I developed from the latest main, or rebased or merged the latest main before submitting.

同步命令 / Sync command:

git fetch origin main; independent branch based on origin/main at c2433a2b.

AI 编码披露 / AI Coding Disclosure

  • 完全 AI 编码:全部编程改动由 AI 产出,并由贡献者接受和审查。 / Fully AI-coded: AI produced all programming changes, which the contributor accepted and reviewed.
  • 部分 AI 辅助:AI 帮助编写或修改了部分内容。 / Partially AI-assisted: AI helped write or modify part of the change.
  • 未使用 AI 编码辅助。 / No AI coding assistance was used.

使用的 AI 模型 / AI model used:

GPT-6

使用的编码 Agent 工具 / Coding Agent tool used:

Codex

仓库规范检查 / Repository Rules

  • 未修改 DSH 官方源码,未让 tsconfig 指向 DSH 源码 checkout,仅使用正式的 @deepseek-ai/* NPM 契约。 / I did not modify DSH source or point tsconfig at a DSH source checkout, and used only published @deepseek-ai/* NPM contracts.
  • Client 与 Host 边界仍以浏览器安全的 src/host/protocol.ts 为准,没有在两侧重复定义 wire DTO。 / The Client and Host boundary still uses browser-safe src/host/protocol.ts as the source for wire DTOs.
  • 持久化格式、RPC 权限、路径或凭据处理的变更包含兼容或拒绝路径、安全分析和相应测试。 / Changes to persistence formats, RPC authority, paths, or credentials include compatibility or rejection paths, security analysis, and tests.
  • 没有提交 token、密钥、私有记忆、未脱敏日志或生成的 lib/ 文件。 / I did not commit tokens, credentials, private memory, unredacted logs, or generated lib/ files.
  • 用户可见文案和长期文档已同步维护中文与英文版本,命令、配置键和路径保持一致。 / User-facing copy and long-lived documentation are synchronized in Chinese and English, with matching commands, configuration keys, and paths.
  • 会改变发布制品或其元数据的 PR 已添加 changeset;仅测试、CI 或站点文档变更可不添加。 / A PR that changes a published artifact or its metadata includes a changeset; test-only, CI-only, and site-documentation-only changes may omit one.
  • 新增和修改的代码、注释、文档、提交信息不含 emoji。 / New and modified code, comments, documentation, and commits contain no emoji.

兼容性与数据安全 / Compatibility and Data Safety

Only Test status requires a recognized stable CLI version >=0.2.13. Older/custom unrecognized binaries receive an actionable upgrade error; other commands and coverage-only backfill counting retain legacy compatibility. The effective CLI is checked on every explicit test, so updating or rolling back the executable does not reuse a stale success. No storage format, credential, process environment, permission or memory mutation changes. The upstream synthetic probe sends no stored memories and uses the configured provider's normal billing/timeout behavior. Existing vector coverage does not establish compatibility with a newly selected model. Includes a patch changeset for Memory Spaces and synchronized guides.

本地验证 / Local Validation

执行的命令 / Commands run:

pnpm run verify
pnpm exec vitest run plugins/dsh-mnemon-source-memory-spaces/tests/service.spec.ts tests/client-settings.spec.tsx

结果摘要 / Result summary:

  • Six new service regressions failed before the fix because legacy status was accepted. They pass after the fix, including upgrade/rollback, malformed responses and reachability-versus-model semantics.
  • Full final pnpm run verify passed: root 2,245 passed / 7 skipped, all plugin suites, deterministic builds, real Headless activation and package validation. The first run identified the expected bilingual-copy fingerprint change; the reviewed baseline was updated and the full command rerun successfully.
  • Real old/new CLI and UI checks are recorded below.

用户可见变更证据 / Local Feature Evidence

In an isolated real DSH 0.2.1-rc.2 Web profile with this branch built, set the saved endpoint to a loopback fixture that returns model-not-found and the model to missing-model; click Apply then Test status. The visible result was 嵌入模型不可用 · missing-model · 协议 ollama · 已嵌入 0/0(0%). A local screenshot was captured; no real account, secret or memory was used.

Real CLI smoke results, through the Memory Spaces service, using disposable stores with one synthetic memory and 100% stored coverage:

Protocol CLI 0.2.12 missing-model raw result Plugin with 0.2.12 CLI 0.2.13 healthy CLI 0.2.13 missing model CLI 0.2.13 unreachable endpoint
Ollama available=true upgrade required available=true available=false, coverage=100% available=false
OpenAI-compatible available=true upgrade required available=true available=false, coverage=100% available=false

The downloaded 0.2.13 archive was checked against its published SHA-256 before running it.

证据 / Evidence:

@Grivn
Grivn merged commit fa49506 into main Oct 28, 2026
8 checks passed
@Grivn Grivn mentioned this pull request Oct 29, 2026
12 of 28 tasks
@Grivn
Grivn deleted the codex/fix-494-embedding-probe-status branch October 31, 2026 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant