feat(config): every lens off until the repository turns it on

Jorijn: "all lenses off by default and opt in only". Config::Defaults()
gives every lens run: false; a config that turns on none - a missing
`lenses` key included - has the one problem that names the lenses, so
config, freeze and run all stop on it; the template ships every lens off,
init says to turn lenses on, and the "no lens runs" preflight names the
cause. A consumer config without a `lenses` key now needs one, as the CI
smoke test's does.

Proven with the lens commit before it: the suite (26 passed), and the
dry-run comparison recorded there.
This commit is contained in:
Jorijn van der Graaf 2026-10-31 20:09:07 +01:00
commit 101471d81a
Signed by: jorijnvdgraaf
GPG key ID: 2937E59CDCC1BCFB
15 changed files with 513 additions and 269 deletions

View file

@ -842,7 +842,7 @@ inventory unit, against a frozen commit range.)";
} else {
fs::create_directories(config.parent_path());
std::ofstream(config, std::ios::binary) << Platform::ReadFile(Home() / "process" / "templates" / "config.json").value_or("{}\n");
std::println(" wrote .review-gates/config.json (the template: set base, then what the lenses' environments need)");
std::println(" wrote .review-gates/config.json (the template: every lens off - turn on the ones this repository runs, set base, then what their environments need)");
}
// The artifacts and the worktrees stay out of git.
const fs::path ignore = cwd / ".gitignore";
@ -887,6 +887,7 @@ inventory unit, against a frozen commit range.)";
if (!std::ranges::contains(off, it.key()) && environment && !environment->mcp.empty()) browser = true;
}
std::println("\nnext:\n {} config - until it reports no problem", Invocation());
if (off.size() == Plan::Lenses.size()) std::println(" turn lenses on in .review-gates/config.json (lenses.<name>.run = true) - every lens is off until the repository says which run");
if (browser) std::println(" {} browser install - a lens drives the application in Chromium", Invocation());
return 0;
}