Skip to content

ci: add production analysis and smoke checks - #132

Merged
crowquillx merged 3 commits into
mainfrom
ci/analysis-hardening
Aug 11, 2026
Merged

ci: add production analysis and smoke checks#132
crowquillx merged 3 commits into
mainfrom
ci/analysis-hardening

Conversation

@crowquillx

@crowquillx crowquillx commented Aug 11, 2026

Copy link
Copy Markdown
Owner

Summary

  • add a scheduled/on-demand deep-analysis workflow for targeted clang-tidy, ASan/UBSan, concurrency-focused TSAN, and retained coverage reports
  • add opt-in CMake sanitizer/coverage instrumentation and keep the normal development/PR path lean through a separate Nix analysis shell
  • strengthen QML structural lint, add ShellCheck/actionlint, and add an offscreen Release startup/version smoke to normal CI
  • fix defects exposed by the new checks: duplicate HeroBanner component IDs, the -v version/verbose collision, a misleading non-move in the image store, and deprecated UTC date construction
  • document analysis scope, TSAN's uninstrumented-Qt limitation, commands, and the initial coverage baseline

Verification

  • ./scripts/dev-build.sh --tests
  • full local CTest including VisualRegressionTest: 36/36 passed (18.71s)
  • targeted clang-tidy: passed
  • ASan/UBSan: 6/6 focused suites passed
  • targeted TSAN: 2/2 focused suites passed
  • coverage suite: 34/34 passed; 54.5% lines, 57.1% functions, 44.9% branches
  • QML lint plus Release smoke: passed
  • ShellCheck and actionlint: passed
  • Release CLI smoke emits exactly Bloom 0.8.0; help retains --verbose, -v

Platform scope

The automated smoke validates Linux offscreen Release startup/version reporting only. Live Jellyfin/Silo servers, playback hardware, GPU/HDR/display switching, and Windows runtime playback remain unavailable locally and retain their documented manual validation gates. TSAN is intentionally limited to process/display tests because the system's uninstrumented Qt reports its queued invokeMethod allocation handoff in the image-cache worker; no broad suppression was added.

Documentation

Please confirm the updated testing policy in AGENTS.md and detailed analysis/coverage guidance in docs/build.md accurately describe the intended CI split.

Note

Add production analysis and smoke check workflows to CI

  • Adds a scheduled deep-analysis.yml workflow running clang-tidy, ASan+UBSan, TSAN, and coverage collection via new scripts in scripts/.
  • Adds release-smoke and automation-lint Nix checks to both the main ci.yml and update-dependencies.yml workflows; smoke check runs bloom --version and --help offscreen.
  • Adds a new cmake/BloomAnalysis.cmake module supporting BLOOM_SANITIZER (address|thread) and BLOOM_ENABLE_COVERAGE build options.
  • Tightens .clang-tidy to an explicit allowlist with WarningsAsErrors='*' and restricts analysis to src/.
  • Fixes --version CLI flag in src/main.cpp to print Bloom <version> and exit without conflicting with -v (verbose).

Macroscope summarized 27a3ebc.

Summary by CodeRabbit

  • New Features

    • Added a --version command-line option that displays the application version.
    • Added optional tooling for sanitizer checks, coverage reports, and static analysis.
  • Bug Fixes

    • Improved date filtering consistency by using UTC.
    • Resolved ambiguous action references in hero layouts.
  • Quality Improvements

    • Strengthened QML linting and automated validation.
    • Added release startup checks and expanded continuous analysis workflows.

@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The change adds Nix and CMake analysis tooling, scheduled deep-analysis workflows, stronger lint checks, release smoke validation, and documentation. It also updates command-line version handling, UTC date conversion, QML IDs, and a headless Qt test entry point.

Changes

Analysis and validation

Layer / File(s) Summary
Analysis tooling foundation
.clang-tidy, CMakeLists.txt, cmake/BloomAnalysis.cmake, flake.nix, nix/source.nix, scripts/*, .gitignore
Adds clang-tidy configuration, sanitizer and coverage controls, an analysis shell, dedicated scripts, and ignored analysis build output.
Validation checks and workflows
flake.nix, nix/qml-lint.nix, .github/workflows/*, docs/build.md, AGENTS.md
Adds release-smoke and automation-lint checks, structural QML lint errors, deep-analysis jobs, and corresponding testing documentation.
Application and test corrections
src/main.cpp, src/providers/jellyfin/JellyfinCatalogProvider.h, src/ui/HeroBanner.qml, src/ui/ImageCacheStore.cpp, tests/ImageCacheStoreTest.cpp
Uses --version, explicit UTC boundaries, distinct hero action IDs, direct path cleanup, and a guiless Qt test entry point.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant GitHubActions
  participant NixAnalysisShell
  participant AnalysisScript
  participant BuildTree
  participant Reports
  GitHubActions->>NixAnalysisShell: Start scheduled or manual analysis
  NixAnalysisShell->>AnalysisScript: Run selected analysis script
  AnalysisScript->>BuildTree: Configure and build with CMake/Ninja
  AnalysisScript->>Reports: Generate analysis or coverage output
  Reports-->>GitHubActions: Publish summary or artifact
Loading

Possibly related PRs

Suggested labels: codex

Poem

I’m a rabbit with checks in my tray,
Clang tidy hops through the hay.
Smoke tests glow bright,
Coverage takes flight,
And --version tells all the way.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely summarizes the PR's main changes: production analysis and CI smoke checks.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/analysis-hardening

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot added the codex label Aug 11, 2026
@greptile-apps

greptile-apps Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds scheduled and on-demand compiler analysis, sanitizer, coverage, automation-lint, QML-lint, and Release smoke checks while correcting several issues those checks exposed.

  • Adds a dedicated Nix analysis shell and opt-in CMake sanitizer/coverage instrumentation.
  • Adds clang-tidy, ASan/UBSan, targeted TSAN, and retained coverage workflows.
  • Strengthens normal CI with ShellCheck, actionlint, structural QML lint, and offscreen version/help smoke checks.
  • Resolves the verbose/version option collision, duplicate QML IDs, deprecated UTC construction, and a misleading move.

Confidence Score: 4/5

The PR appears safe to merge, with one non-blocking coverage-suite omission worth correcting.

The production and CI changes have no established blocking failure, but the new coverage command skips a deterministic cache suite and therefore understates the behavior exercised by its retained reports.

Files Needing Attention: scripts/run-coverage.sh

Important Files Changed

Filename Overview
.github/workflows/deep-analysis.yml Adds isolated scheduled/on-demand jobs for targeted static analysis, sanitizers, and retained coverage reports.
scripts/run-coverage.sh Builds an instrumented test tree and generates several gcovr reports, but unnecessarily excludes a deterministic cache test.
scripts/run-sanitizers.sh Configures separate address and thread sanitizer trees and runs deliberately scoped test targets.
cmake/BloomAnalysis.cmake Adds validated, mutually exclusive sanitizer and coverage instrumentation options for GCC and Clang.
flake.nix Adds the analysis shell, automation lint, and an offscreen Release CLI smoke check while preserving the default development shell.
src/main.cpp Replaces Qt's conflicting short version option with a long-only version option so -v remains verbose.
src/ui/HeroBanner.qml Gives action rows component-local IDs so aliases resolve without duplicate-ID diagnostics.
src/ui/ImageCacheStore.cpp Removes an ineffective move into QDir::cleanPath without changing cache ownership or threading behavior.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  PR[Normal PR CI] --> Build[Nix Release build]
  PR --> Tests[Deterministic tests]
  PR --> Lint[QML and automation lint]
  PR --> Smoke[Offscreen version/help smoke]
  Deep[Scheduled or manual deep analysis] --> Tidy[Targeted clang-tidy]
  Deep --> ASAN[ASan and UBSan]
  Deep --> TSAN[Targeted TSAN]
  Deep --> Coverage[Coverage report and artifact]
Loading
Prompt To Fix All With AI
### Issue 1
scripts/run-coverage.sh:30
**Coverage skips deterministic cache tests**

The coverage command excludes `SeriesDetailsCacheTest` even though the workflow is documented as running the deterministic Linux suite. This leaves cache freshness, connection-scoped prefetch handling, and incompatible-cache rejection out of the retained coverage signal.

```suggestion
    --exclude-regex '^VisualRegressionTest$'
```

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Reviews (1): Last reviewed commit: "ci: add production analysis and smoke ch..." | Re-trigger Greptile

Comment thread scripts/run-coverage.sh
Comment thread scripts/run-coverage.sh Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
src/providers/jellyfin/JellyfinCatalogProvider.h (1)

390-400: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick win

Add regression coverage for the UTC date boundaries.

Extend the request-contract coverage in tests/ProviderCatalogTest.cpp with minPremiereDate, maxPremiereDate, and minDateLastSaved. Assert the emitted MinPremiereDate, MaxPremiereDate, and MinDateLastSaved values so the QTimeZone::UTC conversion remains covered.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/providers/jellyfin/JellyfinCatalogProvider.h` around lines 390 - 400,
Extend the request-contract tests in ProviderCatalogTest to populate
minPremiereDate, maxPremiereDate, and minDateLastSaved, then assert the emitted
MinPremiereDate, MaxPremiereDate, and MinDateLastSaved query values use the
expected UTC start/end-of-day boundaries.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@scripts/run-coverage.sh`:
- Around line 26-31: In the coverage workflow after the cmake build command and
before ctest, delete all existing .gcda files under BUILD_DIR so persisted GCC
counters cannot be merged into the current run. Keep the existing CTest
invocation and exclusions unchanged.

---

Nitpick comments:
In `@src/providers/jellyfin/JellyfinCatalogProvider.h`:
- Around line 390-400: Extend the request-contract tests in ProviderCatalogTest
to populate minPremiereDate, maxPremiereDate, and minDateLastSaved, then assert
the emitted MinPremiereDate, MaxPremiereDate, and MinDateLastSaved query values
use the expected UTC start/end-of-day boundaries.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 10e61f2d-1994-443a-959a-099d2d0d27fa

📥 Commits

Reviewing files that changed from the base of the PR and between 639de2c and baf060c.

📒 Files selected for processing (20)
  • .clang-tidy
  • .github/workflows/ci.yml
  • .github/workflows/deep-analysis.yml
  • .github/workflows/update-dependencies.yml
  • .gitignore
  • AGENTS.md
  • CMakeLists.txt
  • cmake/BloomAnalysis.cmake
  • docs/build.md
  • flake.nix
  • nix/qml-lint.nix
  • nix/source.nix
  • scripts/run-clang-tidy.sh
  • scripts/run-coverage.sh
  • scripts/run-sanitizers.sh
  • src/main.cpp
  • src/providers/jellyfin/JellyfinCatalogProvider.h
  • src/ui/HeroBanner.qml
  • src/ui/ImageCacheStore.cpp
  • tests/ImageCacheStoreTest.cpp

Comment thread scripts/run-coverage.sh
@crowquillx

Copy link
Copy Markdown
Owner Author

Addressed the remaining CodeRabbit review-body nitpick in 27a3ebc: ProviderCatalogTest now supplies all three catalog date filters and asserts their exact UTC start/end-of-day Jellyfin query values. The focused test and full 36-test local suite pass.

@crowquillx
crowquillx merged commit 7fb4ee3 into main Aug 11, 2026
8 checks passed
@crowquillx
crowquillx deleted the ci/analysis-hardening branch August 11, 2026 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant