test(runtime,objectql): the D12 honesty gate iterates the fake inventory, not spot checks (#3898) - #4306
Merged
Conversation
…ory, not spot checks (#3898) The three holes #3898 inventoried are all closed on main — #4082 eliminated the `_fallback` marker by moving every kernel fallback onto the standard `__serviceInfo` descriptor, #4114 made both discovery builders compute the `metadata` slot, #4141 did the same for `data`. What remained was the issue's suggestion 4: a recurrence gate over the known-fake INVENTORY rather than per-slot spot checks. This adds that gate to both discovery builders' suites: iterate CORE_FALLBACK_FACTORIES (the complete fake inventory now that plugin-dev's stub table is retired, ADR-0115), register each product into its own slot, and assert discovery reports it `degraded` — never `available`. Table-driven, so the next fallback added to the table is gated the day it lands. cache/queue/job had no per-slot pin before this: dropping their `svcAvailable(…, svc)` third argument — the exact #4130 regression shape — was test-invisible. Verified the gate bites by simulating that regression (`services.cache.status: expected 'available' to be 'degraded'`). Closes #3898 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Contributor
📓 Docs Drift CheckNo hand-written docs reference the 0 changed package(s). ✅ |
…pability-issues-503666
This was referenced Jul 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
#3898 盘点的三个洞,核对当前 main,已全部由已合并的 PR 修复:
_fallback标记不被readServiceSelfInfo识别metadata/cache/queue/job/i18n)全部改带标准__serviceInfo,message 逐个点名缺什么,_fallback从生产代码中消失。app-plugin.ts的 i18n 诊断分支也改读readServiceSelfInfodata槽位不传实例svcAvailable(routes.data, 'kernel', dataSvc)补上第三参,附跨 builder 一致性 pinmetadata硬编码 degraded /protocol.ts硬编码 available本 PR:补建议 4 的防复发门
现有测试是逐槽位 spot-check;
fallbacks.test.ts在工厂层遍历CORE_FALLBACK_FACTORIES,但 discovery 层cache/queue/job三个槽位没有任何 pin —— 把它们的svcAvailable(…, svc)第三参删掉(正是洞 2 的复发形态)不会有任何测试变红。两个 discovery builder 的套件各加一条表驱动的门:遍历
CORE_FALLBACK_FACTORIES(plugin-dev stub 表按 ADR-0115 退役、_fallback被消灭后,这就是完整的已知 fake 清单),逐一注册进各自槽位,断言 discovery 报degraded、绝不available。新增兜底进表当天即被门覆盖。packages/runtime/src/http-dispatcher.test.ts—— dispatcher builder(getDiscoveryInfo)packages/objectql/src/protocol-discovery.test.ts—— metadata-protocol builder(getDiscovery)验证
cache槽第三参 →services.cache.status: expected 'available' to be 'degraded',还原后绿@objectstack/runtime全套 955/955 通过;@objectstack/objectql全套 1346/1346 通过: Hook字面量 (#4274) #4283 惯例)Closes #3898
🤖 Generated with Claude Code