Skip to content

fix(sdk-core): narrow the slug_name self-encoding guard for strict null checks - #91

Open
heifner wants to merge 1 commit into
masterfrom
fix/slug-name-builtin-strict-null
Open

heifner wants to merge 1 commit into
masterfrom
fix/slug-name-builtin-strict-null

Conversation

@heifner

@heifner heifner commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

The strict-null typecheck fails on master (pnpm run test:ci → typecheck:strict-null:sdk-core):

src/serializer/Builtins.ts(89,45): error TS2722: Cannot invoke an object which is possibly 'undefined'.

The type guard added in #90 narrowed to ABISerializableObject, whose toABI is optional, so the call stayed possibly-undefined. It now narrows to a type whose toABI is present. There is no behaviour change.

This failed the v1.0.93 tag-release run (36179924054), so sdk-core 1.0.93 was never published. After this merges, tag-release needs a manual re-dispatch; master already carries the 1.0.93 version bump.

Verified with the real gate: pnpm run test:ci passes (strict-null typecheck included), 90 suites / 981 tests, and lint is clean.

…ll checks

ABISerializableObject declares toABI optional, so narrowing to it left the call
possibly undefined under the strict-null typecheck and failed test:ci on master
(and the v1.0.93 tag-release). Narrow to a type whose toABI is present.

Change-Id: I6b4a61bcdf946c5b0ab2066fb65332cbd6d0c55c
huangminghuang
huangminghuang previously approved these changes Sep 26, 2026

@huangminghuang huangminghuang left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified the strict-null failure on master in a registry-only Node 24 checkout. The predicate now accurately reflects the runtime toABI function check without changing runtime behavior; pnpm run test:ci passes (90 suites, 981 tests).

@huangminghuang
huangminghuang dismissed their stale review September 26, 2026 16:58

Approval removed at the requester’s direction.

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants