Repository navigation
Update: the job summary renders the effective diff tables instead of System.String[] - #79
Merged
Merged
Conversation
…System.String[] ConvertTo-UpdateSummary wrapped the comma-returned array of Get-EffectiveDiffBlock in @(), which nested it, so -join printed the literal System.String[] under "## Effective diff" in update mode. Assign the result to [string[]] and join it, as Rulebook.Scan and Rulebook.Edit do. A test in Rulebook.Update.Tests.ps1 asserts the endpoint heading, the table header and the row, and no System.String[] (#75). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The array is returned with a leading comma; callers assign it directly or to [string[]] and never wrap it in @() (#75). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This was referenced Oct 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ConvertTo-UpdateSummarywrapped the comma-returned array ofGet-EffectiveDiffBlockin@(), which nested it, so-joinprinted the literalSystem.String[]under## Effective diffin the job summary of an update run with a non-empty effective diff. The pull request body was not affected.[string[]]and joined, asRulebook.ScanandRulebook.Editdo.[string[]], never wrap in@()) is documented in the comment-based help ofGet-EffectiveDiffBlock.Test
tests/Rulebook.Update.Tests.ps1:ConvertTo-UpdateSummary -Mode updatewith a one-rowDiff(AfterSource 'level:recommended') asserts the## Effective diffheading, the endpoint heading, the| Id | Before | After | Decided by |table header and the row, and noSystem.String[]. The test fails without the fix (it showedSystem.String[]) and passes with it. Locally: Pester 1601 passed, 0 failed, 1 skipped; Test-Rulebook V1-V14 passed; PSScriptAnalyzer clean.Review
One Sonnet round at effort high, approve with two notes (return contract documented on
Get-EffectiveDiffBlock).Closes #75
🤖 Generated with Claude Code