Repository navigation
fix(runtime,cli): the dispatcher /meta refusal applies the errors.permission_denied override; install's token conflict names env credentials - #30839
Conversation
…ion_denied override; install token conflict names env credentials The HttpDispatcher meta read gate now hands resolveMessageTranslator from the i18n service, as RestServer does. os package install's token-conflict refusal says OS_RUNTIME_EMAIL/OS_RUNTIME_PASSWORD count as --email/--password. ui prose residues quote the current refusal sentence and -u. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4cyQMWcGmm84uezumhc
📓 Docs Drift CheckThis PR changes 2 package(s): 14 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
⛔ 5 release-owned page(s) also name something this change touched. These are read-only:
What this run could not see
Coarse fallback — 51 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 042ad813b81789b52e8f8aa2899d46a7daaa9f93 && git checkout 042ad813b81789b52e8f8aa2899d46a7daaa9f93
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin b6182249c3278a60d07727b59afc291054521b4b 6a24f4e1fe390a95596f82b574d8bfdd77c7a406 && git checkout -B drift-repro b6182249c3278a60d07727b59afc291054521b4b && git merge --no-ff 6a24f4e1fe390a95596f82b574d8bfdd77c7a406
node scripts/docs-audit/affected-docs.mjs --json b6182249c3278a60d07727b59afc291054521b4b
|
|
domain:server#4 · os-elon-musk · session_016WV4czvZykUqhYxYXSSDt4 维护者速读
席位意见:ACCEPT(#30797)。 席位核对Head-sha:
|
Requested by Elon · project thread
domain:server#4 · os-elon-musk · session_016WV4cyQMWcGmm84uezumhc
Claim: 6677672237
Fixes #30797
Clause-②: no
Metadata-protocol: none
维护者速读
/meta读门,在拒绝无权打开的应用、仪表盘、列表视图时,也读部署自定义的errors.permission_denied文案(此前只有 REST 一侧读);②os package install同时给了--token和邮箱密码时的拒绝句,写明OS_RUNTIME_EMAIL/OS_RUNTIME_PASSWORD也算--email/--password;③ ui 三处注释和 README 里的旧拒绝句、旧-r参数改为现行写法。--token被拒。t抛错都回落到内置句,仍是 403 不是 500;② 只改一句文案;③ 只改注释与 README,无 ui 行为变化。回滚即撤本 PR。packages/runtime/src/domains/meta.ts的metaItemReadGateSources新增的resolveMessageTranslator;packages/cli/src/commands/package/install.ts的拒绝句。pnpm --filter @objectstack/runtime exec vitest run src/domains/meta-permission-refusal-override.test.ts(12 条全绿)。What changes
@objectstack/runtime.metaItemReadGateSources(theHttpDispatcherside of the shared/metaread gate) now handsresolveMessageTranslator: the request'si18nservicet, asRestServer.resolveMessageTranslatorhands it. A deployment'serrors.permission_deniedoverride therefore reads the same on both doors for the app, dashboard and list-view refusals. Ani18nservice that cannot be resolved answersundefined; atthat throws is already caught byrenderOperationMessage. Either way the caller gets the built-in catalog sentence and a 403.@objectstack/cli. Theos package installtoken-conflict refusal now reads:Pass either --token or --email/--password, not both (OS_RUNTIME_TOKEN counts as --token; OS_RUNTIME_EMAIL/OS_RUNTIME_PASSWORD count as --email/--password).MarketplacePackagePage.offlineLocalMenu-11627.test.tsx:84doc comment-r→-u;ui/packages/data-objectstack/README.md:913and theMetaItemAccess.messagedoc comment insrc/index.tsquote the catalog's current English sentence. No ui behaviour change.Changeset: patch for
@objectstack/runtime,@objectstack/cliand@object-ui/data-objectstack(its README ships infiles[]).Tests
packages/runtime/src/domains/meta-permission-refusal-override.test.ts, throughdispatch(), on all three refusals (app, dashboard, list view), caller localezh-CN: the override is the message andtis askederrors.permission_deniedinzh-CN; CONTROL with no i18n service gives the built-in zh-CN sentence; an unresolvable i18n service and a throwingtgive the built-in sentence and the 403.packages/cli/test/package-install-url-token-flags.test.ts: a new case exportsOS_RUNTIME_EMAIL/OS_RUNTIME_PASSWORD, passes only--token, and pins the full refusal sentence, exit 1 and no request sent.origin/main(tests at HEAD), 3 of 12 runtime cases (the three override cases) and 1 of 9 CLI cases fail; with the fix, 12/12 and 9/9 pass.Acceptance notes
appAccessProbe.test.ts,metaItemAccessProbe-12112.test.ts, two studio-designdraftUnreadable-29148tests) are left alone: they are stand-in server answers, not prose, and the card scopes item 3 to the three residues it names.Verification
All readings at head
6a24f4e1.Package tests and typecheck
pnpm --filter @objectstack/runtime typecheckandpnpm --filter @objectstack/cli typecheck: exit 0.pnpm --filter @objectstack/runtime exec vitest run: Test Files 551 passed (551), Tests 10124 passed, 19 skipped.pnpm --filter @objectstack/cli exec vitest run --project unit: 386/388 files on the first run; the 2 failures werepublished-subpath-console.pin.test.tsandpublished-subpath-hook-body.pin.test.tsrefusing becausepackages/cli/distwas not built yet. Afterpnpm --filter @objectstack/cli buildboth pass (Tests 29 passed). Integration tier declared to CI (no spawn entry touched).Derived gates (dispatch-gates --commands, reconciled with --ran)
dispatch-gates --ran: 68 derived, 67 run, 1 NOT-MEASURED, 0 UNRUN; every run family exit 0.check:plugin-teardown-shape --self-testfirst exited 3 on a shallow clone (its positive control commit was absent); after fetching that commit it exits 0.check:i18n,check:i18n-coverage,check:i18n-walk-parityfirst exited 3 (CLI not built); after building their prerequisite closure all exit 0.check:dual-build-cjs-loads, reason: prerequisite not met, it reads every package'sdist/and ten packages outside this diff's closure are unbuilt locally. CI runs it.🤖 Generated with Claude Code
https://claude.ai/code/session_016WV4cyQMWcGmm84uezumhc