diff --git a/CHANGELOG.md b/CHANGELOG.md index d76e227f..ee699ada 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ Sections dated before 2026-09-19 predate the cycle and stay as they are. Named m ## Unreleased +- process(testing): **unit tests are now off by default and `affected-tests.sh` enforces it; each project picks its test strategy with the developer at CAC-5.** Fast-tracked by the maintainer on 2026-10-16 because users report tests firing on every change (the baseline-text A/B is waived; E3 follows as a check). Moments: every change = gate plus what it touched (unit only for affected modules with unit on); module done = that module's journeys (+ its unit tests if on); build complete and before every later deploy = everything once; "run everything" any time. The CAC-5 Offer records it in PROJECT.md `## Test strategy` (Status `ASSUMED` in auto mode). `affected-tests.sh` reads `Unit tests default:` (`no` or absent means unit off, one `unit off` line, never a `.test.mdl` run row); turn unit on per project with `Unit tests default: yes`, per module with `Unit modules: Shop, Admin` in PROJECT.md or `Unit tests: yes` in the module brief; the strategy row's Unit cell is a scope only and never turns unit on. A grant on a microflow or page the same script changes is part of that subject and no longer selects the owning module's tests. `module-review.md` PROVE now runs `--moment module --module `. `testing-shape.md`, `checkpoint-build.md`, `iterative-build-loop.md`, `conversion-runbook.md` and the exec.sh logic lane text updated. `tests/wave2/test-test-strategy-docs.sh` and the extended `test-affected-tests.sh` pin it. Baseline words stay at or below master (75,219 vs 75,225). Split out of #409; found by the field test of the release candidate — the maintainer's decision, 2026-10-16 - learn(skills): **five lab findings land as compact rows, each paid for by trimming prose in the same files, so always-loaded words do not grow (baseline 75,225 to 75,204, budget 80,000).** Enum value `New` and `AutoCreatedDate`/`AutoOwner` (detection gaps), `[%CurrentDateTime%]` not `currentDateTime()`, expression return types (Decimal from date diffs and `div`, absolute `secondsBetween`, `formatDecimal` on pages), CE2729 from the default home page and page microflow grants, Atlas selector carriers for list views, page body and timelines, `-small` spacing suffixes do not exist, `display: contents` rows paint nothing, CSS pseudo text is invisible to `innerText` — lab field runs, Refs #276 (TK-020, TK-021, TK-022, TK-024) - fix(design-check): **a design system whose palette lives only in scoped `:root.` blocks no longer reads as "0 of N tokens carry the design's value".** Pass 2b compared every token against a bare `:root` of the built sheet, so a themed-only palette always warned, a false warning that teaches agents to ignore the check. A token the design declares only in scoped blocks is now compared block for block against the same-named block in the built sheet, and a wrong value is still named with its block (knob binding stays bare-only: a knob bound inside a theme the app is not wearing is not bound). Synthetic fixtures `ds-themed.css`, `built-themed.css`, `built-themed-wrong.css`; 5 new cases in `test-design-reaches-app.sh` (50 total) — TK-015 part (b) - fix(tests): **`test-exec-hash-verify.sh` case K passes on macOS.** `$TMPDIR` ends in `/`, so the bare `mktemp` path held `//` and the exact `MXPATCH_BACKUP_DIR` path assert could not match; `WORK` is now `cd`-ed into and read back with `pwd -P`. Test only, no script change. 42 pass / 1 fail before, 43 / 0 after — #384 review diff --git a/project-bin/affected-tests.sh b/project-bin/affected-tests.sh index 2c701886..6a2873e0 100755 --- a/project-bin/affected-tests.sh +++ b/project-bin/affected-tests.sh @@ -10,7 +10,7 @@ # caller depth N (SHOW CALLERS OF ... TRANSITIVE) # callers measured | NOT MEASURED () # data NOT MEASURED (entity/association/enumeration/access/module/role/userrole/constant subject) -# unit +# unit | unit off () # journey # journeys unmapped N of M journey file(s) cannot be selected by name # run @@ -27,10 +27,34 @@ # THE STRATEGY. PROJECT.md "## Test strategy" (skills/checkpoints/checkpoint-build.md writes it): # | Moment | Unit tests | Journeys | Status | # | Every change | affected | affected | CONFIRMED | -# | Module close | module | module | CONFIRMED | -# | Deploy-ready | full | full | CONFIRMED | +# | Module done | module | module | CONFIRMED | +# | Build complete | full | full | CONFIRMED | # Scopes: none | affected | module | full. No section, or no row for the moment: these defaults, -# and the strategy row says "default". --moment picks the row (change is the default). +# and the strategy row says "default". --moment picks the row (change is the default): +# change = every change (build and feedback) · module = module done · deploy = build complete and +# before every later deploy · all = "run everything", any time (same as deploy). +# Old row names "Module close" and "Deploy-ready" still read. A label is matched by its first words, +# case-insensitively: "Every change (build and feedback)" and "Build complete, and before every later +# deploy" (the Offer's own wording) map to their moment; a cell reads up to its first comma or +# parenthesis ("affected, modules on only" = affected, "none (decided CAC-5)" = none). An unknown row label warns on stderr. +# +# UNIT TESTS ARE OFF BY DEFAULT (field test of the RC, 2026-10-16: nothing read the knob, so a +# unit test was offered after every change). Precedence for the UNIT scope, highest first: +# 1. The '## Test strategy' Unit cell is a SCOPE only (none|affected|module|full). It never +# turns unit on: at the change and module moments the switches in 2 and 3 always filter it. +# Gate open (default yes): the cell is used as written. Gate closed: flipped modules only, with +# the moment's built-in scope when the cell says none. +# 2. A module flipped to yes: that module's tests only, at the change and module moments (deploy +# and all run every existing unit test). A flip is any of: a PROJECT.md line +# `Unit modules: Shop, Admin` (decided at CAC-5); in the module brief +# (architecture/modules//module-brief.md or architecture/modules/-brief.md) a line +# `Unit tests: yes` or the Declared-shape table row `| Unit (...) | yes | ...`. +# 3. PROJECT.md `Unit tests default:`. `yes` keeps the built-in scope for the moment; `no`, or the +# line ABSENT, means unit is OFF for every module not flipped in 2. When off the script prints +# one `unit off` line and NEVER a `run ... .test.mdl` row. `Unit modules:` takes names split +# by comma or space; `#` and `( ... )` comments, a leading `- ` bullet, any case and `none` +# are read; a name that matches no module warns on stderr. +# Journeys are not affected by any of this. # # HOW THE SELECTION IS MADE (judgement-free facts only; skills-over-scripts.md): # 1. Subjects: `bin/exec.sh --subjects