From 07a6c38a45be65aa9ae7b0e9d7073f17b87e7325 Mon Sep 17 00:00:00 2001
From: Dylan Roy <249851642+d6g8k5htny-coder@users.noreply.github.com>
Date: Tue, 6 Oct 2026 18:18:16 -0700
Subject: [PATCH 1/3] Fix teaching SVG height capture with native geometry
witness
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
BQ26-R2-20261007T0108Z-6c24. Dylan Roy — delegated AI implementation; actual OpenAI / Codex explore-export-source-diagnosis-20261007. Strict ordinary geometry checks retained; only bounded rectangle-height CSSOM roundoff may use an independent native used-height witness. Includes test-first controls and native-browser regressions; 22 generated cache-key consumers normalize to unchanged source. Scientific effect NONE. Candidate browser execution and nonauthor review remain pending.
---
docs/site/app.js | 6 +--
docs/site/brand.css | 2 +-
docs/site/cite.html | 4 +-
docs/site/cite.mjs | 2 +-
docs/site/conditionals.mjs | 2 +-
docs/site/curvature-export.mjs | 2 +-
docs/site/dependencies.html | 10 ++--
docs/site/dependencies.mjs | 2 +-
docs/site/explore-models.mjs | 2 +-
docs/site/explore.html | 10 ++--
docs/site/explore.mjs | 12 ++---
docs/site/formal.html | 6 +--
docs/site/index.html | 4 +-
docs/site/measure.html | 10 ++--
docs/site/measure.mjs | 2 +-
docs/site/museum.html | 6 +--
docs/site/museum.mjs | 6 +--
docs/site/palette-export.mjs | 4 +-
docs/site/pin-export.mjs | 4 +-
docs/site/reproduce.html | 4 +-
docs/site/research.html | 2 +-
docs/site/teaching-export.mjs | 15 +++++-
docs/site/workspace.html | 6 +--
tests/test_teaching_export.mjs | 67 ++++++++++++++++++++++++
tools/public_shop_browser_check.py | 81 ++++++++++++++++++++++++++++++
25 files changed, 216 insertions(+), 55 deletions(-)
diff --git a/docs/site/app.js b/docs/site/app.js
index dec057d0f..1421e1f5b 100644
--- a/docs/site/app.js
+++ b/docs/site/app.js
@@ -1,6 +1,6 @@
-import {verifiedJSON, verifiedBytes, validateStatus, validateCoefficient, safeSourceURL, hex40, hex64} from './core.mjs?site-release=ce4cc9c4ecb150312c85c9125729a04d05b118679807deb631951a311dbd86c6';
-import {connectCatalogQuery} from './catalog-query.mjs?site-release=ce4cc9c4ecb150312c85c9125729a04d05b118679807deb631951a311dbd86c6';
-import {prepareWorkspaceFragment} from './workspace-fragment.mjs?site-release=ce4cc9c4ecb150312c85c9125729a04d05b118679807deb631951a311dbd86c6';
+import {verifiedJSON, verifiedBytes, validateStatus, validateCoefficient, safeSourceURL, hex40, hex64} from './core.mjs?site-release=497c3af31a6411ebab7c8646041f0872ae2ce2cca979bc20e47e74a6f6fd342b';
+import {connectCatalogQuery} from './catalog-query.mjs?site-release=497c3af31a6411ebab7c8646041f0872ae2ce2cca979bc20e47e74a6f6fd342b';
+import {prepareWorkspaceFragment} from './workspace-fragment.mjs?site-release=497c3af31a6411ebab7c8646041f0872ae2ce2cca979bc20e47e74a6f6fd342b';
const finishFragment=prepareWorkspaceFragment();
const el=id=>document.getElementById(id);
const node=(tag,text,cls)=>{const n=document.createElement(tag);if(text!==undefined)n.textContent=text;if(cls)n.className=cls;return n;};
diff --git a/docs/site/brand.css b/docs/site/brand.css
index a4f06d3a8..34f8a30c5 100644
--- a/docs/site/brand.css
+++ b/docs/site/brand.css
@@ -58,7 +58,7 @@ body > header {
color: var(--ul-text); font-weight: 750; letter-spacing: .13em;
position: relative; padding-left: 57px; min-height: 44px; line-height: 1.65;
}
-.brand::before { content: ""; position: absolute; left: 0; top: 1px; width: 42px; height: 42px; background: url("brand/mark.svg?site-release=ce4cc9c4ecb150312c85c9125729a04d05b118679807deb631951a311dbd86c6") center/contain no-repeat; }
+.brand::before { content: ""; position: absolute; left: 0; top: 1px; width: 42px; height: 42px; background: url("brand/mark.svg?site-release=497c3af31a6411ebab7c8646041f0872ae2ce2cca979bc20e47e74a6f6fd342b") center/contain no-repeat; }
.brand span { color: var(--ul-muted); font-size: 10px; letter-spacing: .18em; }
nav { gap: 12px 24px; flex-wrap: wrap; }
nav a { color: var(--ul-text); min-height: 36px; display: inline-flex; align-items: center; font-size: 13px; }
diff --git a/docs/site/cite.html b/docs/site/cite.html
index e1472d6a2..e1d51cc8a 100644
--- a/docs/site/cite.html
+++ b/docs/site/cite.html
@@ -4,8 +4,8 @@
Cite · Universal Law
-
-
+
+
Skip to content
diff --git a/docs/site/cite.mjs b/docs/site/cite.mjs
index a0ffc425b..c0d2ca328 100644
--- a/docs/site/cite.mjs
+++ b/docs/site/cite.mjs
@@ -1,4 +1,4 @@
-import {wireReferenceForm} from './source-reference.mjs?site-release=ce4cc9c4ecb150312c85c9125729a04d05b118679807deb631951a311dbd86c6';
+import {wireReferenceForm} from './source-reference.mjs?site-release=497c3af31a6411ebab7c8646041f0872ae2ce2cca979bc20e47e74a6f6fd342b';
const byId = id => document.getElementById(id);
wireReferenceForm({form:byId('reference-form'), repository:byId('reference-repository'), commit:byId('reference-commit'), path:byId('reference-path'), sha256:byId('reference-sha256'), output:byId('reference-output'), json:byId('reference-json'), bibtex:byId('reference-bibtex'), link:byId('reference-link'), status:byId('reference-status'), actions:byId('reference-actions'), copyText:byId('reference-copy'), copyJSON:byId('reference-copy-json'), copyBibTeX:byId('reference-copy-bibtex'), share:byId('reference-share'), clipboard:globalThis.navigator?.clipboard, location:globalThis.location, history:globalThis.history, events:globalThis.window});
byId('reference-builder').hidden = false;
diff --git a/docs/site/conditionals.mjs b/docs/site/conditionals.mjs
index 9ed52e22d..893d26641 100644
--- a/docs/site/conditionals.mjs
+++ b/docs/site/conditionals.mjs
@@ -93,7 +93,7 @@ export function renderProjection(document,host,data,source){
el(document,'p','Generated from verified source bytes. This graph is not formal verification, a proof review, or a scientific-status register.'));
host.replaceChildren(article);
}
-const services=()=>import('./museum.mjs?site-release=ce4cc9c4ecb150312c85c9125729a04d05b118679807deb631951a311dbd86c6');
+const services=()=>import('./museum.mjs?site-release=497c3af31a6411ebab7c8646041f0872ae2ce2cca979bc20e47e74a6f6fd342b');
// The museum module already verifies config → manifest → index/status once per
// page fetch and caches every pinned byte request. This route consumes that same
// verified startup, so it adds only the audited-descriptor check and projection.
diff --git a/docs/site/curvature-export.mjs b/docs/site/curvature-export.mjs
index 2e0fa2514..8e93e5001 100644
--- a/docs/site/curvature-export.mjs
+++ b/docs/site/curvature-export.mjs
@@ -1,6 +1,6 @@
// Bounded, local export of the Peaks and saddles teaching diagram. No source fetch
// or proof verification occurs here; the identity below is recorded provenance.
-import { coneModel } from './explore-models.mjs?site-release=ce4cc9c4ecb150312c85c9125729a04d05b118679807deb631951a311dbd86c6';
+import { coneModel } from './explore-models.mjs?site-release=497c3af31a6411ebab7c8646041f0872ae2ce2cca979bc20e47e74a6f6fd342b';
const SVG_NS = 'http://www.w3.org/2000/svg';
const PUBLIC_EXPLORE = 'https://d6g8k5htny-coder.github.io/main/site/explore.html';
diff --git a/docs/site/dependencies.html b/docs/site/dependencies.html
index 7dad0af14..388813bb9 100644
--- a/docs/site/dependencies.html
+++ b/docs/site/dependencies.html
@@ -7,11 +7,11 @@
Claim dependency viewer · Universal Law
-
-
-
-
-
+
+
+
+
+
Skip to content
diff --git a/docs/site/dependencies.mjs b/docs/site/dependencies.mjs
index 6b796ecb4..7a891be57 100644
--- a/docs/site/dependencies.mjs
+++ b/docs/site/dependencies.mjs
@@ -11,7 +11,7 @@ import {
parsePinnedGraph,
recordedContextRows,
unresolvedTargets,
-} from './dependency-model.mjs?site-release=ce4cc9c4ecb150312c85c9125729a04d05b118679807deb631951a311dbd86c6';
+} from './dependency-model.mjs?site-release=497c3af31a6411ebab7c8646041f0872ae2ce2cca979bc20e47e74a6f6fd342b';
const byId = id => document.getElementById(id);
diff --git a/docs/site/explore-models.mjs b/docs/site/explore-models.mjs
index 28f6b0f20..79e21e032 100644
--- a/docs/site/explore-models.mjs
+++ b/docs/site/explore-models.mjs
@@ -1,6 +1,6 @@
// NON-CERTIFYING educational arithmetic. These functions illustrate source
// definitions; they do not simulate a field or estimate a theorem's constants.
-import { annulusModel, p15Model, remoteModel } from './geometry.mjs?site-release=ce4cc9c4ecb150312c85c9125729a04d05b118679807deb631951a311dbd86c6';
+import { annulusModel, p15Model, remoteModel } from './geometry.mjs?site-release=497c3af31a6411ebab7c8646041f0872ae2ce2cca979bc20e47e74a6f6fd342b';
function finite(value, name) {
if (!Number.isFinite(value)) throw new RangeError(`${name} must be finite`);
diff --git a/docs/site/explore.html b/docs/site/explore.html
index dafa00c20..18fd6383e 100644
--- a/docs/site/explore.html
+++ b/docs/site/explore.html
@@ -7,11 +7,11 @@
Explore the mathematics · Universal Law
-
-
-
-
-
+
+
+
+
+
Skip to content
diff --git a/docs/site/explore.mjs b/docs/site/explore.mjs
index 4aad0ceb9..795b47ecf 100644
--- a/docs/site/explore.mjs
+++ b/docs/site/explore.mjs
@@ -1,10 +1,10 @@
-import { coneModel, pinModel, paletteModel, applyCurvaturePreset } from './explore-models.mjs?site-release=ce4cc9c4ecb150312c85c9125729a04d05b118679807deb631951a311dbd86c6';
-import { readExploreState, exploreStateURL } from './explore-state.mjs?site-release=ce4cc9c4ecb150312c85c9125729a04d05b118679807deb631951a311dbd86c6';
+import { coneModel, pinModel, paletteModel, applyCurvaturePreset } from './explore-models.mjs?site-release=497c3af31a6411ebab7c8646041f0872ae2ce2cca979bc20e47e74a6f6fd342b';
+import { readExploreState, exploreStateURL } from './explore-state.mjs?site-release=497c3af31a6411ebab7c8646041f0872ae2ce2cca979bc20e47e74a6f6fd342b';
-import { captureCurvatureDiagram, serializeCurvatureSVG, createCitationController } from './curvature-export.mjs?site-release=ce4cc9c4ecb150312c85c9125729a04d05b118679807deb631951a311dbd86c6';
-import { captureTeachingDiagram, createFigureCitationController } from './teaching-export.mjs?site-release=ce4cc9c4ecb150312c85c9125729a04d05b118679807deb631951a311dbd86c6';
-import { serializePinSVG, pinFigureCitation } from './pin-export.mjs?site-release=ce4cc9c4ecb150312c85c9125729a04d05b118679807deb631951a311dbd86c6';
-import { serializePaletteSVG, paletteFigureCitation } from './palette-export.mjs?site-release=ce4cc9c4ecb150312c85c9125729a04d05b118679807deb631951a311dbd86c6';
+import { captureCurvatureDiagram, serializeCurvatureSVG, createCitationController } from './curvature-export.mjs?site-release=497c3af31a6411ebab7c8646041f0872ae2ce2cca979bc20e47e74a6f6fd342b';
+import { captureTeachingDiagram, createFigureCitationController } from './teaching-export.mjs?site-release=497c3af31a6411ebab7c8646041f0872ae2ce2cca979bc20e47e74a6f6fd342b';
+import { serializePinSVG, pinFigureCitation } from './pin-export.mjs?site-release=497c3af31a6411ebab7c8646041f0872ae2ce2cca979bc20e47e74a6f6fd342b';
+import { serializePaletteSVG, paletteFigureCitation } from './palette-export.mjs?site-release=497c3af31a6411ebab7c8646041f0872ae2ce2cca979bc20e47e74a6f6fd342b';
const ns = 'http://www.w3.org/2000/svg';
const byId = id => document.getElementById(id);
diff --git a/docs/site/formal.html b/docs/site/formal.html
index e2a4fd29b..3db15bb52 100644
--- a/docs/site/formal.html
+++ b/docs/site/formal.html
@@ -4,9 +4,9 @@
Formal verification · Universal Law
-
-
-
+
+
+
diff --git a/docs/site/index.html b/docs/site/index.html
index c89ed919b..ede35edc6 100644
--- a/docs/site/index.html
+++ b/docs/site/index.html
@@ -4,8 +4,8 @@
Universal Law · The shape of randomness
-
-
+
+
Skip to content
diff --git a/docs/site/measure.html b/docs/site/measure.html
index 899fbc3a2..49bab5a3f 100644
--- a/docs/site/measure.html
+++ b/docs/site/measure.html
@@ -7,11 +7,11 @@
From counts to density · Universal Law
-
-
-
-
-
+
+
+
+
+
Skip to content
diff --git a/docs/site/measure.mjs b/docs/site/measure.mjs
index feb4aa735..5875a5371 100644
--- a/docs/site/measure.mjs
+++ b/docs/site/measure.mjs
@@ -1,4 +1,4 @@
-import { measurementModel, parseMeasurementInputs } from './measurement-model.mjs?site-release=ce4cc9c4ecb150312c85c9125729a04d05b118679807deb631951a311dbd86c6';
+import { measurementModel, parseMeasurementInputs } from './measurement-model.mjs?site-release=497c3af31a6411ebab7c8646041f0872ae2ce2cca979bc20e47e74a6f6fd342b';
const byId = id => document.getElementById(id);
const fields = Object.fromEntries(['count', 'realizations', 'lower', 'upper'].map(name => [name, byId(`measure-${name}`)]));
diff --git a/docs/site/museum.html b/docs/site/museum.html
index 3044133fd..86dd1a165 100644
--- a/docs/site/museum.html
+++ b/docs/site/museum.html
@@ -4,11 +4,11 @@
Source records & exhibits · Universal Law
-
+
-
-
+
+
diff --git a/docs/site/museum.mjs b/docs/site/museum.mjs
index 592a68459..4c5838858 100644
--- a/docs/site/museum.mjs
+++ b/docs/site/museum.mjs
@@ -1,5 +1,5 @@
-import {renderSourceQuote} from './source-quote.mjs?site-release=ce4cc9c4ecb150312c85c9125729a04d05b118679807deb631951a311dbd86c6';
-import {verifiedBytes, hex40, hex64} from './core.mjs?site-release=ce4cc9c4ecb150312c85c9125729a04d05b118679807deb631951a311dbd86c6';
+import {renderSourceQuote} from './source-quote.mjs?site-release=497c3af31a6411ebab7c8646041f0872ae2ce2cca979bc20e47e74a6f6fd342b';
+import {verifiedBytes, hex40, hex64} from './core.mjs?site-release=497c3af31a6411ebab7c8646041f0872ae2ce2cca979bc20e47e74a6f6fd342b';
export const DISCLAIMER='This canvas explains the pinned source. It is not a proof and does not change status.';
const REVIEWED_IDS=['d2-lifetime-remainder','d3-side24-coefficient','d4-fixed-remote-rn','d5-all-height-annulus','d5-height-window-annulus','d5-two-scale','d5-inner-belt-density','d5-fixed-transverse','cumulative-transfer-correction','p15-demand-one-counterexample','d6-p15-full-price'];
@@ -247,7 +247,7 @@ function prepareClaimFragment(document,window,currentHash) {
return true;
};
}
-export async function startMuseum({document=globalThis.document,window=globalThis.window,fetcher=globalThis.fetch,search=globalThis.location?.search||'',geometryLoader=()=>import('./geometry.mjs?site-release=ce4cc9c4ecb150312c85c9125729a04d05b118679807deb631951a311dbd86c6'),currentHash=()=>globalThis.location?.hash||''}={}){
+export async function startMuseum({document=globalThis.document,window=globalThis.window,fetcher=globalThis.fetch,search=globalThis.location?.search||'',geometryLoader=()=>import('./geometry.mjs?site-release=497c3af31a6411ebab7c8646041f0872ae2ce2cca979bc20e47e74a6f6fd342b'),currentHash=()=>globalThis.location?.hash||''}={}){
const ids=['museum-state','claim-cards','lifetime-fixture','packet-cards','active-exhibit'];
const containers=Object.fromEntries(ids.map(id=>{const node=document.getElementById(id);if(!node)throw Error(`Missing museum container: ${id}`);return [id,node];}));
const finishFragment=prepareClaimFragment(document,window,currentHash);
diff --git a/docs/site/palette-export.mjs b/docs/site/palette-export.mjs
index 447309e02..cfb8f8aa0 100644
--- a/docs/site/palette-export.mjs
+++ b/docs/site/palette-export.mjs
@@ -1,7 +1,7 @@
// Bounded teaching export of Explore's current finite P15 diagram. Source
// custody is provenance; this module performs no mathematical verification.
-import { paletteModel } from './explore-models.mjs?site-release=ce4cc9c4ecb150312c85c9125729a04d05b118679807deb631951a311dbd86c6';
-import { serializeTeachingSVG } from './teaching-export.mjs?site-release=ce4cc9c4ecb150312c85c9125729a04d05b118679807deb631951a311dbd86c6';
+import { paletteModel } from './explore-models.mjs?site-release=497c3af31a6411ebab7c8646041f0872ae2ce2cca979bc20e47e74a6f6fd342b';
+import { serializeTeachingSVG } from './teaching-export.mjs?site-release=497c3af31a6411ebab7c8646041f0872ae2ce2cca979bc20e47e74a6f6fd342b';
const PUBLIC_EXPLORE = 'https://d6g8k5htny-coder.github.io/main/site/explore.html';
const SOURCE = Object.freeze({
diff --git a/docs/site/pin-export.mjs b/docs/site/pin-export.mjs
index d0d83b7c1..9989f633c 100644
--- a/docs/site/pin-export.mjs
+++ b/docs/site/pin-export.mjs
@@ -1,7 +1,7 @@
// Bounded export of the CURRENT displayed Approach-points teaching diagram.
// Pinned source identities are provenance, not proof acceptance or verification.
-import { pinModel } from './explore-models.mjs?site-release=ce4cc9c4ecb150312c85c9125729a04d05b118679807deb631951a311dbd86c6';
-import { serializeTeachingSVG } from './teaching-export.mjs?site-release=ce4cc9c4ecb150312c85c9125729a04d05b118679807deb631951a311dbd86c6';
+import { pinModel } from './explore-models.mjs?site-release=497c3af31a6411ebab7c8646041f0872ae2ce2cca979bc20e47e74a6f6fd342b';
+import { serializeTeachingSVG } from './teaching-export.mjs?site-release=497c3af31a6411ebab7c8646041f0872ae2ce2cca979bc20e47e74a6f6fd342b';
const PUBLIC_EXPLORE='https://d6g8k5htny-coder.github.io/main/site/explore.html';
const COMMIT='d6628da09384728992dcbe6e921cc28ba85aebb0';
diff --git a/docs/site/reproduce.html b/docs/site/reproduce.html
index bdaea57bc..55b718109 100644
--- a/docs/site/reproduce.html
+++ b/docs/site/reproduce.html
@@ -4,9 +4,9 @@
Reproduce · Universal Law
-
+
-
+
Skip to content
diff --git a/docs/site/research.html b/docs/site/research.html
index b2666ebea..65444993a 100644
--- a/docs/site/research.html
+++ b/docs/site/research.html
@@ -4,7 +4,7 @@
Research · Universal Law
-
+
Skip to content
diff --git a/docs/site/teaching-export.mjs b/docs/site/teaching-export.mjs
index 42e322c8f..dc541fe38 100644
--- a/docs/site/teaching-export.mjs
+++ b/docs/site/teaching-export.mjs
@@ -27,6 +27,18 @@ function boundedNumber(value, min=0, max=600, units=false) {
if(!/^-?(?:\d+(?:\.\d*)?|\.\d+)$/.test(numberText) || !Number.isFinite(number) || numbermax) refuse('unbounded numeric primitive or style');
return String(number===0?0:number);
}
+function nativeRectHeightMatches(node,expected,displayed) {
+ try {
+ // CSSOM can serialize this height with six significant digits. Matching
+ // that string alone cannot distinguish a genuine nearby CSS override.
+ // SVGLength.value reflects the attribute as a float; getBBox independently
+ // observes the used geometry in SVG user units, without stroke or transforms.
+ const native=node.height?.baseVal?.value,used=node.getBBox().height;
+ return Number.isFinite(native) && native>0 && native<=600 && expected>0
+ && native===Math.fround(expected) && Number.isFinite(used) && used===native
+ && displayed===Number(native.toPrecision(6));
+ } catch { return false; }
+}
function color(value, opaque=false) {
if(typeof value !== 'string' || value.length>64) refuse('unsupported color');
if(!opaque && value==='none')return value;
@@ -145,7 +157,8 @@ export function captureTeachingDiagram(svg,computedStyle=globalThis.getComputedS
if(displayed==='auto')refuse('auto CSS geometry suppresses or changes current attributes');
const actual=Number(boundedNumber(displayed,0,key==='r'?300:600,true));
const expected=Object.hasOwn(currentAttributes,key)?Number(boundedNumber(currentAttributes[key])):0;
- if(Math.abs(actual-expected)>1e-6)refuse('CSS geometry differs from current attributes');
+ if(Math.abs(actual-expected)>1e-6 && !(node.localName==='rect' && key==='height'
+ && nativeRectHeightMatches(node,expected,actual)))refuse('CSS geometry differs from current attributes');
}
if(node.localName==='rect') {
const width=Number(boundedNumber(currentAttributes.width)),height=Number(boundedNumber(currentAttributes.height));
diff --git a/docs/site/workspace.html b/docs/site/workspace.html
index 4c579b163..4745e51af 100644
--- a/docs/site/workspace.html
+++ b/docs/site/workspace.html
@@ -4,9 +4,9 @@
Research workspace · Universal Law
-
-
-
+
+
+
diff --git a/tests/test_teaching_export.mjs b/tests/test_teaching_export.mjs
index f4adc4c86..275d3f256 100644
--- a/tests/test_teaching_export.mjs
+++ b/tests/test_teaching_export.mjs
@@ -86,6 +86,73 @@ function rectSVG(attributes,geometry) {
Object.assign(rect.style,geometry);return svg;
}
+// A controlled native-geometry witness exercises the guard, not browser layout.
+// The hosted browser harness separately records real SVGLength/getBBox values.
+function heightSVG(height='11.888639999999995',displayed='11.8886px') {
+ const svg=rectSVG({x:'448',y:'78',width:'113',height,class:'diagram-fill'},
+ {x:'448px',y:'78px',width:'113px',height:displayed,rx:'auto',ry:'auto'});
+ const rect=svg.children[2],native=Math.fround(Number(height));
+ rect.height={baseVal:{value:native}};
+ rect.getBBox=()=>({x:448,y:78,width:113,height:native});
+ return svg;
+}
+
+test('rounded rectangle height requires a matching native used-height witness',()=>{
+ const capture=api('captureTeachingDiagram');
+ const svg=heightSVG();
+ assert.equal(svg.children[2].height.baseVal.value,11.888640403747559);
+ assert.equal(capture(svg,computedStyle).nodes[2].attributes.height,'11.888639999999995');
+ // The original comparison still suffices without any native witness.
+ const exact=heightSVG('13.4375','13.4375px');delete exact.children[2].getBBox;
+ assert.equal(capture(exact,computedStyle).nodes[2].attributes.height,'13.4375');
+});
+
+test('native height equality cannot admit real CSS overrides sharing a rounded string',()=>{
+ const capture=api('captureTeachingDiagram');
+ for(const actual of [11.88861,11.88862,11.88865,12,0]) {
+ const svg=heightSVG();svg.children[2].getBBox=()=>({height:Math.fround(actual)});
+ assert.throws(()=>capture(svg,computedStyle),/geometry|refused/i);
+ }
+ // Equal reflected/used values cannot disguise a changed source attribute.
+ const wrong=heightSVG();wrong.children[2].height.baseVal.value=Math.fround(11.88861);
+ wrong.children[2].getBBox=()=>({height:Math.fround(11.88861)});
+ assert.throws(()=>capture(wrong,computedStyle),/geometry|refused/i);
+});
+
+test('rectangle height witness is finite, bounded and fail-closed',()=>{
+ const capture=api('captureTeachingDiagram');
+ for(const change of [
+ r=>delete r.getBBox,r=>r.getBBox=()=>{throw Error('unavailable');},
+ r=>r.getBBox=()=>null,r=>r.getBBox=()=>({}),r=>delete r.height,
+ r=>r.height={baseVal:null},r=>Object.defineProperty(r,'height',{get(){throw Error('unavailable');}}),
+ ...[NaN,Infinity,-Infinity,-1,0,601,'11.888640403747559'].flatMap(value=>[
+ r=>r.getBBox=()=>({height:value}),r=>r.height.baseVal.value=value
+ ])
+ ]) {
+ const svg=heightSVG();change(svg.children[2]);
+ assert.throws(()=>capture(svg,computedStyle),/geometry|refused/i);
+ }
+});
+
+test('native representation check is bounded to positive rectangle height roundoff',()=>{
+ const capture=api('captureTeachingDiagram');
+ for(const [height,displayed] of [['40.12416','40.1242px'],['143.08250000000004','143.083px'],['599.99999','600px']]) {
+ assert.equal(capture(heightSVG(height,displayed),computedStyle).nodes[2].attributes.height,height);
+ }
+ // No broad epsilon increase, arbitrary computed string, or other-axis fallback.
+ for(const displayed of ['11.888638px','11.889px','12px','0px','-1px','NaN','Infinity','auto'])
+ assert.throws(()=>capture(heightSVG(undefined,displayed),computedStyle),/geometry|refused/i);
+ for(const height of ['0','-1','601','NaN','Infinity'])
+ assert.throws(()=>capture(heightSVG(height,'11.8886px'),computedStyle),/geometry|refused/i);
+ const nonnative=heightSVG();nonnative.children[2].height.baseVal.value=11.888639999999995;
+ nonnative.children[2].getBBox=()=>({height:11.888639999999995});
+ assert.throws(()=>capture(nonnative,computedStyle),/geometry|refused/i);
+ const otherAxis=heightSVG();otherAxis.children[2].style.width='112.999px';
+ assert.throws(()=>capture(otherAxis,computedStyle),/geometry|refused/i);
+ assert.equal(capture(heightSVG('0','0px'),computedStyle).nodes[2].attributes.height,'0');
+ assert.equal(capture(heightSVG('600','600px'),computedStyle).nodes[2].attributes.height,'600');
+});
+
test('capture refuses auto rectangle dimensions that suppress otherwise current native geometry',()=>{
const capture=api('captureTeachingDiagram');
const attributes={x:'36',y:'157',width:'178',height:'90',rx:'12',class:'diagram-box'};
diff --git a/tools/public_shop_browser_check.py b/tools/public_shop_browser_check.py
index fc4a25cb9..d401e28aa 100644
--- a/tools/public_shop_browser_check.py
+++ b/tools/public_shop_browser_check.py
@@ -844,6 +844,87 @@ def read_svg(kind, params, fragment, label):
page.locator('#' + fragment).screenshot(path=str(shot))
result['other_teaching_screenshots'].append({'path': shot.name, 'sha256': sha256(shot.read_bytes()).hexdigest()})
+ # BQ-26: real layout evidence, separate from mocked native-witness unit tests.
+ result['pin_height_geometry'] = []
+ for region in ['annulus', 'remote']:
+ page.goto(origin + f'explore.html?r=0.25®ion={region}#distance')
+ distance = page.locator('#pin-distance')
+ export = page.locator('#pin-export-svg'); copy = page.locator('#pin-copy-citation')
+ citation = page.locator('#pin-citation-text')
+ rect = page.locator('#pin-diagram rect')
+
+ def height_observation(label):
+ observation = rect.evaluate("""n=>({attribute:n.getAttribute('height'),
+ computed:getComputedStyle(n).getPropertyValue('height'),
+ reflected:n.height.baseVal.value,used:n.getBBox().height,
+ float32:Math.fround(Number(n.getAttribute('height')))})""")
+ result['pin_height_geometry'].append({'region':region,'case':label,**observation})
+ return observation
+
+ for label, key in [('0.25-before', None), ('0.24-rounded', 'ArrowLeft'), ('0.25-after', 'ArrowRight')]:
+ if key:
+ distance.focus(); page.keyboard.press(key)
+ expect(distance).to_have_value('0.24' if key == 'ArrowLeft' else '0.25')
+ expect(export).to_be_enabled(); expect(copy).to_be_enabled()
+ observation = height_observation(label)
+ require(0 < observation['used'] <= 600
+ and observation['used'] == observation['reflected'] == observation['float32'],
+ 'Native used-height witness does not match the reflected Float32 attribute')
+ if key == 'ArrowLeft':
+ require(observation['attribute'] == '11.888639999999995'
+ and observation['computed'] == '11.8886px'
+ and abs(float(observation['computed'][:-2]) - float(observation['attribute'])) > 1e-6,
+ 'Native rounding regression did not exercise the original refusal')
+ with page.expect_download() as pending:
+ native_button(export)
+ path = output / f'{result["case"]}-pin-0.24-{region}.svg'
+ pending.value.save_as(str(path)); data = path.read_bytes()
+ root = ElementTree.fromstring(data)
+ metadata = json.loads(root.find('s:metadata', ns).text)
+ require(metadata['params'] == {'r':0.24,'region':region}
+ and metadata['height_gap'] == 0.013824
+ and metadata['height_window'] == [0.986176,1]
+ and metadata['verification'] == 'not_performed',
+ 'Rounded-height export changed canonical teaching metadata')
+ require(any(n.get('height') == observation['attribute'] and n.get('width') == '113'
+ for n in root.findall('s:rect', ns)),
+ 'Rounded-height export rewrote source geometry')
+ require('non-certifying' in data.decode() and 'No field, count, probability, lifetime or theorem computation.' in data.decode(),
+ 'Rounded-height export lost teaching/non-certification labels')
+ result['other_teaching_svgs'].append({'path':path.name,'sha256':sha256(data).hexdigest(),'metadata':metadata})
+
+ distance.focus(); page.keyboard.press('ArrowLeft')
+ expect(distance).to_have_value('0.24')
+ native = height_observation('native-before-overrides')
+ for css_height in ['11.88861px', '11.889px', '0px', 'auto']:
+ fixture = css_fixture(f'#pin-diagram rect{{height:{css_height}}}')
+ try:
+ changed = height_observation('CSS-height-' + css_height)
+ require(changed['attribute'] == native['attribute'] and changed['reflected'] == native['reflected']
+ and changed['used'] != native['used'], 'CSS fixture did not change only the used height')
+ if css_height == '11.88861px':
+ require(changed['computed'] == native['computed'],
+ 'Nearby CSS override did not share the native rounded string')
+ native_button(copy)
+ expect(export).to_be_disabled(); expect(copy).to_be_disabled(); expect(citation).to_have_value('')
+ finally:
+ remove_css_fixture(fixture)
+ distance.focus(); page.keyboard.press('ArrowRight'); page.keyboard.press('ArrowLeft')
+ expect(export).to_be_enabled(); expect(copy).to_be_enabled()
+
+ # Full supported hundredth-tick range, using actual native input/layout.
+ # This is headless Chromium, not emulated computed styles or native zoom.
+ distance.focus(); page.keyboard.press('Home')
+ for tick in range(5, 61):
+ if tick > 5:
+ page.keyboard.press('ArrowRight')
+ expect(distance).to_have_value(str(tick / 100))
+ expect(export).to_be_enabled(); expect(copy).to_be_enabled()
+ observed = height_observation(f'tick-{tick}')
+ require(0 < observed['used'] <= 600 and observed['used'] == observed['reflected'] == observed['float32'],
+ 'Supported slider tick lost native geometry identity')
+ result['steps'].append('BQ-26 native .25/.24/.25 recovery and SVG metadata, same-rounded-string real CSS override refusal, zero/auto refusal, and all 56 ticks in both highlights checked')
+
# Fresh Explore page, never the previous Formal page. Static output describes
# its true starting values even when the URL asks for a different example.
static = page.context.browser.new_context(viewport=result['viewport'], color_scheme=result['color_scheme'], java_script_enabled=False)
From d896b7a765d9b42a14e5796efc07beda71868bb4 Mon Sep 17 00:00:00 2001
From: Dylan Roy <249851642+d6g8k5htny-coder@users.noreply.github.com>
Date: Tue, 6 Oct 2026 18:37:37 -0700
Subject: [PATCH 2/3] Record native height evidence before browser assertion
failure
BQ26 author instrumentation only. Preserve failed run37556469068 at07a6c38, tested merge1e4f043f, artifact11455027265. No production guard or cache-key changes. Capture exact native values and serializer error before asserting enabled controls.
---
tools/public_shop_browser_check.py | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
diff --git a/tools/public_shop_browser_check.py b/tools/public_shop_browser_check.py
index d401e28aa..74750bff7 100644
--- a/tools/public_shop_browser_check.py
+++ b/tools/public_shop_browser_check.py
@@ -854,10 +854,19 @@ def read_svg(kind, params, fragment, label):
rect = page.locator('#pin-diagram rect')
def height_observation(label):
- observation = rect.evaluate("""n=>({attribute:n.getAttribute('height'),
- computed:getComputedStyle(n).getPropertyValue('height'),
- reflected:n.height.baseVal.value,used:n.getBBox().height,
- float32:Math.fround(Number(n.getAttribute('height')))})""")
+ observation = rect.evaluate("""async n=>{
+ const entry=new URL(document.querySelector('script[src]').src);
+ const module=new URL('teaching-export.mjs'+entry.search,entry);
+ const {captureTeachingDiagram}=await import(module.href);
+ let captureError=null;
+ try{captureTeachingDiagram(n.ownerSVGElement);}catch(error){captureError=String(error);}
+ return {attribute:n.getAttribute('height'),
+ computed:getComputedStyle(n).getPropertyValue('height'),
+ reflected:n.height.baseVal.value,used:n.getBBox().height,
+ float32:Math.fround(Number(n.getAttribute('height'))),
+ typed:n.computedStyleMap?.().get('height')?.value,
+ captureError};
+ }""")
result['pin_height_geometry'].append({'region':region,'case':label,**observation})
return observation
@@ -865,8 +874,8 @@ def height_observation(label):
if key:
distance.focus(); page.keyboard.press(key)
expect(distance).to_have_value('0.24' if key == 'ArrowLeft' else '0.25')
- expect(export).to_be_enabled(); expect(copy).to_be_enabled()
observation = height_observation(label)
+ expect(export).to_be_enabled(); expect(copy).to_be_enabled()
require(0 < observation['used'] <= 600
and observation['used'] == observation['reflected'] == observation['float32'],
'Native used-height witness does not match the reflected Float32 attribute')
From e8c095f14d8ad8111214e68382d37a861792c43a Mon Sep 17 00:00:00 2001
From: Dylan Roy <249851642+d6g8k5htny-coder@users.noreply.github.com>
Date: Tue, 6 Oct 2026 18:47:35 -0700
Subject: [PATCH 3/3] Bind height witness to detached native attribute parsing
BQ26 evidence-driven amendment after failed native run37558048094. Chromium reflected/used11.888639450073242 differs from JS fround11.888640403747559; detached SVG attribute parsing replaces that unsupported conversion assumption. Exact parsed/reflected/used equality, bounds, Float32 representation and ordinary guards remain. Real one-ULP same-string CSS adversary added. Source/nonauthor review and new browser evidence pending.
---
docs/site/app.js | 6 +++---
docs/site/brand.css | 2 +-
docs/site/cite.html | 4 ++--
docs/site/cite.mjs | 2 +-
docs/site/conditionals.mjs | 2 +-
docs/site/curvature-export.mjs | 2 +-
docs/site/dependencies.html | 10 ++++-----
docs/site/dependencies.mjs | 2 +-
docs/site/explore-models.mjs | 2 +-
docs/site/explore.html | 10 ++++-----
docs/site/explore.mjs | 12 +++++------
docs/site/formal.html | 6 +++---
docs/site/index.html | 4 ++--
docs/site/measure.html | 10 ++++-----
docs/site/measure.mjs | 2 +-
docs/site/museum.html | 6 +++---
docs/site/museum.mjs | 6 +++---
docs/site/palette-export.mjs | 4 ++--
docs/site/pin-export.mjs | 4 ++--
docs/site/reproduce.html | 4 ++--
docs/site/research.html | 2 +-
docs/site/teaching-export.mjs | 18 +++++++++-------
docs/site/workspace.html | 6 +++---
tests/test_teaching_export.mjs | 33 ++++++++++++++++++++++++------
tools/public_shop_browser_check.py | 13 +++++++-----
25 files changed, 100 insertions(+), 72 deletions(-)
diff --git a/docs/site/app.js b/docs/site/app.js
index 1421e1f5b..30f2377fc 100644
--- a/docs/site/app.js
+++ b/docs/site/app.js
@@ -1,6 +1,6 @@
-import {verifiedJSON, verifiedBytes, validateStatus, validateCoefficient, safeSourceURL, hex40, hex64} from './core.mjs?site-release=497c3af31a6411ebab7c8646041f0872ae2ce2cca979bc20e47e74a6f6fd342b';
-import {connectCatalogQuery} from './catalog-query.mjs?site-release=497c3af31a6411ebab7c8646041f0872ae2ce2cca979bc20e47e74a6f6fd342b';
-import {prepareWorkspaceFragment} from './workspace-fragment.mjs?site-release=497c3af31a6411ebab7c8646041f0872ae2ce2cca979bc20e47e74a6f6fd342b';
+import {verifiedJSON, verifiedBytes, validateStatus, validateCoefficient, safeSourceURL, hex40, hex64} from './core.mjs?site-release=4ec25edbe710c46618bf3d41c98095262202d484bcad5b9e956627b23843ed36';
+import {connectCatalogQuery} from './catalog-query.mjs?site-release=4ec25edbe710c46618bf3d41c98095262202d484bcad5b9e956627b23843ed36';
+import {prepareWorkspaceFragment} from './workspace-fragment.mjs?site-release=4ec25edbe710c46618bf3d41c98095262202d484bcad5b9e956627b23843ed36';
const finishFragment=prepareWorkspaceFragment();
const el=id=>document.getElementById(id);
const node=(tag,text,cls)=>{const n=document.createElement(tag);if(text!==undefined)n.textContent=text;if(cls)n.className=cls;return n;};
diff --git a/docs/site/brand.css b/docs/site/brand.css
index 34f8a30c5..05ea5d64d 100644
--- a/docs/site/brand.css
+++ b/docs/site/brand.css
@@ -58,7 +58,7 @@ body > header {
color: var(--ul-text); font-weight: 750; letter-spacing: .13em;
position: relative; padding-left: 57px; min-height: 44px; line-height: 1.65;
}
-.brand::before { content: ""; position: absolute; left: 0; top: 1px; width: 42px; height: 42px; background: url("brand/mark.svg?site-release=497c3af31a6411ebab7c8646041f0872ae2ce2cca979bc20e47e74a6f6fd342b") center/contain no-repeat; }
+.brand::before { content: ""; position: absolute; left: 0; top: 1px; width: 42px; height: 42px; background: url("brand/mark.svg?site-release=4ec25edbe710c46618bf3d41c98095262202d484bcad5b9e956627b23843ed36") center/contain no-repeat; }
.brand span { color: var(--ul-muted); font-size: 10px; letter-spacing: .18em; }
nav { gap: 12px 24px; flex-wrap: wrap; }
nav a { color: var(--ul-text); min-height: 36px; display: inline-flex; align-items: center; font-size: 13px; }
diff --git a/docs/site/cite.html b/docs/site/cite.html
index e1d51cc8a..50a991bd5 100644
--- a/docs/site/cite.html
+++ b/docs/site/cite.html
@@ -4,8 +4,8 @@
Cite · Universal Law
-
-
+
+
Skip to content
diff --git a/docs/site/cite.mjs b/docs/site/cite.mjs
index c0d2ca328..a13425187 100644
--- a/docs/site/cite.mjs
+++ b/docs/site/cite.mjs
@@ -1,4 +1,4 @@
-import {wireReferenceForm} from './source-reference.mjs?site-release=497c3af31a6411ebab7c8646041f0872ae2ce2cca979bc20e47e74a6f6fd342b';
+import {wireReferenceForm} from './source-reference.mjs?site-release=4ec25edbe710c46618bf3d41c98095262202d484bcad5b9e956627b23843ed36';
const byId = id => document.getElementById(id);
wireReferenceForm({form:byId('reference-form'), repository:byId('reference-repository'), commit:byId('reference-commit'), path:byId('reference-path'), sha256:byId('reference-sha256'), output:byId('reference-output'), json:byId('reference-json'), bibtex:byId('reference-bibtex'), link:byId('reference-link'), status:byId('reference-status'), actions:byId('reference-actions'), copyText:byId('reference-copy'), copyJSON:byId('reference-copy-json'), copyBibTeX:byId('reference-copy-bibtex'), share:byId('reference-share'), clipboard:globalThis.navigator?.clipboard, location:globalThis.location, history:globalThis.history, events:globalThis.window});
byId('reference-builder').hidden = false;
diff --git a/docs/site/conditionals.mjs b/docs/site/conditionals.mjs
index 893d26641..3342263ac 100644
--- a/docs/site/conditionals.mjs
+++ b/docs/site/conditionals.mjs
@@ -93,7 +93,7 @@ export function renderProjection(document,host,data,source){
el(document,'p','Generated from verified source bytes. This graph is not formal verification, a proof review, or a scientific-status register.'));
host.replaceChildren(article);
}
-const services=()=>import('./museum.mjs?site-release=497c3af31a6411ebab7c8646041f0872ae2ce2cca979bc20e47e74a6f6fd342b');
+const services=()=>import('./museum.mjs?site-release=4ec25edbe710c46618bf3d41c98095262202d484bcad5b9e956627b23843ed36');
// The museum module already verifies config → manifest → index/status once per
// page fetch and caches every pinned byte request. This route consumes that same
// verified startup, so it adds only the audited-descriptor check and projection.
diff --git a/docs/site/curvature-export.mjs b/docs/site/curvature-export.mjs
index 8e93e5001..e23ae685b 100644
--- a/docs/site/curvature-export.mjs
+++ b/docs/site/curvature-export.mjs
@@ -1,6 +1,6 @@
// Bounded, local export of the Peaks and saddles teaching diagram. No source fetch
// or proof verification occurs here; the identity below is recorded provenance.
-import { coneModel } from './explore-models.mjs?site-release=497c3af31a6411ebab7c8646041f0872ae2ce2cca979bc20e47e74a6f6fd342b';
+import { coneModel } from './explore-models.mjs?site-release=4ec25edbe710c46618bf3d41c98095262202d484bcad5b9e956627b23843ed36';
const SVG_NS = 'http://www.w3.org/2000/svg';
const PUBLIC_EXPLORE = 'https://d6g8k5htny-coder.github.io/main/site/explore.html';
diff --git a/docs/site/dependencies.html b/docs/site/dependencies.html
index 388813bb9..cfac0f15d 100644
--- a/docs/site/dependencies.html
+++ b/docs/site/dependencies.html
@@ -7,11 +7,11 @@
Claim dependency viewer · Universal Law
-
-
-
-
-
+
+
+
+
+
Skip to content
diff --git a/docs/site/dependencies.mjs b/docs/site/dependencies.mjs
index 7a891be57..824d1b6fd 100644
--- a/docs/site/dependencies.mjs
+++ b/docs/site/dependencies.mjs
@@ -11,7 +11,7 @@ import {
parsePinnedGraph,
recordedContextRows,
unresolvedTargets,
-} from './dependency-model.mjs?site-release=497c3af31a6411ebab7c8646041f0872ae2ce2cca979bc20e47e74a6f6fd342b';
+} from './dependency-model.mjs?site-release=4ec25edbe710c46618bf3d41c98095262202d484bcad5b9e956627b23843ed36';
const byId = id => document.getElementById(id);
diff --git a/docs/site/explore-models.mjs b/docs/site/explore-models.mjs
index 79e21e032..6ef016704 100644
--- a/docs/site/explore-models.mjs
+++ b/docs/site/explore-models.mjs
@@ -1,6 +1,6 @@
// NON-CERTIFYING educational arithmetic. These functions illustrate source
// definitions; they do not simulate a field or estimate a theorem's constants.
-import { annulusModel, p15Model, remoteModel } from './geometry.mjs?site-release=497c3af31a6411ebab7c8646041f0872ae2ce2cca979bc20e47e74a6f6fd342b';
+import { annulusModel, p15Model, remoteModel } from './geometry.mjs?site-release=4ec25edbe710c46618bf3d41c98095262202d484bcad5b9e956627b23843ed36';
function finite(value, name) {
if (!Number.isFinite(value)) throw new RangeError(`${name} must be finite`);
diff --git a/docs/site/explore.html b/docs/site/explore.html
index 18fd6383e..8d800d541 100644
--- a/docs/site/explore.html
+++ b/docs/site/explore.html
@@ -7,11 +7,11 @@
Explore the mathematics · Universal Law
-
-
-
-
-
+
+
+
+
+
Skip to content
diff --git a/docs/site/explore.mjs b/docs/site/explore.mjs
index 795b47ecf..37aa89640 100644
--- a/docs/site/explore.mjs
+++ b/docs/site/explore.mjs
@@ -1,10 +1,10 @@
-import { coneModel, pinModel, paletteModel, applyCurvaturePreset } from './explore-models.mjs?site-release=497c3af31a6411ebab7c8646041f0872ae2ce2cca979bc20e47e74a6f6fd342b';
-import { readExploreState, exploreStateURL } from './explore-state.mjs?site-release=497c3af31a6411ebab7c8646041f0872ae2ce2cca979bc20e47e74a6f6fd342b';
+import { coneModel, pinModel, paletteModel, applyCurvaturePreset } from './explore-models.mjs?site-release=4ec25edbe710c46618bf3d41c98095262202d484bcad5b9e956627b23843ed36';
+import { readExploreState, exploreStateURL } from './explore-state.mjs?site-release=4ec25edbe710c46618bf3d41c98095262202d484bcad5b9e956627b23843ed36';
-import { captureCurvatureDiagram, serializeCurvatureSVG, createCitationController } from './curvature-export.mjs?site-release=497c3af31a6411ebab7c8646041f0872ae2ce2cca979bc20e47e74a6f6fd342b';
-import { captureTeachingDiagram, createFigureCitationController } from './teaching-export.mjs?site-release=497c3af31a6411ebab7c8646041f0872ae2ce2cca979bc20e47e74a6f6fd342b';
-import { serializePinSVG, pinFigureCitation } from './pin-export.mjs?site-release=497c3af31a6411ebab7c8646041f0872ae2ce2cca979bc20e47e74a6f6fd342b';
-import { serializePaletteSVG, paletteFigureCitation } from './palette-export.mjs?site-release=497c3af31a6411ebab7c8646041f0872ae2ce2cca979bc20e47e74a6f6fd342b';
+import { captureCurvatureDiagram, serializeCurvatureSVG, createCitationController } from './curvature-export.mjs?site-release=4ec25edbe710c46618bf3d41c98095262202d484bcad5b9e956627b23843ed36';
+import { captureTeachingDiagram, createFigureCitationController } from './teaching-export.mjs?site-release=4ec25edbe710c46618bf3d41c98095262202d484bcad5b9e956627b23843ed36';
+import { serializePinSVG, pinFigureCitation } from './pin-export.mjs?site-release=4ec25edbe710c46618bf3d41c98095262202d484bcad5b9e956627b23843ed36';
+import { serializePaletteSVG, paletteFigureCitation } from './palette-export.mjs?site-release=4ec25edbe710c46618bf3d41c98095262202d484bcad5b9e956627b23843ed36';
const ns = 'http://www.w3.org/2000/svg';
const byId = id => document.getElementById(id);
diff --git a/docs/site/formal.html b/docs/site/formal.html
index 3db15bb52..982c8e97d 100644
--- a/docs/site/formal.html
+++ b/docs/site/formal.html
@@ -4,9 +4,9 @@
Formal verification · Universal Law
-
-
-
+
+
+
diff --git a/docs/site/index.html b/docs/site/index.html
index ede35edc6..e6333ad28 100644
--- a/docs/site/index.html
+++ b/docs/site/index.html
@@ -4,8 +4,8 @@
Universal Law · The shape of randomness
-
-
+
+
Skip to content
diff --git a/docs/site/measure.html b/docs/site/measure.html
index 49bab5a3f..356a7a976 100644
--- a/docs/site/measure.html
+++ b/docs/site/measure.html
@@ -7,11 +7,11 @@
From counts to density · Universal Law
-
-
-
-
-
+
+
+
+
+
Skip to content
diff --git a/docs/site/measure.mjs b/docs/site/measure.mjs
index 5875a5371..f313c4b2a 100644
--- a/docs/site/measure.mjs
+++ b/docs/site/measure.mjs
@@ -1,4 +1,4 @@
-import { measurementModel, parseMeasurementInputs } from './measurement-model.mjs?site-release=497c3af31a6411ebab7c8646041f0872ae2ce2cca979bc20e47e74a6f6fd342b';
+import { measurementModel, parseMeasurementInputs } from './measurement-model.mjs?site-release=4ec25edbe710c46618bf3d41c98095262202d484bcad5b9e956627b23843ed36';
const byId = id => document.getElementById(id);
const fields = Object.fromEntries(['count', 'realizations', 'lower', 'upper'].map(name => [name, byId(`measure-${name}`)]));
diff --git a/docs/site/museum.html b/docs/site/museum.html
index 86dd1a165..b153daed5 100644
--- a/docs/site/museum.html
+++ b/docs/site/museum.html
@@ -4,11 +4,11 @@
Source records & exhibits · Universal Law
-
+
-
-
+
+
diff --git a/docs/site/museum.mjs b/docs/site/museum.mjs
index 4c5838858..716ee8018 100644
--- a/docs/site/museum.mjs
+++ b/docs/site/museum.mjs
@@ -1,5 +1,5 @@
-import {renderSourceQuote} from './source-quote.mjs?site-release=497c3af31a6411ebab7c8646041f0872ae2ce2cca979bc20e47e74a6f6fd342b';
-import {verifiedBytes, hex40, hex64} from './core.mjs?site-release=497c3af31a6411ebab7c8646041f0872ae2ce2cca979bc20e47e74a6f6fd342b';
+import {renderSourceQuote} from './source-quote.mjs?site-release=4ec25edbe710c46618bf3d41c98095262202d484bcad5b9e956627b23843ed36';
+import {verifiedBytes, hex40, hex64} from './core.mjs?site-release=4ec25edbe710c46618bf3d41c98095262202d484bcad5b9e956627b23843ed36';
export const DISCLAIMER='This canvas explains the pinned source. It is not a proof and does not change status.';
const REVIEWED_IDS=['d2-lifetime-remainder','d3-side24-coefficient','d4-fixed-remote-rn','d5-all-height-annulus','d5-height-window-annulus','d5-two-scale','d5-inner-belt-density','d5-fixed-transverse','cumulative-transfer-correction','p15-demand-one-counterexample','d6-p15-full-price'];
@@ -247,7 +247,7 @@ function prepareClaimFragment(document,window,currentHash) {
return true;
};
}
-export async function startMuseum({document=globalThis.document,window=globalThis.window,fetcher=globalThis.fetch,search=globalThis.location?.search||'',geometryLoader=()=>import('./geometry.mjs?site-release=497c3af31a6411ebab7c8646041f0872ae2ce2cca979bc20e47e74a6f6fd342b'),currentHash=()=>globalThis.location?.hash||''}={}){
+export async function startMuseum({document=globalThis.document,window=globalThis.window,fetcher=globalThis.fetch,search=globalThis.location?.search||'',geometryLoader=()=>import('./geometry.mjs?site-release=4ec25edbe710c46618bf3d41c98095262202d484bcad5b9e956627b23843ed36'),currentHash=()=>globalThis.location?.hash||''}={}){
const ids=['museum-state','claim-cards','lifetime-fixture','packet-cards','active-exhibit'];
const containers=Object.fromEntries(ids.map(id=>{const node=document.getElementById(id);if(!node)throw Error(`Missing museum container: ${id}`);return [id,node];}));
const finishFragment=prepareClaimFragment(document,window,currentHash);
diff --git a/docs/site/palette-export.mjs b/docs/site/palette-export.mjs
index cfb8f8aa0..6de880c31 100644
--- a/docs/site/palette-export.mjs
+++ b/docs/site/palette-export.mjs
@@ -1,7 +1,7 @@
// Bounded teaching export of Explore's current finite P15 diagram. Source
// custody is provenance; this module performs no mathematical verification.
-import { paletteModel } from './explore-models.mjs?site-release=497c3af31a6411ebab7c8646041f0872ae2ce2cca979bc20e47e74a6f6fd342b';
-import { serializeTeachingSVG } from './teaching-export.mjs?site-release=497c3af31a6411ebab7c8646041f0872ae2ce2cca979bc20e47e74a6f6fd342b';
+import { paletteModel } from './explore-models.mjs?site-release=4ec25edbe710c46618bf3d41c98095262202d484bcad5b9e956627b23843ed36';
+import { serializeTeachingSVG } from './teaching-export.mjs?site-release=4ec25edbe710c46618bf3d41c98095262202d484bcad5b9e956627b23843ed36';
const PUBLIC_EXPLORE = 'https://d6g8k5htny-coder.github.io/main/site/explore.html';
const SOURCE = Object.freeze({
diff --git a/docs/site/pin-export.mjs b/docs/site/pin-export.mjs
index 9989f633c..4aff479c6 100644
--- a/docs/site/pin-export.mjs
+++ b/docs/site/pin-export.mjs
@@ -1,7 +1,7 @@
// Bounded export of the CURRENT displayed Approach-points teaching diagram.
// Pinned source identities are provenance, not proof acceptance or verification.
-import { pinModel } from './explore-models.mjs?site-release=497c3af31a6411ebab7c8646041f0872ae2ce2cca979bc20e47e74a6f6fd342b';
-import { serializeTeachingSVG } from './teaching-export.mjs?site-release=497c3af31a6411ebab7c8646041f0872ae2ce2cca979bc20e47e74a6f6fd342b';
+import { pinModel } from './explore-models.mjs?site-release=4ec25edbe710c46618bf3d41c98095262202d484bcad5b9e956627b23843ed36';
+import { serializeTeachingSVG } from './teaching-export.mjs?site-release=4ec25edbe710c46618bf3d41c98095262202d484bcad5b9e956627b23843ed36';
const PUBLIC_EXPLORE='https://d6g8k5htny-coder.github.io/main/site/explore.html';
const COMMIT='d6628da09384728992dcbe6e921cc28ba85aebb0';
diff --git a/docs/site/reproduce.html b/docs/site/reproduce.html
index 55b718109..08ccbc145 100644
--- a/docs/site/reproduce.html
+++ b/docs/site/reproduce.html
@@ -4,9 +4,9 @@
Reproduce · Universal Law
-
+
-
+
Skip to content
diff --git a/docs/site/research.html b/docs/site/research.html
index 65444993a..05cc56d64 100644
--- a/docs/site/research.html
+++ b/docs/site/research.html
@@ -4,7 +4,7 @@
Research · Universal Law
-
+
Skip to content
diff --git a/docs/site/teaching-export.mjs b/docs/site/teaching-export.mjs
index dc541fe38..70186bff6 100644
--- a/docs/site/teaching-export.mjs
+++ b/docs/site/teaching-export.mjs
@@ -27,16 +27,20 @@ function boundedNumber(value, min=0, max=600, units=false) {
if(!/^-?(?:\d+(?:\.\d*)?|\.\d+)$/.test(numberText) || !Number.isFinite(number) || numbermax) refuse('unbounded numeric primitive or style');
return String(number===0?0:number);
}
-function nativeRectHeightMatches(node,expected,displayed) {
+function nativeRectHeightMatches(node,source,displayed) {
try {
// CSSOM can serialize this height with six significant digits. Matching
// that string alone cannot distinguish a genuine nearby CSS override.
- // SVGLength.value reflects the attribute as a float; getBBox independently
- // observes the used geometry in SVG user units, without stroke or transforms.
+ // Parse the bounded exact attribute string through the same native parser:
+ // SVGLength parsing need not equal JavaScript Number-to-Float32 conversion.
+ // The reference stays detached; getBBox independently observes used geometry.
+ const reference=node.ownerDocument.createElementNS(SVG_NS,'rect');
+ reference.setAttribute('height',source);
+ const parsed=reference.height.baseVal.value;
const native=node.height?.baseVal?.value,used=node.getBBox().height;
- return Number.isFinite(native) && native>0 && native<=600 && expected>0
- && native===Math.fround(expected) && Number.isFinite(used) && used===native
- && displayed===Number(native.toPrecision(6));
+ return Number.isFinite(parsed) && parsed>0 && parsed<=600 && parsed===Math.fround(parsed)
+ && native===parsed && Number.isFinite(used) && used===parsed
+ && displayed===Number(parsed.toPrecision(6));
} catch { return false; }
}
function color(value, opaque=false) {
@@ -158,7 +162,7 @@ export function captureTeachingDiagram(svg,computedStyle=globalThis.getComputedS
const actual=Number(boundedNumber(displayed,0,key==='r'?300:600,true));
const expected=Object.hasOwn(currentAttributes,key)?Number(boundedNumber(currentAttributes[key])):0;
if(Math.abs(actual-expected)>1e-6 && !(node.localName==='rect' && key==='height'
- && nativeRectHeightMatches(node,expected,actual)))refuse('CSS geometry differs from current attributes');
+ && nativeRectHeightMatches(node,currentAttributes[key],actual)))refuse('CSS geometry differs from current attributes');
}
if(node.localName==='rect') {
const width=Number(boundedNumber(currentAttributes.width)),height=Number(boundedNumber(currentAttributes.height));
diff --git a/docs/site/workspace.html b/docs/site/workspace.html
index 4745e51af..03d6dffcb 100644
--- a/docs/site/workspace.html
+++ b/docs/site/workspace.html
@@ -4,9 +4,9 @@
Research workspace · Universal Law
-
-
-
+
+
+
diff --git a/tests/test_teaching_export.mjs b/tests/test_teaching_export.mjs
index 275d3f256..c03d9cc31 100644
--- a/tests/test_teaching_export.mjs
+++ b/tests/test_teaching_export.mjs
@@ -91,25 +91,38 @@ function rectSVG(attributes,geometry) {
function heightSVG(height='11.888639999999995',displayed='11.8886px') {
const svg=rectSVG({x:'448',y:'78',width:'113',height,class:'diagram-fill'},
{x:'448px',y:'78px',width:'113px',height:displayed,rx:'auto',ry:'auto'});
- const rect=svg.children[2],native=Math.fround(Number(height));
+ // The first tuple is measured Chromium parsing, which differs from JS fround.
+ // Other fixture values remain explicitly simulated, not browser evidence.
+ const parse=value=>value==='11.888639999999995'?11.888639450073242:Math.fround(Number(value));
+ const rect=svg.children[2],native=parse(height);
rect.height={baseVal:{value:native}};
rect.getBBox=()=>({x:448,y:78,width:113,height:native});
+ rect.ownerDocument={createElementNS(namespace,tag){
+ assert.equal(namespace,ns);assert.equal(tag,'rect');
+ return {height:{baseVal:{value:0}},setAttribute(key,value){assert.equal(key,'height');this.height.baseVal.value=parse(value);}};
+ }};
return svg;
}
test('rounded rectangle height requires a matching native used-height witness',()=>{
const capture=api('captureTeachingDiagram');
const svg=heightSVG();
- assert.equal(svg.children[2].height.baseVal.value,11.888640403747559);
+ assert.equal(svg.children[2].height.baseVal.value,11.888639450073242);
assert.equal(capture(svg,computedStyle).nodes[2].attributes.height,'11.888639999999995');
// The original comparison still suffices without any native witness.
const exact=heightSVG('13.4375','13.4375px');delete exact.children[2].getBBox;
assert.equal(capture(exact,computedStyle).nodes[2].attributes.height,'13.4375');
});
+test('captured Chromium attribute parsing need not equal JavaScript Float32 conversion',()=>{
+ const svg=heightSVG(),rect=svg.children[2];
+ assert.notEqual(rect.height.baseVal.value,Math.fround(Number(rect.attributes.find(a=>a.name==='height').value)));
+ assert.equal(api('captureTeachingDiagram')(svg,computedStyle).nodes[2].attributes.height,'11.888639999999995');
+});
+
test('native height equality cannot admit real CSS overrides sharing a rounded string',()=>{
const capture=api('captureTeachingDiagram');
- for(const actual of [11.88861,11.88862,11.88865,12,0]) {
+ for(const actual of [11.88861,11.88862,11.88864,11.88865,12,0]) {
const svg=heightSVG();svg.children[2].getBBox=()=>({height:Math.fround(actual)});
assert.throws(()=>capture(svg,computedStyle),/geometry|refused/i);
}
@@ -125,8 +138,16 @@ test('rectangle height witness is finite, bounded and fail-closed',()=>{
r=>delete r.getBBox,r=>r.getBBox=()=>{throw Error('unavailable');},
r=>r.getBBox=()=>null,r=>r.getBBox=()=>({}),r=>delete r.height,
r=>r.height={baseVal:null},r=>Object.defineProperty(r,'height',{get(){throw Error('unavailable');}}),
- ...[NaN,Infinity,-Infinity,-1,0,601,'11.888640403747559'].flatMap(value=>[
- r=>r.getBBox=()=>({height:value}),r=>r.height.baseVal.value=value
+ r=>delete r.ownerDocument,r=>r.ownerDocument.createElementNS=()=>{throw Error('unavailable');},
+ r=>delete r.ownerDocument.createElementNS,
+ r=>r.ownerDocument.createElementNS=()=>null,
+ r=>r.ownerDocument.createElementNS=()=>({setAttribute(){throw Error('unavailable');}}),
+ r=>r.ownerDocument.createElementNS=()=>({setAttribute(){}}),
+ r=>r.ownerDocument.createElementNS=()=>({setAttribute(){},get height(){throw Error('unavailable');}}),
+ r=>r.ownerDocument.createElementNS=()=>({setAttribute(){},height:{baseVal:{value:11.88861}}}),
+ ...[NaN,Infinity,-Infinity,-1,0,601,'11.888640403747559',11.888639999999995].flatMap(value=>[
+ r=>r.getBBox=()=>({height:value}),r=>r.height.baseVal.value=value,
+ r=>r.ownerDocument.createElementNS=()=>({setAttribute(){},height:{baseVal:{value}}})
])
]) {
const svg=heightSVG();change(svg.children[2]);
@@ -136,7 +157,7 @@ test('rectangle height witness is finite, bounded and fail-closed',()=>{
test('native representation check is bounded to positive rectangle height roundoff',()=>{
const capture=api('captureTeachingDiagram');
- for(const [height,displayed] of [['40.12416','40.1242px'],['143.08250000000004','143.083px'],['599.99999','600px']]) {
+ for(const [height,displayed] of [['15.99999','16px'],['16.00001','16px'],['40.12416','40.1242px'],['143.08250000000004','143.083px'],['599.99999','600px']]) {
assert.equal(capture(heightSVG(height,displayed),computedStyle).nodes[2].attributes.height,height);
}
// No broad epsilon increase, arbitrary computed string, or other-axis fallback.
diff --git a/tools/public_shop_browser_check.py b/tools/public_shop_browser_check.py
index 74750bff7..d0c855de2 100644
--- a/tools/public_shop_browser_check.py
+++ b/tools/public_shop_browser_check.py
@@ -860,9 +860,12 @@ def height_observation(label):
const {captureTeachingDiagram}=await import(module.href);
let captureError=null;
try{captureTeachingDiagram(n.ownerSVGElement);}catch(error){captureError=String(error);}
+ const reference=document.createElementNS(n.namespaceURI,'rect');
+ reference.setAttribute('height',n.getAttribute('height'));
return {attribute:n.getAttribute('height'),
computed:getComputedStyle(n).getPropertyValue('height'),
reflected:n.height.baseVal.value,used:n.getBBox().height,
+ parsed:reference.height.baseVal.value,
float32:Math.fround(Number(n.getAttribute('height'))),
typed:n.computedStyleMap?.().get('height')?.value,
captureError};
@@ -877,8 +880,8 @@ def height_observation(label):
observation = height_observation(label)
expect(export).to_be_enabled(); expect(copy).to_be_enabled()
require(0 < observation['used'] <= 600
- and observation['used'] == observation['reflected'] == observation['float32'],
- 'Native used-height witness does not match the reflected Float32 attribute')
+ and observation['used'] == observation['reflected'] == observation['parsed'],
+ 'Native used-height witness does not match the independently parsed attribute')
if key == 'ArrowLeft':
require(observation['attribute'] == '11.888639999999995'
and observation['computed'] == '11.8886px'
@@ -905,13 +908,13 @@ def height_observation(label):
distance.focus(); page.keyboard.press('ArrowLeft')
expect(distance).to_have_value('0.24')
native = height_observation('native-before-overrides')
- for css_height in ['11.88861px', '11.889px', '0px', 'auto']:
+ for css_height in ['11.88861px', '11.88864px', '11.889px', '0px', 'auto']:
fixture = css_fixture(f'#pin-diagram rect{{height:{css_height}}}')
try:
changed = height_observation('CSS-height-' + css_height)
require(changed['attribute'] == native['attribute'] and changed['reflected'] == native['reflected']
and changed['used'] != native['used'], 'CSS fixture did not change only the used height')
- if css_height == '11.88861px':
+ if css_height in ['11.88861px', '11.88864px']:
require(changed['computed'] == native['computed'],
'Nearby CSS override did not share the native rounded string')
native_button(copy)
@@ -930,7 +933,7 @@ def height_observation(label):
expect(distance).to_have_value(str(tick / 100))
expect(export).to_be_enabled(); expect(copy).to_be_enabled()
observed = height_observation(f'tick-{tick}')
- require(0 < observed['used'] <= 600 and observed['used'] == observed['reflected'] == observed['float32'],
+ require(0 < observed['used'] <= 600 and observed['used'] == observed['reflected'] == observed['parsed'],
'Supported slider tick lost native geometry identity')
result['steps'].append('BQ-26 native .25/.24/.25 recovery and SVG metadata, same-rounded-string real CSS override refusal, zero/auto refusal, and all 56 ticks in both highlights checked')