fix: deep scan — issue search, asset upload, metadata guard, file create #26

Merged
jmiller merged 1 commits from fix/deep-scan-bugs into main 2026-06-21 23:14:31 +00:00
Owner

Summary

Deep code scan found 5 bugs in the MCP server tools.

Fixes

  1. gitea_issue_search: Called /repos/search (repo search) instead of /repos/issues/search — issues were never found
  2. gitea_release_asset_upload: Used client.post() which JSON-stringifies body and sets Content-Type: application/json — Gitea expects application/octet-stream. Now uses fetch() directly with correct headers.
  3. gitea_metadata_update: If the initial GET fails (404), current.data is an error object that gets spread into the PUT body. Now guards with current.status < 400 check.
  4. gitea_bulk_file_push: Used client.post() for new file creation — Gitea Contents API requires PUT for both create and update.
  5. Server version: Updated from hardcoded 1.0.0 to 1.4.2 matching package.json.

Test Plan

  • gitea_issue_search returns actual issues
  • gitea_release_asset_upload successfully uploads a binary file
  • gitea_metadata_update works on repos without existing metadata
  • gitea_bulk_file_push creates new files in target repos
## Summary Deep code scan found 5 bugs in the MCP server tools. ### Fixes 1. **`gitea_issue_search`**: Called `/repos/search` (repo search) instead of `/repos/issues/search` — issues were never found 2. **`gitea_release_asset_upload`**: Used `client.post()` which JSON-stringifies body and sets `Content-Type: application/json` — Gitea expects `application/octet-stream`. Now uses `fetch()` directly with correct headers. 3. **`gitea_metadata_update`**: If the initial GET fails (404), `current.data` is an error object that gets spread into the PUT body. Now guards with `current.status < 400` check. 4. **`gitea_bulk_file_push`**: Used `client.post()` for new file creation — Gitea Contents API requires PUT for both create and update. 5. **Server version**: Updated from hardcoded `1.0.0` to `1.4.2` matching package.json. ## Test Plan - [ ] `gitea_issue_search` returns actual issues - [ ] `gitea_release_asset_upload` successfully uploads a binary file - [ ] `gitea_metadata_update` works on repos without existing metadata - [ ] `gitea_bulk_file_push` creates new files in target repos
jmiller added 1 commit 2026-06-21 23:13:50 +00:00
fix: deep scan — issue search endpoint, asset upload, metadata guard, file create
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Failing after 4s
Universal: Build & Release / Promote to RC (pull_request) Has been skipped
Universal: Build & Release / Build & Release Pipeline (pull_request) Failing after 14s
Universal: Changelog Validation / Validate CHANGELOG.md (pull_request) Failing after 5s
Universal: CodeQL Analysis / Analyze (actions) (pull_request) Failing after 1m8s
Universal: CodeQL Analysis / Analyze (javascript) (pull_request) Failing after 1m0s
MCP: Copilot Agent / Run Copilot Coding Agent (pull_request) Failing after 3s
MCP: Build & Validate / build (20) (pull_request) Failing after 10s
MCP: Build & Validate / build (22) (pull_request) Failing after 7s
Universal: PR Check / Branch Policy (pull_request) Failing after 1s
Universal: PR Check / Secret Scan (pull_request) Successful in 6s
Universal: PR Check / Validate PR (pull_request) Failing after 5s
Generic: Repo Health / Access control (pull_request) Successful in 2s
Generic: Repo Health / Site Health (pull_request) Has been skipped
MCP: Standards Compliance / Secret Scanning (pull_request) Successful in 4s
MCP: Standards Compliance / License Header Validation (pull_request) Failing after 4s
MCP: Standards Compliance / Repository Structure Validation (pull_request) Failing after 4s
MCP: Standards Compliance / Coding Standards Check (pull_request) Failing after 5s
MCP: Standards Compliance / Workflow Configuration Check (pull_request) Failing after 7s
MCP: Standards Compliance / Documentation Quality Check (pull_request) Successful in 6s
MCP: Standards Compliance / README Completeness Check (pull_request) Failing after 6s
MCP: Standards Compliance / Git Repository Hygiene (pull_request) Successful in 6s
MCP: Standards Compliance / Script Integrity Validation (pull_request) Successful in 10s
MCP: Standards Compliance / Line Length Check (pull_request) Failing after 5s
MCP: Standards Compliance / File Naming Standards (pull_request) Successful in 4s
MCP: Standards Compliance / Insecure Code Pattern Detection (pull_request) Successful in 6s
MCP: Standards Compliance / Version Consistency Check (pull_request) Successful in 1m23s
MCP: Standards Compliance / Dead Code Detection (pull_request) Successful in 7s
MCP: Standards Compliance / File Size Limits (pull_request) Successful in 5s
MCP: Standards Compliance / Binary File Detection (pull_request) Successful in 6s
MCP: Standards Compliance / TODO/FIXME Tracking (pull_request) Successful in 4s
MCP: Standards Compliance / Code Complexity Analysis (pull_request) Successful in 1m9s
MCP: Standards Compliance / Code Duplication Detection (pull_request) Successful in 1m8s
MCP: Standards Compliance / Broken Link Detection (pull_request) Successful in 7s
MCP: Standards Compliance / API Documentation Coverage (pull_request) Successful in 9s
MCP: Standards Compliance / Accessibility Check (pull_request) Successful in 7s
MCP: Standards Compliance / Performance Metrics (pull_request) Successful in 7s
MCP: Standards Compliance / Dependency Vulnerability Scanning (pull_request) Successful in 1m23s
MCP: Standards Compliance / Unused Dependencies Check (pull_request) Successful in 1m31s
Universal: Auto-Assign / Assign unassigned issues and PRs (pull_request_target) Successful in 3s
MCP: Standards Compliance / Terraform Configuration Validation (pull_request) Successful in 17s
Branch Cleanup / Delete merged branch (pull_request) Failing after 2s
RC Revert / Rename rc/ back to dev/ (pull_request) Has been skipped
Universal: Workflow Sync Trigger / Sync workflows to live repos (pull_request) Failing after 5s
MCP: Standards Compliance / Enterprise Readiness Check (pull_request) Successful in 1m20s
MCP: Standards Compliance / Repository Health Check (pull_request) Successful in 1m14s
Universal: CodeQL Analysis / Security Scan Summary (pull_request) Has been cancelled
Universal: PR Check / Build RC Package (pull_request) Has been cancelled
Universal: PR Check / Report Issues (pull_request) Has been cancelled
Generic: Repo Health / Scripts governance (pull_request) Has been cancelled
Generic: Repo Health / Repository health (pull_request) Has been cancelled
Generic: Repo Health / Report Issues (pull_request) Has been cancelled
MCP: Standards Compliance / Compliance Summary (pull_request) Has been cancelled
9c7dd17e68
- gitea_issue_search: fixed endpoint from /repos/search to /repos/issues/search
- gitea_release_asset_upload: use fetch with application/octet-stream instead of
  JSON-stringified Buffer via client.post (which set wrong Content-Type)
- gitea_metadata_update: guard against GET failure before spreading into merged object
- gitea_bulk_file_push: use PUT (not POST) for file creation per Gitea Contents API
- Server version updated from 1.0.0 to 1.4.2
jmiller merged commit 8d677206e7 into main 2026-06-21 23:14:31 +00:00
jmiller deleted branch fix/deep-scan-bugs 2026-06-21 23:14:33 +00:00
Sign in to join this conversation.