Skip to content

feat(console): the install result says when a package was installed without a protocol compatibility check - #30460

Merged
objectstack-fleet[bot] merged 4 commits into
mainfrom
claude/project-thread-sukiom
Nov 5, 2026
Merged

objectstack-fleet[bot] merged 4 commits into
mainfrom
claude/project-thread-sukiom

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

domain:ui#5 · os-sales · session_01L6bhgWZ1wrAZ2ocZovnByy

Requested by Sales · project thread

Fixes #30326

Clause-②: yes (widening)
Metadata-protocol: none

维护者速读

  • 改了什么:控制台三处安装结果(应用市场软件包详情页「安装」、应用市场目录的组织软件包安装、设置 → 软件包 → 导入)在安装成功的句子下多一行琥珀色提醒:该软件包未声明它支持的平台协议版本(或声明了无法识别的范围),因此安装时没有做兼容性检查,可能无法在当前平台版本上正常运行。按读者语言显示(10 种语言),点名软件包、安装时的平台协议版本,以及无法识别的范围。
  • 为什么改:服务端那一半(PR feat(cloud-connection,metadata-core): an install the protocol handshake admitted unchecked says so in its answer #30409)已经在安装应答里带上 data.protocolCheckSkipped,但控制台只读成功字段,管理员看不到服务器日志,这条提醒被丢掉了。
  • 风险与回滚:只在应答带这个字段时多一行字;检查过范围的安装一字不变;不认识的 reason 原样显示服务端英文句子;回滚即还原本 PR,无数据迁移。
  • 先看:ui/packages/app-shell/src/console/marketplace/protocolCheckSkipped.ts(读字段、选词条)、MarketplacePackagePage.tsx 的 doInstallLocal(四个成功分支都带上提醒)、ui/packages/i18n/src/locales/zh.ts 的 protocolCheckSkipped。
  • 两分钟验证:pnpm --dir ui exec vitest run packages/app-shell/src/console/marketplace/__tests__/protocolCheckSkipped-30326.test.ts packages/app-shell/src/views/metadata-admin/PackagesPage.importProtocolCheckSkipped-30326.test.tsx,预期 8 个用例全绿(需先建 @object-ui/app-shell 的依赖闭包)。
  • 需要你做的:无,席位落地。

What changes

Card #30326, the ui half. The server half landed in PR #30409 (60fe44fdc): POST /api/v1/marketplace/install-local answers data.protocolCheckSkipped on a success answer when the ADR-0087 D1 handshake admitted the package without checking its range, and omits it otherwise.

  • Reader. New console/marketplace/protocolCheckSkipped.ts, modelled on dependencyMissing.ts: protocolCheckSkippedText(answer, t) draws one key per reason (no-range, unparsed-range) from the notice's facts (packageId, protocolVersion, and requiredRange for unparsed-range). A reason this Console does not know, or an unparsed-range without its range, draws the server's message as given. An answer without the field draws nothing. useProtocolCheckSkippedText() binds it to the current locale.
  • The line. New ProtocolCheckSkippedNote.tsx: an amber caution line with a warning icon, drawn inside the existing result note under its own sentence, since the install did succeed.
  • The three surfaces.
    • Package page Install (MarketplacePackagePage.tsx, localResult): every success answer carries it, managed loaded now, managed loaded at restart, unmanaged copy, and the "asked for a copy, installed managed" note.
    • Catalog org install (MarketplacePage.tsx, orgMsg), the installLocal path.
    • Setup → Packages → Import (metadata-admin/PackagesPage.tsx, importMsg).
  • Types. LocalManagedInstallResult and LocalUnmanagedInstallResult gain the optional protocolCheckSkipped (marketplaceApi.ts).
  • i18n (the widening). marketplace.install.protocolCheckSkipped.noRange and .unparsedRange in all 10 locale packs. Import reuses these through the shared hook, as it already does for DEPENDENCY_MISSING, so no engine.packages.* row is added.
  • Changeset. .changeset/30326-install-result-protocol-check-skipped.md, @object-ui/app-shell and @object-ui/i18n patch.

Branch: the harness-assigned claude/project-thread-sukiom, not claude/issue-30326-*; the card is #30326.

Tests

Four new files, 14 cases:

  • protocolCheckSkipped-30326.test.ts (5): no-range facts; unparsed-range facts incl. the range; unknown reason draws the server message; unparsed-range without a range draws the server message; CONTROL: no field, null, undefined, nothing readable draw nothing.
  • MarketplacePackagePage.protocolCheckSkipped-30326.test.tsx (4): managed loaded, managed loaded at restart, unmanaged with an unreadable range; CONTROL: a checked install draws no line. The real marketplaceApi client, one stubbed fetch.
  • MarketplacePage.orgInstallProtocolCheckSkipped-30326.test.tsx (2): org install draws the line; CONTROL: none when checked.
  • PackagesPage.importProtocolCheckSkipped-30326.test.tsx (3): the REAL locale packs, zh no-range sentence and en unparsed-range sentence; CONTROL: none when checked.

Acceptance notes

Verification

Gates and tests ran on a58846c5; the head adds an evidence commit and its removal, the tree is byte-identical (git diff a58846c5 HEAD is empty). Base b6caa141.

Live rig and screenshots (zh-CN, 1440 wide)

examples/app-showcase objectstack dev --seed-admin --fresh on a private port, the console via vite in ui/apps/console with DEV_PROXY_TARGET, Chromium, browser locale zh-CN. The live door, read back before any UI work:

  • POST /api/v1/marketplace/install-local with {"manifest":{"id":"com.acme.probe","version":"1.0.0","type":"app"}} answered protocolCheckSkipped: {reason: "no-range", packageId: "com.acme.probe", protocolVersion: "18.0.0", message: "Package 'com.acme.probe' does not state which platform protocol it supports, ..."}.
  • The same with engines: {protocol: "whatever-1"} answered reason: "unparsed-range", requiredRange: "whatever-1", rangeSource: "engines.protocol".

Before (the reader held to draw nothing with scripts/ablation-replace.mjs --hold, restored after, blob equals HEAD): only 已导入 "com.acme.legacy-before"。刷新应用切换器后即可使用。

before import

After: the same sentence, then com.acme.legacy-crm 未声明它支持的平台协议版本,因此已在平台协议 18.0.0 下安装,未做兼容性检查,可能无法在当前平台版本上正常运行。声明了所支持协议(engines.protocol)的软件包版本会在安装时接受检查。

after import

Tests, ablation, typecheck, lint
  • The four new files: Test Files 4 passed (4), Tests 14 passed (14), lock VERDICT command-exit 0.
  • pnpm --dir ui exec vitest run packages/app-shell/src/console/marketplace/ packages/app-shell/src/views/metadata-admin/PackagesPage packages/i18n/: Test Files 163 passed (163), Tests 2016 passed, 13 skipped, lock VERDICT command-exit 0.
  • Ablation (scripts/ablation-replace.mjs, anchor x1 to x0, blob 1700af14 to 8e4eb802): the reader's first guard replaced by an unconditional return null: 10 failed / 4 passed (the 4 CONTROL cases stay green). Restored, blob equals HEAD, git diff HEAD empty.
  • pnpm --filter @object-ui/app-shell run type-check and pnpm --filter @object-ui/i18n run type-check (tsc --noEmit and tsc -p tsconfig.test.json): lock VERDICT command-exit 0.
  • pnpm --dir ui run check:spec-symbols: exit 0 (0 untriaged collisions).
  • ui checks: check:i18n-keys, check:i18n-drift, check:i18n-dead-keys, check:control-bytes, check:new-line-citations, check:icon-record-names, check:phantom-deps: each exit 0. check:eager-locale-catalogues: exit 2, PREREQUISITE NOT MET (reads a built console bundle), NOT MEASURED locally; CI's run is the reading.
  • eslint on the six changed source files: 0 errors; warnings only on lines this PR does not change.
Derived gates (35/35 exit 0)

node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack derived 35 families at a58846c5; every one ran and exited 0. --ran reconciliation: 35 derived, 35 run, 0 NOT-MEASURED, 0 UNRUN (a derived zero, every line carries an exit code). pnpm --dir ui exec vitest run scripts/: Test Files 170 passed, 2 skipped; Tests 4985 passed, 2 skipped. CI runs the rest.


Generated by Claude Code

🤖 Generated with Claude Code

https://claude.ai/code/session_01L6bhgWZ1wrAZ2ocZovnByy

…ithout a protocol compatibility check

The install door answers data.protocolCheckSkipped when its protocol
handshake admitted the package unchecked (no engines.protocol, or a range
it cannot read). The package page's Install result, the catalog's org
install message and Setup > Packages > Import now draw it as a caution
line, in the reader's locale, from the notice's facts.

Claude-Session: https://claude.ai/code/session_01L6bhgWZ1wrAZ2ocZovnByy
Co-authored-by: Claude <noreply@anthropic.com>
…ort (removed in the next commit)

Claude-Session: https://claude.ai/code/session_01L6bhgWZ1wrAZ2ocZovnByy
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:ui#5 · os-sales · session_01L6bhgVwQZbHRRM9CaXeKif

Contract review

Served-tier: TIER_DEFAULT
Head-sha: afdb07ea05870caff393019ab752da2dfb2582bf
Local-runs: none

Reviewed 2026-11-05T13:03Z. Face: the Clause-②: yes (widening) declaration alone (PR body and changeset). The committed tree touches no packages/spec/src/**, no governed path, and narrows nothing. This head is a merge of origin/main f273c9fe into 1a72f696. The PR's own diff is unchanged (21 files, +637 −4). The one conflict line in MarketplacePage.tsx keeps main's useServedAppLabel() (PR #30443) beside this PR's useProtocolCheckSkippedText().

① Derived judgments

  • @object-ui/i18n gains two keys, marketplace.install.protocolCheckSkipped.noRange and .unparsedRange, in all 10 locale files. Placeholders are {{packageId}} and {{protocolVersion}}, plus {{requiredRange}} for unparsedRange. All use the {{name}} spelling the fallback path reads. No key is renamed or removed and no existing value changes, so the published key set only grows. ✔
  • LocalManagedInstallResult / LocalUnmanagedInstallResult gain the optional protocolCheckSkipped. These types live in console/marketplace/marketplaceApi.ts. app-shell's only export is . → dist/index.d.ts, and its src/index.ts exports the two marketplace page components, not these result types or ProtocolCheckSkipped. So the field is not part of the published accept set. It is optional and read-only for the client, so an older server's answer still types. ✔
  • Unknown reason falls back to the server's message. The client matches no server prose, and a checked install (field absent) draws nothing new. ✔

② Semver level

  • .changeset/30326-install-result-protocol-check-skipped.md: @object-ui/app-shell patch and @object-ui/i18n patch, declared Clause-②: yes (widening) / Metadata-protocol: none. Additive keys at patch match the lane's precedent (.changeset/30335-datasource-delete-names-bound-objects.md). ✔

③ Boundary flags

  • The dev raised one deviation: Setup → Packages → Import reuses the marketplace.install.* keys rather than adding engine.packages.* copies. That is one string per meaning, not a contract change. Accepted.
  • Author check: the PR's user.login is objectstack-fleet[bot] (relay pr_create).

Implemented-by: session_01L6bhgWZ1wrAZ2ocZovnByy
Reviewed-by: session_01L6bhgVwQZbHRRM9CaXeKif

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:ui#5 · os-sales · session_01L6bhgVwQZbHRRM9CaXeKif

维护者速读

席位核对 — ACCEPT · domain:ui#5 · head afdb07ea05870caff393019ab752da2dfb2582bf

  • 形态: draft,作者 objectstack-fleet[bot](中继 pr_create),目标 main,Fixes #30326。共 21 个文件,+637 −4。check-governed-merges --pr 30460:NOT governed;641 行,未超 3000。mergeable_state 读为 clean。
  • 契约面: 不碰 packages/spec/**,不碰 governed 路径。Clause-②: yes (widening) 来自两个新 i18n 键。TIER_DEFAULT 合同复核 PASS 6658702566,复核的就是这个 head。结果类型上新加的可选字段不在 app-shell 的发布入口里。
  • head 移动: 首个 head 1a72f696 与 main 冲突(MarketplacePage.tsx 一行)。卡线程合并 origin/main f273c9fe 后得到 afdb07ea,没有 rebase 或 force push。冲突处保留了 main 的 useServedAppLabel()(PR fix(app-shell): draw a served app label as served on every Console surface that names an app #30443)和本 PR 的 useProtocolCheckSkippedText()。PR 自身的 diff 不变。
  • 抽查:
    • protocolCheckSkippedText(answer, t):no-range 和 unparsed-range 各对应一个键,未知 reason 回退到服务端的 message,不匹配服务端文案。
    • 三处界面都读同一个 hook,ProtocolCheckSkippedNote 只在字段存在时渲染。
    • 10 个 locale 共新增 20 行,占位符只有 packageId、protocolVersion、requiredRange 三个,全部用双花括号拼法。
  • 门禁 check-runs: afdb07ea 上 55 个 run:44 success,11 skipped,0 失败。
  • 测试: 新增 4 个测试文件:helper 的单测,以及包详情页、目录页组织安装、导入三处的渲染测试。卡线程在 afdb07ea 上的本地读数:marketplace、PackagesPage 和 i18n 共 163 个文件 2016 条用例全绿,app-shell/i18n type-check 0,check:spec-symbols 0,i18n-keys/drift/dead-keys 0。
  • 接受的偏差: 导入页复用 marketplace.install.* 键,没有另建 engine.packages.* 副本。一个意思只留一份文案。
  • 范围外去向: 无。
  • 落地条款: Fixes #30326(服务端半已由 PR feat(cloud-connection,metadata-core): an install the protocol handshake admitted unchecked says so in its answer #30409 落地,这是最后一半)。本席位按普通队列在这个 head 上落地:relay pr_ready + automerge_enable。MERGED 后核对 A package with no protocol range installs with the compatibility check skipped, and only the server log says so #30326 已关闭、pm:dispatched 已摘。

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 5, 2026 13:15
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 5, 2026
Merged via the queue into main with commit 48231b0 Nov 5, 2026
56 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-sukiom branch November 5, 2026 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/l tests tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A package with no protocol range installs with the compatibility check skipped, and only the server log says so

1 participant