Skip to content

fix(runtime): honor app-declared default profile on the artifact-serve path (ADR-0056 D7)#2137

Closed
xuyushun441-sys wants to merge 5 commits into
mainfrom
fix/dev-bu-profile-ci
Closed

fix(runtime): honor app-declared default profile on the artifact-serve path (ADR-0056 D7)#2137
xuyushun441-sys wants to merge 5 commits into
mainfrom
fix/dev-bu-profile-ci

Conversation

@xuyushun441-sys

Copy link
Copy Markdown
Contributor

取代 #2132/#2136(GitHub 未对其 synchronize/已见 SHA 触发 CI)。变更同前:createStandaloneStack 浮出 permissions/roles,artifact 启动路径honor app 默认 profile;含 runtime + dogfood 回归测试。

🤖 Generated with Claude Code

os-zhuang and others added 4 commits June 21, 2026 22:41
…e path (ADR-0056 D7)

`createStandaloneStack` (the boot path used by `objectstack dev`/`serve`/`start`
when serving a compiled `dist/objectstack.json` with no host
`objectstack.config.ts`) surfaced `objects`/`requires`/`manifest` from the
artifact bundle but dropped `permissions[]` and `roles[]`. So the CLI's
`appDefaultProfileName(config.permissions)` saw `undefined` and SecurityPlugin
fell back to the built-in owner-only `member_default` — an app `isDefault`
profile carrying e.g. `readScope: 'unit_and_below'` was silently ignored. The
config-load path was unaffected (the app's `permissions` survived via the
original stack object).

Surface `permissions[]` and `roles[]` from the artifact bundle, mirroring the
existing `objects`/`requires`/`manifest` handling, so the artifact-serve path
applies the app default profile exactly like the config-load path.

Tests:
- packages/runtime/src/standalone-stack.test.ts — the artifact-serve path now
  surfaces permissions/roles (incl. readScope) and drives appDefaultProfileName.
- packages/dogfood/test/showcase-scope-depth-fallback.dogfood.test.ts — a
  profile resolved by name as fallbackPermissionSet widens the visibility matrix
  (unit_and_below) with the reference hierarchy resolver, and fails closed
  without it.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The first createStandaloneStack call cold-loads heavy deps (objectql/metadata/
driver-memory) via dynamic import, which on a cold CI worker (Node 20) exceeded
vitest's default 5s test timeout — failing only the first case. Move the
one-time boot into a beforeAll with a 60s timeout and have the assertion cases
read the shared result (also removes 4 redundant boots).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 21, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
spec Ready Ready Preview, Comment Jun 21, 2026 3:52pm

Request Review

@xuyushun441-sys

Copy link
Copy Markdown
Contributor Author

核心修复已随 #2133 合入 main,配套的测试超时修复已由 #2145 合入。本 PR 是 CI 触发故障期间产生的重复,关闭清理。

@xuyushun441-sys
xuyushun441-sys deleted the fix/dev-bu-profile-ci branch June 22, 2026 00:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants