Skip to content

refactor(miro): simplify server src and test-support code - #15077

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

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

Conversation

@melodic-automation-lanes

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

Copy link
Copy Markdown
Contributor

Closes #14659

Summary

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

Applied the /simplify checks to the eight listed miro server files. Three small edits came out of it: index.ts passes the stdio transport inline; launcher.ts's installed() reuses the existing currentManifest() helper so package.json is read in one place; isTokenUnset() trims once instead of twice. launch.ts, response.ts, stderr.ts and the two test-support files were already minimal and are unchanged, because any further cut would have moved code between files or changed exported shapes, which the issue rules out. Behavior, exports and messages are unchanged.

Not verified

  • tsc, biome and the miro vitest suites were not run: this lane runs only its named wrappers, so build, lint and tests are left to the PR's CI.
  • tidy-diff pass 3 proposal, not applied: the 'as { dependencies?: ... }' cast on JSON.parse at plugins/miro/server/src/launcher.ts:115 has no comment saying why it is safe; validating the manifest would change bad-input behavior, so it is out of scope for a no-behavior-change chunk.
  • tidy-diff pass 5: the ai-slop detector (detect.sh) could not run in this lane; the two-line fragment was read against the rubric by hand and has no tells. Its wording is fixed by the issue.
  • ci-status green is a PR CI check, left to the PR's CI.
  • The working tree also shows untracked home dotfiles (.bashrc, .gitconfig, .idea, .mcp.json, .vscode and others) that this run did not create and that are not part of the change.

Fix

  • plugins/miro/server/src/index.ts: pass new StdioServerTransport() straight to server.connect instead of through a one-use variable.
  • plugins/miro/server/src/launcher.ts: installed() parses currentManifest() instead of a second inline readFileSync of package.json.
  • plugins/miro/server/src/miro-client.ts: isTokenUnset() trims the token once into a local and tests that.
  • .changes/miro/work-resolve-issue-issue-14659-42795356927-1-756541b4.md: patch fragment, '### Changed' / 'Internal simplification, no behavior change.', made with new-changelog-fragment miro patch.

Verification

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

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

The run reports:

  • check-changelog-fragments: all 1 fragment valid (run before and after tidy).
  • check-changed-skills: no changed skills, nothing to gate (run before and after tidy).
  • check-affected: 12 passed, 7 skipped over 4 changed files (run before and after tidy).
  • fresh-context review subagent over the whole diff: no problems; confirmed currentManifest is defined before installed() runs, readFileSync(p,'utf8') and readFileSync(p).toString('utf8') decode identically, the single trim is equivalent for undefined/empty/whitespace/${user_config.} inputs and…
  • code-tidying:tidy-diff over the 4 changed hunks: no further edits; one proposal (below).
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/42795356927

Left out: the items under Not verified.

Related

#14659

Merge-Risk: max=MEDIUM demote=false head=6196842a6a4ab047a483c6dce3c90db7744877bd rubric=8.3.3 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 6196842a6a4ab047a483c6dce3c90db7744877bd: read 4 of 4 changed file(s); 0 finding(s), 0 as inline comments.

Security review: PR #15077, refactor(miro): simplify server src code

I found no security issues. I read every hunk of all 4 changed files.

  • plugins/miro/server/src/index.ts: the stdio transport is now passed straight to server.connect. The behavior is the same and nothing new is exposed.
  • plugins/miro/server/src/launcher.ts: installed() now reads the manifest through the existing currentManifest() helper, which reads join(SERVER_DIR, "package.json") (launcher.ts:71). That is the same file the old inline readFileSync read, and decoding it with .toString("utf8") gives the same text. The npm install path is untouched, including --ignore-scripts at launcher.ts:34.
  • plugins/miro/server/src/miro-client.ts: isTokenUnset() now trims the token once instead of twice. It gives the same result for an undefined, empty or whitespace-only token and for the unexpanded ${user_config. placeholder. Token handling and the missing-token guard work as before.
  • .changes/miro/...md: a changelog fragment, with no security surface.

No trust controls, plugin manifests, workflows or standing instructions are changed. The PR context has no embedded directives aimed at this lane.

critical-findings: 0

@github-actions

Copy link
Copy Markdown
Contributor

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

Code review: no findings. I read every hunk of all 4 changed files. None of them falls under a trusted path.

  • plugins/miro/server/src/index.ts: the transport is now passed straight to server.connect. The variable it replaced was used only once, so behavior is the same.
  • plugins/miro/server/src/launcher.ts: installed() now parses currentManifest().toString("utf8"). currentManifest is defined at launcher.ts:71 as readFileSync(join(SERVER_DIR, "package.json")). It is a module-level const, and the file declares it before installed() can run. Its output decodes the same as the old readFileSync(..., "utf8"), and neither form strips a BOM. readFileSync is still imported, because other lines in the file use it.
  • plugins/miro/server/src/miro-client.ts: isTokenUnset now trims once. That gives the same result for undefined, "", whitespace-only input and ${user_config.…} input. miro-client.test.ts already tests this function.
  • .changes/miro/…756541b4.md: a bump: patch fragment. Its body is ### Changed followed by the exact line the issue requires.

Closing issue #14659 acceptance criteria:

  • Behavior unchanged, and no file renamed, moved or deleted: met. I checked this by reading the code; I did not run anything.
  • The diff edits only the listed files plus a changelog fragment: met.
  • Stays within 400 lines and 15 files: met (about 10 changed lines across 3 source files).
  • ci-status green: left to the PR's CI. The author did not run tsc, biome or vitest themselves, and I have not checked them either.
  • The miro fragment has the required body: met.

No plugin manifest changed. There are no settled threads and no prior findings, and this is the first review of this pull request.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

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

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Verification evidence for 6196842

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-15077-6196842a6a4ab047a483c6dce3c90db7744877bd, 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 773b091 Nov 10, 2026
63 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-14659-42795356927-1 branch November 10, 2026 11:27
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The post-merge check verified merge commit 773b09190995ff95ba9026d20480c3fae88ec173; 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 src and test-support miro plugin code

0 participants