Repository navigation
feat(tooling): enforce indexed access checks in extension tests - #105343
Merged
Merged
Conversation
Contributor
Author
|
Land-ready proof for
Supplemental |
Contributor
Author
|
Merged via squash.
|
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Jul 13, 2026
masatohoshino
added a commit
to masatohoshino/openclaw
that referenced
this pull request
Jul 29, 2026
Rebasing onto main picked up openclaw#105343's stricter indexed-access checks, which surfaced two unsound spots in the ordered-receipt path: pairing a sent id with messages[index] typed the message as possibly undefined, and reading the primary id off parts[0] assumed a non-empty list. Pair via a single-element slice so the kind resolver keeps its array contract, and destructure the primary with an explicit contract-violation throw rather than fabricating a placeholder id. The LINE SDK contract requires a non-empty sentMessages response, so an empty list on a resolved send is a broken invariant, not a state to paper over.
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.
Follow-up to #105239 and #104600.
What Problem This Solves
The shared test TypeScript config still opts out of
noUncheckedIndexedAccess, leaving the extension test lane's indexed-access assumptions outside the production safety baseline. The July inventory counted 1,126 diagnostics; currentmainhad drifted to 1,136.Why This Change Was Made
noUncheckedIndexedAccessexplicitly intest/tsconfig/tsconfig.extensions.test.json, overriding the temporary shared test opt-out.expectDefinedchecks for genuine fixture invariants.User Impact
No runtime impact. Future extension tests now fail typechecking when they assume an indexed value exists without proving that invariant.
Evidence
node scripts/run-tsgo.mjs -p test/tsconfig/tsconfig.extensions.test.json --incremental false --pretty false— clean on Blacksmith Testbox; 1,136 diagnostics to zero.pnpm check:changed— clean on Blacksmith Testbox, including extension production/test typechecks, formatting, extension and script lint, import cycles, and policy guards.pnpm test:extensions— broad Testbox attempt exercised the extension matrix; it exposed 9 failures in pre-existing memory export/index test cases outside the changed hunks. The changed QMD query-argument assertions passed, and the repository-native exact-head gates remain the merge authority.git diff --checkand targeted oxfmt — pass.Testbox lease
tbx_01kxayd6558vyham2c3sxe67jj; backing run: https://github.com/openclaw/openclaw/actions/runs/29189409636