docs/ci-failure-analysis.md
CI failure analysis (2026-03-04)
CI failure analysis (2026-03-04)
Scope
Repository: heodonugn/cotor
Workflow: .github/workflows/ci.yml
Why "3/3 failed" happened
-
formatCheckfails immediately due to Spotless violations.- CI runs
gradle formatCheckbeforegradle test. - The run failed in
spotlessKotlinCheckwith formatting violations (including Kotlin filename-rule mismatch and many existing format diffs), so the workflow is marked failed before tests can proceed.
- CI runs
-
testhad a deterministic environment-variable mismatch inTemplateEngineTest(before fix).TemplateEngineTestexpected fallback textunknownwhenUSERenv is missing.TemplateEnginepreviously returned an error marker string ([env variable ... not found ...]) for missing env vars.- This mismatch causes
TemplateEngineTest > should interpolate environment variables()to fail in CI-like environments whereUSERis unset.
-
The same root causes repeat across each CI run/check.
- Because both are deterministic project-state issues (format violations + env fallback mismatch), each triggered CI check fails consistently until source is fixed.
Changes applied
- Renamed
src/main/kotlin/com/cotor/presentation/web/stream/RealtimeEvents.kttoRealtimeEvent.ktto satisfy Kotlin filename convention. - Updated
TemplateEngine.handleEnvScope()to return"unknown"in interpolate mode when env var is absent, while keeping validation-mode errors.
Local verification summary
gradle test: PASS after the env fallback fix.gradle formatCheck: FAIL because there are many pre-existing Spotless violations across the repository that are unrelated to this single rename.