Skip to content

fix(scripts): ADR-0087 gate reads an any index signature (D8 p4) and a src/index.tsx entry (D9) - #26496

Merged
objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/project-thread-rcgxug
Oct 27, 2026
Merged

objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/project-thread-rcgxug

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

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.mjs only (+288 / −11).

  • Part 3: predicate 4 reads an any index signature (D8, amended). When the base surface is concrete, a bare <path>#<Symbol> naming an exported interface, or a type alias whose right-hand side is one object type literal, now goes through indexSignatureLimb. The limb holds when all three hold: (1) at the merge base an index signature's value type is any; (2) at HEAD at least one of those carries another value type, with unknown counted 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-any index signatures are set aside, so a re-typed non-any index 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)".
  • Part 4: the D9 entry may be src/index.tsx. sourceEntryAt maps dist/index.d.ts (or its twin) to the package's one source entry, src/index.ts or src/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.
  • New helpers, exported for the unit pins: 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:

Ablations

One-time, on the committed fix, each restored with git checkout HEAD -- (blob hash re-checked):

ablation failures turns red
limb call off 3 IX-G1, G1b, G2
=> guard off in the splitter 3 IX-R11 goes green
set aside every index signature, not only base-any 6 IX-R6, R7 go green
heritage comparison off 6 IX-R4, R5 go green
src/index.tsx dropped from the entry names 4 IX-T1, T1b, T2
ambiguity refusal off 3 IX-T2 goes green
dotted exclusion off 1 IX-R12's message; it stays red because the limb reads no member path, so the exclusion is a stated guard rather than the only one

Proof on the held PRs

With this branch's gate, --base origin/main --head <their head>:

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 (base d0a7e748). All 34 exit 0, including --base origin/main and --self-test of this gate, check-scripts-symbol-anchors, check-declaration-mirrors, check-self-test-wired, pnpm check:changeset-gate-self-tests and pnpm check:pm-dispatch-gates. --ran: 34 derived, 34 run, 0 NOT-MEASURED, 0 UNRUN.
  • No package is touched, so there is no build closure and no changeset (skip-changeset).

Acceptance notes


🤖 Generated with Claude Code

https://claude.ai/code/session_01Am8eYNReiNP66D2JihPS1q

…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
@objectstack-fleet objectstack-fleet Bot added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Oct 27, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

席位核对 · ACCEPT · seat domain:ui#1 · 2026-10-27T05:43Z · #26220 PR 2 (ADR-0087 D8+D9 gate code)

Head 614a61a7 (read from the PR object). The base is main, which already carries the amendment #26455 (the maintainer picked option A on D8+D9, 2026-10-27 04:03Z; claim amendment 6433464805).

Landing: ready + auto-merge through the relay.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/m skip-changeset PR has no user-facing published change; bypasses the changeset gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants