diff --git a/docs/adr/0018-sparse-config-subtraction.md b/docs/adr/0018-sparse-config-subtraction.md new file mode 100644 index 0000000000..0bd3e91062 --- /dev/null +++ b/docs/adr/0018-sparse-config-subtraction.md @@ -0,0 +1,66 @@ +# 0018. Sparse Config Subtraction + +**Status**: proposed +**Date**: 2026-08-18 + +## Problem Statement + +`config diff` (CLI-2156) and `config pull` (CLI-2064) compare a project's remote configuration against the local `config.toml` to surface *drift*: any difference between the project's effective remote configuration and the local file. The remote endpoint (`GET /v2/projects/{ref}/config`) returns the *effective* config — every setting reported, defaulted or not — and a locally decoded `ProjectConfig` likewise has every default filled in. Comparing these full objects directly would drown the user in hundreds of identical default values. CLI-2155 asks for a stored reference of config defaults and a mapping function that omits values matching them, so diffs stay readable and pulled files stay sparse. + +The trap is where that mapping recurses. A `[remotes.