fix: compile-check says how to get its changed-files check back
Merged
HA
1d ago+16+16+01234567890123456789-10-10-01234567890123456789
Summary
- When compile-check falls back to a full compile because the last one had errors, the reason now says what brings the changed-files check back.
- The skill and docs now cover two cases an agent using compile-check ran into:
usingchanges, and projects that treat warnings as errors.
User Impact
These come from an agent writing a game on a project with 561 assemblies and running compile-check 32 times.
- Fallback reason. Before:
no baseline: the last full compile had errors. The agent saw three full compiles in a row and could not tell from the output when the fast check would return. After:no baseline: the last full compile had errors; the first full compile without errors records one. usingdirectives. Adding or removing ausingdirective makes the next run a full compile, because it can change what every name in the file resolves to. Neither the skill nor the docs said so, so the full compile came without an explanation. Both now say it counts as a declaration change.- Warnings as errors. In a project that compiles with
-warnaserror, rules the changed-files check cannot run, such as CS0414, fail only the--fullrun. The skill and docs now say this, next to the advice to run--fullbefore finishing.
Changes
- The reason string of a missing baseline after a failed full compile, with the store's comment that lists the reasons.
docs/compile-check.md:- the new reason, and that the assembly is compiled in full until a compile succeeds;
usingdirectives in the list of conditions;-warnaserroramong what the check does not guarantee.
- The compile-check skill: one sentence each on
usingdirectives and-warnaserror. It is now 7,004 bytes.
Verification
- The two tests that expect the reason (
TestFailedFullCompileLeavesNoBaselineand the store'sTestLoadBaselineExplainsAMissingBaseline) were changed first and failed before the string changed. git grep 'last full compile had errors'finds only the new string.cli/dispatcher:golangci-lint fmt --diffis empty;go vet ./...passes;golangci-lint runand the complexity config both report 0 issues.go test ./...andgo test -race ./internal/compilecheck/...pass.- Coverage with the CI exclusions: 94.26% (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.
- This PR is stacked on #3331.