Skip to content

Match run report deltas by module type - #3877

Open
thomhurst wants to merge 2 commits into
mainfrom
issue-3749-report-delta-join
Open

Match run report deltas by module type#3877
thomhurst wants to merge 2 commits into
mainfrom
issue-3749-report-delta-join

Conversation

@thomhurst

Copy link
Copy Markdown
Owner

Summary

  • build the results-printer delta lookup from stable module type identifiers
  • remove positional Zip coupling between pipeline modules and report entries
  • verify reversed report ordering preserves each module's delta

Validation

  • SpectreResultsPrinterTests: 5/5
  • core Release build: 0 warnings, 0 errors

Closes #3749

@claude

claude Bot commented Aug 5, 2026

Copy link
Copy Markdown

Code review

Reviewed the change against CLAUDE.md and checked for bugs/logic issues in the diff.

Summary: SpectreResultsPrinter now builds the Δ previous lookup by joining on ModuleRunReport.ModuleTypeName (via ModuleTypeIdentifier.Get) instead of Zip-ing pipelineSummary.Modules with pipelineSummary.RunReport.Modules by list position. This removes the implicit invariant that the two lists stay positionally aligned (called out in #3749), and mirrors the same type-name join already used internally in PipelineRunReportFactory.previousByType.

I traced this against PipelineRunReportFactory.Create/CreateModuleReport to confirm:

  • RunReport.Modules entries are always tagged with the same ModuleTypeIdentifier.Get(...) identity that AddModuleRow now looks up with, so the join key is consistent on both sides.
  • Duplicate module types (same type instantiated more than once in a pipeline) collapse to a single dictionary entry both before and after this change (the factory itself only ever computes a delta for types where group.Count() == 1), so there's no behavior regression there.
  • The new test (ModulesTable_MatchesDurationDeltasByModuleType) exercises exactly the scenario the fix targets — RunReport.Modules in a different order than pipelineSummary.Modules — and asserts each module's delta still lands on the correct row.

No bugs or CLAUDE.md violations found. This is a small, well-scoped, well-tested defensive fix.

@thomhurst

Copy link
Copy Markdown
Owner Author

Refreshed onto current main in f7a2d36 after the required Ubuntu pipeline hit the known core-test host failure (no failed-test summary; exit 2/134 after ~16 minutes). Local validation: SpectreResultsPrinterTests 5/5; core Release build 0 warnings/errors.

@claude

claude Bot commented Aug 5, 2026

Copy link
Copy Markdown

Code review

Re-checked this PR's current state. The only change since the previous review is a merge from main (f7a2d36) that pulls in unrelated files (docs, RunReportService, ModuleTester, packaging) — the two files this PR actually changes, src/ModularPipelines/Helpers/SpectreResultsPrinter.cs and test/ModularPipelines.UnitTests/Helpers/SpectreResultsPrinterTests.cs, are byte-identical to the version already reviewed at 38b7c19.

No new code to review. The previous review stands: the join-by-ModuleTypeName fix is correct, well-tested, and no bugs or CLAUDE.md violations were found.

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.

Run reports: SpectreResultsPrinter pairs modules with report entries by list position — silent delta misalignment risk

1 participant