Turn any idea, plan, or codebase into a beautiful interactive diagram. An agent skill for Claude Code, Codex, and more.
HTML agent-skillsai-agentsarchitecture-diagramclaude-codeclaude-skillscodexcoding-agentsdeepseek-harnessdeveloper-toolsdiagramsdiagrams-as-codedsh-pluginflowchartllmmermaidopencodesequence-diagramsoftware-architecturesystem-designvisualization
fix(delta): surface repository provenance changes
To3akaRinadcdddce5eed
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex bd03a391..0ea76128 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -7,6 +7,7 @@ All notable changes are documented here. Format loosely follows [Keep a Changelo> Development identity: `v2.17.0-dev.1`. Not a stable release.### Fixed+- **Architecture Delta provenance visibility.** Repository revision, provider, link-mode, and location-representation changes now produce a separate redacted provenance receipt and visible Delta notice instead of an empty authored-change claim. Provenance-only comparisons keep graph counts at zero, leave Review disabled, avoid false SVG change states, and carry the same truthful distinction into Share Cards.- **DSH plugin refresh.** Adapter 0.2.0 pins the current Archify development snapshot, includes the newer runtime and CLI fixes, and targets DSH 0.1.2-rc.1. Release metadata replaces the frozen 0.1.0 packaging source; the tarball uses the canonical clean-Skill stager and documents independent plugin upgrades.- **Machine-readable CLI argument failures (#330).** `validate --json` and `deliver --json` now keep invalid or missing option values, unknown options and diagram types, unsupported option combinations, and usage errors inside one versioned failure receipt on stdout. These failures use the `arguments` stage, stable diagnostic codes, and exit status 2, while human-mode stderr behavior remains unchanged.- **Complete artifact-check receipts (#311).** The checker now lets stdout drain before exiting, so large JSON receipts remain complete through pipes. Validation, delivery, and architecture comparison retain their original success/failure status without truncated-JSON errors.diff --git a/README.md b/README.mdindex b1ef38e4..5821a908 100644--- a/README.md+++ b/README.md@@ -150,7 +150,7 @@ Continue with focused requests such as `add Redis`, `move auth to the left`, orArchitecture's optional `deployment-ownership` profile fails closed when authored owners, region placement, private database scope, or named crossings are missing; it is never implicit and does not inspect live infrastructure. See the [checked deployment proof](https://tt-a1i.github.io/archify/gallery.html#proof-deployment-ownership).-For design or PR review, Architecture Delta compares validated Before / Delta / After snapshots with a machine receipt. Select an authored change or play one finite, viewer-only Review; it infers no impact, risk, or merge safety.+For design or PR review, Architecture Delta compares validated Before / Delta / After snapshots with a machine receipt. Repository revision, provider, and link-mode changes appear as separate provenance facts without marking graph entities as changed. Select an authored graph change or play one finite, viewer-only Review; it infers no impact, risk, or merge safety.`node archify/bin/archify.mjs compare architecture base.json head.json architecture-delta.html --json`diff --git a/README_EN.md b/README_EN.mdindex b1ef38e4..5821a908 100644--- a/README_EN.md+++ b/README_EN.md@@ -150,7 +150,7 @@ Continue with focused requests such as `add Redis`, `move auth to the left`, orArchitecture's optional `deployment-ownership` profile fails closed when authored owners, region placement, private database scope, or named crossings are missing; it is never implicit and does not inspect live infrastructure. See the [checked deployment proof](https://tt-a1i.github.io/archify/gallery.html#proof-deployment-ownership).-For design or PR review, Architecture Delta compares validated Before / Delta / After snapshots with a machine receipt. Select an authored change or play one finite, viewer-only Review; it infers no impact, risk, or merge safety.+For design or PR review, Architecture Delta compares validated Before / Delta / After snapshots with a machine receipt. Repository revision, provider, and link-mode changes appear as separate provenance facts without marking graph entities as changed. Select an authored graph change or play one finite, viewer-only Review; it infers no impact, risk, or merge safety.`node archify/bin/archify.mjs compare architecture base.json head.json architecture-delta.html --json`diff --git a/README_ZH.md b/README_ZH.mdindex a99570a9..530b0c0c 100644--- a/README_ZH.md+++ b/README_ZH.md@@ -146,7 +146,7 @@ DeepSeek Harness(社区集成、显式启用):运行 `dsh plugin --profile它不会被静默开启,只校验作者写入的事实,不代表线上基础设施已经核验。可查看[通过校验的部署证明](https://tt-a1i.github.io/archify/gallery.html#proof-deployment-ownership)。-做设计或 PR 评审时,Architecture Delta 生成已校验的 Before / Delta / After 和机器回执。精确选择任一作者变更,或播放一次有限 Review;全程只读,不推断影响、风险或合并安全。+做设计或 PR 评审时,Architecture Delta 生成已校验的 Before / Delta / After 和机器回执。仓库 revision、provider 和链接模式的变化会作为独立来源事实显示,不会把图实体错误标记为已变化。精确选择任一已创作的图变更,或播放一次有限 Review;全程只读,不推断影响、风险或合并安全。`node archify/bin/archify.mjs compare architecture base.json head.json architecture-delta.html --json`diff --git a/archify.zip b/archify.zipindex 5902a52a..6be52b5e 100644Binary files a/archify.zip and b/archify.zip differdiff --git a/archify/delta/architecture-delta.mjs b/archify/delta/architecture-delta.mjsindex 5bd54a70..cf0d431d 100644--- a/archify/delta/architecture-delta.mjs+++ b/archify/delta/architecture-delta.mjs@@ -45,6 +45,32 @@ function normalizeRepository(repository) {};}+const PROVENANCE_FIELDS = ['url', 'revision', 'provider', 'link_mode'];++function provenanceSide(repository) {+ if (!repository) return null;+ return {+ revision: repository.revision,+ ...(repository.provider !== undefined ? { provider: repository.provider } : {}),+ ...(repository.link_mode !== undefined ? { linkMode: repository.link_mode } : {}),+ };+}++function provenanceChange(base, head) {+ if (equal(base, head)) return undefined;+ const changedFields = !base || !head+ ? ['/repository']+ : PROVENANCE_FIELDS+ .filter((field) => !equal(base[field], head[field]))+ .map((field) => `/${field}`)+ .sort(codepointOrder);+ return {+ changedFields,+ base: provenanceSide(base),+ head: provenanceSide(head),+ };+}+function normalizeComponent(component) {return {...component,@@ -280,7 +306,8 @@ export function compareArchitecture(base, head, evidence = {}) {kind: (after || before).kind,label: (after || before).label,}));- const provenanceChanged = !equal(baseRepository, headRepository);+ const provenance = provenanceChange(baseRepository, headRepository);+ const provenanceChanged = Boolean(provenance);return {schemaVersion: 1,@@ -313,6 +340,7 @@ export function compareArchitecture(base, head, evidence = {}) {provenanceChanged,},changes: { components, connections, boundaries },+ ...(provenance ? { provenance } : {}),identity: {components: 'components[].id',connections: 'connections[].id (required)',@@ -696,15 +724,38 @@ function expectedReviewTargetSignature(row) {const total = (summary, key) => summary.components[key] + summary.connections[key] + summary.boundaries[key];+function provenanceDetail(provenance) {+ const value = (side, field) => {+ if (!side) return 'undeclared';+ if (field === '/revision') return side.revision?.slice(0, 8) || 'none';+ if (field === '/provider') return side.provider ?? 'automatic';+ if (field === '/link_mode') return side.linkMode ?? 'default';+ if (field === '/repository') return 'declared';+ return 'changed';+ };+ return provenance.changedFields.map((field) => {+ if (field === '/url') return '/url: repository location changed';+ return `${field}: ${value(provenance.base, field)} → ${value(provenance.head, field)}`;+ }).join(' · ');+}+export function renderArchitectureDeltaHtml({ receipt, baseSvg, deltaSvg, headSvg, baseHtml = '', headHtml = '', artifactCss }) {const rows = architectureDeltaChangeRows(receipt);const changed = total(receipt.summary, 'changed');const proof = receipt.proofLevel === 'revision-pinned' ? 'REVISION-PINNED INPUTS' : 'AUTHORED SNAPSHOTS';+ const provenanceChanged = receipt.summary.provenanceChanged === true;+ const provenanceFields = receipt.provenance?.changedFields?.join(', ') || 'repository metadata';+ const provenanceDescription = provenanceChanged ? provenanceDetail(receipt.provenance) : '';+ const provenanceNotice = provenanceChanged+ ? `<aside class="provenance-change" data-provenance-changed="true" data-provenance-fields="${esc(provenanceFields)}"><strong>Repository provenance changed</strong><span>${esc(provenanceDescription)}</span></aside>`+ : '';const rowHtml = rows.length ? rows.map((row, index) => {const label = row.headLabel || row.baseLabel || row.head?.label || row.base?.label || row.label || row.id;const targetSignature = expectedReviewTargetSignature(row);return `<li data-change-status="${esc(row.status)}"><button class="change-row" type="button" data-change-index="${index}" data-change-key="${esc(row.key)}" data-change-kind="${esc(row.kindKey)}" data-change-id="${esc(row.id)}" data-change-label="${esc(label)}" data-change-status="${esc(row.status)}" data-change-classifications="${esc(row.classifications.join(', '))}" data-change-target-signature="${esc(targetSignature)}"><span class="token">${esc(markerFor(row.status) || '~')}</span><span>${esc(row.kind)}</span><strong>${esc(label)}</strong><code>${esc(row.id)}</code><span>${esc(row.classifications.join(', '))}</span><span>${esc(row.changedFields.join(', ') || 'identity')}</span></button></li>`;- }).join('\n') : '<li class="empty">No authored architecture changes.</li>';+ }).join('\n') : provenanceChanged+ ? '<li class="empty">No component, relationship, or boundary changes; repository provenance changed.</li>'+ : '<li class="empty">No authored architecture changes.</li>';const baseView = baseHtml? `<iframe class="snapshot-frame" title="Before architecture explorer" srcdoc="${esc(baseHtml)}"></iframe>`: baseSvg;@@ -719,17 +770,18 @@ ${artifactCss}:root{color-scheme:dark;--d-add:#34d399;--d-remove:#fb7185;--d-change:#fbbf24;--d-move:#7dd3fc;--d-focus:#7dd3fc;--d-ink:#e6edf5;--d-muted:#8aa0b5;--d-line:#25384a}*{box-sizing:border-box}body{margin:0;overflow-x:hidden;background:#071019;color:var(--d-ink);font-family:"JetBrains Mono",ui-monospace,SFMono-Regular,Menlo,monospace}.proof-page{width:min(1600px,calc(100vw - 64px));margin:auto;padding:30px 0 42px}.proof-head{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:28px;align-items:end;padding-bottom:20px;border-bottom:1px solid var(--d-line)}.eyebrow{margin:0 0 8px;color:#7dd3fc;font:700 11px/1.2 ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:.14em}.proof-head h1{margin:0;font-size:clamp(32px,4vw,56px);line-height:.96;letter-spacing:-.04em}.subtitle{margin:12px 0 0;color:var(--d-muted);font-size:14px}.metrics{display:flex;gap:9px}.metric{min-width:86px;padding:11px 13px;border:1px solid var(--d-line);border-radius:8px;background:#0b1722}.metric strong{display:block;font:700 23px/1 ui-monospace,SFMono-Regular,Menlo,monospace}.metric span{display:block;margin-top:6px;color:var(--d-muted);font:700 9px/1 ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:.1em}.add strong{color:var(--d-add)}.remove strong{color:var(--d-remove)}.change strong{color:var(--d-change)}.proof-tools{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:16px 0 10px}.view-switch{display:inline-flex;padding:3px;border:1px solid var(--d-line);border-radius:8px;background:#0a141e}.view-switch button,.utility,.review-step{border:0;border-radius:6px;background:transparent;color:var(--d-muted);padding:8px 14px;font:700 11px/1 ui-monospace,SFMono-Regular,Menlo,monospace;cursor:pointer}.view-switch button[aria-selected="true"]{background:#173047;color:#fff}.utility{border:1px solid var(--d-line)}.view-switch button:focus-visible,.utility:focus-visible,.review-step:focus-visible,.change-row:focus-visible{outline:2px solid var(--d-focus);outline-offset:2px}.utility:disabled,.review-step:disabled{cursor:not-allowed;opacity:.45}.legend{display:flex;gap:16px;color:var(--d-muted);font:650 10px/1 ui-monospace,SFMono-Regular,Menlo,monospace}.legend span{display:inline-flex;align-items:center;gap:6px}.legend i{width:22px;border-top:3px solid currentColor}.legend .add{color:var(--d-add)}.legend .remove{color:var(--d-remove)}.legend .remove i{border-top-style:dashed}.legend .change{color:var(--d-change)}.legend .change i{border-top-style:dotted}.legend .move{color:var(--d-move)}.legend .move i{border-top-style:double}+.provenance-change{display:flex;align-items:center;gap:12px;margin:14px 0 0;padding:10px 13px;border:1px solid rgba(125,211,252,.45);border-radius:8px;background:rgba(125,211,252,.07);color:var(--d-muted);font:650 11px/1.35 ui-monospace,SFMono-Regular,Menlo,monospace}.provenance-change strong{color:var(--d-focus)}.provenance-change span{margin-left:auto;color:var(--d-muted)}.review-strip{display:grid;grid-template-columns:auto auto auto auto minmax(0,1fr);align-items:center;gap:5px;margin:0 0 10px;padding:7px 8px;border-block:1px solid var(--d-line);font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.review-step{min-height:34px;border:1px solid var(--d-line);padding-inline:11px}.review-step[aria-pressed="true"]{border-color:var(--d-focus);color:var(--d-ink)}.review-status{min-width:0;padding-left:9px;color:var(--d-muted);font-size:10px;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.review-status strong{color:var(--d-ink);font-weight:750}.review-status[data-state="unavailable"]{color:var(--d-remove)}.canvas{overflow:hidden;border:1px solid var(--d-line);border-radius:10px;background:#09141e;padding:12px;min-height:520px}.canvas svg{display:block;width:100%;height:auto;max-height:72vh}.canvas[hidden]{display:none}.snapshot-frame{display:block;width:100%;height:min(76vh,920px);min-height:620px;border:0;border-radius:6px;background:#071019}.canvas[data-view="base"],.canvas[data-view="head"]{padding:0}.canvas[data-view="delta"] [data-delta-state="same"]{opacity:.38}.canvas[data-delta-review-active]{--review-same-opacity:.14;--review-change-opacity:.28}.canvas[data-delta-review-active] [data-delta-state="same"]{opacity:var(--review-same-opacity)!important}.canvas[data-delta-review-active] [data-delta-state]:not([data-delta-state="same"]):not([data-delta-review-current]){opacity:var(--review-change-opacity)!important}.canvas[data-delta-review-active] [data-delta-review-current]{opacity:1!important;transition:opacity .16s ease-out}g[data-node-id][data-delta-state="added"]>rect:last-of-type{stroke:var(--d-add)!important;stroke-width:3!important}g[data-node-id][data-delta-state="removed"]>rect:last-of-type{stroke:var(--d-remove)!important;stroke-width:3!important;stroke-dasharray:7 5}g[data-node-id][data-delta-state="changed"]>rect:last-of-type{stroke:var(--d-change)!important;stroke-width:3!important;stroke-dasharray:2 3}g[data-node-id][data-delta-state="moved"]>rect:last-of-type,g[data-node-id][data-delta-state="moved-from"]>rect:last-of-type{stroke:var(--d-move)!important;stroke-width:3!important;stroke-dasharray:8 3 2 3}g[data-node-id][data-delta-state="moved-from"],path[data-delta-state="moved-from"]{opacity:.42}path[data-delta-state="added"]{stroke:var(--d-add)!important;stroke-width:3!important}path[data-delta-state="removed"]{stroke:var(--d-remove)!important;stroke-width:3!important;stroke-dasharray:7 5!important}path[data-delta-state="changed"]{stroke:var(--d-change)!important;stroke-width:3!important;stroke-dasharray:2 3!important}path[data-delta-state="rerouted"],path[data-delta-state="moved-from"]{stroke:var(--d-move)!important;stroke-width:2.5!important;stroke-dasharray:8 3 2 3!important}.delta-node-marker circle{fill:#071019;stroke:currentColor;stroke-width:1.5}.delta-node-marker text,.delta-edge-marker,.delta-boundary-marker{fill:currentColor;font:800 9px ui-monospace,SFMono-Regular,Menlo,monospace}[data-delta-state="added"] .delta-node-marker,.delta-edge-marker[data-delta-state="added"],.delta-boundary-marker[data-delta-state="added"]{color:var(--d-add)}[data-delta-state="removed"] .delta-node-marker,.delta-edge-marker[data-delta-state="removed"],.delta-boundary-marker[data-delta-state="removed"]{color:var(--d-remove)}[data-delta-state="changed"] .delta-node-marker,.delta-edge-marker[data-delta-state="changed"],.delta-boundary-marker[data-delta-state="changed"]{color:var(--d-change)}[data-delta-state="moved"] .delta-node-marker,[data-delta-state="moved-from"] .delta-node-marker,.delta-edge-marker[data-delta-state="moved-from"],.delta-edge-marker[data-delta-state="rerouted"],.delta-boundary-marker[data-delta-state="geometry-changed"]{color:var(--d-move)}.delta-edge-marker,.delta-boundary-marker{paint-order:stroke;stroke:#071019;stroke-width:3px}rect[data-graph-role="structural-frame"][data-delta-state="added"]{stroke:var(--d-add)!important;stroke-width:2.5!important}rect[data-graph-role="structural-frame"][data-delta-state="removed"]{stroke:var(--d-remove)!important;stroke-width:2.5!important;stroke-dasharray:7 5!important}rect[data-graph-role="structural-frame"][data-delta-state="changed"]{stroke:var(--d-change)!important;stroke-width:2.5!important;stroke-dasharray:2 3!important}rect[data-graph-role="structural-frame"][data-delta-state="moved-from"]{stroke:var(--d-move)!important;stroke-width:2!important;stroke-dasharray:8 3 2 3!important;opacity:.42}text[data-delta-boundary-state="added"]{fill:var(--d-add)!important}text[data-delta-boundary-state="removed"]{fill:var(--d-remove)!important}text[data-delta-boundary-state="changed"]{fill:var(--d-change)!important}text[data-delta-boundary-state="moved-from"]{fill:var(--d-move)!important;opacity:.55}details{margin-top:12px;border:1px solid var(--d-line);border-radius:9px;background:#0a141e}summary{padding:13px 15px;cursor:pointer;font-weight:700}.changes{list-style:none;margin:0;padding:0 8px 8px}.changes li{border-top:1px solid rgba(138,160,181,.16)}.change-row{display:grid;grid-template-columns:30px 90px minmax(140px,1fr) minmax(100px,.7fr) minmax(120px,.8fr) minmax(140px,1.2fr);gap:10px;width:100%;margin:0;padding:9px 7px;border:0;border-radius:5px;background:transparent;color:inherit;font:inherit;font-size:11px;text-align:left;align-items:baseline;cursor:pointer}.change-row:hover{background:rgba(125,211,252,.06)}.change-row[aria-current="step"]{background:rgba(125,211,252,.1);box-shadow:inset 0 0 0 1px var(--d-focus)}.change-row:disabled{cursor:default}.token{font:800 13px/1 ui-monospace,SFMono-Regular,Menlo,monospace}.changes code,.change-row>span:last-child{color:var(--d-muted)}.proof-foot{display:flex;justify-content:space-between;gap:24px;margin-top:14px;color:var(--d-muted);font:650 10px/1.4 ui-monospace,SFMono-Regular,Menlo,monospace}html[data-theme="dark"] body{background:#071019!important;background-image:none!important}html[data-theme="light"]{color-scheme:light;--d-ink:#10283c;--d-muted:#587187;--d-line:#c8d6e2;--d-focus:#006b8f}html[data-theme="light"] body{background:#eef3f7!important;background-image:none!important;color:var(--d-ink)}html[data-theme="light"] .metric,html[data-theme="light"] .view-switch,html[data-theme="light"] details{background:#fff}html[data-theme="light"] .canvas{background:#f8fbfd}html[data-theme="light"] .view-switch button[aria-selected="true"]{background:#dbeaf5;color:#10283c}html[data-theme="light"] .delta-node-marker circle{fill:#fff}html[data-preset="blueprint"] body{background-image:none!important}-@media(max-width:760px){.proof-page{width:100%;padding:12px}.proof-head{grid-template-columns:1fr;gap:14px;align-items:start}.proof-head h1{font-size:32px}.metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:100%}.metric{min-width:0}.proof-tools{align-items:stretch;flex-wrap:wrap;gap:8px}.view-switch{display:flex;flex:1 1 100%}.view-switch button{flex:1;padding-inline:8px}.legend{flex-wrap:wrap;gap:8px}.proof-tools>div:last-child{margin-left:auto}.review-strip{grid-template-columns:auto auto auto auto}.review-status{grid-column:1/-1;padding:4px 2px 0}.canvas{min-height:0;padding:6px;overflow:auto}.canvas svg{min-width:720px;max-height:none}.snapshot-frame{min-width:720px}.changes{overflow-x:auto}.change-row{min-width:820px}.proof-foot{flex-direction:column;gap:4px}}+@media(max-width:760px){.proof-page{width:100%;padding:12px}.proof-head{grid-template-columns:1fr;gap:14px;align-items:start}.proof-head h1{font-size:32px}.metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:100%}.metric{min-width:0}.provenance-change{align-items:flex-start;flex-wrap:wrap}.provenance-change span{width:100%;margin-left:0}.proof-tools{align-items:stretch;flex-wrap:wrap;gap:8px}.view-switch{display:flex;flex:1 1 100%}.view-switch button{flex:1;padding-inline:8px}.legend{flex-wrap:wrap;gap:8px}.proof-tools>div:last-child{margin-left:auto}.review-strip{grid-template-columns:auto auto auto auto}.review-status{grid-column:1/-1;padding:4px 2px 0}.canvas{min-height:0;padding:6px;overflow:auto}.canvas svg{min-width:720px;max-height:none}.snapshot-frame{min-width:720px}.changes{overflow-x:auto}.change-row{min-width:820px}.proof-foot{flex-direction:column;gap:4px}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}.canvas[data-delta-review-active] [data-delta-review-current]{transition:none!important}}@media print{body{min-width:0;background:#fff;color:#111}.proof-page{width:100%;padding:0}.proof-tools,.review-strip,details{display:none!important}.canvas{display:none!important}.canvas[data-view="delta"]{display:block!important;border:0}.canvas[data-view="delta"] [data-delta-state="same"]{opacity:1!important;transition:none!important}.canvas[data-delta-review-active]{--review-same-opacity:1;--review-change-opacity:1}.canvas[data-delta-review-active] [data-delta-review-current]{opacity:1!important;transition:none!important}.proof-foot{color:#444}}</style></head>-<body><main class="proof-page"><header class="proof-head"><div><p class="eyebrow">ARCHITECTURE DELTA · ${proof}</p><h1>See what changed<br>before you merge.</h1><p class="subtitle">${esc(receipt.base.title)} → ${esc(receipt.head.title)}</p></div><div class="metrics"><div class="metric add"><strong>${total(receipt.summary, 'added')}</strong><span>ADDED</span></div><div class="metric remove"><strong>${total(receipt.summary, 'removed')}</strong><span>REMOVED</span></div><div class="metric change"><strong>${changed}</strong><span>CHANGED</span></div></div></header>+<body><main class="proof-page"><header class="proof-head"><div><p class="eyebrow">ARCHITECTURE DELTA · ${proof}</p><h1>See what changed<br>before you merge.</h1><p class="subtitle">${esc(receipt.base.title)} → ${esc(receipt.head.title)}</p></div><div class="metrics"><div class="metric add"><strong>${total(receipt.summary, 'added')}</strong><span>ADDED</span></div><div class="metric remove"><strong>${total(receipt.summary, 'removed')}</strong><span>REMOVED</span></div><div class="metric change"><strong>${changed}</strong><span>CHANGED</span></div></div></header>${provenanceNotice}<div class="proof-tools"><div class="view-switch" role="tablist" aria-label="Architecture snapshot"><button role="tab" data-target="base" aria-selected="false">Before</button><button role="tab" data-target="delta" aria-selected="true">Delta</button><button role="tab" data-target="head" aria-selected="false">After</button></div><div class="legend"><span class="add"><i></i>+ ADD</span><span class="remove"><i></i>− DEL</span><span class="change"><i></i>~ MOD</span><span class="move"><i></i>↔ MOVE</span></div><div><button class="utility" id="export-svg" type="button">Export SVG</button> <button class="utility" id="share-card" type="button">Share Card</button> <button class="utility" id="preset" type="button">Preset</button> <button class="utility" id="theme" type="button">Theme</button></div></div>-<nav class="review-strip" aria-label="Authored change review"><button class="review-step" id="review-overview" type="button" disabled>Overview</button><button class="review-step" id="review-previous" type="button" aria-label="Previous authored change" disabled>←</button><button class="review-step" id="review-play" type="button" aria-pressed="false"${rows.length ? '' : ' disabled'}>Review</button><button class="review-step" id="review-next" type="button" aria-label="Next authored change" disabled>→</button><div class="review-status" id="review-status" role="status" aria-live="polite">Overview · ${rows.length} authored changes</div></nav>+<nav class="review-strip" aria-label="Authored change review"><button class="review-step" id="review-overview" type="button" disabled>Overview</button><button class="review-step" id="review-previous" type="button" aria-label="Previous authored change" disabled>←</button><button class="review-step" id="review-play" type="button" aria-pressed="false"${rows.length ? '' : ' disabled'}>Review</button><button class="review-step" id="review-next" type="button" aria-label="Next authored change" disabled>→</button><div class="review-status" id="review-status" role="status" aria-live="polite">Overview · ${rows.length} authored ${provenanceChanged ? 'graph changes · provenance changed' : 'changes'}</div></nav><section class="canvas" data-view="base" hidden>${baseView}</section><section class="canvas" data-view="delta">${deltaSvg}</section><section class="canvas" data-view="head" hidden>${headView}</section><details${rows.length <= 10 ? ' open' : ''}><summary>Exact authored changes · ${rows.length}</summary><ul class="changes">${rowHtml}</ul></details><footer class="proof-foot"><span>Stable IDs only · completeness: complete · ${proof}</span><span>Authored IR only · no risk or mergeability inference</span></footer></main>@@ -1043,18 +1095,31 @@ html[data-theme="dark"] body{background:#071019!important;background-image:none!ctx.fillText(connectionLine, 420, 151);ctx.fillText(boundaryLine, 786, 151);ctx.font = '650 14px ui-monospace, SFMono-Regular, Menlo, monospace';- const authoredChanges = ['components', 'connections', 'boundaries'].reduce((sum, collection) => {- const summary = receipt.summary[collection];- return sum + summary.added + summary.changed + summary.removed;- }, 0);+ const graphChanges = ['components', 'connections', 'boundaries'].reduce((sum, collection) => sum + (receipt.changes[collection] || []).length, 0);+ const provenanceSummary = ${safeJson(provenanceChanged ? `provenance changed · ${provenanceFields}` : '')};const movementSummary = '↔ moved ' + receipt.summary.components.moved + ' · rerouted ' + receipt.summary.connections.rerouted + ' · presentation ' + (receipt.summary.presentationChanged ? 'changed' : 'unchanged');- const secondary = authoredChanges === 0- ? 'No authored architecture changes · ' + movementSummary- : movementSummary;- ctx.fillText(secondary, 66, 181);+ const secondary = graphChanges === 0+ ? receipt.summary.provenanceChanged+ ? 'No graph changes · ' + provenanceSummary+ : 'No authored architecture changes · ' + movementSummary+ : movementSummary + (provenanceSummary ? ' · ' + provenanceSummary : '');const proofLine = receipt.proofLevel === 'revision-pinned'? 'REV ' + String(receipt.base.revision).slice(0, 8) + ' → ' + String(receipt.head.revision).slice(0, 8) + ' · REVISION-PINNED INPUTS': 'AUTHORED SNAPSHOTS';+ function fitCanvasLine(text, maxWidth) {+ if (ctx.measureText(text).width <= maxWidth) return text;+ let low = 0;+ let high = text.length;+ while (low < high) {+ const middle = Math.ceil((low + high) / 2);+ if (ctx.measureText(text.slice(0, middle) + '…').width <= maxWidth) low = middle;+ else high = middle - 1;+ }+ return text.slice(0, low).trimEnd() + '…';+ }+ const proofWidth = ctx.measureText(proofLine).width;+ const secondaryWidth = Math.max(0, 1044 - proofWidth);+ ctx.fillText(fitCanvasLine(secondary, secondaryWidth), 66, 181);ctx.textAlign = 'right';ctx.fillText(proofLine, 1134, 181);ctx.textAlign = 'left';@@ -1187,6 +1252,18 @@ export function validateArchitectureDeltaHtml(html, receipt) {}if (!svgBalanced || svgDepth !== 0 || svgRoots !== 1 || deltaMarkup.slice(0, rootStart).trim() || deltaMarkup.slice(rootEnd).trim()) failures.push('expected exactly one root SVG in the Delta canvas');if ((html.match(/id="archify-compare-receipt"/g) || []).length !== 1) failures.push('expected exactly one embedded compare receipt');+ const provenanceChanged = receipt.summary?.provenanceChanged === true;+ const provenanceNotices = (html.match(/data-provenance-changed="true"/g) || []).length;+ const provenanceFields = receipt.provenance?.changedFields;+ const provenanceDescription = provenanceChanged && receipt.provenance ? provenanceDetail(receipt.provenance) : '';+ if (provenanceNotices !== (provenanceChanged ? 1 : 0)+ || Boolean(receipt.provenance) !== provenanceChanged+ || (provenanceChanged && (!Array.isArray(provenanceFields) || provenanceFields.length === 0))+ || (provenanceChanged && !html.includes(`data-provenance-fields="${esc(provenanceFields.join(', '))}"`))+ || (provenanceChanged && !html.includes(`<span>${esc(provenanceDescription)}</span>`))) {+ failures.push('provenance change notice does not match the receipt');+ }+ if (provenanceChanged && rows.length === 0 && html.includes('No authored architecture changes.')) failures.push('provenance-only delta claims no authored changes');if (!html.includes('aria-label="Authored change review"')) failures.push('missing exact-ID change navigator');if ((html.match(/class="change-row"/g) || []).length !== rows.length) failures.push('change navigator row count does not match the receipt');if (!html.includes('id="export-svg"') || !html.includes('id="share-card"')diff --git a/archify/test/architecture-delta.test.mjs b/archify/test/architecture-delta.test.mjsindex 7f35bca3..df2c2bd5 100644--- a/archify/test/architecture-delta.test.mjs+++ b/archify/test/architecture-delta.test.mjs@@ -1,6 +1,6 @@import { test } from 'node:test';import assert from 'node:assert/strict';-import { spawnSync } from 'node:child_process';+import { execFileSync, spawnSync } from 'node:child_process';import fs from 'node:fs';import os from 'node:os';import path from 'node:path';@@ -10,6 +10,7 @@ import {architectureDeltaChangeRows,canonicalArchitectureJson,compareArchitecture,+ renderArchitectureDeltaHtml,validateArchitectureDeltaHtml,} from '../delta/architecture-delta.mjs';@@ -25,6 +26,70 @@ const tmp = fs.mkdtempSync(path.join(os.tmpdir(), 'archify-delta-'));const read = (file) => JSON.parse(fs.readFileSync(file, 'utf8'));const run = (args) => spawnSync(process.execPath, [cli, ...args], { cwd: skillRoot, encoding: 'utf8' });+function git(repo, ...args) {+ return execFileSync('git', ['-C', repo, ...args], {+ encoding: 'utf8',+ env: {+ ...process.env,+ GIT_AUTHOR_DATE: '2026-01-01T00:00:00Z',+ GIT_COMMITTER_DATE: '2026-01-01T00:00:00Z',+ },+ }).trim();+}++function provenanceFixture() {+ const root = fs.mkdtempSync(path.join(tmp, 'provenance-repo-'));+ const sourceDirectory = path.join(root, 'src');+ fs.mkdirSync(sourceDirectory);+ git(root, 'init');+ git(root, 'config', 'user.name', 'Archify Tests');+ git(root, 'config', 'user.email', '[email protected]');+ git(root, 'remote', 'add', 'origin', '[email protected]:example/provenance-repo.git');+ fs.writeFileSync(path.join(sourceDirectory, 'service.js'), 'export const version = 1;\n');+ git(root, 'add', 'src/service.js');+ git(root, 'commit', '-m', 'base');+ const baseRevision = git(root, 'rev-parse', 'HEAD');+ fs.writeFileSync(path.join(sourceDirectory, 'service.js'), 'export const version = 2;\n');+ git(root, 'add', 'src/service.js');+ git(root, 'commit', '-m', 'head');+ const headRevision = git(root, 'rev-parse', 'HEAD');+ const diagram = {+ schema_version: 1,+ diagram_type: 'architecture',+ meta: { title: 'Provenance-only delta' },+ components: [{+ id: 'service',+ type: 'backend',+ label: 'Service',+ pos: [100, 100],+ size: [160, 80],+ sources: [{ path: 'src/service.js', line: 1 }],+ }],+ boundaries: [],+ connections: [],+ cards: [],+ };+ const base = structuredClone(diagram);+ base.meta.repository = { url: 'https://github.com/example/provenance-repo', revision: baseRevision };+ const head = structuredClone(diagram);+ head.meta.repository = { url: 'https://github.com/example/provenance-repo', revision: headRevision };+ const basePath = path.join(root, 'base.architecture.json');+ const headPath = path.join(root, 'head.architecture.json');+ fs.writeFileSync(basePath, JSON.stringify(base));+ fs.writeFileSync(headPath, JSON.stringify(head));+ return { root, basePath, headPath, baseRevision, headRevision };+}++const renderDelta = (receipt) => renderArchitectureDeltaHtml({+ receipt,+ baseSvg: '<svg xmlns="http://www.w3.org/2000/svg"></svg>',+ deltaSvg: '<svg xmlns="http://www.w3.org/2000/svg"></svg>',+ headSvg: '<svg xmlns="http://www.w3.org/2000/svg"></svg>',+ baseHtml: '<!doctype html><title>Before</title>',+ headHtml: '<!doctype html><title>After</title>',+ artifactCss: '',+});+test('architecture compare classifies authored facts separately from geometry and presentation', () => {const receipt = compareArchitecture(read(baseFixture), read(headFixture));assert.equal(receipt.command, 'compare');@@ -310,6 +375,124 @@ test('repository mismatch fails and verified matching revisions remain evidence-assert.equal(receipt.summary.provenanceChanged, true);});+test('provenance-only changes stay separate from graph changes and remain visible', () => {+ const base = read(baseFixture);+ const head = read(baseFixture);+ base.meta.repository = {+ url: 'https://github.com/example/one',+ revision: 'a'.repeat(40),+ link_mode: 'web',+ };+ head.meta.repository = {+ url: 'https://github.com/example/one',+ revision: 'b'.repeat(40),+ provider: 'github',+ link_mode: 'local-only',+ };++ const receipt = compareArchitecture(base, head, { baseVerified: true, headVerified: true });+ assert.equal(receipt.summary.provenanceChanged, true);+ assert.deepEqual(receipt.provenance, {+ changedFields: ['/link_mode', '/provider', '/revision'],+ base: { revision: 'a'.repeat(40), linkMode: 'web' },+ head: { revision: 'b'.repeat(40), provider: 'github', linkMode: 'local-only' },+ });+ assert.deepEqual(receipt.changes, { components: [], connections: [], boundaries: [] });+ assert.deepEqual(architectureDeltaChangeRows(receipt), []);++ const html = renderDelta(receipt);+ assert.match(html, /data-provenance-changed="true"/);+ assert.match(html, /Repository provenance changed/);+ assert.match(html, /\/revision: aaaaaaaa → bbbbbbbb/);+ assert.match(html, /\/provider: automatic → github/);+ assert.match(html, /\/link_mode: web → local-only/);+ assert.match(html, /\/link_mode, \/provider, \/revision/);+ assert.match(html, /No component, relationship, or boundary changes; repository provenance changed\./);+ assert.doesNotMatch(html, /No authored architecture changes\./);+ assert.match(html, /Overview · 0 authored graph changes · provenance changed/);+ assert.match(html, /No graph changes · ' \+ provenanceSummary/);+ assert.match(html, /const proofWidth = ctx\.measureText\(proofLine\)\.width/);+ assert.match(html, /fitCanvasLine\(secondary, secondaryWidth\)/);+ assert.doesNotMatch(html, /data-change-key="provenance/);+ assert.deepEqual(validateArchitectureDeltaHtml(html, receipt), { ok: true, checksPassed: 10, checkCount: 10 });++ const missingNotice = html.replace(/<aside class="provenance-change"[\s\S]*?<\/aside>/, '');+ assert.throws(+ () => validateArchitectureDeltaHtml(missingNotice, receipt),+ (error) => error instanceof ArchitectureDeltaError+ && error.code === 'delta/artifact-invalid'+ && error.details.failures.includes('provenance change notice does not match the receipt'),+ );+ const tamperedNotice = html.replace('/link_mode: web → local-only', '/link_mode: web → web');+ assert.throws(+ () => validateArchitectureDeltaHtml(tamperedNotice, receipt),+ (error) => error instanceof ArchitectureDeltaError+ && error.code === 'delta/artifact-invalid'+ && error.details.failures.includes('provenance change notice does not match the receipt'),+ );+});++test('repository location representation changes stay redacted in provenance output', () => {+ const base = read(baseFixture);+ const head = read(baseFixture);+ base.meta.repository = {+ url: 'https://github.com/example/one',+ revision: 'a'.repeat(40),+ };+ head.meta.repository = {+ url: '[email protected]:example/one.git',+ revision: 'a'.repeat(40),+ };+ const receipt = compareArchitecture(base, head, { baseVerified: true, headVerified: true });+ assert.equal(receipt.summary.provenanceChanged, true);+ assert.deepEqual(receipt.provenance.changedFields, ['/url']);+ assert.equal(JSON.stringify(receipt.provenance).includes('github.com'), false);++ const html = renderDelta(receipt);+ assert.match(html, /\/url: repository location changed/);+ assert.deepEqual(validateArchitectureDeltaHtml(html, receipt), { ok: true, checksPassed: 10, checkCount: 10 });+});++test('public compare keeps a revision-only provenance change out of graph identities', () => {+ const data = provenanceFixture();+ const output = path.join(data.root, 'delta.html');+ const result = run([+ 'compare', 'architecture', data.basePath, data.headPath, output,+ '--repo-root', data.root, '--json',+ ]);+ assert.equal(result.status, 0, result.stderr || result.stdout);+ const receipt = JSON.parse(result.stdout);+ assert.equal(receipt.summary.provenanceChanged, true);+ assert.deepEqual(receipt.provenance.changedFields, ['/revision']);+ assert.deepEqual(receipt.changes, { components: [], connections: [], boundaries: [] });+ const html = fs.readFileSync(output, 'utf8');+ assert.match(html, new RegExp(`${data.baseRevision.slice(0, 8)} → ${data.headRevision.slice(0, 8)}`));+ assert.match(html, /id="review-play"[^>]* disabled/);+ const deltaSvg = html.match(/<section class="canvas" data-view="delta">([\s\S]*?)<\/section>/)?.[1] || '';+ assert.doesNotMatch(deltaSvg, /data-delta-state="(?:added|removed|changed|moved|moved-from|rerouted|geometry-changed|evidence-changed)"/);+ assert.deepEqual(validateArchitectureDeltaHtml(html, receipt), { ok: true, checksPassed: 10, checkCount: 10 });+});++test('unchanged provenance preserves the ordinary empty graph state', () => {+ const base = read(baseFixture);+ base.meta.repository = {+ url: 'https://github.com/example/one',+ revision: 'a'.repeat(40),+ provider: 'github',+ link_mode: 'web',+ };+ const receipt = compareArchitecture(base, structuredClone(base), { baseVerified: true, headVerified: true });+ assert.equal(receipt.summary.provenanceChanged, false);+ assert.equal(receipt.provenance, undefined);++ const html = renderDelta(receipt);+ assert.doesNotMatch(html, /data-provenance-changed="true"/);+ assert.doesNotMatch(html, /provenance unchanged/);+ assert.match(html, /No authored architecture changes\./);+ assert.match(html, /Overview · 0 authored changes/);+ assert.deepEqual(validateArchitectureDeltaHtml(html, receipt), { ok: true, checksPassed: 10, checkCount: 10 });+});+test('portable compare retains link settings and uses the same repository identity rules', () => {const base = read(baseFixture);const head = read(headFixture);@@ -379,6 +562,7 @@ test('compare CLI writes a deterministic three-state artifact and complete sidecassert.match(firstHtml, /data-delta-boundary-state="added".*fill:#34d399!important/);assert.match(firstHtml, /delta-boundary-marker\[data-delta-state\]\{color:var\(--delta\)\}/);assert.match(firstHtml, /No authored architecture changes ·.*movementSummary/);+ assert.doesNotMatch(firstHtml, /provenance unchanged/);assert.match(firstHtml, /font-family:"JetBrains Mono",ui-monospace/);assert.doesNotMatch(firstHtml, /font-family:Inter|body\{min-width:1080px/);assert.match(firstHtml, /@media\(max-width:760px\)/);diff --git a/docs/authoring-cookbook.md b/docs/authoring-cookbook.mdindex c680bf15..e8edc6f1 100644--- a/docs/authoring-cookbook.md+++ b/docs/authoring-cookbook.md@@ -95,6 +95,8 @@ node bin/archify.mjs compare architecture base.json head.json \architecture-delta.html --quality showcase --json```+Repository revision, provider, link mode, or location representation changes are reported separately from component, relationship, and boundary changes. The Delta page never marks a graph entity as changed for provenance alone, and it does not expose repository URLs in the provenance summary.+## 6. Inspect the exact final fileThe deterministic checks do not exercise the Viewer in a browser. Collect automated browser evidence from the exact delivered HTML when Chrome or Chromium is available:diff --git a/docs/authoring-cookbook.zh-CN.md b/docs/authoring-cookbook.zh-CN.mdindex c9969c13..9fb62c62 100644--- a/docs/authoring-cookbook.zh-CN.md+++ b/docs/authoring-cookbook.zh-CN.md@@ -95,6 +95,8 @@ node bin/archify.mjs compare architecture base.json head.json \architecture-delta.html --quality showcase --json```+仓库 revision、provider、链接模式或地址表达方式的变化会与组件、关系和边界变化分开报告。仅来源发生变化时,Delta 页面不会把任何图实体标为已变化,来源摘要也不会暴露仓库 URL。+## 6. 检查最终文件确定性校验不会在真实浏览器中运行 Viewer。如果环境有 Chrome 或 Chromium,请对刚刚交付的 HTML 收集自动化浏览器证据:diff --git a/examples/checkout-platform-delta.html b/examples/checkout-platform-delta.htmlindex b99bf226..02016bf3 100644--- a/examples/checkout-platform-delta.html+++ b/examples/checkout-platform-delta.html@@ -4813,12 +4813,13 @@:root{color-scheme:dark;--d-add:#34d399;--d-remove:#fb7185;--d-change:#fbbf24;--d-move:#7dd3fc;--d-focus:#7dd3fc;--d-ink:#e6edf5;--d-muted:#8aa0b5;--d-line:#25384a}*{box-sizing:border-box}body{margin:0;overflow-x:hidden;background:#071019;color:var(--d-ink);font-family:"JetBrains Mono",ui-monospace,SFMono-Regular,Menlo,monospace}.proof-page{width:min(1600px,calc(100vw - 64px));margin:auto;padding:30px 0 42px}.proof-head{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:28px;align-items:end;padding-bottom:20px;border-bottom:1px solid var(--d-line)}.eyebrow{margin:0 0 8px;color:#7dd3fc;font:700 11px/1.2 ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:.14em}.proof-head h1{margin:0;font-size:clamp(32px,4vw,56px);line-height:.96;letter-spacing:-.04em}.subtitle{margin:12px 0 0;color:var(--d-muted);font-size:14px}.metrics{display:flex;gap:9px}.metric{min-width:86px;padding:11px 13px;border:1px solid var(--d-line);border-radius:8px;background:#0b1722}.metric strong{display:block;font:700 23px/1 ui-monospace,SFMono-Regular,Menlo,monospace}.metric span{display:block;margin-top:6px;color:var(--d-muted);font:700 9px/1 ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:.1em}.add strong{color:var(--d-add)}.remove strong{color:var(--d-remove)}.change strong{color:var(--d-change)}.proof-tools{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:16px 0 10px}.view-switch{display:inline-flex;padding:3px;border:1px solid var(--d-line);border-radius:8px;background:#0a141e}.view-switch button,.utility,.review-step{border:0;border-radius:6px;background:transparent;color:var(--d-muted);padding:8px 14px;font:700 11px/1 ui-monospace,SFMono-Regular,Menlo,monospace;cursor:pointer}.view-switch button[aria-selected="true"]{background:#173047;color:#fff}.utility{border:1px solid var(--d-line)}.view-switch button:focus-visible,.utility:focus-visible,.review-step:focus-visible,.change-row:focus-visible{outline:2px solid var(--d-focus);outline-offset:2px}.utility:disabled,.review-step:disabled{cursor:not-allowed;opacity:.45}.legend{display:flex;gap:16px;color:var(--d-muted);font:650 10px/1 ui-monospace,SFMono-Regular,Menlo,monospace}.legend span{display:inline-flex;align-items:center;gap:6px}.legend i{width:22px;border-top:3px solid currentColor}.legend .add{color:var(--d-add)}.legend .remove{color:var(--d-remove)}.legend .remove i{border-top-style:dashed}.legend .change{color:var(--d-change)}.legend .change i{border-top-style:dotted}.legend .move{color:var(--d-move)}.legend .move i{border-top-style:double}+.provenance-change{display:flex;align-items:center;gap:12px;margin:14px 0 0;padding:10px 13px;border:1px solid rgba(125,211,252,.45);border-radius:8px;background:rgba(125,211,252,.07);color:var(--d-muted);font:650 11px/1.35 ui-monospace,SFMono-Regular,Menlo,monospace}.provenance-change strong{color:var(--d-focus)}.provenance-change span{margin-left:auto;color:var(--d-muted)}.review-strip{display:grid;grid-template-columns:auto auto auto auto minmax(0,1fr);align-items:center;gap:5px;margin:0 0 10px;padding:7px 8px;border-block:1px solid var(--d-line);font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.review-step{min-height:34px;border:1px solid var(--d-line);padding-inline:11px}.review-step[aria-pressed="true"]{border-color:var(--d-focus);color:var(--d-ink)}.review-status{min-width:0;padding-left:9px;color:var(--d-muted);font-size:10px;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.review-status strong{color:var(--d-ink);font-weight:750}.review-status[data-state="unavailable"]{color:var(--d-remove)}.canvas{overflow:hidden;border:1px solid var(--d-line);border-radius:10px;background:#09141e;padding:12px;min-height:520px}.canvas svg{display:block;width:100%;height:auto;max-height:72vh}.canvas[hidden]{display:none}.snapshot-frame{display:block;width:100%;height:min(76vh,920px);min-height:620px;border:0;border-radius:6px;background:#071019}.canvas[data-view="base"],.canvas[data-view="head"]{padding:0}.canvas[data-view="delta"] [data-delta-state="same"]{opacity:.38}.canvas[data-delta-review-active]{--review-same-opacity:.14;--review-change-opacity:.28}.canvas[data-delta-review-active] [data-delta-state="same"]{opacity:var(--review-same-opacity)!important}.canvas[data-delta-review-active] [data-delta-state]:not([data-delta-state="same"]):not([data-delta-review-current]){opacity:var(--review-change-opacity)!important}.canvas[data-delta-review-active] [data-delta-review-current]{opacity:1!important;transition:opacity .16s ease-out}g[data-node-id][data-delta-state="added"]>rect:last-of-type{stroke:var(--d-add)!important;stroke-width:3!important}g[data-node-id][data-delta-state="removed"]>rect:last-of-type{stroke:var(--d-remove)!important;stroke-width:3!important;stroke-dasharray:7 5}g[data-node-id][data-delta-state="changed"]>rect:last-of-type{stroke:var(--d-change)!important;stroke-width:3!important;stroke-dasharray:2 3}g[data-node-id][data-delta-state="moved"]>rect:last-of-type,g[data-node-id][data-delta-state="moved-from"]>rect:last-of-type{stroke:var(--d-move)!important;stroke-width:3!important;stroke-dasharray:8 3 2 3}g[data-node-id][data-delta-state="moved-from"],path[data-delta-state="moved-from"]{opacity:.42}path[data-delta-state="added"]{stroke:var(--d-add)!important;stroke-width:3!important}path[data-delta-state="removed"]{stroke:var(--d-remove)!important;stroke-width:3!important;stroke-dasharray:7 5!important}path[data-delta-state="changed"]{stroke:var(--d-change)!important;stroke-width:3!important;stroke-dasharray:2 3!important}path[data-delta-state="rerouted"],path[data-delta-state="moved-from"]{stroke:var(--d-move)!important;stroke-width:2.5!important;stroke-dasharray:8 3 2 3!important}.delta-node-marker circle{fill:#071019;stroke:currentColor;stroke-width:1.5}.delta-node-marker text,.delta-edge-marker,.delta-boundary-marker{fill:currentColor;font:800 9px ui-monospace,SFMono-Regular,Menlo,monospace}[data-delta-state="added"] .delta-node-marker,.delta-edge-marker[data-delta-state="added"],.delta-boundary-marker[data-delta-state="added"]{color:var(--d-add)}[data-delta-state="removed"] .delta-node-marker,.delta-edge-marker[data-delta-state="removed"],.delta-boundary-marker[data-delta-state="removed"]{color:var(--d-remove)}[data-delta-state="changed"] .delta-node-marker,.delta-edge-marker[data-delta-state="changed"],.delta-boundary-marker[data-delta-state="changed"]{color:var(--d-change)}[data-delta-state="moved"] .delta-node-marker,[data-delta-state="moved-from"] .delta-node-marker,.delta-edge-marker[data-delta-state="moved-from"],.delta-edge-marker[data-delta-state="rerouted"],.delta-boundary-marker[data-delta-state="geometry-changed"]{color:var(--d-move)}.delta-edge-marker,.delta-boundary-marker{paint-order:stroke;stroke:#071019;stroke-width:3px}rect[data-graph-role="structural-frame"][data-delta-state="added"]{stroke:var(--d-add)!important;stroke-width:2.5!important}rect[data-graph-role="structural-frame"][data-delta-state="removed"]{stroke:var(--d-remove)!important;stroke-width:2.5!important;stroke-dasharray:7 5!important}rect[data-graph-role="structural-frame"][data-delta-state="changed"]{stroke:var(--d-change)!important;stroke-width:2.5!important;stroke-dasharray:2 3!important}rect[data-graph-role="structural-frame"][data-delta-state="moved-from"]{stroke:var(--d-move)!important;stroke-width:2!important;stroke-dasharray:8 3 2 3!important;opacity:.42}text[data-delta-boundary-state="added"]{fill:var(--d-add)!important}text[data-delta-boundary-state="removed"]{fill:var(--d-remove)!important}text[data-delta-boundary-state="changed"]{fill:var(--d-change)!important}text[data-delta-boundary-state="moved-from"]{fill:var(--d-move)!important;opacity:.55}details{margin-top:12px;border:1px solid var(--d-line);border-radius:9px;background:#0a141e}summary{padding:13px 15px;cursor:pointer;font-weight:700}.changes{list-style:none;margin:0;padding:0 8px 8px}.changes li{border-top:1px solid rgba(138,160,181,.16)}.change-row{display:grid;grid-template-columns:30px 90px minmax(140px,1fr) minmax(100px,.7fr) minmax(120px,.8fr) minmax(140px,1.2fr);gap:10px;width:100%;margin:0;padding:9px 7px;border:0;border-radius:5px;background:transparent;color:inherit;font:inherit;font-size:11px;text-align:left;align-items:baseline;cursor:pointer}.change-row:hover{background:rgba(125,211,252,.06)}.change-row[aria-current="step"]{background:rgba(125,211,252,.1);box-shadow:inset 0 0 0 1px var(--d-focus)}.change-row:disabled{cursor:default}.token{font:800 13px/1 ui-monospace,SFMono-Regular,Menlo,monospace}.changes code,.change-row>span:last-child{color:var(--d-muted)}.proof-foot{display:flex;justify-content:space-between;gap:24px;margin-top:14px;color:var(--d-muted);font:650 10px/1.4 ui-monospace,SFMono-Regular,Menlo,monospace}html[data-theme="dark"] body{background:#071019!important;background-image:none!important}html[data-theme="light"]{color-scheme:light;--d-ink:#10283c;--d-muted:#587187;--d-line:#c8d6e2;--d-focus:#006b8f}html[data-theme="light"] body{background:#eef3f7!important;background-image:none!important;color:var(--d-ink)}html[data-theme="light"] .metric,html[data-theme="light"] .view-switch,html[data-theme="light"] details{background:#fff}html[data-theme="light"] .canvas{background:#f8fbfd}html[data-theme="light"] .view-switch button[aria-selected="true"]{background:#dbeaf5;color:#10283c}html[data-theme="light"] .delta-node-marker circle{fill:#fff}html[data-preset="blueprint"] body{background-image:none!important}-@media(max-width:760px){.proof-page{width:100%;padding:12px}.proof-head{grid-template-columns:1fr;gap:14px;align-items:start}.proof-head h1{font-size:32px}.metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:100%}.metric{min-width:0}.proof-tools{align-items:stretch;flex-wrap:wrap;gap:8px}.view-switch{display:flex;flex:1 1 100%}.view-switch button{flex:1;padding-inline:8px}.legend{flex-wrap:wrap;gap:8px}.proof-tools>div:last-child{margin-left:auto}.review-strip{grid-template-columns:auto auto auto auto}.review-status{grid-column:1/-1;padding:4px 2px 0}.canvas{min-height:0;padding:6px;overflow:auto}.canvas svg{min-width:720px;max-height:none}.snapshot-frame{min-width:720px}.changes{overflow-x:auto}.change-row{min-width:820px}.proof-foot{flex-direction:column;gap:4px}}+@media(max-width:760px){.proof-page{width:100%;padding:12px}.proof-head{grid-template-columns:1fr;gap:14px;align-items:start}.proof-head h1{font-size:32px}.metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:100%}.metric{min-width:0}.provenance-change{align-items:flex-start;flex-wrap:wrap}.provenance-change span{width:100%;margin-left:0}.proof-tools{align-items:stretch;flex-wrap:wrap;gap:8px}.view-switch{display:flex;flex:1 1 100%}.view-switch button{flex:1;padding-inline:8px}.legend{flex-wrap:wrap;gap:8px}.proof-tools>div:last-child{margin-left:auto}.review-strip{grid-template-columns:auto auto auto auto}.review-status{grid-column:1/-1;padding:4px 2px 0}.canvas{min-height:0;padding:6px;overflow:auto}.canvas svg{min-width:720px;max-height:none}.snapshot-frame{min-width:720px}.changes{overflow-x:auto}.change-row{min-width:820px}.proof-foot{flex-direction:column;gap:4px}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}.canvas[data-delta-review-active] [data-delta-review-current]{transition:none!important}}@media print{body{min-width:0;background:#fff;color:#111}.proof-page{width:100%;padding:0}.proof-tools,.review-strip,details{display:none!important}.canvas{display:none!important}.canvas[data-view="delta"]{display:block!important;border:0}.canvas[data-view="delta"] [data-delta-state="same"]{opacity:1!important;transition:none!important}.canvas[data-delta-review-active]{--review-same-opacity:1;--review-change-opacity:1}.canvas[data-delta-review-active] [data-delta-review-current]{opacity:1!important;transition:none!important}.proof-foot{color:#444}}</style></head><body><main class="proof-page"><header class="proof-head"><div><p class="eyebrow">ARCHITECTURE DELTA · AUTHORED SNAPSHOTS</p><h1>See what changed<br>before you merge.</h1><p class="subtitle">Checkout Platform — Baseline → Checkout Platform — Fraud Gate</p></div><div class="metrics"><div class="metric add"><strong>2</strong><span>ADDED</span></div><div class="metric remove"><strong>2</strong><span>REMOVED</span></div><div class="metric change"><strong>5</strong><span>CHANGED</span></div></div></header>@@ -35532,18 +35533,31 @@ OTHER DEALINGS IN THE FONT SOFTWARE.ctx.fillText(connectionLine, 420, 151);ctx.fillText(boundaryLine, 786, 151);ctx.font = '650 14px ui-monospace, SFMono-Regular, Menlo, monospace';- const authoredChanges = ['components', 'connections', 'boundaries'].reduce((sum, collection) => {- const summary = receipt.summary[collection];- return sum + summary.added + summary.changed + summary.removed;- }, 0);+ const graphChanges = ['components', 'connections', 'boundaries'].reduce((sum, collection) => sum + (receipt.changes[collection] || []).length, 0);+ const provenanceSummary = "";const movementSummary = '↔ moved ' + receipt.summary.components.moved + ' · rerouted ' + receipt.summary.connections.rerouted + ' · presentation ' + (receipt.summary.presentationChanged ? 'changed' : 'unchanged');- const secondary = authoredChanges === 0- ? 'No authored architecture changes · ' + movementSummary- : movementSummary;- ctx.fillText(secondary, 66, 181);+ const secondary = graphChanges === 0+ ? receipt.summary.provenanceChanged+ ? 'No graph changes · ' + provenanceSummary+ : 'No authored architecture changes · ' + movementSummary+ : movementSummary + (provenanceSummary ? ' · ' + provenanceSummary : '');const proofLine = receipt.proofLevel === 'revision-pinned'? 'REV ' + String(receipt.base.revision).slice(0, 8) + ' → ' + String(receipt.head.revision).slice(0, 8) + ' · REVISION-PINNED INPUTS': 'AUTHORED SNAPSHOTS';+ function fitCanvasLine(text, maxWidth) {+ if (ctx.measureText(text).width <= maxWidth) return text;+ let low = 0;+ let high = text.length;+ while (low < high) {+ const middle = Math.ceil((low + high) / 2);+ if (ctx.measureText(text.slice(0, middle) + '…').width <= maxWidth) low = middle;+ else high = middle - 1;+ }+ return text.slice(0, low).trimEnd() + '…';+ }+ const proofWidth = ctx.measureText(proofLine).width;+ const secondaryWidth = Math.max(0, 1044 - proofWidth);+ ctx.fillText(fitCanvasLine(secondary, secondaryWidth), 66, 181);ctx.textAlign = 'right';ctx.fillText(proofLine, 1134, 181);ctx.textAlign = 'left';diff --git a/examples/checkout-platform-delta.receipt.json b/examples/checkout-platform-delta.receipt.jsonindex 7b8ad355..ade9d2d5 100644--- a/examples/checkout-platform-delta.receipt.json+++ b/examples/checkout-platform-delta.receipt.json@@ -219,8 +219,8 @@"Boundary identity is conservatively derived from kind + label."],"artifact": {- "sha256": "c6ad05b9e1852f1dd68c8c076e03d026f00ad8edcfe7fbd186f82b73db923aae",- "bytes": 2215875+ "sha256": "0e8010bc5adbc6655917a537a2825d3637fd54d994d6a95858ead818a2832298",+ "bytes": 2217033},"validation": {"checksPassed": 28,