Skip to content

refactor(architecture): simplify render-dependencies.sh - #14811

Merged
melodic-automation-lanes[bot] merged 1 commit into
mainfrom
work-resolve-issue/issue-14406-42648068345-1
Nov 9, 2026
Merged

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

Conversation

@melodic-automation-lanes

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

Copy link
Copy Markdown
Contributor

Closes #14406

Summary

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

Simplified the awk inside render-dependencies.sh without changing its output, exit codes, flags or messages. The layout checker now loops over its four array keys instead of repeating each call and message. In the renderer, two identical label functions became one vertex_label, a node_key helper replaces three copies of the aggregate-to-directory ternary, an add_evidence helper replaces two copies of the evidence-line code, the two node-count loops became one, and the edge loop skips unresolved edges once at the top. Choice of means: only awk-internal helpers and loops changed; the bash wrapper, the summary printf and every printed string are byte-identical.

Not verified

  • Did not run plugins/architecture/skills/map-dependencies/scripts/dependency-graph.test.sh or shellcheck: this lane's Bash runs only the named wrappers. Left to the PR's CI.
  • tidy: the markdown passes (write-for-humans, ai-slop:audit fix) were skipped because the fragment's only prose is the line the issue requires word for word; the three code passes ran with no edits.
  • ci-status green is a PR CI check; left to the PR's CI.

Fix

  • plugins/architecture/skills/map-dependencies/scripts/render-dependencies.sh: looped the layout checker over a split() key list; merged src_label/dst_label into vertex_label; added node_key and add_evidence helpers; made k local to want_draw; merged the node-count loops; hoisted the resolved-status…
  • .changes/architecture/work-resolve-issue-issue-14406-42648068345-1-d6c15517.md: patch fragment, '### Changed' with 'Internal simplification, no behavior change.'

Verification

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

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

The run reports:

  • check-changelog-fragments: all 8 fragments valid (run before and after tidy)
  • check-changed-skills: map-dependencies PASS, 0 errors, 1 warning (SKILL.md body length, which this change did not touch)
  • check-affected: 13 passed, 6 skipped over 2 changed files
  • fresh-context review subagent: read the diff against HEAD hunk by hunk (layout-loop short-circuiting, fn + 0, else-if node count, early continue, node_key ordering after aggregated is set, local k, ''' quoting) and found no behavior difference under gawk, mawk, busybox or BSD awk
  • tidy-diff over the change's 17 hunks: no edits needed in the code passes
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/42648068345

Left out: the items under Not verified.

Related

#14406

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

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

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

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

Security review: PR #14811 (head c1bf0f4)

I found no security issues.

Scope: I read every hunk of both changed files in the full diff.

  • .changes/architecture/work-resolve-issue-issue-14406-42648068345-1-d6c15517.md is a new changelog fragment with a patch bump and one line of prose. It has no security-relevant surface.
  • plugins/architecture/skills/map-dependencies/scripts/render-dependencies.sh only changes the awk program embedded in it:
    • The layout checker now loops over a split() key list instead of repeating each call and message.
    • src_label and dst_label are merged into one vertex_label function.
    • New node_key and add_evidence helpers replace repeated code.
    • The two node-count loops are merged into one.
    • Unresolved edges are now skipped once at the top of the edge loop.

What I checked:

  • Evidence escaping: the backtick escaping of evidence strings (gsub(//, "'''", ev)) is byte-identical to the base. It just moved into add_evidence`, so how untrusted evidence text gets into the Markdown output has not changed.
  • Heredocs and shell: both heredocs are still quoted (<<'AWK'). No shell interpolation was added, and the bash wrapper, the flags and the output paths are untouched.
  • Trust surfaces: neither file matches a trusted-path glob. The diff touches no trust control, merge hold, workflow, token scope, kill switch, plugin manifest or standing instruction.

Prior findings: none (earlier heads this lane reviewed: 0; blocking only: no).

PR context: it contains no embedded directives aimed at the review lane.

critical-findings: 0

@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

claude-review reviewed c1bf0f4e055660d2273b39275ad6b5ef4bd1753b: 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 to render-dependencies.sh against the head file. None of them changes what the script does:

  • Layout checker loop (render-dependencies.sh:133): when the main rule starts, open is always empty, because the open != "" rule ends with next. problem is also always empty, because any earlier problem already called exit. So the guard on the first loop pass always holds, which matches the old unconditional open_array("nodes"). Later passes short-circuit the same way the old if (problem == "" && open == "") chain did. The END loop (:138-139) gives the same messages in the same order (nodes, edges, cycles, findings).
  • node_key (:188-190): it reads the global aggregated, which is set at :309 before every call site (:322, :324, :330). Package edges still use the raw edge_to[i] as their destination.
  • Edge loop continue (:319): before this change, both branches already required resolved. A project edge with draw_project false falls into the package branch and is skipped, both before and after.
  • Local k in want_draw (:210): the only other use of k is for (k in node_eco) at :364, which assigns it before reading it. Making it local changes nothing.
  • vertex_label / add_evidence: these merge identical code. The '\'' quoting sits in the same single-quoted bash string as before, and awk passes scalar parameters by value, so gsub on ev does not touch the caller's arrays.
  • unresolved_lines = fn + 0 (:378): the total is the same as the old per-finding increments, and the output order (edge evidence, then findings) is unchanged.
  • The node-count else if and the braced truncated block are the same as before.

Closing issue #14406 acceptance criteria:

  • Behavior unchanged: by reading the code, I found no change in output, exit codes, flags or messages. dependency-graph.test.sh runs the renderer (for example the threshold and aggregation assertions at lines 247-250), so a test there could fail if this broke. I did not run it: this lane has no shell.
  • Only listed files plus a fragment: met.
  • Within 400 lines and 15 files: met.
  • ci-status green: left to the PR's CI and not checked by this lane. The PR body's verification claims come from the author and I have not verified them.
  • Fragment: .changes/architecture/... has bump: patch, ### Changed, and the required line word for word. Met.

I found no embedded instructions in the PR context.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

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

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Verification evidence for c1bf0f4

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-14811-c1bf0f4e055660d2273b39275ad6b5ef4bd1753b, expires on 2026-12-09.

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 9, 2026
Merged via the queue into main with commit 8551e9b Nov 9, 2026
49 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-14406-42648068345-1 branch November 9, 2026 19:01
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 render-dependencies.sh architecture plugin code

0 participants