fix: (GPT 5.4 Parity vs. Opus Agentic) stabilize post-parity-program main (target-resolver, memory-wiki, pruning-defaults)#64675
Conversation
…i + pruning-defaults) Fixes three inherited failures that are red on every recent main commit since PR B (#64439) and PR C (#64300) landed. Each failure is a stale test surface that a production change forgot to update. 1) target-resolver.test.ts is mocking plugins/runtime.js with only getActivePluginChannelRegistryVersion. After src/channels/registry.ts started calling getActivePluginChannelRegistry + getActivePluginRegistry through listRegisteredChannelPluginEntries(), every resolveMessagingTarget test that reaches normalizeTargetForProvider fails with 'No getActivePluginChannelRegistry export is defined on the ../../plugins/runtime.js mock'. Adds both exports to the mock factory with a registry seeded from the channels the test cases actually use (discord, imessage, mattermost, slack, telegram) so normalizeAnyChannelId resolves them the way real runtime would. 2) memory-wiki/index.test.ts expects 16 gateway methods, but src/gateway.ts now registers 19 after wiki.importRuns, wiki.importInsights, and wiki.palace were added between wiki.status and wiki.init. Extends the expected list to match the real registration order. 3) test/extension-test-boundary.test.ts flags src/config/config.pruning-defaults.test.ts as a core test that deep-imports extensions/anthropic/provider-policy-api.js, which violates the extension-test-boundary rule. Moves the test to extensions/anthropic/config-pruning-defaults.test.ts with inferred types from applyAnthropicConfigDefaults's parameter/return shape, matching the pattern used by the sibling provider-policy-api.test.ts. Local validation: - pnpm test src/infra/outbound/target-resolver.test.ts - pnpm test extensions/memory-wiki/index.test.ts - pnpm test extensions/anthropic/config-pruning-defaults.test.ts - pnpm test test/extension-test-boundary.test.ts Refs #64227
The test was moved to extensions/anthropic/config-pruning-defaults.test.ts in the previous commit to comply with the extension-test-boundary rule (keep plugin-owned behavior suites under the bundled plugin tree). This commit removes the now-orphaned core copy. The committer script only stages file additions, not deletions, so this removal is committed directly with git commit -m. Refs #64227
There was a problem hiding this comment.
Pull request overview
Fixes three inherited, lane-specific test failures on main by updating test mocks/expectations to match recent production surface changes (target resolver plugin registry access, memory-wiki gateway method registration count/order, and extension-boundary compliance for Anthropic config pruning defaults).
Changes:
- Extend
target-resolvertests to mock the additional plugin-runtime registry exports now used transitively by channel normalization. - Update
memory-wikiplugin registration test expectations to include newly registered gateway methods in the correct order. - Relocate / adapt the Anthropic pruning-defaults test to live under the owning extension and infer types from
applyConfigDefaults.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
src/infra/outbound/target-resolver.test.ts |
Adds runtime registry mocks + seeded channel entries so normalizeAnyChannelId resolves channels used in the suite. |
extensions/memory-wiki/index.test.ts |
Updates expected gateway method list to match the current registerMemoryWikiGatewayMethods registration order. |
extensions/anthropic/config-pruning-defaults.test.ts |
Keeps the test within the Anthropic extension boundary and removes core-only type imports via inferred types. |
Greptile SummaryThis PR fixes three inherited test failures on Confidence Score: 5/5This PR is safe to merge — all changes are test-only with no runtime behavior impact. All three fixes correctly align test expectations with their production counterparts. The mock shape, gateway method order, and type derivation patterns have all been verified against source. No P0/P1 findings identified. No files require special attention. Reviews (1): Last reviewed commit: "fix: remove moved anthropic pruning-defa..." | Re-trigger Greptile |
|
Loop-6 status (pass 1): no code fixes needed on this PR. Prior bot findings were all addressed in earlier pushes. Re-requesting fresh review pass from @Copilot. Paired with the loop-6 pushes on #64679, #64681, #64685, and the re-opened parity-summary PR (#64789, replacing closed #64689) this PR is ready for merge once main is green. |
|
Closing as superseded. All three fixes this PR proposed have been independently resolved on main (HEAD
Each of the three inherited red-main failures that PR F was fixing is now green on main through different commits, so this PR is no longer needed. Closing to keep the tracker clean. Completion gate criterion 5 progress on #64227 is unaffected. |
Summary
Fix the three inherited test failures that are red on every recent
maincommit since the GPT-5.4 / Codex parity program's PR B (#64439) and PR C (#64300) landed. Each failure is a stale test surface that a production code change forgot to update.Tracked by #64227. Unblocks PR D (#64441) and PR E (#64662) from inheriting the same red signal on rebase.
Scope
Refs #64227What changed
src/infra/outbound/target-resolver.test.ts— mock factory for../../plugins/runtime.jsonly declaredgetActivePluginChannelRegistryVersion. Aftersrc/channels/registry.tsstarted callinggetActivePluginChannelRegistry+getActivePluginRegistrythroughlistRegisteredChannelPluginEntries(), everyresolveMessagingTargettest that reachesnormalizeTargetForProviderhits:Fix: add both exports to the mock factory, seeded with a registry of the channel plugin ids the test cases actually use (
discord,imessage,mattermost,slack,telegram) sonormalizeAnyChannelIdresolves them the same way the real runtime would.extensions/memory-wiki/index.test.ts— asserted 16 gateway methods, butextensions/memory-wiki/src/gateway.tsnow registers 19 afterwiki.importRuns,wiki.importInsights, andwiki.palacewere added betweenwiki.statusandwiki.init. Update the expected list to match the real registration order.src/config/config.pruning-defaults.test.ts— flagged bytest/extension-test-boundary.test.tsas a core test deep-importing../../extensions/anthropic/provider-policy-api.js, which violates the extension-test-boundary rule ("Keep plugin-owned behavior suites under the bundled plugin tree"). Move the whole test toextensions/anthropic/config-pruning-defaults.test.ts, replace the direct../../src/config/config.jsOpenClawConfigimport with inferred types fromapplyAnthropicConfigDefaults's parameter / return shape — matching the pattern already used by the siblingextensions/anthropic/provider-policy-api.test.ts— and delete the orphaned core copy.Why
All three failures predate any parity-program PR and all three have been red on the same check lanes (
checks-node-core-test-core-runtime,checks-node-extensions-shard-6,checks-node-core-test-core-support-boundary) on every recentmaincommit. Maintainer has been pushing a stream oftest: narrow …stabilization commits; this PR concentrates the three remaining lane-specific fixes into one reviewable unit so PR D (#64441) and PR E (#64662) can rebase onto a greenmainand actually produce a first-wave parity verdict.Validation
Focused checks on the rebased branch:
pnpm test src/infra/outbound/target-resolver.test.ts→ 6/6 passpnpm test extensions/memory-wiki/index.test.ts→ 1/1 pass (70 other memory-wiki tests also pass)pnpm test extensions/anthropic/config-pruning-defaults.test.ts→ 7/7 passpnpm test test/extension-test-boundary.test.ts→ 4/4 pass (boundary offender list empty)Non-goals
.generatedbaseline SHA files or any config schemaLinked issues