Skip to content

Update: the job summary renders the effective diff tables instead of System.String[] - #79

Merged
Arthurvdv merged 2 commits into
mainfrom
wp10/update-summary
Oct 9, 2026
Merged

Arthurvdv merged 2 commits into
mainfrom
wp10/update-summary

Conversation

@Arthurvdv

Copy link
Copy Markdown
Member

Summary

  • 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 the job summary of an update run with a non-empty effective diff. The pull request body was not affected.
  • The result is now assigned to [string[]] and joined, as Rulebook.Scan and Rulebook.Edit do.
  • The return contract (leading comma; assign directly or to [string[]], never wrap in @()) is documented in the comment-based help of Get-EffectiveDiffBlock.

Test

tests/Rulebook.Update.Tests.ps1: ConvertTo-UpdateSummary -Mode update with a one-row Diff (AfterSource 'level:recommended') asserts the ## Effective diff heading, the endpoint heading, the | Id | Before | After | Decided by | table header and the row, and no System.String[]. The test fails without the fix (it showed System.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

Arthurvdv and others added 2 commits October 9, 2026 14:17
…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>
@Arthurvdv Arthurvdv added the bug Something isn't working label Oct 9, 2026
@Arthurvdv
Arthurvdv merged commit 9ba62ec into main Oct 9, 2026
6 checks passed
@Arthurvdv
Arthurvdv deleted the wp10/update-summary branch October 9, 2026 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ConvertTo-UpdateSummary renders System.String[] instead of the effective-diff tables

1 participant