Skip to content

fix(proxy): fail when native proxy publication fails - #128

Open
kunkunGames wants to merge 1 commit into
tumourlove:masterfrom
kunkunGames:agent/proxy-publication-failure
Open

fix(proxy): fail when native proxy publication fails#128
kunkunGames wants to merge 1 commit into
tumourlove:masterfrom
kunkunGames:agent/proxy-publication-failure

Conversation

@kunkunGames

@kunkunGames kunkunGames commented Aug 4, 2026

Copy link
Copy Markdown

Summary

Make the Windows native-proxy build report success only after a complete executable has been safely published to its final destination.

Problem

Both proxy build entry points previously compiled in the source tree, copied directly over Binaries\\monolith_proxy.exe, ignored publication failures, and printed success unconditionally. A locked or unwritable destination could therefore leave the previous executable in place while returning a misleading successful result. Direct replacement also exposed the live binary to partial-publication risk.

Solution

  • keep Tools\\MonolithProxy\\build_proxy.bat as the single authoritative implementation
  • make Tools\\MonolithProxy\\build.bat a compatibility delegate that preserves the authoritative exit code
  • compile in an invocation-owned private staging directory
  • copy the completed executable to a unique candidate beside the destination and verify its byte count
  • make the final same-directory move the only replacement operation
  • validate every toolchain, directory, compile, copy, move, existence, and size gate before printing success
  • on failure, preserve the existing proxy and clean only invocation-owned staging/candidate paths

Explicit source, output, and staging overrides let the regression harness exercise the production batch workflow without maintaining a second test-only implementation.

Verification

  • Windows PowerShell 5.1.26100.8655: Scripts\\test_proxy_build.ps1 passed
  • PowerShell 7.5.5: Scripts\\test_proxy_build.ps1 passed
  • both public batch entry points built and published a non-empty proxy
  • injected C++ compilation failure returned non-zero, printed no success message, and preserved the existing sentinel executable byte-for-byte
  • a locked destination forced native replacement failure; the command returned non-zero, printed no success message, preserved the sentinel byte-for-byte, and removed candidate/staging artifacts
  • git diff --check passed
  • detailed evidence: Docs/testing/2026-08-04-native-proxy-publication-failure.md

Compatibility and risk

This changes only the Windows native-proxy build and publication workflow. MCP protocol behavior, Unreal modules, assets, and runtime proxy logic are unchanged. Existing callers can continue using either batch entry point, but failed publication now correctly produces a non-zero exit code.

Visual evidence

Not applicable: this is command-line build/publication reliability work with no visual or editor-facing UI change.

@kunkunGames
kunkunGames marked this pull request as ready for review August 4, 2026 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant