Skip to content

Feat/nightly cli brew tap#8

Merged
oscarcv merged 2 commits intomainfrom
feat/nightly-cli-brew-tap
Feb 20, 2026
Merged

Feat/nightly cli brew tap#8
oscarcv merged 2 commits intomainfrom
feat/nightly-cli-brew-tap

Conversation

@oscarcv
Copy link
Owner

@oscarcv oscarcv commented Feb 20, 2026

Summary

  • add a dedicated regression test for Homebrew-installed template resolution to avoid runtime bundle lookup failures
  • add CLI-focused tests that validate --verbose parsing and expected diagnostic log output behavior
  • make CLI internals testable in a safe way (CLI.parse, CLI.Options, logger writer hooks) without changing runtime UX
  • keep logging state concurrency-safe under Swift 6 checks

What Changed

  • Sources/SnapshotReportCore/Reporters/HTML/HTMLSnapshotReporter.swift
    • replace direct Bundle.module dependency with resilient template candidate resolution
    • support executable path + resolved symlink path lookups (Homebrew /opt/homebrew/bin -> Cellar)
    • add source fallback path and improved actionable error message when template is missing
  • Sources/snapshot-report/CLI/main.swift
    • expose parser/types for testing
    • add test hooks to capture logger output
    • preserve verbose/non-verbose behavior while improving testability
  • Tests/SnapshotReportCoreTests/SnapshotReportCoreTests.swift
    • add tests for symlink-resolved template candidate and source fallback coverage
  • Tests/SnapshotReportCoreTests/SnapshotReportCLITests.swift
    • add test to verify:
      • --verbose enables diagnostic logging
      • non-verbose mode suppresses step/progress/debug lines
      • success line is always emitted
  • Package.swift
    • include snapshot-report executable module in test target dependencies

Validation

  • swift test --filter verboseFlagAndDiagnosticLogs
  • swift test

Why

This prevents the known Homebrew/nightly crash:
Fatal error: could not load resource bundle ...
and locks in expected CLI diagnostics behavior so future changes don’t silently break verbose troubleshooting output.

@oscarcv oscarcv merged commit d893611 into main Feb 20, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant