fix: batch quick-fixes (4 issues)#923
Merged
Merged
Conversation
- #907: fix signature "any" + output_schema mutual exclusivity gate in validate_output_contract/1 — "any" normalizes to absent in validate_signature/1 but was incorrectly treated as present in the exclusivity check - #915: add HTTP upstream metadata test for parse_http_upstream/3 to complete coverage symmetrically with the existing stdio path tests - #916: refactor 4 inline tmp_dir setups in application_phase1b_test.exs to use the shared setup context and write_config/2 helper - #918: extract shared render_server_header/1 helper in CatalogDescription, removing ~10 lines of duplication between the inline and lazy rendering paths Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
PR Review: fix: batch quick-fixes (4 issues)SummaryClean batch PR that fixes four independent quick-fix issues from recent reviews. All changes are well-scoped, correct, and each issue is properly addressed with good test coverage. What's Good
Issues (Must Fix)None. Suggestions (Optional)
SecurityNo concerns. The DocumentationNo updates needed. The changes are internal implementation fixes with no public API impact. VerdictApprove. All four issues are correctly addressed with proper tests. The code is clean and the refactoring reduces duplication without changing behavior. |
Contributor
Auto-Triage Summary
No FIX_NOW items — all must-fix issues from review are clean. |
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
Batch fix for quick-fix issues from recent PR reviews.
Issues Fixed
signature: "any"+output_schemamutual exclusivity edge caseparse_http_upstream/3tmp_dirsetup in metadata testsCatalogDescriptionIssues Skipped
catalog_builtins.exwhich only exists on the unmerged PR feat(mcp): catalog/ PTC-Lisp namespace with 4 builtins #919 branch (claude/911-catalog-namespace-builtins). These should be fixed when that branch is merged.Changes
#907 —
tools.ex:validate_output_contract/1was checkingsig_presentusing a simple nil-check, which treatedsignature: "any"as present. Butvalidate_signature/1normalizes"any"to{:ok, nil}(absent). Fixed the presence check to exclude"any"values using the sameString.trim/1logic. Added a regression test inoutput_schema_arg_test.exs.#915 —
application_phase1b_test.exs: Added"http entry preserves description and capabilities in metadata"test to the existingupstream metadata preservationdescribe block, completing coverage for the HTTP path ofextract_upstream_metadata/1.#916 —
application_phase1b_test.exs: Refactored the 3 new metadata tests and thehandshake_timeout_mstest to accept%{tmp_dir: tmp_dir}from the existingsetupblock and use thewrite_config/2helper instead of creating their own inline tmp directories.#918 —
catalog_description.ex: Extractedrender_server_header/1(3 clauses: nil/empty/list tools) to replace the 6 duplicated clauses acrossrender_inline_server/1andrender_lazy_server/1. The lazy path now delegates entirely torender_server_header/1; the inline path calls it and appends the tool listing for non-empty tool lists.🤖 Generated with Claude Code