Repository navigation
fix(scripts): ADR-0087 gate reads an any index signature (D8 p4) and a src/index.tsx entry (D9) - #26496
Merged
Conversation
…a src/index.tsx entry (D9) The gate half of the 2026-10-27 ADR-0087 amendment (#26455). Predicate 4 of type-surface-only gains the index-signature limb: a bare reference to an exported interface, or an object-literal type alias, holds when an index signature typed any at the merge base carries another value type at HEAD and the kind, heritage and every other member are identical. The runtime-export-retired entry mapping reads one source entry, src/index.ts or src/index.tsx; both present is refused as ambiguous. New self-test battery IX (52 cases), roster floor 56 -> 57. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Am8eYNReiNP66D2JihPS1q
Contributor
Author
席位核对 · ACCEPT · seat
|
This was referenced Oct 27, 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.
Requested by Steve · project thread
Part of #26220 (PR 2 of 2 for parts 3 and 4: the gate code for the ADR-0087 amendment that landed in #26455).
Clause-②: no
Metadata-protocol: none
What changes
scripts/check-adr-0087-registration.mjsonly (+288 / −11).anyindex signature (D8, amended). When the base surface is concrete, a bare<path>#<Symbol>naming an exportedinterface, or atypealias whose right-hand side is one object type literal, now goes throughindexSignatureLimb. The limb holds when all three hold: (1) at the merge base an index signature's value type isany; (2) at HEAD at least one of those carries another value type, withunknowncounted as narrowed here only; (3) the kind, the heritage (type parameters,extends) and every member are identical position by position on the comment-masked, normalised surface. Only the value types of base-anyindex signatures are set aside, so a re-typed non-anyindex signature is a moved member, which reads no wider than the ADR text. A dotted member path does not reach the limb. When the limb fails, the existing feat(runtime)!: 退役 ctx.user 的 roles 别名,positions 成为唯一拼法 (#6011) #6048 refusal now also prints why the limb did not hold, e.g. "the member count moved (2 -> 1)".src/index.tsx.sourceEntryAtmapsdist/index.d.ts(or its twin) to the package's one source entry,src/index.tsorsrc/index.tsx(SOURCE_ENTRY_NAMES). Both present is refused as AMBIGUOUS by name. Neither present is refused as unmappable, as before. The build tool is never read.structuralDeclarationParts,readIndexSignature,indexSignatureLimb. The member splitter does not treat the>of=>as a closer, so a nested literal's index signature is never read as a top-level one.Battery rows
New battery
IX (#26220): predicate 4 reads an any index signature; the entry may be src/index.tsx, 52 cases, roster floor 56 → 57:[key: string]: any→unknownon a generic interface; the verdict names both sides) and IX-G2 an object-literal alias with areadonlyindex signature narrowed tostring.extendsadded;anybase signature re-typed;unknown;anyat HEAD;anysignature behind an=>;src/index.tsx-only package retires an export (green; the verdict namesGone.tsx). IX-T2 both entries present is red as ambiguous; its.tstwin exports the same names, so only the refusal holds it red. IX-T3 neither entry is red as unmappable.Ablations
One-time, on the committed fix, each restored with
git checkout HEAD --(blob hash re-checked):=>guard off in the splitteranysrc/index.tsxdropped from the entry namesProof on the held PRs
With this branch's gate,
--base origin/main --head <their head>:e349c832: exit 0. The verdict isui/packages/types/src/base.ts#ComponentRendererProps ([key: string]: any -> [key: string]: unknown). Main's gate refuses it at predicate 4.@object-ui/plugin-aiand its three node types #26365 at20d75f11: exit 1, on a refusal the amendment does not cover. Main's gate refused all three operands at the MERGE BASE as unmappable (src/index.tsx). With this branch the base side maps and reads. The new refusal is at HEAD: "no workspace manifest at … is named@object-ui/plugin-ai". refactor(ui)!: retire@object-ui/plugin-aiand its three node types #26365 deletes the whole package, and D9 predicate 1 reads "absent at HEAD" through a Program over the package's entry at each rev, which a deleted package does not have. Admitting a whole-package removal needs its own D9 wording (Tier H). Seat 1 has put that choice to the maintainer, and it is not in this PR.Tests and gates
node scripts/check-adr-0087-registration.mjs --self-test: exit 0, "627 assertions over real temp git repos" (575 before this branch).node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack: 34 commands derived at this head (based0a7e748). All 34 exit 0, including--base origin/mainand--self-testof this gate,check-scripts-symbol-anchors,check-declaration-mirrors,check-self-test-wired,pnpm check:changeset-gate-self-testsandpnpm check:pm-dispatch-gates.--ran: 34 derived, 34 run, 0 NOT-MEASURED, 0 UNRUN.skip-changeset).Acceptance notes
anyindex signatures have their value types set aside, so a non-anyone that changes is a re-typed member. This is stated in the function's comment and pinned by IX-R6 and its ablation.runtime-export-retiredcan never certify an operand nameddefault(predicate 2 word-scansdefaultacross every metadata surface) #26324 (predicate 2 cannot certify an operand nameddefault) is a separate card and is not addressed here.🤖 Generated with Claude Code
https://claude.ai/code/session_01Am8eYNReiNP66D2JihPS1q