Repository navigation
test(dogfood): boot PlatformObjectsPlugin in the Setup/Account entry-view roster, so sys_exchange_rate resolves - #27873
Conversation
…view roster, so sys_exchange_rate resolves The Setup contribution nav_exchange_rates (shipped by @objectstack/setup) opens sys_exchange_rate, which PlatformObjectsPlugin registers. The test's composition did not boot that plugin, so its catalogue check reported the object as declared by neither source. Added as an object-only registrant (apps: []): it lands no nav id, so check-app-nav-i18n's NAV roster, which holds every entry to at least one nav id, takes no counterpart. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QSeKYmTYfaPbLQD4BJfomW
📓 Docs Drift CheckNothing in this diff resolved to a documentable surface (no symbol, route or SDK anchor derived from 0 changed package(s)), so this run has no opinion about the docs. What this run could not see
Coarse fallback — 0 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): |
|
domain:devx#2 · os-justin · session_01QSeKYmTYfaPbLQD4BJfomW 席位核对 — ACCEPT · p0 main-red stop-bleed · domain:devx#2 · head
|
Refs #27813
Clause-②: no
Metadata-protocol: none
维护者速读
platform-app-object-entry-views.test.ts的组装名单里加上PlatformObjectsPlugin(只注册对象、不贡献导航),让 Setup 的「汇率」入口指向的sys_exchange_rate能被解析到。sys_exchange_rate上线后(feat(platform-objects): sys_exchange_rate — an organization's dated exchange rates, admin-written and audited, with a Setup list under Localization #27246),main 上每次 push 的Dogfood Regression Gate (2/3)都红在该文件的「入口指向的对象两个来源都没有声明」断言;这是该测试自己写明的修法,不是兜底。packages/qa/dogfood/test/platform-app-object-entry-views.test.ts的新名单条目(apps: [])和 Reach 段新增的说明。pnpm --filter @objectstack/dogfood exec vitest run --maxWorkers=2 test/platform-app-object-entry-views.test.ts,预期 52/52 通过;删掉新条目再跑,预期只红named objects neither source declares: ['sys_exchange_rate']一条。What changes
packages/qa/dogfood/test/platform-app-object-entry-views.test.tsboots the Setup and Account composition and requires every object a mergedtype: 'object'entry names to be declared by the composition's registry or by the identity barrel. The Setup contributionnav_exchange_rates(inSETUP_NAV_CONTRIBUTIONS, shipped by@objectstack/setup) openssys_exchange_rate. That object is registered byPlatformObjectsPlugin(packages/platform-objects/src/plugin.ts, theobjects: [SysMigration, SysMigrationJournal, SysSecret, SysExchangeRate, SysTrustedKey]manifest ininit). The test's roster did not boot that plugin, so the catalogue assertion went red on everymainpush since194e66c0(#27246).The fix adds
PlatformObjectsPluginto the test's roster as an object-only registrant (apps: []). It lands no nav id, so it adds no row to the per-app "lands at least one navigation id" invariant. The Reach section of the file header and the remedy comment on the assertion now say that an object-only registrant goes into this roster alone. The production composition boots the same plugin (packages/cli/src/commands/serve.ts), so this makes the test's composition closer to the real one. No product code changes. No fallback, skip or exclusion is added.check-app-nav-i18n's roster is unchanged, and this was measured. The triage remedy says to add the plugin there too. That gate'sCONTRIBUTORSis a NAV roster: every entry must land a nav id, and its header records that widening it with a non-nav entry was refused. Both ways of adding the plugin go red. Each probe was a one-time disk mutation throughscripts/ablation-replace.mjs, restored to HEAD afterwards:apps: ['setup']: the run fails with@objectstack/platform-objects (H3 probe) landed NO setup navigation id.apps: []: the self-test fails withevery CONTRIBUTORS entry declares at least one app IN the population.That gate also already judges
nav_exchange_rates's labels, because the entry comes from@objectstack/setup. It is green unchanged:OK (12 contributor(s), 4 locale(s), 2 app(s) — setup: 55 merged nav id(s) ...).Tests
Reproduction at origin/main (3865159): the test file at its base blob, built closure
Fixed head (ed373af): green, and sys_exchange_rate is now judged by rule (a)
Teeth: the new roster entry deleted on disk, run, restored
Acceptance notes
Dogfood Regression Gateshards do not run onpull_requestor in the merge queue. They run onmainpush and on the schedule only. The first CI reading of this fix is therefore the post-mergemainpush. The local runs above are the evidence for this PR.check-app-nav-i18n'sCONTRIBUTORS, and that was already inexact before this PR. That gate also boots@objectstack/service-settings, and this test does not. The plugin contributes onlynav_settings_branding, which istype: 'url', so no object entry is missing from this test's population. This is noted only, not filed (carrier: none).Verification
All local readings were taken at head
ed373afd88, the final commit, with the dogfood dependency closure built (pnpm --filter '@objectstack/dogfood^...' build, lock VERDICT command-exit 0).pnpm check:app-nav-i18nexited 0:OK (12 contributor(s), 4 locale(s), 2 app(s) — setup: 55 merged nav id(s), account: 12 merged nav id(s) — every id labelled in every locale).node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack, 51 commands. Every command was run with its exit code written to disk before any pipe. 50 exited 0.pnpm check:dual-build-cjs-loadsexited 3 withPREREQUISITE NOT MET, because eight packages outside this diff have nodist/. That one is NOT MEASURED locally and is left to CI.--ranreconciliation:51 derived famil(ies) accounted for — 50 run, 1 NOT-MEASURED (1 DERIVED from a recorded exit 3).The 51 derived commands and their exit codes
Generated by Claude Code