Repository navigation
test(spec): the deleted-baseline reachability pin measures descent below the unregistered connector root again - #29831
Merged
Conversation
…low the unregistered connector root again Adds integration/ConnectorInstanceBearerAuth (connector.auth → the instance-auth union → its bearer arm) beside the root's own def in the #17356 case. The root's own def is refused even with the roots narrowed back to the registered set, because its shared bookkeeping keys bridge it as a derived clone; the depth specimen reads null there and is the key whose verdict flips to the proof-2 waiver when the walk stops descending below an unregistered root. The fixture guard holds the def beneath `connector` and beneath no other root, by the gate's own two routes (identity in the closure, shape-entry bridge). Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzeePBUouzbRj7MtDva
…oots prints for the root's own def Measured: with the roots narrowed back to the registered set, the root's own def reads as a derived clone and is still refused (exit 1); the waiver the comment described is printed for the depth key instead. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzeePBUouzbRj7MtDva
Contributor
📓 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): |
Contributor
Author
|
domain:spec#2 · os-support-ai · session_01WGufzhJG3tKnksHVa1krBz 席位核对 — ACCEPT · domain:spec#2 · head
|
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.
Requested by Yibo Wang · project thread
Fixes #29668
维护者速读
build-schemas-check-mode.deleted-baseline.test.ts的 [finding] the authorable-key deletion gate's reachability BFS reportsintegration/DataSyncConfigunreachable from the metadata-type roots — it is two hops from theconnectorroot, so #4650 proof 2 waives a tombstone for a key a stack manifest really authors #17356 用例在原有的根自身 def(integration/DeclarativeConnectorEntry)旁,新增一个挂在未注册根connector之下的 def:integration/ConnectorInstanceBearerAuth(connector.auth→ 实例鉴权联合 →bearer分支),并加夹具诚实守卫。仅测试,+97/−1。integration/DataSyncConfigunreachable from the metadata-type roots — it is two hops from theconnectorroot, so #4650 proof 2 waives a tombstone for a key a stack manifest really authors #17356 缺陷:根集合收窄回已注册类型时,它经共享的_lock等记账键实例被读成 derived-clone,删除照样被拒;新样本此时读null,会被 proof 2 豁免,正是该缺陷的形态。DELETED_BENEATH_UNREGISTERED_KIND_DEF的文档注释,再看beforeAll里 A connector save ofretryConfig: {}keeps a withheld key; decide whether an empty container clears it #29668 守卫和 [finding] the authorable-key deletion gate's reachability BFS reportsintegration/DataSyncConfigunreachable from the metadata-type roots — it is two hops from theconnectorroot, so #4650 proof 2 waives a tombstone for a key a stack manifest really authors #17356 用例中新增的四条断言。pnpm --filter @objectstack/spec exec vitest run --project repo scripts/build-schemas-check-mode.deleted-baseline.test.ts -t 17356,预期通过;把computeSurfaceReachability()的 BFS 改为不下探未注册根,预期本用例在新断言处变红,下方两次消融均已实测。Clause-②: no
Metadata-protocol: none
What changes
integration/DataSyncConfigunreachable from the metadata-type roots — it is two hops from theconnectorroot, so #4650 proof 2 waives a tombstone for a key a stack manifest really authors #17356 case seeds a third deleted base line,integration/ConnectorInstanceBearerAuth:zzBeneathAnUnregisteredRoot29668, and asserts that check (c) refuses it: in the eager regime it readsdef reachable from the metadata-type roots; … was LIVE, in the lazy regimedef … was LIVE (never tombstoned), and in neither does it readdef not reachable from the …(the proof-2 waiver). The existing specimen and its assertions are unchanged. It runs in the same spawned run as the existing specimen, so no new spawn and no test-budget change.beforeAllholds the def beneathconnectorand beneath no other root. It reads the def the way the gate does, on both routes: its own instance in a BFS closure (zodChildSchemas), and a shape entry (same name, same instance) held by a visited object node (zodShapeOf). It also checks the def is still emitted with authorable keys. Imports added for the guard only:getMetadataTypeSchema,ConnectorInstanceBearerAuthSchema,zodChildSchemasandzodShapeOf.Why
#29573 moved the #17356 specimen from
integration/RetryConfigto the connector root's own def. The card asks for a specimen beneath that root again. Measuring which one qualifies onmainturned up more than the card said: the root's own def no longer catches the defect at all.Every metadata document carries the shared bookkeeping keys (
_lock,_lockReason, …) as the same schema instances. So with the roots narrowed back tolistMetadataTypeSchemaTypes()(the #17356 defect),integration/DeclarativeConnectorEntryresolves asderived-clonethrough any registered root's_lock, and check (c) still refuses its deletion. Only the wording changes. The existing pin goes red on that wording, but the waiver it was written against no longer happens to it.Measurement (on
mainat 0e4b0fa)A one-off probe, deleted before commit, ran the gate's own walk (
zodChildSchemasclosure plus the shape-entry bridge) over every Integration/Shared/… namespace export, in both schema regimes. Defs that readroot-graphfromconnectorand not from the other 32 roots:connectorintegration/ConnectorInstance{NoAuth,BearerAuth,APIKeyAuth,BasicAuth,OAuth2AuthorizationCodeAuth,OAuth2ClientCredentialsAuth,AppCredentialAuth,SignedAlipayV3Auth,SignedAliyunAcs3Auth,SignedTencentCloudTc3Auth}nullintegration/ConnectorInstance{Auth,OAuth2Auth,SignedAuth}(unions)nullintegration/DeclarativeConnectorEntry(the root's own def)derived-cloneWith the registered set alone (30 roots, the pre-#17356 roots):
DeclarativeConnectorEntrygivesderived-clone,ConnectorInstanceBearerAuthgivesnull, in both regimes.bearerwas picked as the plainest arm.Ablations (the new assertion, red; then restored)
Each ablation edited
packages/spec/scripts/build-schemas.ts, ranvitest run --project repo … -t 17356underos-verify-lock, and was restored withgit checkout. The committed tree has no generator change.Stop the walk at the unregistered roots. The root stays visited, but the BFS does not push its children. Exit 1, red at the new eager assertion (
:617). The gate printed:integration/ConnectorInstanceBearerAuth:zzBeneathAnUnregisteredRoot29668 — def not reachable from the 33 metadata-type roots(waived)integration/DeclarativeConnectorEntry:zzOnlyRootIsAnUnregisteredKind17356 — def reachable from the metadata-type roots; … was LIVE (never tombstoned).(the existing assertions held)Only the new specimen measures the descent.
Narrow the roots back to the registered set (the [finding] the authorable-key deletion gate's reachability BFS reports
integration/DataSyncConfigunreachable from the metadata-type roots — it is two hops from theconnectorroot, so #4650 proof 2 waives a tombstone for a key a stack manifest really authors #17356 defect: drop thelistUnregisteredKindSchemaTypes()line fromreachabilityRootTypes()). Exit 1, red at the existing wording assertion (:606). The gate printed:ConnectorInstanceBearerAuth:… — def not reachable from the 30 metadata-type roots(waived)DeclarativeConnectorEntry:… — def authorable through a derived clone of a root-reachable schema; … was LIVE(still refused)This confirms the docblock's claim with the real gate.
Item 1 (ruled, already on
main)Item 1 was ruled by the maintainer on PR #29573 (comment 6593804783, 「显式 {} 就清掉,带前提」), and #29573 built it and is merged. The HTTP-door pin is on
main:packages/qa/dogfood/test/connector-meta-door-url-and-nested-keys.dogfood.test.ts, test "retryConfig: {}replaces the stored one whole: the next read of the stored row no longer has the undeclared key", in the CARRY-FORWARD describe. It is aPUT /meta/connector/:nameof the served form withretryConfig: {}over a seeded row holdingretryConfig.secret. It asserts awithheld-key-droppedadvisory atconnectors[0].retryConfig.secret, the stored row'sretryConfigequal to{}, and a control that a withheld position outsideretryConfigis still carried forward. The served-object variant is inconnector-meta-door-undeclared-keys-withheld.dogfood.test.ts. This PR adds no dogfood pin.Verification
All under
scripts/pm/os-verify-lock.shon headd1cdcbe1, shared box:pnpm --filter @objectstack/spec build: exit 0 (93 s).pnpm --filter @objectstack/spec test: exit 0, 23961 passed, 1 todo.pnpm --filter @objectstack/spec test:repo: exit 0, 89 files, 1522 tests (the deleted-baseline file runs here: 15/15, 186 s alone).pnpm --filter @objectstack/spec check:test-typecheckandcheck:scripts-typecheck: exit 0.node scripts/pm/dispatch-gates.mjs --commands: 58 families, each run and recorded.--ranexits 0 with 56 run, 2 NOT MEASURED, 0 unrun. NOT MEASURED:check:dual-build-cjs-loadsandcheck:lean-entry-closure, both exit 3 because they need every package'sdistand only spec was built. CI's Build Core runs them, and a test file underpackages/spec/scripts/moves no dist.check-plugin-teardown-shape --self-testfirst exited 3 on the shallow clone; aftergit fetch origin 621a4876it exited 0.node scripts/check-commit-card-trailers.mjs --range origin/main..HEAD: exit 0.Acceptance notes
skip-changeset. AGENTS.md (Post-Task Checklist 3) reserves the label for "a diff that publishes nothing from any released package".packages/spec/package.jsonfilesdoes not includescripts/, so this test file publishes nothing.Clause-②: noandMetadata-protocol: none: no accept set and no authorable surface moves (the diff is one test file).🤖 Generated with Claude Code
https://claude.ai/code/session_01WGufzeePBUouzbRj7MtDva