From e04a687a7af999c66c2513077201b449137f7dc6 Mon Sep 17 00:00:00 2001 From: Test User Date: Fri, 5 Jun 2026 10:35:02 -0600 Subject: [PATCH] test(dogfood): match condensed CLAUDE.md format in scholar-config check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Check [34] grepped for the literal two-word strings `teach solution`, `teach sync`, `teach validate-r`, but a03916ba ("docs(claude): optimize — move teach/dispatcher detail to pointers") condensed CLAUDE.md's teach docs into a single subcommand list (`..., solution, sync, validate-r, ...`). The subcommands are still documented, so the doc is correct and the assertion was stale — failing 1/41 on dev independent of any feature work. Accept either form via an alternation: `teach ` OR `[(,] ?[,)]`. The [(,]/[,)] boundaries keep it non-vacuous and stop it matching the `--sync` deploy flag on the same line (verified: removing the `sync` subcommand while keeping `--sync` still fails the check). Fixes the test, not the doc — re-adding per-command lines would undo the deliberate CLAUDE.md optimization. Co-Authored-By: Claude Opus 4.8 (1M context) --- tests/dogfood-scholar-config-sync.zsh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tests/dogfood-scholar-config-sync.zsh b/tests/dogfood-scholar-config-sync.zsh index 7c1ac0832..d6198530e 100644 --- a/tests/dogfood-scholar-config-sync.zsh +++ b/tests/dogfood-scholar-config-sync.zsh @@ -198,10 +198,15 @@ echo "${CYAN}── Documentation ──${RESET}" # DOCUMENTATION CHECKS # ============================================================================ +# Accept either the per-command form (`teach solution`) or the condensed +# subcommand-list form (`..., solution, sync, validate-r, ...`). CLAUDE.md was +# optimized to the condensed list in a03916ba ("move teach/dispatcher detail to +# pointers"); the subcommands are still documented, just not as two-word literals. +# Boundaries ([(,] before, [,)] after) avoid matching the `--sync` deploy flag. run_test "CLAUDE.md lists new subcommands" ' - grep -q "teach solution" "$PROJECT_ROOT/CLAUDE.md" && - grep -q "teach sync" "$PROJECT_ROOT/CLAUDE.md" && - grep -q "teach validate-r" "$PROJECT_ROOT/CLAUDE.md" + grep -Eq "teach solution|[(,] ?solution[,)]" "$PROJECT_ROOT/CLAUDE.md" && + grep -Eq "teach sync|[(,] ?sync[,)]" "$PROJECT_ROOT/CLAUDE.md" && + grep -Eq "teach validate-r|[(,] ?validate-r[,)]" "$PROJECT_ROOT/CLAUDE.md" ' run_test "QUICK-REFERENCE includes config commands" '