I have seen this and the only question is - does the aggressor party also get the benefit of the tech completion? If so, either bug or buggy concept, if not, then likely not a bug, and still a bit of a buggy concept. Ideally, the party that declares war should forfeit the pact with no refund, the party on whom war is declared should receive their initial gold investment back. I would also be willing to listen to the victim getting both their and the aggressors refund, but have not thought that one totally through yet. But giving the victim back their money makes a bit more sense, since I have actually seen this give a free tech just a few turns into a research pact.