Repository navigation
refactor: eliminate final wrapper-shadowing hazards - #122157
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 11, 2026, 4:09 PM ET / 20:09 UTC. ClawSweeper reviewWhat this changesThe PR renames internal implementations behind behavior-complete runtime and Plugin SDK façades, deletes duplicate forwarders, and removes remaining wrapper-shadowing baseline entries. Merge readinessNo actionable patch regression was identified; the two prior Plugin SDK compatibility concerns are addressed by retaining public façades over distinct internal owners. This maintainer-labeled refactor should remain open for its exact-head contract and CI completion. Priority: P3 Review scores
Verification
How this fits togetherCore and plugins enter public SDK or runtime façades, which preserve behavior such as lazy loading, privacy filtering, and provider-auth routing before delegating to internal owners. The wrapper-shadowing guard prevents future internal exports from reusing those façade names. flowchart LR
A[Core and plugin callers] --> B[Public SDK and runtime facades]
B --> C[Lazy behavior boundaries]
C --> D[Internal owner implementations]
D --> E[Provider auth, sessions, and audit behavior]
D --> F[Wrapper-shadowing check]
Before merge
Agent review detailsSecurityNone. Review metrics
Stored data modelPersistent data-model change detected: Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep public SDK and behavior-complete wrapper names stable, use distinct internal owner names, and merge only after exact-head contract validation confirms the generated API surface remains compatible. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR is an internal naming and ownership refactor, not a report of a reproducible user failure. Is this the best way to solve the issue? Yes. Retaining behavior-complete public façades while giving lower-level owners distinct names is the narrowest durable way to prevent ambiguous imports without breaking Plugin SDK callers. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 09c39e0ec528. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (2 earlier review cycles)
|
b92ccf6 to
98912e3
Compare
d84a6dd to
d02ab03
Compare
d02ab03 to
0d6546e
Compare
55890b2 to
cdb6b76
Compare
cdb6b76 to
2681bc4
Compare
|
Merged via squash.
|
…-prep * commit 'edb7a1692e58d78ff7e196db39ea8eff297b2e19': (1351 commits) fix(telegram): expose live location updates to hooks (openclaw#122185) fix(ui): remove the pre-creation session row (openclaw#122259) fix(openai): surface failed realtime response outcomes (openclaw#121177) fix(logging): publish diagnostics ZIP through staged atomic overwrite (openclaw#122130) test(cli): trim duplicate MCP probe process cases (openclaw#122260) feat(agents): replay persisted native video (openclaw#122257) fix(test): serialize default e2e runner (openclaw#122203) fix(ui): always show full assistant responses (openclaw#122207) feat(mcp): per-requester OAuth for MCP servers (openclaw#122166) fix(ui): preserve focus on composer accessory clicks (openclaw#122243) fix(backup): exclude state temp files (openclaw#122250) fix(browser): let attached workers exit after CDP use (openclaw#122103) test(cli): trim duplicate Claw authoring process cases (openclaw#122248) refactor(outbound): inline delivery diagnostics (openclaw#122219) refactor: eliminate final wrapper-shadowing hazards (openclaw#122157) fix(ui): keep new-session identity anchored (openclaw#122242) test(cli): trim duplicate gateway process cases (openclaw#122240) fix(media): decode local file URLs safely (openclaw#122192) refactor(agents): centralize typed activity event emission (openclaw#122188) fix(ui): effort slider matches selected level after model switches (openclaw#122125) ...
* refactor: disambiguate wrapper-shadowed exports * test: align renamed session and facade boundaries * test: cover renamed runtime mock exports * refactor: align remaining wrapper owner call sites * test: align overlap-rebased runtime mocks * refactor: preserve public SDK names after overlap rebase * chore: regenerate wrapper shadowing baselines * test: align cron model selection mocks
What Problem This Solves
The wrapper-shadowing guard still carried 30 debt entries where the same exported spelling could select either a low-level implementation or a behavior-complete lazy/runtime/SDK boundary. Importing the inner module by accident could silently bypass wrapper-owned behavior such as activation checks, session privacy filtering, persistence binding, redaction, compatibility materialization, or lazy loading.
This burns the final #121300 wrapper-shadowing debt tranche requested after #122040: one exported spelling now identifies one behavior at each owner boundary.
Why This Change Was Made
Behavior-complete wrappers keep their canonical names, while their wrapped owners receive grep-unique
Coreor concept-specific names. Four true duplicate forwarders are deleted instead of preserved: the three unused web-media runtime aliases and the outboundreadBooleanParamalias. Shipped Plugin SDK export names and callable counts stay unchanged; only internal mappings and generated closure hashes move.loadBundledPluginPublicSurfaceModuleSyncloadBundledPluginPublicSurfaceModuleSyncCoreloadCombinedSessionStoreForGatewayloadCombinedSessionStoreForGatewayCoreloadPluginManifestRegistryloadPluginManifestRegistryCoreloadWebMediaRawloadWebMediamaybeApplyTtsToPayloadmaybeApplyTtsToPayloadCorenormalizeCronRunDiagnosticsnormalizeCronRunDiagnosticsCorenormalizeOutboundReplyPayloadnormalizeOutboundReplyPayloadCorenormalizePluginsConfigWithResolvernormalizePluginsConfigWithResolverCoreoptimizeImageToJpegpruneStaleCommandPollspruneStaleCommandPollsCorereadAmbientTranscriptWatermarkreadAmbientTranscriptWatermarkFromEntryreadBooleanParamreadSessionTranscriptVisibleMessageDeltareadSessionTranscriptVisibleMessageDeltaCoreresolveAllowedModelRefresolveAllowedModelRefCoreresolveApiKeyForProviderresolveApiKeyForProviderCore; internal runtime →resolveProviderRuntimeApiKey; SDK spelling retainedresolveHeartbeatPromptresolveHeartbeatPromptCoreresolvePluginProvidersresolvePluginProvidersCoreresolvePluginSetupProviderresolvePluginSetupProviderCoreresolveProviderPluginChoiceresolveProviderPluginChoiceCoreresolveSecretPlanTargetByPathresolveSecretPlanTargetByPathCoreresolveSessionFilePathresolveSessionFilePathCoreresolveSessionKeyForRequestresolveSessionKeyForRequestCoreresolveSessionStoreEntryresolveSessionStoreEntryCoreresolveStorePathresolveSessionStorePathCore; SDK spelling retainedrunProviderModelSelectedHookrunProviderModelSelectedHookCorerunSecurityAuditrunSecurityAuditCoresha256HexPrefixsha256HexPrefixCoreshouldSuppressBuiltInModelshouldSuppressBuiltInModelCoretextToSpeechtextToSpeechCoreAI-assisted: yes. The full branch was reviewed with the repository autoreview workflow, and every actionable finding gate is clean.
User Impact
None. This is behavior-neutral internal ownership cleanup. Existing operators, plugin authors, and Plugin SDK consumers keep the same public names and runtime behavior.
Evidence
tsgoon the final rebased head.pnpm plugin-sdk:api:check,pnpm check:import-cycles, andgit diff --checkpass.pnpm check:wrapper-shadowingpasses with 0 current / 0 baselined. The original assigned list drops 30 → 0; after concurrent main cleanups, this rebased branch drops the remaining 14 → 0. A second generator run is idempotent at 0.origin/main: clean, 0 accepted/actionable findings, overall 0.98.