fix: validate dynamicTool input before execution - #594
Merged
Conversation
Parse input through inputSchema if available, otherwise require a non-null object. Prevents passing unchecked input to tool execute.
ariskemper
marked this pull request as draft
March 10, 2026 20:29
ariskemper
marked this pull request as ready for review
March 11, 2026 15:50
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fc5ff4390c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Cover the new runtime validation added to dynamicTool: - Zod schema validates and rejects input - Non-schema fallback accepts objects, rejects null/undefined/primitives
MCP tools called without arguments pass undefined input, which the
validation guard rejected. Treat undefined as {} to support zero-input
tools while still rejecting null and primitives.
This was referenced Aug 19, 2026
veryfront-code-agent Bot
added a commit
that referenced
this pull request
Aug 21, 2026
Module path-cache publication remains fire-and-forget for render and module-load callers, but each background save now enters a tracked lifecycle before it can settle. Tests and controlled shutdown can drain pending saves, including saves started while a prior drain is in progress. Constraint: Production rendering must not wait for cache persistence. Rejected: Await cache writes from persistTransformedModule | puts disk publication back on the critical path. Confidence: high Scope-risk: narrow Reversibility: clean Directive: Keep path-cache save failures non-fatal and observable through the existing debug log. Issue: #594 Tested: deno fmt src/rendering/orchestrator/module-loader/module-persistence.ts src/rendering/orchestrator/module-loader/module-persistence.test.ts; deno task lint; deno test --preload=src/testing/preload.ts --no-check --allow-all src/rendering/orchestrator/module-loader/module-persistence.test.ts; for run in {1..20}; do deno test --preload=src/testing/preload.ts --no-check --allow-all src/rendering/orchestrator/module-loader/module-persistence.test.ts >/tmp/module-persistence-run-$run.log || { cat /tmp/module-persistence-run-$run.log; exit 1; }; done; deno task typecheck; git diff --check Not-tested: deno task test:unit failed in src/proxy/oauth-client.test.ts because the local network returned connection refused before the test timeout path.
veryfront-code-agent Bot
added a commit
that referenced
this pull request
Aug 21, 2026
Module path-cache publication remains fire-and-forget for render and module-load callers, but each background save now enters a tracked lifecycle before it can settle. Tests and controlled shutdown can drain pending saves, including saves started while a prior drain is in progress. Constraint: Production rendering must not wait for cache persistence. Rejected: Await cache writes from persistTransformedModule | puts disk publication back on the critical path. Confidence: high Scope-risk: narrow Reversibility: clean Directive: Keep path-cache save failures non-fatal and observable through the existing debug log. Issue: #594 Tested: deno fmt src/rendering/orchestrator/module-loader/module-persistence.ts src/rendering/orchestrator/module-loader/module-persistence.test.ts; deno task lint; deno check src/rendering/orchestrator/module-loader/module-persistence.test.ts; deno test --preload=src/testing/preload.ts --no-check --allow-all src/rendering/orchestrator/module-loader/module-persistence.test.ts; for run in {1..20}; do deno test --preload=src/testing/preload.ts --no-check --allow-all src/rendering/orchestrator/module-loader/module-persistence.test.ts >/tmp/module-persistence-run-$run.log || { cat /tmp/module-persistence-run-$run.log; exit 1; }; done; deno task typecheck; git diff --check Not-tested: deno task test:unit failed in src/proxy/oauth-client.test.ts because the local network returned connection refused before the test timeout path.
veryfront-code-agent Bot
added a commit
that referenced
this pull request
Aug 21, 2026
Module path-cache publication remains fire-and-forget for render and module-load callers, but each background save now enters a tracked lifecycle before it can settle. Tests and controlled shutdown can drain pending saves, including saves started while a prior drain is in progress. Constraint: Production rendering must not wait for cache persistence. Rejected: Await cache writes from persistTransformedModule | puts disk publication back on the critical path. Confidence: high Scope-risk: narrow Reversibility: clean Directive: Keep path-cache save failures non-fatal and observable through the existing debug log. Issue: #594 Tested: deno fmt src/rendering/orchestrator/module-loader/module-persistence.ts src/rendering/orchestrator/module-loader/module-persistence.test.ts; deno task lint; deno check src/rendering/orchestrator/module-loader/module-persistence.test.ts; deno test --preload=src/testing/preload.ts --no-check --allow-all src/rendering/orchestrator/module-loader/module-persistence.test.ts; for run in {1..20}; do deno test --preload=src/testing/preload.ts --no-check --allow-all src/rendering/orchestrator/module-loader/module-persistence.test.ts >/tmp/module-persistence-run-$run.log || { cat /tmp/module-persistence-run-$run.log; exit 1; }; done; deno task typecheck; git diff --check Not-tested: deno task test:unit failed in src/proxy/oauth-client.test.ts because the local network returned connection refused before the test timeout path.
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
dynamicTool()before callingconfig.execute()inputSchemahas aparsemethod (Zod schema), use it for validationTest plan