Skip to content

fix(rendered-views): audit planning surface escapes and document two escape exceptions - #7943

Merged
melodic-automation-lanes[bot] merged 2 commits into
mainfrom
work-resolve-issue/issue-6118-39092046905-1
Oct 18, 2026
Merged

melodic-automation-lanes[bot] merged 2 commits into
mainfrom
work-resolve-issue/issue-6118-39092046905-1

Conversation

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

Closes #6118

Summary

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

Documents the Python html.escape emitters and the repo-sweep JSON-in-script splice as named exceptions in the rendered-views convention, per the recorded decision. Audits all 31 innerHTML sites in the planning surface page and escapes the six interpolations that were raw.

Not verified

  • surface.test.sh did not pass here (browser phase, line 260; playwright-cli is likely unavailable in this environment). Left to the PR's CI. The page's JS syntax was not machine-checked after the fix, only read in the diff.
  • scripts/check-html-assets.sh was not run separately (needed approval); the htmlhint step inside surface.test.sh passed before the final syntax fix.

Fix

  • plugins/planning/surface/index.html: esc() added on the chip s- class values (4 sites), the rev number in the rediff line, and the settings source layer
  • docs/conventions/rendered-views/README.md: new 'Documented escape exceptions' section for the Python emitters and the repo-sweep splice, each with a reason
  • docs/conventions/rendered-views/CHANGELOG.md: entry for the two exceptions
  • .changes/planning/fix-surface-page-escape-audit-6118-5e1a7c24.md: patch fragment for planning

Verification

The run reports:

Left out: the items under Not verified.

Related

#6118

@github-actions

github-actions Bot commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 5c1f7f89ab63ca527507f16e2bee55c757bedea4: 0 finding(s), 0 as inline comments.

No security issues found in this PR (head 5c1f7f8).

  • plugins/planning/surface/index.html: The diff only wraps already-interpolated values in esc(). These are the status-chip class names st and d.decision, old.rev, and settingSrc(k). Each change tightens output encoding. No new sink, trust boundary or input path is added.
  • Docs (docs/conventions/rendered-views/README.md, CHANGELOG.md) and the .changes fragment: These are prose only, and no standing guardrail is deleted or softened. I checked the documented exceptions against the code:
    • render.sh:113 does rewrite < to < in the spliced JSON.
    • server.py:461 does prefix-check image sources against data:image/ and http(s)://.
    • There is no quote=False call in plugins/planning/surface or plugins/pixel-art/scripts.
  • Not reviewed: I did not read the instruction-exception register. The diff removes no rule, so it does not apply.

@github-actions

github-actions Bot commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

claude-review reviewed 5c1f7f89ab63ca527507f16e2bee55c757bedea4: 0 finding(s), 0 as inline comments.

Code review: no findings

I found nothing to block or flag on #7943 at 5c1f7f8. I read the diff and the PR context. I also spot-checked index.html and the Python and shell emitters the new README section describes.

Closing issue #6118. All four acceptance criteria are met or, for the two test-dependent ones, depend on CI.

  • README names both exceptions with a reason each, and the CHANGELOG logs it. Met by the diff.
  • Every innerHTML interpolation is esc()-wrapped or constant. The six raw sites are now wrapped: four s- class values, old.rev, and settingSrc(k). I read the remaining sites (the choices list, the decide and talk rows, the notes thread, Settings, the accept-all dialog and inline()/md()). Each is constant markup (LABEL[...], USECT, the letter() suffixes) or goes through esc(). inline() and md() escape before they add markup. I did not read all 31 sites individually.
  • scripts/run-test-file.sh passes on the planning surface test file. I did not run it. The PR body says the run failed in the playwright browser phase at line 260 and was not re-run, so this criterion is unconfirmed until CI reports.
  • Changelog fragment passes scripts/check-changelog-fragments.sh. I did not run it. The PR body claims the check passed (author-claimed, unverified).

README claims I checked against the code.

  • Python emitters. exporters.py:1001 calls html.escape(..., quote=True). gallery.py:30,37,48 use the one-argument form. server.py:463 escapes the image src.
  • repo-sweep splice. render.sh:113 runs sed 's/</\\u003c/g', which matches the README's description of the < rewrite.
  • Not checked. I did not confirm the data:image/ or http(s) prefix check the README attributes to server.py, or the textContent-only claim for the repo-sweep template.

Unconfirmed from the PR body. The PR body says the page's JS syntax was not machine-checked after the final edit. Each edit in the diff is a balanced esc(...) wrap, so I saw no syntax problem when reading it.

Nit, not reported inline. In the README's repo-sweep bullet, "none can form;" is followed by a capitalised "That escape parses back…". It should be a period.

@melodic-automation-lanes melodic-automation-lanes Bot added the needs-human Human-in-the-loop required; autonomous sessions must not resolve items carrying this. label Oct 18, 2026
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The pr-unblock lane stopped on this pull request and needs a person: the merge stages a change under .github/workflows/, which the lane does not push.

  • Reason: workflow-staged
  • Resume key: b83f8ef07d3581ee7947e8eebe2dc424aa6e2a4e (the head the lane stopped on)

To resume, deal with the reason above, remove the needs-human label (and do-not-merge, if set), then dispatch the pr-unblock workflow with pr-number=7943 and activity=resolve-conflicts:

gh workflow run pr-unblock.yml -R melodic-software/claude-code-plugins -f pr-number=7943 -f activity=resolve-conflicts

…sue-6118-39092046905-1

# Conflicts:
#	docs/conventions/rendered-views/CHANGELOG.md
@kyle-sexton kyle-sexton added needs-human Human-in-the-loop required; autonomous sessions must not resolve items carrying this. and removed needs-human Human-in-the-loop required; autonomous sessions must not resolve items carrying this. labels Oct 18, 2026
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The unattended merge path enqueued this pull request at head 5c1f7f89ab63ca527507f16e2bee55c757bedea4.

@melodic-automation-lanes
melodic-automation-lanes Bot added this pull request to the merge queue Oct 18, 2026
Merged via the queue into main with commit dfeae2b Oct 18, 2026
61 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-6118-39092046905-1 branch October 18, 2026 21:50
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.

fix(rendered-views): bring the remaining Python and planning-app HTML emitters under the single escape helper

1 participant