Notes/Aftermarket

Aftermarket Adds AfterConfig to Change Vendor Config Files Without Editing Them

Aftermarket has a fifth tool, and it’s the first one that doesn’t sit in the traffic. AfterConfig, run as aftermarket config, is for the config file a vendor ships and every upgrade overwrites. Your changes live in a separate overlay, and the vendor’s file is never written. Each change can name the value it expects to find. When an upgrade moves that default, apply stops at that line and writes nothing, instead of quietly overriding what the vendor changed.

The case study takes an overlay of seven changes through a vendor upgrade. It stops at exactly the two defaults the new version changed, then applies cleanly once those two lines are updated. Everything else new in the upgrade comes through untouched. It reads JSON, YAML and .env files, and passwords show as REDACTED in every diff and error.

The tests try six ways to point the output at the vendor’s file, and all six are refused. A review before release found that renaming a key into its own child deleted it, plus seven smaller problems. All were fixed, and the suite now has 296 tests. Binaries are out for Linux, macOS and Windows. The previous note covers AfterTest and AfterDiff.