Skip to content

Fix incorrect orphan message wording in lint test assertions - #216

Merged
Malcolmnixon merged 1 commit into
mainfrom
fix/orphan-message-test-assertions
Sep 8, 2026
Merged

Malcolmnixon merged 1 commit into
mainfrom
fix/orphan-message-test-assertions

Conversation

@Malcolmnixon

Copy link
Copy Markdown
Member

Problem

Recent CI runs failed the Test step consistently across ubuntu/macos/windows and all target frameworks (net8.0/9.0/10.0):

Root cause

Two tests asserted the orphan message text as 'requirements is orphaned', but 'Program.cs' actually emits 'requirements orphaned (not reachable...)' — matching the wording used by all 7 other orphan-message tests in the same file. This was a genuine, deterministic mismatch (not flakiness), causing 6 failing test cases (2 tests x 3 TFMs) on every job/OS.

Fix

Updated the two assertions in 'ProgramTests.cs' to match the actual, consistently-used message wording:

  • 'Program_Run_WithLintFlagAndRootTags_ReportsOrphansAsWarning'
  • 'Program_Run_WithLintFlagAndEnforce_FailsOnOrphans'

Verification

  • Ran the two affected tests directly across net8.0/9.0/10.0 — all pass.
  • Ran 'fix.ps1' — no additional formatting changes needed.

Two tests (Program_Run_WithLintFlagAndRootTags_ReportsOrphansAsWarning and
Program_Run_WithLintFlagAndEnforce_FailsOnOrphans) asserted the message
'requirements is orphaned' which does not match the actual Program.cs
output 'requirements orphaned (not reachable...)'. This caused
deterministic Test step failures on every OS in CI. Updated the
assertions to match the wording used consistently by all other orphan
message tests.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI lite review requested due to automatic review settings September 8, 2026 02:46

Copilot AI 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.

🟢 Approval recommended

The change is narrowly scoped to test assertions, and the updated wording matches the existing orphan-message assertion pattern used elsewhere in the same test file.

Pull request overview

This pull request fixes deterministic CI test failures by updating two lint-related test assertions in ProgramTests.cs so they match the actual orphan-warning/error wording emitted by Program.cs, aligning with the message format used by other orphan-message tests in the same suite.

Changes:

  • Updated the orphan warning assertion to expect "...requirements orphaned" instead of "...requirements is orphaned".
  • Updated the orphan error assertion to expect "...requirements orphaned" instead of "...requirements is orphaned".
File summaries
File Description
test/DemaConsulting.ReqStream.Tests/ProgramTests.cs Adjusts two orphan-message assertions to match the program’s emitted wording and the existing convention used by other orphan-message tests.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

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.

2 participants