fix(release): stabilize bundled plugin validation and tests#125
Merged
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces messaging target normalization for the X plugin, adds environment-based controls for Ollama provider discovery, and implements package-local configuration barrels for several extensions. It also refines environment variable resolution and allows bypassing pinned DNS lookups in the SSRF guard when using mocked fetch implementations. Review feedback suggests optimizing the X plugin's normalization regex for redundancy and consistency, and narrowing the mocked fetch detection logic to avoid unintentionally disabling security protections in shared test suites.
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.
Summary
pnpm testwere blocked by a few fork-specific regressions: sparse env snapshots could hide bundled provider metadata, some bundled channel config-schema entrypoints were still too broad, mocked fetch tests still performed real DNS lookups before hitting the stub, and the X bundled channel surface still had a couple of package-boundary gaps.scripts/release-npm.shand release-time verification could fail even when the visible shard summary looked green, which blocked publish-time confidence for the QVerisBot fork.x, and normalized X messaging targets more consistently.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
Root Cause (if applicable)
Regression Test Plan (if applicable)
src/infra/net/fetch-guard.ssrf.test.ts,src/secrets/provider-env-vars.test.ts,src/agents/models-config.providers.ollama.test.ts,extensions/msteams/src/oauth.test.ts,extensions/google/image-generation-provider.test.ts,extensions/venice/models.test.ts,extensions/xai/x-search.test.ts,extensions/xai/code-execution.test.ts,extensions/mattermost/src/channel.test.ts.User-visible / Behavior Changes
xmessaging target normalization is stricter and more consistent for prefixed user ids andtwitter.comprofile URLs.Diagram (if applicable)
Security Impact (required)
No)No)No)No)No)Yes, explain risk + mitigation: N/ARepro + Verification
Environment
24.2.0,pnpm@qverisai/qverisbot, local test/home isolation enabled by repo Vitest setupSteps
env OPENCLAW_LOCAL_CHECK=0 pnpm testor invokescripts/release-npm.shon the fork.Expected
pnpm testand release validation complete without false-negative failures from bundled validation or mocked-fetch DNS behavior.Actual
ENOTFOUNDbecause mocked fetch paths still performed real DNS first, and bundled/forked config paths had a few boundary mismatches.pnpm testpass.Evidence
Attach at least one:
Human Verification (required)
What you personally verified (not just CI), and how:
node scripts/run-vitest.mjs run src/infra/net/fetch-guard.ssrf.test.ts extensions/msteams/src/oauth.test.ts extensions/google/image-generation-provider.test.ts extensions/venice/models.test.ts extensions/xai/x-search.test.ts extensions/xai/code-execution.test.ts extensions/mattermost/src/channel.test.ts,env OPENCLAW_LOCAL_CHECK=0 pnpm test, and the commit hook'spnpm checkgate.npm publish, registry install after publish, or post-publish smoke on a published artifact.Review Conversations
Compatibility / Migration
Yes)No)No)Risks and Mitigations
fetch-guardcould accidentally mask a future production-path regression if it were allowed to apply too broadly.