Skip to content

托管环境的「系统设置」隐藏自托管才用得到的基础设施设置(文件存储适配器、AI 提供商与向量化、知识库后端) #33891

Closed

Description

@objectstack-fleet

coordinator#1 · hotlong · session_0b694aec78a6416c9b4b75ecd4ac7112

Filing gate: ① 用户可见的体验缺陷,方向已由维护者裁定(2026-11-15,问「托管环境的设置里要不要隐藏自托管才用得到的配置项」,答「当然」)。

来源

2026-11-15 staging 浏览器全量测试(cloud 部署 c4153027,pin 181ad7d4),环境 os-6hf1jq → 系统设置。

现象

托管环境的管理员在「系统设置」里看到这些只有自己部署时才有意义的项:

  • 文件存储:「适配器* 环境变量锁定 · S3 / …」,以及 S3 凭据。
  • AI 与向量化:LLM 提供商、模型、凭据、温度 0.7、最大输出、请求超时、「测试连接」「重置为环境变量默认值」,以及向量化提供商「禁用」。
  • 知识库:「适配器* 内存(仅开发/测试)· 已有索引不会迁移」。云用户看到「仅开发/测试」会以为自己的环境配错了。

这些在托管里由平台负责,管理员改不了或不该改;「环境变量」「适配器」也不是云用户能理解的概念。

机制

托管判断已有现成的:isCloudManaged()(packages/core/src/stack-auth.ts),公开给前端的是 /auth/config 的 features.cloudManaged,sys-user / sys-member / sys-invitation 已经用 visible: 'features.cloudManaged != true' 隐藏托管下无效的动作。设置清单(packages/services/service-settings/src/manifests/*.manifest.ts)和 Setup 导航还没有用这个判断。

修复方向

在托管下(features.cloudManaged == true):

  1. Setup 导航和设置总览里不显示「文件存储」「知识库」两项。
  2. 「AI 与向量化」只留租户自己的偏好(会话标题、可观测性),提供商、模型、凭据、温度、超时、向量化整段不显示。
  3. 直接访问这些设置的路由时,显示「此项由平台托管」而不是表单。

不在本卡范围:

  • 「邮件投递」页保留。cloud#4386 已裁定平台默认代发、且自带 SMTP 仍可覆盖,这页在托管里改为显示平台通道状态,由 objectstack#32799 跟进。
  • 知识库功能在所有部署形态下是否整体隐藏,另行决定。

验收

  1. staging 托管环境的系统设置导航里没有「文件存储」「知识库」;「AI 与向量化」不出现提供商、温度、向量化。
  2. 直接打开 /setup/system/settings/storage 显示「此项由平台托管」。
  3. 本地自托管(不带 OS_CLOUD_MANAGED)这些设置照常显示。

Reader

objectstack domain:ui / service-settings 车道。

Dedupe

  • repo:objectstack-ai/objectstack hosted setup hide infrastructure settings → 0 条(含 closed)。
  • repo:objectstack-ai/cloud hosted setup hide infrastructure settings → 0 条。
  • managed settings storage knowledge hide hosted(两仓)→ 0 条;Setup platform managed hosted adapter(两仓)→ 0 条。
  • 最近的 objectstack#30208(Setup 改用业务管理员能懂的字段,已关)只改文案,不涉及托管下隐藏。

Activity

  1. objectstack-fleet commented on Nov 15, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Path: none

    Triage: first touch → domain:server · p2 · 2026-11-15T13:46Z

    ⛔ Not a claim.

    The maintainer ruled the direction on 2026-11-15 (「当然」): a hosted environment's System Settings hides the self-host-only infrastructure settings (file storage adapter, AI provider and vectorization, knowledge-base backend) behind features.cloudManaged. Admins see settings they cannot or should not change, and 「仅开发/测试」 reads as a broken environment, so p2. The work is in the service-settings manifests plus Setup navigation; if the seat finds the change is console-only, re-lane it to ui.

  2. added
    domain:server
    pm:queue
    priority:p2
    on Nov 15, 2026
  3. objectstack-fleet commented on Nov 15, 2026

    @objectstack-fleet
    ContributorAuthor

    coordinator#1 · hotlong · session_0b694aec78a6416c9b4b75ecd4ac7112
    2026-11-15T14:34Z

    范围收窄:维护者同日裁定「知识库甚至不应该加载这个插件,目前不是本项目的重点」,知识库设置页与向量化一段改由 #33933 处理(所有部署形态默认都不出现)。本卡只剩文件存储和 AI 提供商 / 模型 / 凭据 / 温度 / 超时两项。

    本卡保持 OPEN。

  4. objectstack-fleet commented on Nov 15, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:server#5 · zhuangjianguo · session_01QsR2jTEivi2wogPpeo3xd5

    Claim (fold member of lead #33933): server area-lease mode (#33751 §2), area S3, slot 3, borrowed from S1 · executed by the same os-dev sub-agent as #33933 · posted at 2026-11-15T17:22Z
    Session: session_01QsR2jTEivi2wogPpeo3xd5
    Account: zhuangjianguo
    Branch: claude/area-S3-33933 (the lead's branch)
    Worktree: objectstack-issue-33933
    Domain: domain:server
    Seat: domain:server#5
    File surface: as the lead's claim on #33933. Under hosted (isCloudManaged() / features.cloudManaged), Setup nav and the settings overview hide file storage, AI with vectorization keeps only the tenant's own preferences, and a direct route answers that the platform manages it. The knowledge part moved to #33933 (scope note 6896173754). ⛔ ui/**: needs_area if the fix is console-only. No cloud code; isCloudManaged() is in packages/core/src/stack-auth.ts.
    Container & model: M, mode:subagent, model: default, effort: high
    Clause-②: no
    Metadata-protocol: none
    Responsibility: n/a — not a defect card (maintainer-ruled direction 「当然」)
    Thread-read: 6896173754
    Premise: holds (the card measures it: the manifests and Setup nav do not read cloudManaged; the dev re-measures)
    Serial constraints cleared: none open (as on the lead).
    Pre-claim lane: server because the fix is in the service-settings manifests and Setup nav (S1 paths, borrowed); console-only would mean needs_area and a re-lane to ui (triage 6895261076).
    Pre-claim deps: none. The email delivery page is #32799, out of scope.
    Prior rulings read: maintainer 「当然」 (2026-11-15, card body); scope note 6896173754; the existing visible: 'features.cloudManaged != true' precedent on sys-user, sys-member and sys-invitation actions (card body).

    Generated by Claude Code

  5. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 15, 2026
  6. objectstack-fleet commented on Nov 15, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:server#5 · zhuangjianguo · session_01QsR2jTEivi2wogPpeo3xd5

    Fold-member pointer: the os-dev report for the coupled set (lead #33933) is posted on #33933. Status needs_area: hypothesis H3 is false for this card. The settings visible grammar reads only the data root, and withholding the namespace from the registry would break live readers (service-storage reads the storage namespace for its upload limits), so hiding storage and the AI provider fields under hosted needs a mechanism decision, recorded as open question 2 in that report. No code or PR yet.

  7. objectstack-fleet commented on Nov 15, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:server#5 · zhuangjianguo · session_01QsR2jTEivi2wogPpeo3xd5

    Release: area S3 claim 6898339310, before any code (no commits). The dev's step-1 reading (6898438942, full report 6898434053 on #33933) found no mechanism inside the ruled surface:

    • the settings visible grammar has only the data root, so features.cloudManaged is refused at parse;
    • registry withholding breaks readers that stay live under hosted (storage-service-plugin.ts reads getNamespace('storage'), and SettingsService.get throws UnknownKeyError).

    The mechanism is a decision. Options are A (a server-side served projection under isCloudManaged()), B (a features root in the settings visible grammar) and C (console only, re-lane to ui). It has gone to the seat for the maintainer batch. The card returns to pm:queue until it is ruled. #33933 continues alone.


    Generated by Claude Code

  8. added
    pm:queue
    and removed
    pm:dispatched
    on Nov 15, 2026
  9. objectstack-fleet commented on Nov 15, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:server#5 · zhuangjianguo · session_01QsR2jTEivi2wogPpeo3xd5

    Claim (fold member of lead #33933, after the ruling): server area-lease mode (#33751 §2), area S3, borrowed from S1 · executed by the same os-dev sub-agent as #33933 · posted at 2026-11-15T21:57Z
    Session: session_01QsR2jTEivi2wogPpeo3xd5
    Account: zhuangjianguo
    Branch: claude/area-S3-33933 (the lead's branch)
    Worktree: objectstack-issue-33933
    Domain: domain:server
    Seat: domain:server#5
    Ruled: the maintainer tapped the decision card at 2026-11-15T21:55Z: 「裁定托管环境用哪种机制隐藏文件存储与 AI 提供商设置」 → 「服务端按托管裁剪并拒绝」 (option A). The maintainer then wrote in the area S3 project thread at 2026-11-15T21:55Z: 「批准认领 #33891,按方案 A 实现」.
    File surface: packages/services/service-settings/** (a new hosted check at the settings doors under isCloudManaged(), from packages/core/src/stack-auth.ts), the Setup nav contributions (CEL visible on features), their tests, a changeset. ⛔ ui/** (the 「此项由平台托管」 page goes to a ui follow-up card filed by the area). No cloud code.
    Route (from the independent review that went with the card, edits E1–E5):

    • A new check at the settings doors. It is not branding's registry withholding: the registry stays whole so that hosted readers such as storage-service-plugin.ts keep working.
    • A named refusal code that the console can tell apart from UNKNOWN_NAMESPACE.
    • Every door gives the same answer: GET list, GET namespace, the write routes, the storage.test / ai.test / ai.test_embedder actions, and the sys_setting / sys_platform_setting data-API read (settings-read-door.ts).
    • AI hides per key. The provider, model, credentials, temperature, max output and timeout keys are hidden, and titles and observability are still served. A write that names a hidden key refuses the whole call, as setMany does for an unknown key.
      Container & model: M, mode:subagent, model: default, effort: high
      Clause-②: no (narrowing) (hosted callers lose a served answer; L2 contract review owed)
      Metadata-protocol: none (settings manifests are platform-declared; the dev confirms against the diff)
      Responsibility: n/a — not a defect card (maintainer-ruled direction 「当然」, mechanism ruled A)
      Thread-read: 6898462174
      Premise: holds (step-1 reading 6898434053 on 知识库不是当前重点:默认不加载知识库,Setup 的「知识库」页和「AI 与向量化」里的向量化一段只在挂了知识库服务时才出现 #33933; the review re-measured visibility-eval.ts, storage-service-plugin.ts L840, settings-service.ts L2183)
      Serial constraints cleared: none open (as on the lead).
      Pre-claim lane: server, because the fix is in service-settings and the Setup nav (S1 paths, borrowed). The console page is a ui follow-up.
      Pre-claim deps: none open.
      Prior rulings read: the maintainer's 「当然」 (card body); scope note 6896173754; release 6898462174; the mechanism ruling above; the house pattern of a server refusal plus a console hide (plugin-auth cloudManagedRefusal).

    Generated by Claude Code

  10. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 15, 2026
  11. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:server#5 · zhuangjianguo · session_01QsR2jTEivi2wogPpeo3xd5
    os-dev-report

    {
      "issue": 33891,
      "status": "done",
      "branch": "claude/area-S3-33891",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/34254",
      "session": "session_01QsR2jTEivi2wogPpeo3xd5",
      "premise_still_valid": true,
      "summary": "Option A as ruled, with review edits E1 to E5. A new door check in service-settings (cloud-managed-settings.ts) is gated on isCloudManaged() from @objectstack/core. The registry stays whole, so in-process readers (storage-service-plugin's getNamespace('storage'), the AI service) keep every value; this is pinned. One table drives every door. storage is hidden whole with every action. ai hides a key list: provider, the per-provider model, credential and base-URL keys, temperature, max_tokens, request_timeout_ms and the six embedder_* keys. Its test, test_embedder and reset actions are refused; reset is refused too because it clears hidden rows. The title and observability keys stay served. Doors covered: GET /api/settings (list projected), GET /api/settings/:namespace (storage refused; ai's manifest, values and live projected), PUT (storage refused; any hidden ai key refuses the whole call, nothing written), POST actions, and the data-API read door over sys_setting, sys_setting_audit, sys_platform_setting and sys_platform_setting_audit for non-system callers. The refusal is the house cloud-managed answer, 409 RESOURCE_CONFLICT with no code minted and no ledger change; details.managedBy 'platform' tells it apart from 404 UNKNOWN_NAMESPACE. The Setup nav_settings_storage entry carries visible 'features.cloudManaged != true'. No ui/** change. Metadata-protocol none confirmed: the diff touches no spec file. Separate PR, cut from origin/main, because the diff separates cleanly from #34223. BRANCH MISMATCH: claim 6902019399 names Branch claude/area-S3-33933, so check:closing-target-claim is red on #34254. The seat amends the claim (or posts a Claim: line naming claude/area-S3-33891); this dev did not write a claim.",
      "tests": "At 4018e852c2: service-settings test 76/76 files, 1501/1501 tests, typecheck exit 0; platform-objects test 122/122 files, 2007/2007 tests (lock VERDICT command-exit 0). At final head 6fc6664eed: cloud-managed-settings.pin, settings-read-door.pin and settings-translation-coverage (the file the merge changed), 3/3 files, 220/220 tests. New pins: cloud-managed-settings.pin.test.ts (25 cases, every door hosted and self-hosted on one composition, by status + error.code + details.managedBy) and a hosted/self-hosted describe in settings-read-door.pin.test.ts on the real engine. Ablation via scripts/ablation-replace.mjs (WRAP restore, each leg 'ok restored: blob == HEAD', git diff HEAD empty at the end):\n- B1 read check removed: red (GET storage).\n- B2 write check removed: red (PUT storage, and the whole-call ai refusal).\n- B3 action check removed: red, 4 actions.\n- B4 list projection removed: red.\n- B5 manifest projection removed: red.\n- B6 values projection removed: red.\n- B7 refusal mapping disabled: red, 7 cases.\n- B8 read-door hosted scope disabled: red, 4 cases.\n- B9 nav visible removed: the first attempt was a refused no-op (the replacement text already occurred in the file); B9b was red.\nThe live projection has no leg, because no ai live provider exists in this repository.",
      "gates": "dispatch-gates --commands --repo objectstack-ai/objectstack at 6fc6664eed: 72 families. --ran: '72 derived, 70 run, 2 NOT-MEASURED (2 DERIVED from a recorded exit 3)'. NOT MEASURED: check:dual-build-cjs-loads (needs a full pnpm build of every package) and check:type-check-debt (its closure build timed out in the shared lock queue); CI runs both. check-platform-checklist --changed-from origin/main: OK, 9 anchors, 0 lost. check-nul-bytes: OK. eslint --no-inline-config on the changed files: exit 0. git merge-tree: exit 0. PR-body gates: no-major exit 0 (LEVEL AXIS no (narrowing), none, patch), adr-0087-registration exit 0, closing-keyword-parity exit 0, partof-closing-keyword exit 0. PR check-runs at report time: 28 success, 16 skipped, 5 in_progress, 1 failure. The failure is 'PR-body guards (claim · duplicate · Part-of · single-writer path)': check:closing-target-claim, the branch mismatch above.",
      "dogfood_battery": "6fc6664eed · VERDICT command-exit 0 (held 1h01m15s) · Test Files 4 failed, 465 passed, 3 skipped (472) · Tests 8 failed, 3966 passed, 42 skipped (4016). Failing files: bare-name-one-holder-flow-family, package-commit-revert-path-package, permission-set-clone-door, wall-package-refusal. None sets OS_CLOUD_MANAGED or reads /api/settings. Re-run alone on the same head and build under the lock: 4/4 files, 58/58 tests, exit 0. Read as box contention; CI's battery decides.",
      "mcp_calls": "0",
      "api_writes": "2. Relay writes: pr_create #34254, and this os-dev-report comment on #33891. git push is not a REST write.",
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": [
        "The 「此项由平台托管」 console page: when a hosted caller opens /apps/setup/system/settings/storage directly, or meets the 409 on the ai page, the console should draw 'managed by the platform' from error.code RESOURCE_CONFLICT plus details.managedBy 'platform', not a generic error. ui/** is closed to the server seat. carrier: ui follow-up (seat files)"
      ]
    }

    Generated by Claude Code

  12. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:server#5 · zhuangjianguo · session_01QsR2jTEivi2wogPpeo3xd5

    Claim (branch re-cut, same claim as 6902019399): server area-lease mode (#33751 §2), area S3 · posted at 2026-11-16T02:59Z
    Session: session_01QsR2jTEivi2wogPpeo3xd5
    Account: zhuangjianguo
    Branch: claude/area-S3-33891
    Worktree: objectstack-issue-33891
    Domain: domain:server
    Seat: domain:server#5
    Why a new claim: claim 6902019399 named the lead's branch claude/area-S3-33933. The work now ships as its own PR, #34254 on claude/area-S3-33891, cut from main, because its diff separates cleanly from #33933's PR #34223. Everything else in 6902019399 stands: the ruling, the file surface, the route E1–E5, the pre-claim lines.
    Clause-②: no (narrowing)
    Metadata-protocol: none
    Note: 6902019399 said Clause-②: no. The diff is a narrowing, but only in a cloud-managed process (OS_CLOUD_MANAGED=1): the settings doors stop serving storage and the hosted ai keys, and answer 409 RESOURCE_CONFLICT with details.managedBy: 'platform'. That is the ruled option A. The PR body carries the (narrowing) arm, and the contract record will judge it.

    Generated by Claude Code

  13. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:server#5 · zhuangjianguo · session_01QsR2jTEivi2wogPpeo3xd5

    Claim: branch re-cut of claim 6902019399 (its first line was not in the Claim: spelling), server area-lease mode (#33751 §2), area S3 · posted at 2026-11-16T03:09Z
    Session: session_01QsR2jTEivi2wogPpeo3xd5
    Account: zhuangjianguo
    Branch: claude/area-S3-33891
    Worktree: objectstack-issue-33891
    Domain: domain:server
    Seat: domain:server#5
    Why a new claim: claim 6902019399 named the lead's branch claude/area-S3-33933. The work now ships as its own PR, #34254 on claude/area-S3-33891, cut from main, because its diff separates cleanly from #33933's PR #34223. Everything else in 6902019399 stands: the ruling, the file surface, the route E1–E5, the pre-claim lines.
    Clause-②: no (narrowing)
    Metadata-protocol: none
    Note: 6902019399 said Clause-②: no. The diff is a narrowing, but only in a cloud-managed process (OS_CLOUD_MANAGED=1): the settings doors stop serving storage and the hosted ai keys, and answer 409 RESOURCE_CONFLICT with details.managedBy: 'platform'. That is the ruled option A. The PR body carries the (narrowing) arm, and the contract record will judge it.

    Generated by Claude Code

  14. removed
    pm:dispatched
    on Nov 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

domain:serverpriority:p2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions