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:
parent
febbfc3fcc
commit
101471d81a
15 changed files with 513 additions and 269 deletions
|
|
@ -87,11 +87,11 @@ echo '{"type":"result","subtype":"success","is_error":false,"result":"ok","total
|
|||
const Process::Captured first = Self({"init"}, r);
|
||||
const std::string skill = Read(r / ".claude" / "skills" / "prepush" / "SKILL.md");
|
||||
const std::size_t frontmatter = shipped.find("\n---\n", 3) + 5;
|
||||
Check("init: the config from the template, the artifact and worktree dirs ignored, the skill with init's marker after its frontmatter, the next steps",
|
||||
Check("init: the config from the template (every lens off), the artifact and worktree dirs ignored, the skill with init's marker after its frontmatter, the next steps (turn lenses on; no browser line while none drives the application)",
|
||||
first.returnCode == 0 && Read(r / ".review-gates" / "config.json") == Read(checkout / "process" / "templates" / "config.json")
|
||||
&& Read(r / ".gitignore") == ".review-gates/push/\n.review-gates/trees/\n" && skill.starts_with(shipped.substr(0, frontmatter))
|
||||
&& skill.substr(frontmatter).starts_with(marker) && skill.ends_with(shipped.substr(frontmatter)) && first.out.contains(" config - until it reports no problem")
|
||||
&& first.out.contains(" browser install - "),
|
||||
&& first.out.contains("turn lenses on in .review-gates/config.json") && !first.out.contains(" browser install - "),
|
||||
first.out + first.err);
|
||||
Write(r / ".review-gates" / "config.json", R"({"base": "origin/dev"})");
|
||||
Write(r / ".gitignore", "node_modules/\n/.review-gates/push\n");
|
||||
|
|
|
|||
Loading…
Reference in a new issue