Aftermarket Launches With AfterPatch, a Proxy That Repairs HTTP Traffic by Rules
Aftermarket, the studio’s twenty-third project, is about the work that happens after software ships: the proxy rule that renames a field, the shim that keeps an old client alive, the patch nobody can test. It gives that work a name and a set of tools, all under one aftermarket command. Ten are planned. The first one is out.
AfterPatch 0.1.0 sits between a client and a service that neither side can change, and fixes the traffic with YAML rules short enough to review. A rule picks traffic by method, path, query, headers, status and content type. It can move an endpoint, set or drop headers, and rename, copy, set or delete JSON fields going in and out. The example it was built around is an old client calling /api/v1/customer?id=7 against a new service that only knows /api/v2/customers/7. Two rules make them talk again, and the quick start runs it in five minutes. A dry run shows what the rules would change on live traffic, and an audit log records every change without a single value in it.
The promise it’s tested against is that a repair changes one thing and breaks nothing else. Traffic no rule matches has to come through byte for byte, checked with 400 random requests and responses, and keep streaming. Bodies it can’t change safely pass through untouched and get logged. An independent review before release found 24 problems, the worst a dropped query string after a ; and a path rewrite that .. could steer. Each was fixed and now has its own test, 157 tests and subtests in all. On a 2-CPU test machine over loopback, the proxy added about 57 µs at the median when it only passed traffic on. It’s one Go binary with no dependencies at all, not even a YAML library, open source under Apache 2.0, with binaries for Linux, macOS and Windows. BareProxy is the studio’s general-purpose proxy; AfterPatch does one job, keeping integrations alive when one side moves on.