Skip to content

refactor(event-storming): simplify build-bc-view.mjs - #15155

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

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

Conversation

@melodic-automation-lanes

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

Copy link
Copy Markdown
Contributor

Closes #14464

Summary

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

Simplified plugins/event-storming/skills/simulation/scripts/build-bc-view.mjs without changing its behavior. The one-call texts() and objects() helpers are folded into a shared isRecord() predicate and a point-free joined() (asList(value).map(e).filter(Boolean)), runBuild reuses isRecord for its JSON-root check, and a new errorText() helper replaces two copies of the same error-message ternary. buildBoundedContextPage keeps its own object guard: switching it to isRecord would change what an array argument renders. The exported name, CLI flags, exit codes, stderr text and page output are all unchanged.

Not verified

  • build-bc-view.test.sh was not executed: this lane may run only its named wrappers, so node/bash test runs are left to the PR's CI
  • tidy pass 5 (ai-slop:audit fix) ran its rubric only: detect.sh is not a wrapper this lane may run, so the deterministic detector and findings file were skipped; the fragment text is the issue-mandated line
  • ci-status green is a PR CI check, left to the PR's CI

Fix

  • plugins/event-storming/skills/simulation/scripts/build-bc-view.mjs: inlined texts()/objects() into isRecord() and a shorter joined(); added errorText() for the two duplicated error-message ternaries; runBuild's JSON-root check uses isRecord(); no behavior change
  • .changes/event-storming/work-resolve-issue-issue-14464-42880184080-1-1f1d809e.md: patch fragment created with new-changelog-fragment (event-storming patch), body '### Changed' and 'Internal simplification, no behavior change.'

Verification

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

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

The run reports:

  • check-changelog-fragments: all 6 fragments under .changes/ valid (run before and after tidy/review fix)
  • check-changed-skills: simulation skill PASS, 0 errors, 5 pre-existing warnings unrelated to this diff
  • check-affected: 12 passed, 7 skipped over 2 changed files
  • fresh-context review subagent: no bugs; confirmed output, exit codes, stderr text and exports identical for all inputs, and that build-bc-view.test.sh's source-slice interpolation check still holds (errorText sits after 'function fail'); its one optional suggestion (joined via…
  • tidy-diff (code-tidying): passes 1-4 found nothing to change in the listed lines; pass 5 rubric read of the fragment found no AI-writing tells
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/42880184080

Left out: the items under Not verified.

Related

#14464

Merge-Risk: max=LOW demote=false head=2935908e94930ed2dee274c2446962c9b129435b 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 2935908e94930ed2dee274c2446962c9b129435b: read 2 of 2 changed file(s); 0 finding(s), 0 as inline comments.

Security review: PR #15155 (head 2935908)

No security issues found. I read both changed files in full.

plugins/event-storming/skills/simulation/scripts/build-bc-view.mjs is a refactor of a local HTML page builder. The data it handles is untrusted model JSON read from stdin, and its sink is HTML output. I checked whether the escaping still holds:

  • joined() used to run asText, drop empty items and then call escapeHtml. It now runs asList(value).map(e).filter(Boolean), and e is escapeHtml(asText(value)) (unchanged, L75-L77). Every item is still escaped before it is joined, so this opens no new HTML injection path. e takes one parameter, so the extra index and array arguments that map passes are ignored.
  • isRecord() matches the old objects() filter and the old JSON-root check: truthy, an object, not an array.
  • errorText() is the same ternary as before, now in one place. Error messages still go to stderr, as before.
  • The built page still has to pass validateRenderedPage before it is written out, so that gate is unchanged.

.changes/event-storming/...md is a new changelog fragment containing a patch bump and one line of text. It has no executable surface.

Checks that didn't apply:

  • Neither changed file matches a trusted-path glob.
  • The PR touches no trust control, merge hold, workflow, plugin manifest or standing instruction, so the trust-control, manifest and instruction-surface checks had nothing to judge.
  • The PR context contains no embedded instructions aimed at this lane.

critical-findings: 0

@github-actions

Copy link
Copy Markdown
Contributor

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

Code review: PR #15155, simplify build-bc-view.mjs

No findings. I read both changed files in full, and none of them match a trusted path.

Behavior is the same as before. I checked each change against the head file and the helpers it calls:

  • joined(): the old code converted each item to text, dropped empty strings, then escaped. The new code is asList(value).map(e).filter(Boolean). The only extra arguments map passes are the index and array, and e → asText/escapeHtml take one parameter, so they are ignored (html-escape.mjs#L85). escapeHtml returns an empty string only for an empty input, so filtering after escaping drops the same items as filtering before.
  • contextRows() filtering with isRecord: this keeps exactly the rows the old objects() filter kept, because Boolean(x) && … is true for the same values as the old truthiness check.
  • runBuild's JSON-root check: !isRecord(model) is the old three-part condition restated. The exit code (2) and the stderr text are unchanged.
  • errorText(): produces the same text as the two ternaries it replaces.
  • buildBoundedContextPage still uses its own guard (model && typeof model === "object"). Leaving it out of the isRecord change is correct: isRecord rejects arrays, so switching would change what an array argument renders.
  • build-bc-view.test.sh checks a slice of the source that ends at "function fail" (test.sh#L94). errorText is defined after fail, so the slice and its check do not change. No other file references the removed texts/objects helpers.

Closing issue #14464, acceptance criteria:

  • Behavior unchanged: met, by the code reading above. The existing build-bc-view.test.sh covers the rendered output. I did not run it, and the author says they did not run it either, leaving it to CI.
  • Diff edits only the listed file plus changelog fragments: met.
  • Within 400 lines / 15 files: met (2 files, about 30 changed lines).
  • ci-status green: depends on CI. I could not check it in this lane.
  • Fragment: met. The fragment is bump: patch, its heading is ### Changed, and its body is the required line. I did not check whether the fragment was created with scripts/new-changelog-fragment.sh.

The check results in the PR body (changelog-fragment check, check-changed-skills, check-affected) are the author's claims. I have not verified them.

No plugin manifest changed, no .claude/rules/ file applies, and the PR context contains no instructions aimed at this review.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

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

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Verification evidence for 2935908

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-15155-2935908e94930ed2dee274c2446962c9b129435b, 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 0cde437 Nov 10, 2026
63 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-14464-42880184080-1 branch November 10, 2026 20:05
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The post-merge check verified merge commit 0cde437007f6c8d610416f1017715097daa32838; 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 build-bc-view.mjs event-storming plugin code

0 participants