Repository navigation
fix(settings)!: a cloud-managed environment does not offer its file storage or AI provider settings - #34254
Conversation
…torage or AI provider settings Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTEivi2wogPpeo3xd5
…der section is declared Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTEivi2wogPpeo3xd5
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTEivi2wogPpeo3xd5
📓 Docs Drift CheckThis PR changes 2 package(s): 31 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: ⛔ 16 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails. What this run could not see
Coarse fallback — 11 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 0e8f441a34f944d3d1acb079af216849d08dbaf8 && git checkout 0e8f441a34f944d3d1acb079af216849d08dbaf8
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 36c0e96aa0ad1195293a5997e96fb88341815802 6fc6664eedda467e1cd164e86c5fcbc7ab771fd0 && git checkout -B drift-repro 36c0e96aa0ad1195293a5997e96fb88341815802 && git merge --no-ff 6fc6664eedda467e1cd164e86c5fcbc7ab771fd0
node scripts/docs-audit/affected-docs.mjs --json 36c0e96aa0ad1195293a5997e96fb88341815802
|
|
review#2 · os-tesla · session_01L9qibxTeW8xHnxoHxWNHWW Contract-review-claim: session_01L9qibxTeW8xHnxoHxWNHWW · head 6fc6664 · 2026-11-16T04:02Z |
|
domain:server#5 · zhuangjianguo · session_01QsR2jTjrNnh6b2BkCXFugM |
|
domain:server#5 · zhuangjianguo · session_01QsR2jTjrNnh6b2BkCXFugM Review — PASS (L1; the contract record is review#2's)Head-sha: Contract face: a declared narrowing, What holds
The battery. 8 of 4016 were red, in 4 files that never set Nits (no re-review needed)
Gates: the latest run of each check is green: 33 success, 18 skipped, none red or pending. The two earlier Can land once review#2's record at this head is a PASS. |
|
review#2 · os-tesla · session_01L9qibxTeW8xHnxoHxWNHWW Contract reviewServed-tier: Read at 2026-11-16T04:11Z. First review of this head; claim: comment 6906933086; no lane request (owed per check-owed-reviews). Independence: implemented in a project thread for domain:server#5; reviewed by os-tesla, who neither dispatched nor implemented it. ① Derived judgments
② Semver level
CI completed before posting: 59 check-runs on this head, 37 success, 20 skipped, 2 failure — both are superseded earlier runs of PR-body guards; the newest run of that guard on this head is a success. ③ Boundary flags
④ Design judgmentThe narrowing against the published contract on
No must-fix. Implemented-by: VERDICT: PASS |
|
domain:server#5 · zhuangjianguo · session_01QsR2jTEivi2wogPpeo3xd5 席位核对ACCEPT and landing · area S3 · 2026-11-16T04:13Z · head
Ready + auto-merge under the area S3 landing line (maintainer, project thread, 2026-11-15T11:06Z) and the pm-dispatch landing procedure (maintainer, 2026-11-15T15:56Z). Generated by Claude Code |
domain:server#5 · zhuangjianguo · session_01QsR2jTEivi2wogPpeo3xd5
Requested by Steedos · project thread
Fixes #33891
Clause-②: no (narrowing) — in a cloud-managed process (
OS_CLOUD_MANAGED=1) only, the settings doors stop servingstorageand theaiprovider/model/credential/generation-default/embedder keys:GET /api/settingsleaves them out,GET/PUT /api/settings/storage, aPUT /api/settings/ainaming a hidden key, andPOST storage/*,ai/test,ai/test_embedder,ai/resetanswer409 RESOURCE_CONFLICT(details.managedBy: 'platform'), and the data-API reads of the four settings stores leave out those rows for any non-system caller. A self-hosted deployment answers exactly as before.Metadata-protocol: none
Skills-docs: none — no skill under
skills/**teaches the hosted settings doors or the storage / AI settings pages.BREAKING for a caller of a cloud-managed environment: its file storage and AI provider are the hosting platform's, so the settings doors no longer show or change them. The registry stays whole, so the storage and AI services keep reading every value in process. The changeset carries the ADR-0087 not-required marker (no-migration-prescription).
维护者速读
OS_CLOUD_MANAGED=1)下,设置接口不再显示或修改文件存储设置、AI 提供商/模型/凭据/生成默认值/Embedder;会话标题与可观测性仍可配置;Setup 菜单的「文件存储」在托管下隐藏。packages/services/service-settings/src/cloud-managed-settings.ts(隐藏表与裁剪规则)、packages/services/service-settings/src/settings-routes.ts(各入口的检查点)、packages/services/service-settings/src/settings-read-door.ts(数据 API 读取过滤)。pnpm --filter @objectstack/service-settings exec vitest run src/cloud-managed-settings.pin.test.ts src/settings-read-door.pin.test.ts,预期全绿:托管各入口 409,自托管对照照旧。What changes
packages/services/service-settings/src/cloud-managed-settings.ts:CLOUD_MANAGED_HIDDEN_SETTINGS.storageis hidden whole, with every action.aihides a key list:provider, every per-provider model / credential / base-URL key,temperature,max_tokens,request_timeout_msand the sixembedder_*keys; itstest,test_embedderandresetactions are refused.CLOUD_MANAGED_SERVED_AI_KEYSis the pinned complement:title_generation_enabled,title_max_length,trace_enabled,log_prompts.isCloudManaged()from@objectstack/core, and nothing else.aipage keeps its Conversation titles and Observability sections.SettingsCloudManagedError, answered409 RESOURCE_CONFLICTwithdetails: { namespace, managedBy: 'platform', keys? | actionId? }.settings-routes.tsasks the table at every door:GET /api/settings: projected list;GET /api/settings/:namespace: whole-hidden namespaces refused first; manifest,valuesandliveprojected;PUT /api/settings/:namespace: refused whole, before anything is applied, when the body names a hidden key;POST /api/settings/:namespace/:actionId: the refused actions.settings-read-door.ts: in a hosted process a non-system read ofsys_setting,sys_setting_audit,sys_platform_settingorsys_platform_setting_auditANDs incloudManagedRowScope(). That scope leaves out everystoragerow and every row of a hiddenaikey. A system context still reads all rows.@objectstack/platform-objects:nav_settings_storagecarriesvisible: 'features.cloudManaged != true'.featuresis a root every nav entry binds. The AI entry stays, because part of its page is still served.Tests
service-settings/src/cloud-managed-settings.pin.test.tsdrives every route twice on one composition: hosted, and self-hosted as the control.aikey as hidden or served, never both or neither. A newaikey fails here until it is classified.storage, GETai(keys, values, groups, buttons), PUTstorage, and a PUTainamingtemperaturebesidetitle_max_length: the call is refused and nothing is written. The served-only PUT is written. POSTstorage/test,ai/test,ai/test_embedderandai/resetare covered too.storageandai.provider.visible, and that the AI entry has none.settings-read-door.pin.test.tsgains a hosted and self-hosted describe on the real engine. Oversys_settingandsys_platform_setting, a reader holding every capability reads onlyai.trace_enabledwhen hosted and all four rows self-hosted; a count agrees with the list; the system reads all four.Acceptance notes
storage-service-plugin.ts's in-processgetNamespace('storage')and the AI service's reads keep working; this is pinned.409 RESOURCE_CONFLICT, with no code minted (as in plugin-authcloudManagedRefusal). It is told apart from404 UNKNOWN_NAMESPACEby code, anddetails.managedBy: 'platform'names the reason. No error-code ledger change.ai/resetis refused besides the three named actions, because it clears every storedairow, hidden ones included.ui/**is closed to the server seat). It is reported for a ui follow-up card.livestatement on theaipage is filtered by key. A banner text is served as its provider writes it; no provider in this repository registers one forai.origin/mainand is independent of the knowledge-settings PR for 知识库不是当前重点:默认不加载知识库,Setup 的「知识库」页和「AI 与向量化」里的向量化一段只在挂了知识库服务时才出现 #33933. Whichever lands second re-reads the other'saimanifest change. The hidden key list names theembedder_*keys whichever way that lands.Verification
All verify runs go through
scripts/pm/os-verify-lock.shand quote the lock'sVERDICT command-exit 0line. Final head is6fc6664eed:4018e852c2plus a merge oforigin/main.Package tests and typecheck
4018e852c2:@objectstack/service-settingstest: Test Files 76 passed (76), Tests 1501 passed (1501); typecheck exit 0.@objectstack/platform-objectstest: Test Files 122 passed (122), Tests 2007 passed (2007).6fc6664eed:cloud-managed-settings.pin.test.ts,settings-read-door.pin.test.tsandsettings-translation-coverage.test.ts(which the merge changed): Test Files 3 passed (3), Tests 220 passed (220).Dogfood battery (narrowing) at 6fc6664
pnpm --filter '@objectstack/dogfood^...' build: exit 0.pnpm --filter @objectstack/dogfood testunder the lock, with no shard and no path: Test Files 4 failed, 465 passed, 3 skipped (472); Tests 8 failed, 3966 passed, 42 skipped (4016).bare-name-one-holder-flow-family,package-commit-revert-path-package,permission-set-clone-doorandwall-package-refusal.OS_CLOUD_MANAGEDor reads/api/settings.Ablation of every pin (scripts/ablation-replace.mjs, WRAP restore, blob == HEAD and git diff HEAD empty after each leg)
Tests are src-aliased, so no dist leg is needed.
GET storagehosted.PUT storage, and the whole-call refusal oftemperatureplustitle_max_length.storage/test,ai/test,ai/test_embedder,ai/reset.GET /api/settings.GET ai.GET ai.sys_settingandsys_platform_setting).visibleremoved:liveprojection has no ablation leg: no provider in this repository registers anailive statement.Gates
dispatch-gates --commandsat6fc6664eed: 72 families.--ran: 72 derived, 70 run, 2 NOT-MEASURED (derived from a recorded exit 3).check:dual-build-cjs-loadsneeds a fullpnpm buildof every package.check:type-check-debt's closure build timed out in the shared lock queue.check-platform-checklist --changed-from origin/main: OK, 9 anchors, 0 lost.check-nul-bytes: OK. eslint--no-inline-configon the changed files: exit 0.git merge-tree --write-tree origin/main HEAD: exit 0.🤖 Generated with Claude Code
https://claude.ai/code/session_01QsR2jTEivi2wogPpeo3xd5