fix: compile-check's summary says 1 assembly and 1 error
Merged
HA
9h ago+210+210+012345678901234567890123456789-77-77-01234567890123456789
Summary
- compile-check's one-line
Messagenow says1 assembly,1 error, and1 warninginstead of1 assemblies,1 errors, and1 warnings. - The skill now says which full compiles drop an assembly's baseline, and how a failure of the command itself is printed.
User Impact
These came out of a second round of real use: an agent wrote a small game in a project with 561 assemblies and ran compile-check 37 times along the way.
- Plurals: the summary read
Reused 1 assemblies and fast-checked 1 with 1 errors and 0 warnings. 28 assemblies were not compiled because ... 1 assemblies were checked on their changed files only; .... Every count followed by a noun now takes the singular for exactly one, and the plural for zero and for more than one (0 errors). - Which runs drop the baseline: the skill said the changed-files check is lost "after a
--fullthat had errors". A normal run that fell back to a full compile and ended in errors drops it too. A run that compiled the assembly only because one it references changed records no baseline either. The agent could not tell from the skill whether its next run would be a full compile again. - Exit codes: the skill said only that the process exits 1 when
ErrorCountis above zero. A failure of the command itself, such asCOMPILE_CHECK_UNITY_BUILD_REQUIRED, also exits 1, so the exit code alone does not tell the two apart. The skill now says that such a failure prints no payload on stdout and writes the error, with itsErrorCode, to stderr.
Changes
- The functions that build
Messagemove unchanged intocompile_check_message.go(separate commit), sincecompile_check.gowas close to the file-length limit. - A small helper picks singular or plural from the count. The sentence for blocked assemblies and the one for assemblies checked on their changed files switch as a whole (
1 assembly was ... it references/2 assemblies were ... they reference). - Counts after the first item stay bare (
reused 1,fast-checked 19), as before. SKILL.mdanddocs/compile-check.md: the baseline sentence covers fallback full compiles (and, in the skill, compiles caused by a changed reference), and the exit-code sentence covers command failures.
Verification
-
Tests:
- The existing tests that pinned the old wording now expect the new one. The test that pins
Reused 2 assemblies with 0 errors and 0 warnings.is unchanged. - A new table test covers the counts 0, 1, and 2 for the first noun, errors, warnings, the blocked sentence, and the changed-files sentence.
- Before the fix, the failing tests were exactly the updated ones and the new count-of-one cases; the zero and two cases passed.
- The existing tests that pinned the old wording now expect the new one. The test that pins
-
Mutations, each restored afterwards:
Mutation Fails Singular when count <= 1every zero case ( 0 error), plus the old-wording testsSingular when count == 2every one and two case The blocked sentence never takes the singular only the one-blocked case -
cli/dispatcher:golangci-lint fmt --diffis empty;go vet ./...passes;golangci-lint runand the complexity config both report 0 issues.go test ./...andgo test -raceon the compile-check and dispatcher packages pass.- Coverage with the CI exclusions: 94.25% (baseline 94.2).
-
cli/release-automation:go test ./...passes;check-skill-sizepasses; the file-length check passes. -
scripts/sync-tool-docs.sh --checkreports no drift. -
Repository CI does not run on pull requests into this branch; the checks above were run locally.