Build on origin/main (38e9eba) will fail go build with duplicate function
declarations:
ssrf.go:15 isSafeURL redeclared (a2a_proxy.go:741)
ssrf.go:58 isPrivateOrMetadataIP redeclared (a2a_proxy.go:795)
ssrf.go:84 validateRelPath redeclared (templates.go:65)
a2a_proxy.go:14 "fmt" imported and not used
Root cause: main was fast-forwarded to a CWE-22 fix commit that incorporated
ssrf.go from the staging handler-split (PR #1457), but ssrf.go declares
isSafeURL/isPrivateOrMetadataIP that already exist in a2a_proxy.go, and
validateRelPath that already exists in templates.go.
Fix:
- Delete ssrf.go entirely — its isSafeURL/isPrivateOrMetadataIP are
already in a2a_proxy.go; its validateRelPath is in templates.go.
- Remove unused "fmt" import from a2a_proxy.go.
- Add t.Setenv cleanup in TestIsPrivateOrMetadataIP and TestIsSafeURL
so MOLECULE_DEPLOY_MODE=saas from TestIsPrivateOrMetadataIP_SaaSMode
cannot leak into sibling tests.
- Update stale file-location comments in ssrf_test.go.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>