Skip to content

refactor(architecture): simplify render-landscape.sh - #15178

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

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

Conversation

@melodic-automation-lanes

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

Copy link
Copy Markdown
Contributor

Closes #14412

Summary

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

Simplified plugins/architecture/skills/map-landscape/scripts/render-landscape.sh without changing its behavior. The four copies of the sed -n ... | head -1 header read, each with its own empty-value default, are now one record_string <key> <default> helper. The two identical node printf loops in the model awk, and the owner-prefix ternary repeated three times, are now emit_node and owner_of. The unused owners\[\] array in the mermaid renderer is gone, and the portfolio awk decodes each row's name once instead of twice. Flags, outputs, exit codes, messages and the --help text are unchanged.

Not verified

  • render-landscape.test.sh was not executed: this lane runs no test runner or interpreter. Left to the PR's CI.
  • shellcheck/shfmt and typos were not run directly here (typos is not installed; check-affected reported which checks run only in CI). Left to the PR's CI.
  • ci-status green is a PR CI check. Left to the PR's CI.
  • tidy: passes 1-3 (code) ran with nothing to change; passes 4-5 (docs-hygiene, ai-slop) were skipped on the changelog fragment because the issue fixes its body text word for word.
  • Untracked runner dotfiles in the checkout root (.bashrc, .gitconfig, .idea, .vscode, .mcp.json and others) are sandbox artifacts, not part of this change. Exclude them from the patch.

Fix

  • plugins/architecture/skills/map-landscape/scripts/render-landscape.sh: added a record_string helper in place of four duplicated header-read pipelines and their defaults; added awk owner_of and emit_node helpers in place of duplicated node emission and owner derivation; removed the dead owners[]…
  • .changes/architecture/work-resolve-issue-issue-14412-42885955392-1-e5c5c4f6.md: patch fragment with body '### Changed' and the line 'Internal simplification, no behavior change.'

Verification

The runner ran each check from the base copy against 60f8ec6:

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

The run reports:

  • check-changelog-fragments: all 4 fragments under .changes/ valid (run before and after tidy)
  • check-changed-skills: map-landscape 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 (run before and after tidy)
  • fresh-context subagent review of the full diff for behavior differences (sed escaping, awk scoping and portability, output order): no differences found
  • grep of render-landscape.test.sh: the test runs the script and asserts on its outputs only, never on its source text, so no test line needed changing
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/42885955392

Left out: the items under Not verified.

Related

#14412

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

Security review: PR #15178 (head 60f8ec6)

I found no security issues.

I read every hunk of both changed files:

  • plugins/architecture/skills/map-landscape/scripts/render-landscape.sh. This is a refactor and behaves the same as before.
    • record_string <key> <default>. The new helper replaces four sed -n … | head -1 header reads. The key goes into the sed expression, but every call site passes a fixed literal (subject_owner, generated_on, discovery_source, remote). The key never comes from the record or the user, so the change adds no regex or command injection. The double-quoted escaping expands to the same pattern the old single-quoted versions used. The value still goes out through printf '%s', so it is never evaluated.
    • owner_of / emit_node awk helpers. They replace the duplicated owner ternary and node printf loops. The owner and the other untrusted fields still go through safe() before they are emitted, the same as the base did. Output columns and order are unchanged.
    • Other cleanups. The unused owners[] array is removed, and the portfolio awk now decodes name once. Neither changes how any value is escaped (md() / cell() are still applied).
  • .changes/architecture/…e5c5c4f6.md is a changelog fragment with no executable surface.

Checked and out of scope:

  • Trusted paths and trust controls. Neither file matches a listed trusted-path glob, and no trust control, merge hold, token scope or kill switch is touched.
  • Manifests and instructions. No plugin manifest is changed, and no standing instruction is removed or softened.
  • PR context. The description contains no embedded instructions aimed at this lane.

No cost or spend impact.

critical-findings: 0

@github-actions

Copy link
Copy Markdown
Contributor

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

Code review: no findings

This PR refactors plugins/architecture/skills/map-landscape/scripts/render-landscape.sh and adds a patch changelog fragment. I read both changed files in full and checked each change for behavior differences. I found none.

  • record_string (head lines 166-170): the double-quoted sed program is the same as the four single-quoted ones it replaces. \" becomes ", \\(/\\) become \(/\), \$ becomes $, and \\1 becomes \1. ${value:-$2} gives the same fallback as the old [[ -n … ]] || x=default lines, including 'not used' for remote. Pipefail behaviour of sed | head -1 is unchanged.
  • awk owner_of / emit_node (lines 340-346, 426, 450-451): seg is now a local. The parameter k hides the global k, and the parameter rel hides the global rel that the edge rule sets. Nothing after the emit loops reads the global k or seg; the edge loop uses fk. aliasof, ndisp and ndesc are still read as globals. The column order and safe() wrapping match the printf lines they replace, with "internal"/"external" now passed in as rel. The in drawn filter for externals is kept.
  • Mermaid renderer: nothing in the END block read owners[], so removing it changes nothing.
  • Portfolio awk (lines 605-614): the new global name is not used by field, unquote, md, cell, deplist or gensub_commas, so decoding the name once gives the same row and sort key.

Closing issue #14412, acceptance criteria:

  • Behavior unchanged: met, by the reading above. render-landscape.test.sh checks the outputs these paths produce: boundary captions, the Remote facts: not used header, owner grouping, and foreign owners.
  • Diff limited to the listed file plus a changelog fragment: met.
  • Within 400 lines and 15 files: met.
  • Fragment for architecture with body ### Changed / "Internal simplification, no behavior change.": met, with bump: patch.
  • ci-status green: CI decides this; the lane cannot check it.

I ran no tests or tools. The PR's test runs and check results are the author's claims and are unverified.

No plugin manifests changed. No .claude/rules/ criteria applied, and no paved-path or settled-thread inputs were provided. The PR context contains no embedded instructions aimed at the lane.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

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

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Verification evidence for 60f8ec6

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-15178-60f8ec6ce44910a0854e322d3c07ba981ce53697, 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 9354d5b Nov 10, 2026
63 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-14412-42885955392-1 branch November 10, 2026 22:06
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The post-merge check verified merge commit 9354d5b498f5da5524fae11ee32a8fd9587b6eb9; 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 render-landscape.sh architecture plugin code

0 participants