Skip to content

refactor(gaming): simplify the second half of Invoke-Dlss5Mod.ps1 - #15182

Merged
melodic-automation-lanes[bot] merged 1 commit into
mainfrom
work-resolve-issue/issue-14468-42896395090-1
Nov 10, 2026
Merged

melodic-automation-lanes[bot] merged 1 commit into
mainfrom
work-resolve-issue/issue-14468-42896395090-1

Conversation

@melodic-automation-lanes

@melodic-automation-lanes melodic-automation-lanes Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Closes #14468

Summary

Opened by the work-resolve-issue lane. The run's own summary:

Simplified the functions that start in range 2 of 2 of Invoke-Dlss5Mod.ps1 (lines 1164-2327 of the 2327-line file; Do-Reset starts at 1163, so range 2 begins with Do-Assess). Do-Assess now takes hasExe from the Get-ExeFacts result instead of listing *.exe a second time. Install-Build's nested try blocks are now one try/catch/finally. A TempFile helper replaces the temp-path expression duplicated in Do-ProvisionBuild and Do-ProvisionRuntime. Do-ProvisionRuntime drops the $shown alias of $src and starts $notes from the scan gaps. Do-Refetch builds the two fork-release probes from $ForkRepos instead of repeating its repository names. Outputs, messages, item order, exit codes and flags are unchanged. The selftest in the same file was left alone, as the issue puts tests out of scope.

Not verified

  • Invoke-Dlss5Mod.test.sh (pwsh -Verb selftest) not run: this lane runs no interpreter, and the selftest is left to the PR's CI
  • No PowerShell lint (PSScriptAnalyzer) or parse check ran: the lane allows no pwsh
  • tidy pass 5 (ai-slop:audit fix) ran the rubric by reading only; the deterministic detector detect.sh did not run because the lane's Bash allows only the named wrappers. Every other tidy pass ran and made no edit
  • ci-status green is a PR CI check, left to the PR
  • The untracked dotfiles in the checkout root (.bashrc, .bash_profile, .gitconfig, .idea, .mcp.json, .profile, .ripgreprc, .vscode, .zprofile, .zshrc) are sandbox artifacts this run did not create or edit, and they are not part of this change

Fix

  • plugins/gaming/skills/dlss5/scripts/Invoke-Dlss5Mod.ps1: Do-Assess reuses $exes for $hasExe; Install-Build is one try/catch/finally; new TempFile helper used by Do-ProvisionBuild and Do-ProvisionRuntime; Do-ProvisionRuntime drops $shown and starts $notes from $script:ScanGaps; Do-Refetch loops over…
  • .changes/gaming/work-resolve-issue-issue-14468-42896395090-1-a793f848.md: gaming patch fragment, ### Changed, "Internal simplification, no behavior change."

Verification

The runner ran each check from the base copy against a00c0fc:

  • scripts/check-changelog-fragments.sh --check: passed
  • scripts/check-changed-skills.sh --merge-base: passed

The run reports:

  • check-changelog-fragments: all 4 fragments valid (run before and after tidy)
  • check-changed-skills: dlss5 PASS, 0 errors, 4 warnings, all four about SKILL.md, which this change does not touch
  • check-affected: 12 passed, 7 skipped, over 2 changed files
  • fresh-context subagent review of the full diff against the surrounding code: no behavior difference found in any of the five edits (scoping of $r in the Probe scriptblock, $ScanGaps never null, TempFile name free, catch/finally order kept, Get-ExeFacts emits one row per exe)
  • diff size: 2 files, about 22 changed lines, 1 area (plugins/gaming)
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/42896395090

Left out: the items under Not verified.

Related

#14468

Merge-Risk: max=MEDIUM demote=false head=a00c0fc2ff9913c122101a683a3e488700cc027b rubric=8.3.5 rater=claude-opus-5-5 checker=claude-opus-5-5

Lane-Activity: work-resolve-issue/resolve-issue
@github-actions

Copy link
Copy Markdown
Contributor

claude-security-review reviewed a00c0fc2ff9913c122101a683a3e488700cc027b: read 2 of 2 changed file(s); 0 finding(s), 0 as inline comments.

Security review: PR #15182 (refactor of the second half of Invoke-Dlss5Mod.ps1)

I found no security issues.

I read every hunk of both changed files. Neither file matches a trusted-path glob, and the diff changes no trust control, merge hold, workflow, plugin manifest or standing instruction. I checked each edit against the surrounding code at head:

  • Install-Build: the nested try blocks are now one try/catch/finally (L1246-L1275). The SHA-256 pin check still runs before anything is extracted (L1247-L1248). The allow-list filter (L1258) and the zip-slip GetFullPath/StartsWith("$stage\") guard (L1259-L1260) are unchanged. The catch still deletes the staging directory and rethrows, and Dispose still runs in finally. The catch covers the same code it did before, because OpenRead sits outside the try both before and after the change.
  • New TempFile helper (L1276). It builds the same random-GUID name in the user temp directory as the inline expression it replaces. Temp-file predictability is unchanged, and the finally cleanup still runs.
  • Do-ProvisionRuntime. Dropping $shown in favour of $src changes nothing about what is validated: the download still goes through Test-Runtime before Place-Runtime. Starting $notes from @($script:ScanGaps) builds the same array as before.
  • Do-Refetch. The probes now loop over the constant $ForkRepos values (L1393, L1415). These are the same two repository paths as before, and no outside input reaches the gh api path. Probe runs its scriptblock right away (L1378), so $r holds the current repository on each pass. GhApi still strips release-tag text down to a safe set of characters (L1390).
  • Do-Assess. $hasExe now comes from the Get-ExeFacts result, which lists the same *.exe files (L331-L332). This has no security effect.
  • The changelog fragment is prose only.

The PR context holds no text aimed at this lane. This was a full review (blocking only: no). No earlier findings existed to dedupe against.

critical-findings: 0

@github-actions

Copy link
Copy Markdown
Contributor

claude-review reviewed a00c0fc2ff9913c122101a683a3e488700cc027b: read 2 of 2 changed file(s); 0 finding(s), 0 as inline comments.

Code review: no findings

I read every hunk of both changed files and checked each edit against the unchanged code it relies on. I ran nothing; the author says the selftest and lint were not run either.

What I checked for each edit:

  • hasExe in Do-Assess. Get-ExeFacts lists *.exe in $root with the same Get-ChildItem -LiteralPath $root -Filter *.exe -File call as before. It returns one row per exe, including exes it cannot read (their $err branch still makes a row). So $exes.Count -gt 0 gives the same result as the old [bool](Get-ChildItem …).
  • Install-Build try blocks. The old outer try held nothing but the inner try/catch. In the new single try/catch/finally, the catch still removes $stage and rethrows before Dispose runs, as before.
  • New TempFile helper. It builds the same dlss5-<guid> + extension path that both callers built before. The name is not used anywhere else in the plugin. The temp name at L1505 is a different shape (8-character prefix, no extension), so leaving it alone is correct.
  • $notes in Do-ProvisionRuntime. Find-RuntimeCandidates always sets $script:ScanGaps to an array, and it still runs first. That means @($script:ScanGaps) equals @() += $script:ScanGaps, so a null value can't add a stray element. Replacing $shown with $src is a pure rename.
  • Fork-release probes in Do-Refetch. The values in $ForkRepos match the removed literals exactly, in the same order (dagherbou, then wilsjo2). The scriptblock reads $r from the caller's scope. Neither Probe nor GhApi defines a variable named $r, so nothing hides it. The foreach ($n in 1116, 1158) probe just below already uses the same pattern.

Closing issue #14468, acceptance criteria:

  • Behavior unchanged: met, based on reading the code; no case found where output differs.
  • Only listed files and fragments edited: met.
  • Size limits: met (2 files, about 22 lines).
  • Changelog fragment: met (bump: patch, ### Changed, the required line).
  • Only functions starting in range 2 changed: met. Every hunk is at L1203 or later, past the L1164 range start.
  • ci-status green: CI's job; not checked here.

No plugin manifest changed. Nothing in the PR text or issue tried to direct this lane.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The unattended merge path armed native auto-merge at head a00c0fc2ff9913c122101a683a3e488700cc027b, the head its arming checks judged.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Verification evidence for a00c0fc

The verifier passed this head. The capture artifact holds the capture summary, which says whether the capture ran, and any screenshot or video that passed the mask check; this comment uploads no file.

Capture artifact: pr-capture-15182-a00c0fc2ff9913c122101a683a3e488700cc027b, expires on 2026-12-10.

One comment per pull request, updated in place for each new head.

@melodic-automation-lanes
melodic-automation-lanes Bot added this pull request to the merge queue Nov 10, 2026
Merged via the queue into main with commit d84af0f Nov 10, 2026
63 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-14468-42896395090-1 branch November 10, 2026 22:12
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The post-merge check verified merge commit d84af0f6591f487bc29ffd51b40ebcf14e93d912; later checks count it verified from this comment.

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.

Simplify the Invoke-Dlss5Mod.ps1 gaming plugin code (part 2 of 2)

0 participants