Summary
The run_observability_logs_match_snapshot test in src/bin_tests/main_tests.rs was updated in #107 to accept ANSI escape/colour codes embedded directly in the insta::assert_snapshot! expected output. This makes the snapshot brittle: any incidental change to terminal colour configuration, tracing subscriber settings, or escape-code formatting will break the test without indicating a real behavioural regression. It also obscures the actual behavioural expectations behind raw escape sequences.
Resolution
- Strip ANSI escape sequences from log output before snapshotting (e.g., configure the tracing subscriber with colour disabled in test environments, or apply a redaction filter), so that snapshots contain only human-readable structured text.
- Add separate semantic assertions about log structure and field presence (e.g., that
operation, repository, branch, and outcome fields are present) to make the behavioural intent explicit and robust.
References
/cc @leynos
Summary
The
run_observability_logs_match_snapshottest insrc/bin_tests/main_tests.rswas updated in #107 to accept ANSI escape/colour codes embedded directly in theinsta::assert_snapshot!expected output. This makes the snapshot brittle: any incidental change to terminal colour configuration, tracing subscriber settings, or escape-code formatting will break the test without indicating a real behavioural regression. It also obscures the actual behavioural expectations behind raw escape sequences.Resolution
operation,repository,branch, andoutcomefields are present) to make the behavioural intent explicit and robust.References
/cc @leynos