feat(tooling): enforce noUncheckedIndexedAccess in the extensions lane (NUIA phase 4)#105132
Merged
Conversation
Transport-payload-safe burn-down: malformed Telegram/Discord/QQ/LINE and sibling channel input keeps existing skip paths; no synthesized fields, no new throws in delivery loops. Zalo escape sentinels preserve literal matches instead of undefined replacements.
…ory plugins Stream and model iteration, tool-block guards, capture guards, and sparse accumulators; singleton model reads carry named invariants.
… flip the extensions lane Remaining plugins (oc-path, qa-lab, browser, logbook, and siblings) plus the tsconfig.extensions.json flag flip. Cleanup: logbook sampleFrames NaN index at max=1, QA retry clamp at non-positive attempts, dead Canvas probe and OpenShell no-op slice removed, twitch test setup leak excluded from the prod lane.
Extensions imported @openclaw/normalization-core directly, crossing the external-plugin packaging boundary (it only worked because the runtime builder bundles undeclared workspace helpers). expect-runtime joins the canonical entrypoints JSON, generated exports, API baseline, docs, and subpath contract test; all 78 extension imports now use the SDK seam. Two scanner-shaped locals renamed for review-bundle hygiene.
One new entrypoint with one callable export, added intentionally as the packaging-honest seam for extension invariant helpers.
Contributor
Author
|
Merged via squash.
|
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Jul 13, 2026
…e (NUIA phase 4) (openclaw#105132) * fix(extensions): make indexed access explicit across channel plugins Transport-payload-safe burn-down: malformed Telegram/Discord/QQ/LINE and sibling channel input keeps existing skip paths; no synthesized fields, no new throws in delivery loops. Zalo escape sentinels preserve literal matches instead of undefined replacements. * fix(extensions): make indexed access explicit across provider and memory plugins Stream and model iteration, tool-block guards, capture guards, and sparse accumulators; singleton model reads carry named invariants. * fix(extensions): make indexed access explicit across tooling plugins, flip the extensions lane Remaining plugins (oc-path, qa-lab, browser, logbook, and siblings) plus the tsconfig.extensions.json flag flip. Cleanup: logbook sampleFrames NaN index at max=1, QA retry clamp at non-positive attempts, dead Canvas probe and OpenShell no-op slice removed, twitch test setup leak excluded from the prod lane. * refactor(plugin-sdk): expose expectDefined via a focused SDK subpath Extensions imported @openclaw/normalization-core directly, crossing the external-plugin packaging boundary (it only worked because the runtime builder bundles undeclared workspace helpers). expect-runtime joins the canonical entrypoints JSON, generated exports, API baseline, docs, and subpath contract test; all 78 extension imports now use the SDK seam. Two scanner-shaped locals renamed for review-bundle hygiene. * chore(plugin-sdk): raise surface budgets for the expect-runtime subpath One new entrypoint with one callable export, added intentionally as the packaging-honest seam for extension invariant helpers.
ceckert
added a commit
to ceckert/openclaw
that referenced
this pull request
Jul 14, 2026
…hreadDirectMessages The 7.2 cherry-pick resolved extensions/mattermost/src/mattermost/monitor.ts by taking our side wholesale, silently reverting six upstream commits landed between 7.1 and 7.2. Adopt them instead of clobbering: f77c2aa truncate the inbound preview on a code-point boundary (openclaw#101630) b7ab62c preserve text-block boundaries in the draft preview (openclaw#87449) da6a24d prevent hung pre-delivery hooks from blocking lanes (openclaw#104256) 218dcd8 noUncheckedIndexedAccess in the extensions lane (openclaw#105132) 9cdf166 trim the monitor gating facade (openclaw#106021) 70a7e6e (opt-in DM threading by chat type) was already in the impl; three 7.1-era assertions in monitor.test.ts that upstream had superseded move to upstream's semantics (the implementations are byte-identical to upstream). b7ab62c's 173-line monitor hunk (block-preview boundary machinery) was hand-ported onto our activity/warm-fallback interleaving; the block-preview code is now byte-identical to pristine 7.2. threadDirectMessages kept as a thin compat feeding upstream's replyToModeByChatType, because Dockerfile.base's shared config probe still writes it and the probe spans matrix bases older than 2026.7.2. Retire both together later. Mattermost suite 630/632. The 2 remaining timeouts are localized to deliverMattermostReplyWithDraftPreview: with a mocked-rejecting updateMattermostPost, our patched buildFinalEdit attempts the in-place edit (pristine skips it), the edit rejects, and the deliverNormally fallback awaits the unmocked deliverMattermostReplyPayload which never resolves under the test's bare sendMessageMattermost stub. Behavioral divergence in our activity/warm-fallback finalize path, not the upstream port. TODO.
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.
Related: #104600
What Problem This Solves
Phase 4 of the
noUncheckedIndexedAccessadoption (#104600): all 844 extension-owned unchecked-index errors across ~50 bundled plugins, and the fourth production lane flip — with this landed,src/,packages/,ui/, andextensions/all enforce the flag inherently.Why This Change Was Made
tsconfig.extensions.jsonnow enforces the flag; a synthetic unchecked read fails the normal lane command (probe removed).@openclaw/normalization-coredirectly — which only worked because the runtime builder bundles undeclared workspace helpers. New focused SDK subpathopenclaw/plugin-sdk/expect-runtime(entrypoints JSON, generated exports, API baseline, docs, subpath contract test) with all 78 imports switched; a rebuilt published plugin keeps the SDK import with no inlined helper.sampleFrames(…, 1)NaN index; Zalo escape sentinels producing undefined replacements; QA credential retry clamp at non-positive attempts; dead Canvas filesystem probe and OpenShell no-op slice removed; a twitch test-setup leak excluded from the prod lane.User Impact
No channel/provider behavior change on healthy or malformed payloads (equivalence documented); plugin packaging is contractually honest; every future extension change is index-safe at check time.
Evidence
../codexsources (config/mod.rs, config_toml.rs, token_data.rs).