Skip to content

feat(architecture): build the deepening report on the shared chrome with pinned CDN diagrams - #16508

Merged
kyle-sexton merged 4 commits into
mainfrom
feat/architecture-deepening-report-shared-chrome
Nov 16, 2026
Merged

kyle-sexton merged 4 commits into
mainfrom
feat/architecture-deepening-report-shared-chrome

Conversation

@kyle-sexton

Copy link
Copy Markdown
Member

No related issue: an owner decision from the Codebase Design workshop interview (ledger Q636, Q637, Q640), built after the rendered-views contract change in #16490.

Summary

The /architecture:improve deepening report had a private light-only scaffold and drew every diagram by hand. It now uses the shared page chrome, loads Tailwind and Mermaid from a CDN at exact versions, and its header shows evidence counts.

  • The report follows the system's light or dark setting and carries the System, Light and Dark toggle.
  • Graph-shaped diagrams are Mermaid blocks; layer stacks, size bars and deep modules stay hand-built.
  • The header lists up to four counts, each a number Phase 1.5 reproduced; selected candidates that depend on each other are interviewed as one tree.

Fix

  • research/deepening/html-report.md: new scaffold with a content security policy that names each library file (never the CDN origin), the chrome copied from reference/html-chrome.html, the header counts line, a Depends on card line, and Mermaid patterns beside the hand-built ones. With no network the page keeps the chrome's styling and shows each Mermaid block's source.
  • Mermaid runs with securityLevel: "strict" and HTML labels off, and a repository-derived string in a Mermaid label keeps only letters, digits, spaces and _ . / : -. Reason: in a headless Chromium probe with HTML labels on, an HTML-escaped <img> tag inside a flowchart label became an element (its handler was stripped and the page policy blocked the load); with HTML labels off it did not.
  • actions/deepening.md: Phase 2 points at the new scaffold; Phase 3 adds the one-tree exception.
  • The architecture plugin becomes the fourth carrier of the generated chrome copy (scripts/shared-copies.txt, scripts/check-html-assets.sh, the rendered-views README and changelog). lib/html-chrome.html is unchanged.

Left out: the interview loop and the design hand-off inside /architecture:improve (a later item), and any theme or branding option (#16412).

Verification

  • Scaffold rendered in headless Chromium under its policy: Tailwind utilities applied, the chrome's own rules won where both set a property, Mermaid drew the flowchart, no policy violation.
  • Two new eval cases, three runs each: deepening-report-on-chrome-with-counts 3 of 3 with the change and 0 of 3 on the base plugin; deepening-dependent-candidates-one-tree 3 of 3 with the change and 0 of 3 on the base plugin. The report case's scan claims five call sites where the scaffolded code has three, so a report that copies the scan fails.
  • The six existing deepening cases, three runs each with the change: four at 3 of 3. deepening-standard-reproduces-strong scored 0 of 3 with the change and 0 of 3 on the base plugin. deepening-light-labels-unverified scored 1 of 3 with the change and 3 of 3 on base; both failing replies state that nothing is reproduced or checked inline and that both claims are labeled unverified, which is the case's criterion, so the judge's votes are wrong on them.
  • scripts/sync-shared-copies.sh --check, scripts/check-html-assets.sh and scripts/check-changelog-fragments.sh --check pass.

Related

Follow-ups

  • Pre-existing (advisory): the eval case deepening-standard-reproduces-strong fails its judge grader on the base plugin too (0 of 3); the case's prompt forbids opening repository files while its criterion asks for reproduction against the code.

🤖 Generated with Claude Code

kyle-sexton and others added 2 commits November 16, 2026 00:13
…ith pinned CDN diagrams

The /architecture:improve deepening report takes the shared page chrome
(light and dark, theme toggle), loads Tailwind and Mermaid from a CDN at
exact versions named in its content security policy, and keeps hand-built
diagrams for what a graph cannot show. Its header gains one line of
evidence counts that Phase 1.5 reproduced, and candidates that depend on
each other are interviewed as one tree.

Mermaid runs in strict mode with HTML labels off, and a repository-derived
string in a Mermaid label is reduced to a safe character set: with HTML
labels on, an escaped tag in a label became an element in a headless
Chromium probe.

The architecture plugin becomes the fourth carrier of the generated
chrome copy.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
@kyle-sexton
kyle-sexton marked this pull request as ready for review November 16, 2026 05:19
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-16T05:21:19.357461Z 964dc50 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@kyle-sexton kyle-sexton added the do-not-merge Hard merge gate: do not merge while applied. label Nov 16, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 964dc500c0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@github-actions

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-refine/fix-docs
Model rung 0
Leg base
Run job success
Activity step skipped
Commits pushed none (read lane)
Run 43809491082

Failed GitHub API calls

Method Path Status
GET /repos/{repo}/git/ref/tags/* 404

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

claude-review: 3 inline finding(s) on 964dc500c0e922a8f202c9dcbb1f2bcad6cec158; the summary is in this lane's pull request comment.

claude-lane: claude-review

@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

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

Code review: deepening report on the shared chrome (#16508)

This round reports blocking findings only. This lane already reviewed an earlier head (964dc500), so advisory findings are left out.

I read every hunk of all 32 changed files in the full diff. I found no blocking findings at this head.

Earlier findings, now fixed and settled. The three earlier findings are fixed at this head, and their threads are resolved:

  • The Mermaid leak edge now uses linkStyle 2. The index is right: the edge C -.-> D is the third link, counted from 0. The pattern table now says the same thing.
  • no-scan-count now matches only inside <header>. Its samples include a passing report that mentions the scan number outside the header.
  • The link to the chrome copy is now relative. ../../../../reference/html-chrome.html from skills/improve/research/deepening/ resolves to plugins/architecture/reference/html-chrome.html.

The settled point about the missing integrity hash (an owner decision recorded under #16490) is not raised again.

What I checked at this head:

  • Registration. The fourth chrome copy is listed in scripts/shared-copies.txt, scripts/check-html-assets.sh, the comment in cross-plugin-source-registry.txt, and the rendered-views README and changelog.
  • Generated copy. plugins/architecture/reference/html-chrome.html has the generated-file header right after the doctype.
  • Scaffold.
    • The content security policy names each library file, not the CDN origin.
    • Each URL appears twice, once in the policy and once on its <script> tag.
    • style-src 'unsafe-inline' lets Tailwind's browser build inject its styles.
    • mermaid.initialize runs before the page's load event, so startOnLoad takes effect.
    • The .paper and .deep classes use tokens the chrome defines.
  • Path-scoped rules. I checked the changes against .claude/rules/eval-case-transcripts.md and .claude/rules/skill-bodies-state-current-rules.md:
    • The eval content is synthetic, not a transcript.
    • The pinned library versions are stored values, and they carry an as-of date and a recheck trigger.
  • Release. The changelog fragment's bump: minor fits the added behavior.
  • Manifests. No plugin manifest changed, so the manifest checks do not apply.

Not verified. The PR has no closing issue; it cites workshop decisions (ledger Q636, Q637, Q640), so there are no acceptance criteria to check. The Chromium render, the eval pass rates and the script checks are the author's own claims; I ran none of them.

Out of scope here. Security findings belong to the separate security lane.

Spend. The two new eval cases add 6 runs (three each). They are paid from prepaid credits or subscription usage, not billing.

Verifier dropped 0 of 0 candidates.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

claude-security-review: 1 inline finding(s) on 964dc500c0e922a8f202c9dcbb1f2bcad6cec158; the summary is in this lane's pull request comment.

claude-lane: claude-security-review

@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

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

Security review: PR #16508 (deepening report on the shared chrome, pinned CDN Tailwind and Mermaid)

No security issues found at cf7995b9. This review was blocking only: the lane already reviewed head 964dc500, so SUGGESTION findings were not reported.

I read every hunk of all 32 changed files in .claude-lane/pr.diff. None of them matches a TRUSTED PATHS glob. The diff doesn't touch any workflow, action, token request, trusted-actor list, merge hold, kill switch or plugin manifest, so no trust control and no manifest line is involved.

Checks against head

  • Content security policy (html-report.md, scaffold): the policy starts from default-src 'none' and lists each library by its exact file URL, not the CDN's origin. Styles may only be inline, images only data:, and base-uri and form-action are 'none'. The base report had no policy at all, so this adds protection. 'unsafe-inline' is there for the chrome's theme toggle script and the call that starts Mermaid.

  • Mermaid injection: Mermaid runs with securityLevel: "strict", and HTML labels are off both at the top level and for flowcharts. A string taken from the repository keeps only letters, digits, spaces and _ . / : -, sits inside a quoted label, and is then HTML-escaped. The allowlist leaves out %, #, ;, quotes, brackets and newlines. That rules out:

    • %%{init}%% directives, which could change the settings above;
    • entity codes;
    • statement breaks;
    • breaking out of the label.

    Node IDs, classDef and the linkStyle line are fixed text in the pattern, never repository-derived. I found no path around these controls.

  • Escaping rules (deepening.md Phase 2): unchanged in meaning. Text and attributes are still escaped, nothing unescaped goes into <script> or <style>, and no event-handler attribute is built from input. The rule that skips the HTML report for someone else's checkout is also unchanged.

  • reference/html-chrome.html: a generated copy of lib/html-chrome.html. Its only script is the theme toggle, which accepts only the fixed values system, light and dark.

  • Eval scaffold (scaffold.sh): heredocs with quoted delimiters and fixed paths. It runs only in the eval harness and takes no outside input.

  • Removed instructions: two rules are dropped: "a diagram runtime such as Mermaid is not allowed" and the report's own self-containment choice. Both existed for self-containment, which the contract already lifted in feat(rendered-views): let a view load a pinned CDN library with a fallback #16490. The diff replaces them with the policy, strict-mode Mermaid and the label allowlist. Judged by what breaks when each rule is gone, no protected class is left without enforcement. I did not re-read the register this round. The previous round read docs/contracts/instruction-exception-register/README.md, and these deletions have not changed since.

Settled point: the missing integrity hash on the two CDN <script> tags was this lane's earlier SUGGESTION. kyle-sexton settled it with a decision (the #16490 contract requires an exact version and a fallback, not a hash), and its lines have not changed since. It is not raised again.

Pull request text: the PR context and the settled threads contain no instructions aimed at this lane.

Cost: nothing in this change can bill. Running the two new eval cases (three runs each) uses only prepaid model usage.

critical-findings: 0

…three eval cases' checks

The Mermaid example styled the two nodes of a leak, not its arrow; it
now styles the edge with linkStyle. The chrome reference is a relative
link. The counts case lets the run search for callers, and its scan-number
check reads the header only. The standard-level case's judge criterion
says the reply describes the gate and does not run it.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
@kyle-sexton

Copy link
Copy Markdown
Member Author

(Reply written by a Claude Code session.) Hold status: this pull request carries do-not-merge while it waits on one owner decision, whether Mermaid diagrams in the report stay on a fixed light card in both themes or are redrawn when the theme changes. Fixes for four of the five review threads are committed locally (19f54a9ea2, both changed eval cases 3 of 3) and not yet pushed: the branch needs main merged in first, and commit signing on the authoring machine is down. They will be pushed once signing works again.

@kyle-sexton

Copy link
Copy Markdown
Member Author

(Reply written by a Claude Code session.) Hold lifted: the owner chose the fixed light card for Mermaid diagrams (the recommended option; no extra page script, and a diagram reads the same in both themes). The reworded judge criterion of deepening-standard-reproduces-strong was also run where it should fail, with the level line set to light: 0 of 3, against 3 of 3 at standard.

@kyle-sexton kyle-sexton removed the do-not-merge Hard merge gate: do not merge while applied. label Nov 16, 2026
@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 16, 2026
Merged via the queue into main with commit 9746c9e Nov 16, 2026
91 of 92 checks passed
@kyle-sexton
kyle-sexton deleted the feat/architecture-deepening-report-shared-chrome branch November 16, 2026 15:39
@github-actions github-actions Bot added the merge-path: owner-agent Post-merge accounting record (README.md, Merge paths) label Nov 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-path: owner-agent Post-merge accounting record (README.md, Merge paths)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant