Skip to content

fix: batch quick-fixes (4 issues)#923

Merged
andreasronge merged 1 commit into
mainfrom
batch-fix/quick-fixes-20260512-1805
May 12, 2026
Merged

fix: batch quick-fixes (4 issues)#923
andreasronge merged 1 commit into
mainfrom
batch-fix/quick-fixes-20260512-1805

Conversation

@andreasronge
Copy link
Copy Markdown
Owner

Summary

Batch fix for quick-fix issues from recent PR reviews.

Issues Fixed

Issues Skipped

Changes

#907tools.ex: validate_output_contract/1 was checking sig_present using a simple nil-check, which treated signature: "any" as present. But validate_signature/1 normalizes "any" to {:ok, nil} (absent). Fixed the presence check to exclude "any" values using the same String.trim/1 logic. Added a regression test in output_schema_arg_test.exs.

#915application_phase1b_test.exs: Added "http entry preserves description and capabilities in metadata" test to the existing upstream metadata preservation describe block, completing coverage for the HTTP path of extract_upstream_metadata/1.

#916application_phase1b_test.exs: Refactored the 3 new metadata tests and the handshake_timeout_ms test to accept %{tmp_dir: tmp_dir} from the existing setup block and use the write_config/2 helper instead of creating their own inline tmp directories.

#918catalog_description.ex: Extracted render_server_header/1 (3 clauses: nil/empty/list tools) to replace the 6 duplicated clauses across render_inline_server/1 and render_lazy_server/1. The lazy path now delegates entirely to render_server_header/1; the inline path calls it and appends the tool listing for non-empty tool lists.


🤖 Generated with Claude Code

- #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>
@andreasronge andreasronge added the claude-review Add to PRs to trigger Claude automated review label May 12, 2026
@claude
Copy link
Copy Markdown
Contributor

claude Bot commented May 12, 2026

PR Review: fix: batch quick-fixes (4 issues)

Summary

Clean 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)

  1. File size of tools.exmcp_server/lib/ptc_runner_mcp/tools.ex is at 1111 lines. This PR only adds 9 lines (a minor edit), so no action needed here, but it's worth tracking for future work that adds more logic to this module.

Security

No concerns. The String.trim(v) != "any" comparison is purely on the server-side argument validation path with no user-facing input risk.

Documentation

No updates needed. The changes are internal implementation fixes with no public API impact.

Verdict

Approve. All four issues are correctly addressed with proper tests. The code is clean and the refactoring reduces duplication without changing behavior.

@claude
Copy link
Copy Markdown
Contributor

claude Bot commented May 12, 2026

Auto-Triage Summary

Issue Decision Action
tools.ex at 1111 lines — worth tracking for future refactor DEFER_ISSUE Created #930

No FIX_NOW items — all must-fix issues from review are clean.

@claude claude Bot added the ready-to-merge PR is ready to be merged label May 12, 2026
@andreasronge andreasronge enabled auto-merge (squash) May 12, 2026 21:49
@andreasronge andreasronge merged commit 92b3234 into main May 12, 2026
12 checks passed
@andreasronge andreasronge deleted the batch-fix/quick-fixes-20260512-1805 branch May 12, 2026 21:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

claude-review Add to PRs to trigger Claude automated review ready-to-merge PR is ready to be merged

Projects

None yet

1 participant