Repository navigation
fix(console): a lookup target the presence read served is not read again by name - #35398
Conversation
…t served it Claude-Session: https://claude.ai/code/session_01Utp6CZrgaiMgTJCnswR6jQ Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Utp6CZrgaiMgTJCnswR6jQ Co-authored-by: Claude <noreply@anthropic.com>
… boundary Claude-Session: https://claude.ai/code/session_01Utp6CZrgaiMgTJCnswR6jQ Co-authored-by: Claude <noreply@anthropic.com>
…t through the presence read Claude-Session: https://claude.ai/code/session_01Utp6CZrgaiMgTJCnswR6jQ Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Utp6CZrgaiMgTJCnswR6jQ Co-authored-by: Claude <noreply@anthropic.com>
…okup-target-single-read
|
repo:objectstack#5 · os-bill · session_01Utp6CZrgaiMgTJCnswR6jQ Final head for review · area ux-2 · 2026-11-19T08:22Z |
|
repo:objectstack#5 · os-bill · session_01Utp6CXsZsKmgG1EcKp5bY4 维护者速读
席位核对 — ACCEPT (L1-a) · repo:objectstack#5 · head
|
|
repo:objectstack#5 · os-bill · session_01Utp6CZrgaiMgTJCnswR6jQ Landing · area ux-2 · 2026-11-19T08:28Z
State: draft → ready + auto-merge (merge queue). #35306 closes on merge via |
⛔ merge queue 构建失败 — 先分诊,再决定要不要重排队列构建 44487953113 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集), 分类: 失败的 job(日志抽取,best effort):
跨 PR 相同签名(24h,按失败测试文件聚合):
历史信号:
分诊清单:
Generated by Claude Code · merge-queue-triage workflow (#4859) |
|
repo:objectstack#5 · os-bill · session_01Utp6CZrgaiMgTJCnswR6jQ Queue red triage · area ux-2 · 2026-11-19T08:46Z |
…okup-target-single-read
Main's Home now asks its recent rows' objects in one ?names= presence read; with the presence-served by-name answer, no /meta/object/NAME read follows a served name. The two Home pins assert that exact shape. Claude-Session: https://claude.ai/code/session_01Utp6CZrgaiMgTJCnswR6jQ Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#5 · os-bill · session_01Utp6CXsZsKmgG1EcKp5bY4 维护者速读
席位核对 — ACCEPT (L1-a, delta) · repo:objectstack#5 · head
|
|
repo:objectstack#5 · os-bill · session_01Utp6CZrgaiMgTJCnswR6jQ Re-landing · area ux-2 · 2026-11-19T10:20Z
State: ready + auto-merge (merge queue). #35306 closes on merge via |
Fixes #35306
Clause-②: no
Metadata-protocol: none
维护者速读
sys_user)时,?names=存在性读取已经带回了对象定义,之后不再按名字(meta/object/sys_user)再读一次;应用导航requiresObject与仪表盘部件对象同理。MetadataProvider.readObjectScope一处分支,只复用存在性读取「已返回定义」的答案;被省略(不存在或被拒)的名字照旧按名字读,所以「不存在」与「被拒(OBJECT_PACKAGE_DISABLED)」的区分不变;草稿预览不复用。回滚即 revert 本 PR。ui/packages/app-shell/src/providers/MetadataProvider.tsx(readObjectScope里presentDefinition分支与随后的bump()),ui/packages/app-shell/src/providers/__tests__/MetadataProvider.scopeRefusal-13052.test.tsx(新增的拒绝边界钉子)。pnpm --dir ui exec vitest run packages/app-shell/src/providers/__tests__/MetadataProvider.scopeRefusal-13052.test.tsx packages/app-shell/src/console/__tests__/appObjectScope-12811.test.tsx,预期 2 个文件全绿。What changes
Traced first, on a real app (showcase,
pnpm dev -- --fresh --uion a private port, production console build, signed in through the login page, headless Chromium 1440x900, one warm-up load, then a fresh page per load; every/api/Resource Timing entry to network idle plus 3 s; request initiators from the DevTools protocol)./apps/com.example.showcase/showcase_task, every run sentmeta/object?names=sys_userand thenmeta/object/sys_user, 0.64 to 0.76 s later. Both initiator stacks run from a React render throughappObjectScope; the second ends in the adapter'sgetObjectSchema(fetchScopeName,readItem).sys_useritem in the?names=answer is deep-equal toitemin the by-name answer. The by-name envelope addssortabilityandcascadeDeleteObjects; the adapter puts both on its own copy under symbol keys, and the provider'scloneServedObject(astructuredClone) drops them, so no scope reader ever saw them. Switched-off actions ride both answers (disabledActions, keyed by object on the list door).readObjectScope: before asking a name by name for a scope, take the definition the batched names scope (the presence read) already SERVED for it. Only a served answer is taken. A name the presence read left out, has not answered yet, or failed is asked by name exactly as before, so the by-name door stays the one authority on absent versus refused. The draft preview never takes it. A reader that asked the name for its side effect (a route's lookup targets) learns of it on the render the provider'sbump()causes, as it would on a by-name answer landing.requiresObjectand a dashboard widget's object once their presence read has served them. Those were the same double read: on an app whose package holds no objects of its own, three by-name reads go away (the updated pins below show it).Readings: before (origin/main 81c0947) and after (this branch, a949078 product code plus the bump fix)
Requests counted from navigation, chain depth = 1 + the deepest request that ENDED before this one STARTED.
/api/requests per loadsys_user's definition?names=, then by name) every run?names=) every runBefore, run 2:
After, run 1:
Long tasks (start, duration in ms) beside the before runs: run 1
[1235,468] [1781,71] [1865,51] [1930,92]with the presence answer at 1259 and the by-name start at 2022; run 2[1286,390] [1749,65] [1876,79]with the presence answer at 1316 and the by-name start at 1954.Tests
MetadataProvider.scopeRefusal-13052.test.tsx, new top-level describe on its real-ObjectStackAdapterharness: a name the presence read served joins the route scope with that definition and is asked by name zero times; a name it left out is asked by name and its refusal is still namedOBJECT_PACKAGE_DISABLED(flat and wrapped envelope); CONTROL: left out and answered 404RESOURCE_NOT_FOUNDis the plain absence.appObjectScope-12811,AppContent.objectScope-12811(the held-read case now holds the presence read),AppContent.emptyPackageScope-13046,AppContent.packagelessReads-29416,AppContent.packagelessRecordRelated-29552,AppContent.packagelessRoot-29552(anote-entryprobe: the bundle answers it through the presence read, no request),AppContent.pageRouteObjects-12980,AppContent.dashboardRouteReads-28784,packagelessChromeScope-12980. Where a pin read the scope or the sidebar gate, it still asserts the object arrives there; the by-name call is what is gone.requiresObjectis never asked by name) pass unchanged.Ablations (scripts/ablation-replace.mjs; each restored: blob == HEAD, git diff HEAD empty)
if (present) {toif (present && false) {: 16 failed / 21 passed acrossscopeRefusal-13052,appObjectScope-12811,AppContent.objectScope-12811, the new served-name pin among them.if (answeredFromPresence) bump();deleted: 2 failed / 16 passed inappObjectScope-12811(expected 'sys_invitation' to be 'sys_invitation,sys_user'): without the bump a packageless list route never shows the target that joined its scope.Acceptance notes
pnpm installin the clone) was refused by the session's permission classifier, so it could not be booted. The change is app-neutral (it keys on the presence read, not on any object name); the showcase readings above are the measured app.data/sys_notification_receipt, which waits ondata/sys_inbox_message, so the card's grouping stays at 6 and the chain depth stays in its noise band (9 to 12). What goes away is one request per load and the 0.6 to 0.8 s the page kept a request open after its data had landed.appObjectScope.tsnow say which part of its answer a route takes.getObjectSchemacache for the target as a side effect. Nothing on the list page read that cache (the after trace has no by-name read ofsys_userat all); a later reader that needs the schema reads it then.Verification
On head
047e7f29(origin/mainmerged; the incoming commits touch no file of this diff; workspace rebuilt after the merge):cd ui && pnpm exec vitest run packages/app-shell/src/console/ packages/app-shell/src/providers/ packages/app-shell/src/hooks/ packages/app-shell/src/views/__tests__/ apps/console/src/under the verify lock: Test Files 847 passed (847), Tests 7852 passed (7852);pnpm --filter @object-ui/app-shell run type-check: exit 0.node scripts/pm/dispatch-gates.mjs --commandson047e7f29: 38 derived families, 38 run, each exit 0;--ranreconciliation: 38 derived, 38 run, 0 NOT-MEASURED, 0 UNRUN.check:type-check-debtwas re-run under the lock after its first call timed out in the queue:OK — 0 ledger entr(ies) re-measured.pnpm --dir ui exec vitest run scripts/: Test Files 171 passed, 2 skipped.pnpm check:new-line-citations(ui): 0 new citations.!in the title, no(narrowing)arm).Generated by Claude Code