From fb3949b64f22654046980dde7d36b0b2f73d5f60 Mon Sep 17 00:00:00 2001 From: Dylan Roy Date: Sat, 26 Sep 2026 12:24:34 -0500 Subject: [PATCH 1/2] Add source-bound verification museum and landed packet display Scientific effect NONE. Preserve proof/status dispositions and existing intake isolation. --- .github/workflows/public-shop.yml | 5 + README.md | 4 + docs/PUBLIC_SHOP_SETUP.md | 4 +- docs/site/IMPLEMENTATION.md | 45 ++ docs/site/README.md | 32 +- docs/site/app.js | 33 +- docs/site/geometry.mjs | 398 +++++++++++++++++ docs/site/index.html | 12 +- docs/site/museum.css | 3 + docs/site/museum.html | 29 ++ docs/site/museum.json | 709 ++++++++++++++++++++++++++++++ docs/site/museum.mjs | 213 +++++++++ docs/site/style.css | 15 + tests/test_museum_data.py | 134 ++++++ tests/test_museum_frontend.mjs | 151 +++++++ tests/test_museum_geometry.mjs | 134 ++++++ tests/test_public_shop_app.mjs | 91 +++- tools/museum_check.py | 48 ++ tools/museum_data.py | 558 +++++++++++++++++++++++ 19 files changed, 2591 insertions(+), 27 deletions(-) create mode 100644 docs/site/IMPLEMENTATION.md create mode 100644 docs/site/geometry.mjs create mode 100644 docs/site/museum.css create mode 100644 docs/site/museum.html create mode 100644 docs/site/museum.json create mode 100644 docs/site/museum.mjs create mode 100644 tests/test_museum_data.py create mode 100644 tests/test_museum_frontend.mjs create mode 100644 tests/test_museum_geometry.mjs create mode 100644 tools/museum_check.py create mode 100644 tools/museum_data.py diff --git a/.github/workflows/public-shop.yml b/.github/workflows/public-shop.yml index 3f2680a2f..d506a0aba 100644 --- a/.github/workflows/public-shop.yml +++ b/.github/workflows/public-shop.yml @@ -20,5 +20,10 @@ jobs: run: python3 -B -m unittest discover -s tests -p test_public_shop_data.py - name: Browser data-validation controls run: node --test tests/test_public_shop_frontend.mjs + - name: Museum source projection and refusal controls + run: | + python3 -B -m unittest discover -s tests -p test_museum_data.py + python3 -B tools/museum_check.py + node --test tests/test_museum_geometry.mjs - name: Pinned public source readback and interaction harness run: python3 -B tools/public_shop_check.py diff --git a/README.md b/README.md index 967b149e8..1ffec061b 100644 --- a/README.md +++ b/README.md @@ -90,3 +90,7 @@ Start with [CONTRIBUTING.md](CONTRIBUTING.md) and [AGENTS.md](AGENTS.md). New wo ## License and citation Released under the [MIT License](LICENSE). Citation metadata is in [CITATION.cff](CITATION.cff). + +## Verification museum + +Open the [claim cards and source-bound exhibits](https://d6g8k5htny-coder.github.io/main/site/museum.html) for quoted scopes, proof/review identities, and replay links. The [packet list](https://d6g8k5htny-coder.github.io/main/site/museum.html#packets) shows submissions present in its pinned default-branch snapshot; packets are not STATUS. The museum uses the Math checkout and query checkout pinned above. [Display documentation](docs/site/README.md) explains its snapshots and limits. diff --git a/docs/PUBLIC_SHOP_SETUP.md b/docs/PUBLIC_SHOP_SETUP.md index fb94b242a..c6fc3e408 100644 --- a/docs/PUBLIC_SHOP_SETUP.md +++ b/docs/PUBLIC_SHOP_SETUP.md @@ -1,6 +1,6 @@ # Public shop deployment and contribution board -Scientific effect: **NONE**. This page records verified public deployment and the remaining review-settings configuration. A live site or installed setting does not promote mathematical status. +Scientific effect: **NONE**. This page records verified public deployment and review-settings installation. A live site or installed setting does not promote mathematical status. ## Pages @@ -26,7 +26,7 @@ The first five bounded tasks are [#141](https://github.com/d6g8k5htny-coder/main **Math- verified active:** [Proof vault: reviewed changes](https://github.com/d6g8k5htny-coder/Math-/rules/24045351) protects its default `main` branch. It requires a pull request, at least one approving review, approval of the most recent reviewable push, dismissal of stale approvals, resolved conversations, and an up-to-date **math-downstream-gates** check from GitHub Actions. Force pushes and deletion are blocked; the bypass list is empty. -**Main intended configuration; the tightened settings still require a separate installation receipt.** In [main branch settings](https://github.com/d6g8k5htny-coder/main/settings/branches), require a pull request, at least one approving review, approval of the most recent reviewable push, and passing **verify**, **public-shop**, and **public-intake** checks. The external results guard is **public-intake**; its tests are a different check. A green replay is not mathematical acceptance. Do not grant outsiders direct write access. +**Main verified active:** [Verified pull requests](https://github.com/d6g8k5htny-coder/main/rules/23798639) requires a pull request, at least one approving review, approval of the most recent reviewable push, dismissal of stale approvals, resolved conversations, and up-to-date **verify**, **public-shop**, and **public-intake** checks from GitHub Actions. Force pushes and deletion are blocked. The existing repository-admin bypass is restricted to pull requests; it was not expanded. See the [installation receipt](https://github.com/d6g8k5htny-coder/main/pull/149#issuecomment-5848091891), recorded separately from the deployment PR. The external results guard is **public-intake**; its tests are a different check. A green replay is not mathematical acceptance. Do not grant outsiders direct write access. A check name alone does not authenticate the workflow. Before merging an intake PR, inspect the **trusted public-intake workflow**, its `pull_request_target` event, the precise reviewed PR head, and the pass result. Administrative override must not be treated as a scientific review. diff --git a/docs/site/IMPLEMENTATION.md b/docs/site/IMPLEMENTATION.md new file mode 100644 index 000000000..461c77211 --- /dev/null +++ b/docs/site/IMPLEMENTATION.md @@ -0,0 +1,45 @@ +# Verification museum implementation plan + +> For agentic workers: use the subagent-driven-development workflow for the independent projection, display, and geometry tasks; root owns integration and release. + +**Goal:** Expose pinned public mathematics, its exact scoped reviews and open limits, and landed intake packets without changing scientific status. + +**Architecture:** Extend the existing static Pages shop with a separate museum page and a small reproducible display projection. Reuse the existing public-math inventory and trusted incoming guard. Geometry explains source language; it is never replay evidence or an acceptance register. + +**Tech stack:** Python standard library exporter and checks, vanilla ES modules/SVG, an isolated optional Three.js scene with a 2D fallback. + +**Spec:** Owner's PUBLIC VERIFICATION DISPLAY + INTAKE ENGINEERING contract, 2026-09-26; W1–W12 are mapped below. + +## Global constraints + +- Scientific effect NONE. STATUS, proof bodies, review dispositions, and vault claims stay byte-identical. +- Math snapshot: `d6628da09384728992dcbe6e921cc28ba85aebb0`; main snapshot: `71400b94f6cb354a8cf7aba73ffede2138a64efa`. +- Existing STATUS/inventory snapshot and SIDE24 enclosure pins remain historical and explicit; query checkout stays `c88768bb11efd1f7d6bda188f13064bedec54a06`. +- Every exhibit names its object, class, repository/path, full commit and SHA-256, and states: “This canvas explains the pinned source. It is not a proof and does not change status.” +- No new repository or source inventory. No live field sampling. No outsider write or automatic packet promotion. +- One main PR, draft until its hosted checks pass. Do not touch files owned by open PRs; specifically leave `docs/NAVIGATION.json` to #125 and the draft packet in #150 to its author. + +## Tasks and verification + +- [x] **W1–W2: exact claim projection.** `tools/museum_data.py` regenerates `docs/site/museum.json`: all 11 reviewed-result bullets and three AMEND rows, each with immutable proof/review identities. Preserve EXACT_COUNTEREXAMPLE and review-pointer limitations. Tests reject changed source bytes, quotes and invented acceptance. `museum.html`, `museum.mjs`, and `museum.css` show claim/source/replay columns and an engineering strip. +- [x] **W3/W8: existing-shop integration.** Complete the SIDE24 visible identity contract, link the museum, and filter the original catalog by repository/path. Keep exact decimal endpoints. Replace the mutable browser ref fetch with the pinned query identity and local check instructions. Exercise real HTML IDs and filter behavior. +- [x] **W4–W7: scoped exhibits.** Show a fixture-absent D2 card; EC-014 frame with camera orbit and 2D fallback; fixed-remote and fixed-annulus diagrams with OPEN complements; source-stated P15 finite example. Test displayed domains and controls; do not invent bounds or certifying samples. +- [x] **W9: landed packets.** Project only the single packet present at the main snapshot, with RESULT identity, issue not stated, and “packet — not STATUS.” Reject draft-PR inclusion and unknown source identity. +- [x] **W10–W11: retain intake/replay.** Existing trusted `public-intake.yml`, guard, task form, manual claim protocol and SIDE24 notebook already implement these lanes. The audit found no missing write-isolation feature. +- [x] **W12/release.** Keep README and Math/query pins consistent. Run existing navigation, intake and public-shop checks plus new projection/view checks. Review the entire diff, then attach every touched file's commit and SHA-256 to the single PR. Hosted CI must pass before readiness; deploy only through the repository's permitted merge path. + +## Review focus + +- D5 fixed-annulus ACCEPT must never relabel the open pin-neighborhood/microdisk scope. +- Imported EC-014 self-labels are custody bytes, not adopted dispositions. +- Mutable review comments receive a pinned pointer identity, never an invented comment digest. +- Missing WebGL or unavailable source bytes leaves readable fallback/absence states, not a success badge. +- A packet is listed only from the pinned default snapshot; no result is promoted onto claim cards. + +## Audit baseline + +Current defaults and the live Pages site were inspected. Main's 17 open PR file lists were checked before edits. The baseline passed 85 Python tests and 16 frontend controls. Math and query need no PR. No committed lifetime sample was found, so the implementation uses the expressly allowed fixture-absent card. + +## Pre-publication validation + +The implementation passed 97 Python tests in normal and optimized modes; 16 existing frontend controls, four shop interaction controls, 15 museum frontend/integration controls, and eight geometry controls. Public source readback, navigation and landing checks passed. Independent source/scope and engineering reviews found no remaining critical or important findings after the source-association and bounded-fetch fixes. No scientific source/status file changed. Hosted PR checks and publication are release gates; these local checks do not assert deployment or successful GPU rendering. diff --git a/docs/site/README.md b/docs/site/README.md index d14db17e1..236be979f 100644 --- a/docs/site/README.md +++ b/docs/site/README.md @@ -4,7 +4,7 @@ This static viewer makes the existing public work easier to read. It does not ow **Live:** [Open the public research shop](https://d6g8k5htny-coder.github.io/main/site/). Coordinate a bounded contribution on the [Public contributions board](https://github.com/users/d6g8k5htny-coder/projects/1/views/1). -- **Board:** a mechanically exported, byte-bound `STATUS.md` snapshot. Counts refer to the selected rows, with full scope and limits. API observations are dated separately. +- **Board:** a mechanically exported, byte-bound `STATUS.md` snapshot. Counts refer to the selected rows, with full scope and limits. Historical observations are dated separately; Pages does not fetch a mutable ref. - **SIDE24 explorer:** exact decimal endpoints from pinned public JSON; approximate bar lengths are NON-CERTIFYING. No lifetime curve, random field simulation, or new bound is generated. - **Inventory browser:** reads the existing `docs/public-math/sources.json` and its fourteen hash-verified shards. No second inventory is created. - **Contributions:** GitHub issues and incoming-only result PRs. The viewer has no upload endpoint, credentials, write token, or backend. @@ -27,7 +27,7 @@ node --test tests/test_public_shop_frontend.mjs python3 -B tools/public_shop_check.py ``` -The interaction harness tests loading, searching, exact decimal selection and commit currency; it is not a visual browser test. Local-server preview was unavailable in the editing environment. After deployment on 2026-09-26, the live Pages site was checked in a real browser: all 2,138 original catalog records loaded and the exact SIDE24 source bytes verified. +The interaction harness tests loading, searching, exact decimal selection and pinned query identity; it is not a visual browser test. Local-server preview was unavailable in the editing environment. The baseline live Pages site was checked in a real browser on 2026-09-26: all 2,138 original catalog records loaded and the exact SIDE24 source bytes verified. This baseline check does not validate a later museum deployment. Reproduce the exports with `python3 -B tools/public_shop_data.py --check`. The exporter uses fixed source identities, refuses changed bytes or unfamiliar tables, and preserves verbatim cells. Updating the snapshot requires an explicit source-bound engineering PR; this viewer never decides a review disposition. @@ -39,4 +39,30 @@ The [SIDE24 notebook](../notebooks/SIDE24_PUBLIC_COEFFICIENTS.ipynb) exposes the GitHub Pages is configured as **Deploy from a branch → main → /docs**. The entry `docs/index.html` points to `site/`; `docs/.nojekyll` serves static files. The verified destination is [https://d6g8k5htny-coder.github.io/main/site/](https://d6g8k5htny-coder.github.io/main/site/). GitHub's branch publishing supports `/` or `/docs`, so `docs/site` is the app directory, not a selectable publishing root. -See the [deployment and review settings record](../PUBLIC_SHOP_SETUP.md). Pages, the public Project, the four profile pins, and Math-'s proof-vault branch rules have been activated. Main's tightened review settings remain intended configuration pending separate verification; a public site does not establish branch protection or mathematical acceptance. +See the [deployment and review settings record](../PUBLIC_SHOP_SETUP.md). Pages, the public Project, the four profile pins, and the main/Math- branch rules have installation receipts. A public site does not establish branch protection or mathematical acceptance. + +## Claim cards and exhibits + +Open [the verification museum](museum.html). Its small `museum.json` display projection is reproduced by `tools/museum_data.py`; it is not a replacement for the 2,138-row public inventory. The generator preserves all eleven bullets in Math-'s “Reviewed scoped results” and the three STATUS AMEND rows verbatim. An EXACT_COUNTEREXAMPLE retains that label; publication of a source does not make its claim accepted. Where a review is a GitHub comment, the displayed digest identifies the pinned index pointer, not mutable comment bytes. + +The museum binds Math sources to `d6628da09384728992dcbe6e921cc28ba85aebb0` and main source/packet membership to `71400b94f6cb354a8cf7aba73ffede2138a64efa`. The existing board/inventory pin `a26f744be7597e3f0c0543c34ead23049bbac657` and SIDE24 import pin `9d7b6802424fb4715b31999066aafca8ee2f3cca` remain explicit historical identities. Neither changes the README's Math checkout or query checkout. No source fetch selects an AMEND branch. + +Claims use claim/scope, source/review, and replay columns. Missing recorded replay commands are disclosed. The separate engineering strip and CI links do not attest to mathematical acceptance. D5's reviewed fixed-annulus region and its open pin-neighborhood/microdisk work remain separate objects. + +- EC-014 illustrates the two-pin frame and six data coordinates. Camera motion is presentation, not a replay of its Jacobian argument. Imported self-labels are not adopted. +- D4/D5 diagrams show only their stated fixed regions, with OPEN complements. Diagram dimensions are schematic, not certified constants. +- P15 illustrates the source's stated finite realized-family example, with no unrestricted prize claim. +- D2 has a **fixture absent** card: no committed lifetime/barcode samples were found in the audited defaults. No synthetic proof data or live Gaussian sampler is supplied. +- The packet list contains only the one package in the pinned main snapshot. Later or unmerged PRs are excluded until a reviewed engineering refresh. Every row says **packet — not STATUS**. + +```sh +python3 -B -m unittest discover -s tests -p test_museum_data.py +python3 -B tools/museum_check.py +node --test tests/test_museum_geometry.mjs +``` + +Existing intake enforcement remains `.github/workflows/public-intake.yml` and `tools/public_intake_check.py`: trusted `pull_request_target` code, no packet execution, incoming-only files, bounded identities, and a documented credential-pattern scan. The scan is not comprehensive. Task claims remain the human protocol in CONTRIBUTING; display inclusion never replaces review. + +`museum_check.py` reads the pinned public bytes, checks regeneration, and exercises the actual committed manifest through the display code with the declared HTML containers. It also tests refusal of cross-claim proof, scope and replay substitutions. It is an integration harness, not a browser layout or GPU test. `museum_data.py --check` remains available for export-only reproduction. + +The [implementation record](IMPLEMENTATION.md) maps W1–W12, coordination exclusions, and validation boundaries. diff --git a/docs/site/app.js b/docs/site/app.js index ef8e3704c..5bfbcb8a6 100644 --- a/docs/site/app.js +++ b/docs/site/app.js @@ -3,6 +3,7 @@ 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;}; const error=(id,e)=>{el(id).textContent=`Unavailable: ${e.message}. No result inferred.`;el(id).className='error';}; const link=(text,url)=>{const a=node('a',text);a.href=url;return a;}; +const disclaimer='This canvas explains the pinned source. It is not a proof and does not change status.'; // Small safe renderer: links to this public GitHub owner; no HTML execution. function cell(target,text,base) { const re=/\[([^\]]+)\]\(([^)]+)\)/g;let start=0; @@ -16,22 +17,33 @@ function cell(target,text,base) { target.append(document.createTextNode(text.slice(start).replace(/\*\*|`/g,''))); } function identity(target,pin) { - for(const [label,value] of [['Commit',pin.commit],['Path',pin.path],['SHA-256',pin.sha256],['Bytes',pin.bytes]]) { + for(const [label,value] of [['Repository',pin.repository],['Path',pin.path],['Commit',pin.commit],['SHA-256',pin.sha256],['Bytes',pin.bytes]]) { const p=node('p');p.append(node('strong',label+': '),node('code',String(value)));target.append(p); } const url=pin.url||pin.raw_url;if(url)target.append(link('Read the pinned public bytes ↗',url)); } +function sourceHeader(target,object,classification,pin) { + const header=node('div',undefined,'source-header'); + for(const [label,value] of [['Object ID',object],['Class',classification]]) { + const p=node('p');p.append(node('strong',label+': '),node('span',value));header.append(p); + } + identity(header,pin);header.append(node('p',disclaimer,'canvas-disclaimer'));target.append(header); +} async function board(config) { const s=validateStatus(await verifiedJSON(config.status_json)); await verifiedBytes(s.source); const base=`https://github.com/d6g8k5htny-coder/main/blob/${s.source.commit}/`; el('status-note').textContent=`Snapshot ${s.snapshot_date}. Counts cover the selected rows below, not every theorem or artifact. ${s.meaning}`; const labels={accept:'ACCEPT — scoped',amend:'AMEND / open',engineering:'Engineering only'}; + const classes={accept:'ACCEPT-scoped',amend:'AMEND/open',engineering:'engineering-only'}; for(const section of s.sections) { - const card=node('article',undefined,section.key);card.append(node('span',String(section.count),'count'),node('h3',labels[section.key]),node('p','Selected source rows; read the scope below.'));el('counts').append(card); + const card=node('article',undefined,section.key);card.append(node('span',String(section.count),'count'),node('h3',labels[section.key]),node('p','Selected source rows; read the scope below.')); + sourceHeader(card,'status-count-'+section.key,'engineering-only',s.source);el('counts').append(card); const details=node('details',undefined,'status-group');details.append(node('summary',`${labels[section.key]} · ${section.count}`)); for(const row of section.rows) { const article=node('article',undefined,'status-object');const title=node('h4');cell(title,row[0],base);article.append(title); + const object=row[0].replace(/\[([^\]]+)\]\([^)]+\)/g,'$1').replace(/\*\*|`/g,''); + article.setAttribute('data-class',classes[section.key]);sourceHeader(article,object,classes[section.key],s.source); row.slice(1).forEach((c,i)=>{const p=node('p');p.append(node('strong',section.headers[i+1]+': '));cell(p,c,base);article.append(p);});details.append(article); }el('status-rows').append(details); } @@ -51,6 +63,7 @@ function drawCoefficient(data,dimension) { } async function coefficients(config) { const data=validateCoefficient(await verifiedJSON(config.coefficient)); + sourceHeader(el('coefficient-source'),'D3 SIDE24 · '+data.object,'engineering-only',config.coefficient); el('coefficient-state').textContent='SHA-256 and byte count verified. Exact endpoints shown verbatim.'; el('proof-link').href=`https://github.com/d6g8k5htny-coder/Math-/blob/${config.proof.commit}/${config.proof.path}`; identity(el('coefficient-identity'),config.coefficient);el('coefficient-identity').append(node('p',data.method),node('p',`Original source scope: ${data.scope}`)); @@ -67,10 +80,14 @@ async function inventory(config) { })); const rows=chunks.flat();if(rows.length!==index.source_count)throw new Error('Catalog total mismatch'); let limit=50; - const render=()=>{const query=el('search').value.trim().toLowerCase();const matches=rows.filter(row=>[row.repository,row.path,row.commit,row.sha256].some(s=>s.toLowerCase().includes(query)));el('catalog').replaceChildren(); + const render=()=>{const query=el('search').value.trim().toLowerCase(),repository=el('repository-filter').value,path=el('path-filter').value.trim().toLowerCase(); + const matches=rows.filter(row=>(!repository||row.repository===repository)&&row.path.toLowerCase().includes(path)&&[row.repository,row.path,row.commit,row.sha256].some(s=>s.toLowerCase().includes(query)));el('catalog').replaceChildren(); matches.slice(0,limit).forEach(row=>{const tr=node('tr'),name=node('td'),commit=node('td'),hash=node('td');name.append(node('small',row.repository),link(row.path,safeSourceURL(row)));commit.append(node('code',row.commit));hash.append(node('code',row.sha256));tr.append(name,commit,hash);el('catalog').append(tr);}); el('inventory-state').textContent=`${matches.length.toLocaleString()} matches · ${Math.min(limit,matches.length)} shown · all 2,138 source records loaded from the original hash-verified shards.`;el('more').hidden=matches.length<=limit;}; - el('search').disabled=false;el('search').addEventListener('input',()=>{limit=50;render();});el('more').addEventListener('click',()=>{limit+=50;render();});render(); + for(const [id,event] of [['search','input'],['repository-filter','change'],['path-filter','input']]) { + el(id).disabled=false;el(id).addEventListener(event,()=>{limit=50;render();}); + } + el('more').addEventListener('click',()=>{limit+=50;render();});render(); } async function custody(config) { const manifest=await verifiedJSON(config.imports); @@ -78,11 +95,11 @@ async function custody(config) { const observed=config.observations; el('custody-note').textContent=`${config.imports.count} byte-copy imports landed at Math ${config.imports.commit}; source labels were not adopted. ${observed.open_math_prs} Math PRs were open when observed ${observed.observed_at}. An open PR is not landed math.`; el('custody-note').append(' ',link('Import identities ↗',config.imports.manifest_url)); - const q=config.query;const bundle=await verifiedJSON(q);if(bundle.math_tip!==q.math_pin||bundle.scientific_status_authority!==false)throw new Error('Query source mismatch');el('query-note').textContent=`Query checkout ${q.commit}; recorded Math commit ${q.math_pin}. --check-math-tip checks seven file identities, not commit equality. The button below checks commit currency only.`; + const q=config.query;const bundle=await verifiedJSON(q);if(bundle.math_tip!==q.math_pin||bundle.scientific_status_authority!==false)throw new Error('Query source mismatch'); if(!hex40.test(q.math_pin)||!hex40.test(q.commit))throw new Error('Query pin unavailable'); - el('check-tip').disabled=false;el('check-tip').addEventListener('click',async()=>{el('check-tip').disabled=true;el('tip-result').textContent='Reading current public Math ref…'; - try{const r=await fetch('https://api.github.com/repos/d6g8k5htny-coder/Math-/git/ref/heads/main',{credentials:'omit',redirect:'error'});if(!r.ok)throw new Error(`GitHub API ${r.status}`);const ref=await r.json(),tip=ref.object?.sha;if(!hex40.test(tip)||ref.ref!=='refs/heads/main')throw new Error('Unexpected ref response');const same=tip===q.math_pin;el('tip-result').className=same?'good':'error';el('tip-result').textContent=`${same?'Commit pin current':'Commit pin differs'} at ${new Date().toISOString()}: Math ${tip}. Gate-byte equality was not tested by this browser check.`; - }catch(e){error('tip-result',e);}finally{el('check-tip').disabled=false;}}); + identity(el('query-identity'),q);el('query-identity').append(node('p','Recorded Math commit: '+q.math_pin)); + el('query-note').textContent='To compare the seven pinned gate-file identities with current public Math bytes, run this command locally from the pinned query checkout: '; + el('query-note').append(node('code','python -B -S verify_portable_stubs.py --check-math-tip'),node('span','. The command checks file bytes, not commit equality. This page reads only the pinned bundle and performs no live tip check.')); } try { const response=await fetch('config.json',{credentials:'omit'});if(!response.ok)throw new Error('Shop config unavailable');const config=await response.json(); diff --git a/docs/site/geometry.mjs b/docs/site/geometry.mjs new file mode 100644 index 000000000..c25a76f8f --- /dev/null +++ b/docs/site/geometry.mjs @@ -0,0 +1,398 @@ +// Illustrations only. Source bytes are verified by the detail-page caller before +// mounting; this module additionally binds each visual to its declared source. +export const THREE_CDN = Object.freeze({ + version: '160', + url: 'https://cdn.jsdelivr.net/npm/three@0.160.0/build/three.js', + integrity: 'sha384-ADduDXZ84mYNs9BwgDbfsq8503KaK0OzR6s3AFB6fclZoaXtLa7zmoXdmbFSEptM' +}); + +const SOURCE_PATHS = Object.freeze({ + ec014: 'imports/hardening_ebedb780/EC-014/proof.md.export.txt', + remote: 'frontiers/remote_window_20260924/PROOF.md', + annulus: 'frontiers/rn_annulus_bridge_20260925/PROOF.md', + p15: 'frontiers/full_price_20260924/PROOF.md' +}); +const SVG_NS = 'http://www.w3.org/2000/svg'; +const ink = '#162f36', teal = '#07596c', amber = '#986323', pale = '#e0ece8'; + +function positive(value, name) { + if (!Number.isFinite(value) || value <= 0) throw new Error(`${name} must be finite and positive`); + return value; +} + +export function ec014Model(r = 1) { + positive(r, 'r'); + return { + pins: [{ name: 'M', t: -r / 2, s: 0 }, { name: 'S', t: r / 2, s: 0 }], + rawRows: ['f(M)', 'f(S)', 'f_t(M)', 'f_s(M)', 'f_t(S)', 'f_s(S)'], + correctedRows: ['V+', 'V-_corr', 'G_t+', 'G_t-', 'G_s+', 'G_s-'] + }; +} + +// These membership helpers describe scope; they do not estimate the field, +// evaluate Kac–Rice, supply theorem constants, or replay an analytic proof. +export function remoteModel({ L, rho }) { + positive(L, 'L'); positive(rho, 'rho'); + if (rho >= L / 4) throw new Error('The fixed exclusion radius must satisfy 0 < rho < L/4'); + return { + L, rho, heightScope: 'between-pin heights only', + contains({ distance, height, b, k, r }) { + positive(k, 'k'); positive(r, 'r'); + if (![distance, height, b].every(Number.isFinite) || distance < 0) return false; + return distance >= rho && height > b - k * r ** 3 && height < b; + } + }; +} + +export function annulusModel({ A, B, dimension = 2 }) { + if (dimension !== 2 || !Number.isFinite(A) || !Number.isFinite(B) || A <= 1 || B <= A) + throw new Error('The fixed annulus requires dimension 2 and finite 1 < A < B'); + return { + A, B, dimension, heightScope: 'all heights', + containsPhysical({ x, y, r }) { + positive(r, 'r'); + if (![x, y].every(Number.isFinite)) return false; + const scaledRadius = Math.hypot(x / r, y / r); + return scaledRadius >= A && scaledRadius <= B; + } + }; +} + +export function p15Model(selection = [0, 1, 2]) { + if (!Array.isArray(selection) || selection.some(v => !Number.isInteger(v) || v < 0 || v > 2) || new Set(selection).size !== selection.length) + throw new Error('Select a subset of the three original coordinates'); + const selected = [...selection].sort(); + const decomposable = selected.length <= 2; + return { + selected, a: 1, d: 2, n: 3, K: 2, macroEdges: [], decomposable, + parts: decomposable ? [selected.slice(0, 1), selected.slice(1, 2)] : null + }; +} + +function element(tag, text, attributes = {}) { + const node = document.createElement(tag); + if (text !== undefined) node.textContent = text; + for (const [key, value] of Object.entries(attributes)) node.setAttribute(key, value); + return node; +} +function shape(tag, attributes = {}, text) { + const node = document.createElementNS(SVG_NS, tag); + for (const [key, value] of Object.entries(attributes)) node.setAttribute(key, value); + if (text !== undefined) node.textContent = text; + return node; +} +function label(svg, x, y, text, attrs = {}) { + svg.append(shape('text', { x, y, fill: ink, 'font-size': 17, 'font-family': 'system-ui, sans-serif', ...attrs }, text)); +} +function line(svg, x1, y1, x2, y2, attrs = {}) { + svg.append(shape('line', { x1, y1, x2, y2, stroke: ink, 'stroke-width': 2, ...attrs })); +} +function visual(title, description, viewBox = '0 0 720 360') { + const figure = element('figure', undefined, { class: 'museum-visual illustration' }); + const svg = shape('svg', { viewBox, role: 'img', 'aria-label': `${title}. ${description}` }); + svg.append(shape('title', {}, title), shape('desc', {}, description)); + figure.append(svg, element('figcaption', description)); + return { figure, svg }; +} +function boundary(host, text) { host.append(element('p', text, { class: 'boundary' })); } + +function ec014Plan() { + const result = visual('EC014 two-pin coordinate plane', 'Illustration: pin separation represents r > 0; t is longitudinal and s is transverse. No field values or surface are invented.'); + const { svg } = result; + svg.append(shape('rect', { x: 24, y: 24, width: 672, height: 296, rx: 12, fill: '#eef3ef', stroke: '#c6d4cd' })); + line(svg, 65, 176, 662, 176, { stroke: '#829b94' }); + line(svg, 360, 50, 360, 300, { stroke: '#829b94' }); + label(svg, 668, 181, 't'); label(svg, 370, 55, 's'); + for (const [name, x, formula, color] of [['M', 225, '(−r/2, 0)', teal], ['S', 495, '(r/2, 0)', amber]]) { + svg.append(shape('circle', { cx: x, cy: 176, r: 10, fill: color })); + label(svg, x, 140, name, { 'text-anchor': 'middle', 'font-size': 23, 'font-weight': 700 }); + label(svg, x, 211, formula, { 'text-anchor': 'middle' }); + } + line(svg, 225, 255, 495, 255); + line(svg, 225, 248, 225, 262); line(svg, 495, 248, 495, 262); + label(svg, 360, 280, 'r > 0', { 'text-anchor': 'middle' }); + return result.figure; +} + +function addRows(host) { + const model = ec014Model(); + const table = element('table', undefined, { 'aria-label': 'Declared ordered six-pin data and corrected frame' }); + const head = element('thead'); const row = element('tr'); + row.append(element('th', 'Order'), element('th', 'Raw vector X_r'), element('th', 'Corrected vector Y_r')); + head.append(row); table.append(head); + const body = element('tbody'); + model.rawRows.forEach((raw, i) => { + const entry = element('tr'); + entry.append(element('td', String(i + 1)), element('td', raw), element('td', model.correctedRows[i])); + body.append(entry); + }); + table.append(body); host.append(table); + host.append(element('p', 'Source identity: det T_r = −r⁻⁵ in these exact row and column orders. The diagram illustrates the six data labels; it does not replay the Jacobian proof or compute a full contact coefficient.', { class: 'muted' })); +} + +function drawRemote(host) { + const { figure, svg } = visual('Fixed remote region and between-pin height window', 'Schematic on the torus: the fixed exterior Dρ is paired only with the shrinking open height window. Diagram distances and heights are not numerical estimates.'); + svg.append(shape('path', { d: 'M24 45H434V315H24Z M229 85A95 95 0 1 0 229 275A95 95 0 1 0 229 85Z', 'fill-rule': 'evenodd', fill: pale })); + svg.append(shape('rect', { x: 24, y: 45, width: 410, height: 270, fill: 'none', stroke: '#b1c7bd', 'stroke-width': 2 })); + svg.append(shape('circle', { cx: 229, cy: 180, r: 95, fill: 'none', stroke: teal, 'stroke-width': 2 })); + label(svg, 42, 75, 'Dρ: dist_X(x, 0) ≥ ρ', { 'font-size': 18, 'font-weight': 700 }); + label(svg, 229, 229, 'excluded interior', { 'text-anchor': 'middle', fill: '#586d6e', 'font-size': 15 }); + line(svg, 229, 180, 308, 129); label(svg, 282, 141, 'ρ fixed', { 'font-size': 15 }); + for (const [x, name, color] of [[203, 'M', teal], [255, 'S', amber]]) { + svg.append(shape('circle', { cx: x, cy: 180, r: 6, fill: color })); label(svg, x, 164, name, { 'text-anchor': 'middle' }); + } + label(svg, 229, 341, '0 < ρ < L/4; ρ does not shrink with r', { 'text-anchor': 'middle', 'font-size': 15 }); + svg.append(shape('rect', { x: 495, y: 126, width: 184, height: 94, fill: pale })); + line(svg, 480, 58, 480, 300, { stroke: '#829b94' }); + line(svg, 495, 126, 679, 126, { 'stroke-dasharray': '5 5', stroke: teal }); + line(svg, 495, 220, 679, 220, { 'stroke-dasharray': '5 5', stroke: teal }); + label(svg, 590, 82, 'HEIGHT', { 'text-anchor': 'middle', 'font-size': 15 }); + label(svg, 590, 111, 'b', { 'text-anchor': 'middle' }); + label(svg, 590, 252, 'b − kr³', { 'text-anchor': 'middle' }); + label(svg, 590, 170, 'open window', { 'text-anchor': 'middle', 'font-size': 16 }); + label(svg, 590, 196, 'length kr³', { 'text-anchor': 'middle', 'font-size': 16 }); + host.append(figure); + boundary(host, 'FIXED REMOTE SCOPE — between-pin heights only: b − kr³ < f(x) < b, E ⊆ Dρ and fixed 0 < ρ < L/4. No fixed-remote all-height estimate is shown.'); +} + +function drawAnnulus(host) { + const { figure, svg } = visual('Fixed scaled annulus and open omitted regions', 'Dimension 2; physical points belong to rE for E ⊆ K_AB and fixed 1 < A < B < ∞. The shaded annulus permits all heights. Dashed regions remain OPEN; radii are symbolic.', '0 0 720 400'); + svg.append(shape('path', { d: 'M260 62A140 140 0 1 0 260 342A140 140 0 1 0 260 62Z M260 114A88 88 0 1 0 260 290A88 88 0 1 0 260 114Z', 'fill-rule': 'evenodd', fill: pale })); + for (const radius of [88, 140]) svg.append(shape('circle', { cx: 260, cy: 202, r: radius, fill: 'none', stroke: teal, 'stroke-width': 2 })); + svg.append(shape('circle', { cx: 260, cy: 202, r: 177, fill: 'none', stroke: amber, 'stroke-width': 2, 'stroke-dasharray': '7 6' })); + line(svg, 260, 202, 323, 141, { stroke: '#68857a' }); label(svg, 289, 181, 'Ar', { 'font-size': 16 }); + line(svg, 260, 202, 369, 289, { stroke: '#68857a' }); label(svg, 334, 250, 'Br', { 'font-size': 16 }); + for (const [x, name, color] of [[231, 'M', teal], [289, 'S', amber]]) { + svg.append(shape('circle', { cx: x, cy: 202, r: 20, fill: 'none', stroke: amber, 'stroke-width': 2, 'stroke-dasharray': '5 4' })); + svg.append(shape('circle', { cx: x, cy: 202, r: 5, fill: color })); + label(svg, x, 234, name, { 'text-anchor': 'middle', 'font-size': 15 }); + } + label(svg, 260, 104, 'rE: all heights', { 'text-anchor': 'middle', 'font-size': 18, 'font-weight': 700 }); + label(svg, 490, 65, 'OPEN REGIONS', { fill: amber, 'font-weight': 700 }); + label(svg, 490, 99, 'Pin neighborhoods', { 'font-size': 16 }); + label(svg, 490, 129, 'Intermediate scales', { 'font-size': 16 }); + label(svg, 490, 152, 'r ≪ distance ≪ ρ', { 'font-size': 15 }); + svg.append(shape('rect', { x: 480, y: 177, width: 220, height: 147, rx: 8, fill: 'none', stroke: amber, 'stroke-width': 2, 'stroke-dasharray': '7 6' })); + for (const x of [574, 604]) svg.append(shape('circle', { cx: x, cy: 219, r: 24, fill: 'none', stroke: amber, 'stroke-width': 2, 'stroke-dasharray': '4 4' })); + label(svg, 590, 269, 'Witness–witness', { 'text-anchor': 'middle', 'font-size': 16 }); + label(svg, 590, 293, 'shrinking separation', { 'text-anchor': 'middle', 'font-size': 15 }); + host.append(figure); + boundary(host, 'FIXED ANNULUS CANDIDATE — d = 2, fixed 1 < A < B < ∞, physical rE, all heights. Dashed pin neighborhoods, intermediate scales and witness–witness collisions remain OPEN. This is not a solved full plane or all-scales RN statement.'); +} + +function drawP15(host) { + const selected = new Set([0, 1, 2]); + let paletteReversed = false; + const { figure, svg } = visual('Three-coordinate realized capacity family', 'One original block with a = 1, d = 2, n = 3, K = 2 and no macro edges. Lines show pair capacity conflicts; they are not macro-clutter edges.'); + const controls = element('div', undefined, { class: 'geometry-controls', role: 'group', 'aria-label': 'Choose a subset of the three coordinates' }); + const status = element('p', undefined, { role: 'status', 'aria-live': 'polite' }); + const palette = element('p'); + const vertices = []; + function redraw() { + const model = p15Model([...selected]); + svg.replaceChildren(shape('title', {}, 'Capacity-one conflicts on three coordinates')); + const positions = [[160, 92], [65, 268], [255, 268]]; + for (const [a, b] of [[0, 1], [0, 2], [1, 2]]) line(svg, ...positions[a], ...positions[b], { stroke: selected.has(a) && selected.has(b) ? '#879c95' : '#cdd7d2', 'stroke-width': 3, 'stroke-dasharray': selected.has(a) && selected.has(b) ? 'none' : '5 5' }); + const colors = paletteReversed ? [amber, teal] : [teal, amber]; + positions.forEach(([x, y], i) => { + const slot = model.parts?.findIndex(part => part.includes(i)) ?? -1; + const fill = !selected.has(i) ? '#f6f5f0' : slot >= 0 ? colors[slot] : '#58746d'; + svg.append(shape('circle', { cx: x, cy: y, r: 29, fill, stroke: ink, 'stroke-width': 2 })); + label(svg, x, y + 7, `x${i + 1}`, { 'text-anchor': 'middle', fill: selected.has(i) ? '#ffffff' : ink, 'font-size': 21, 'font-weight': 700 }); + vertices[i]?.setAttribute('aria-pressed', String(selected.has(i))); + }); + label(svg, 355, 92, 'Two palette classes', { 'font-size': 21, 'font-weight': 700 }); + label(svg, 355, 126, 'Each can contain at most one', { 'font-size': 17 }); + label(svg, 355, 154, 'selected coordinate.', { 'font-size': 17 }); + for (let i = 0; i < 2; i++) { + const y = 195 + i * 58; + svg.append(shape('rect', { x: 355, y, width: 305, height: 43, rx: 6, fill: 'none', stroke: colors[i], 'stroke-width': 3 })); + const names = model.parts ? model.parts[i].map(v => `x${v + 1}`).join(', ') || 'empty' : 'no valid partition'; + label(svg, 371, y + 28, `Palette ${i + 1}: ${names}`, { 'font-size': 16, fill: colors[i] }); + } + status.textContent = model.decomposable + ? `Selected ${model.selected.length} of 3: this proper subset is two-decomposable.` + : 'Selected 3 of 3: the full triple is not two-decomposable.'; + palette.textContent = 'K = 2; each palette class is a member of D and has size at most a = 1.'; + } + for (let i = 0; i < 3; i++) { + const button = element('button', `Toggle x${i + 1}`, { type: 'button', 'data-vertex': i, 'aria-pressed': 'true' }); + button.addEventListener('click', () => { selected.has(i) ? selected.delete(i) : selected.add(i); redraw(); }); + vertices.push(button); controls.append(button); + } + const swap = element('button', 'Swap palette colors', { type: 'button' }); + swap.addEventListener('click', () => { paletteReversed = !paletteReversed; redraw(); }); + controls.append(swap); + host.append(figure, controls, status, palette); + boundary(host, 'REALIZED FAMILY ONLY — full-price proof §5: one block, a = 1, d = 2, n = 3, no macro edges, K = 2. This finite illustration does not assert an unrestricted downset or prize result.'); + redraw(); +} + +let threePromise; +function loadThree() { + if (threePromise) return threePromise; + threePromise = new Promise((resolve, reject) => { + const script = document.createElement('script'); + script.src = THREE_CDN.url; + script.integrity = THREE_CDN.integrity; + script.crossOrigin = 'anonymous'; + script.referrerPolicy = 'no-referrer'; + script.async = true; + const timeout = setTimeout(() => reject(new Error('Three.js CDN timed out')), 15000); + script.onload = () => { + clearTimeout(timeout); + if (globalThis.THREE?.REVISION !== THREE_CDN.version) reject(new Error('Unexpected Three.js revision')); + else resolve(globalThis.THREE); + }; + script.onerror = () => { clearTimeout(timeout); reject(new Error('Three.js CDN unavailable or integrity failed')); }; + document.head.append(script); + }); + return threePromise; +} + +let activeSceneCleanup = null; +let sceneRequest = 0; +async function mountEC014(host) { + const request = ++sceneRequest; + activeSceneCleanup?.(); + const fallback = ec014Plan(); + const status = element('p', '2D coordinate diagram. Checking optional 3D view…', { role: 'status', 'aria-live': 'polite', class: 'muted' }); + const stage = element('div', undefined, { class: 'geometry-3d-stage' }); + stage.hidden = true; + stage.style.position = 'relative'; + stage.style.width = '100%'; + const controls = element('div', undefined, { class: 'geometry-controls' }); + host.append(stage, fallback, status, controls); + addRows(host); + boundary(host, 'ILLUSTRATION — camera orbit changes the view only. The pins and six data labels retain their source definitions. No invented field surface, Jacobian proof replay or full contact coefficient is shown.'); + if (!globalThis.WebGLRenderingContext && !globalThis.WebGL2RenderingContext) { + status.textContent = '2D fallback: WebGL is unavailable. All pin coordinates and six data labels remain visible.'; + return { destroy() {} }; + } + let renderer, observer, disposed = false; + const disposables = []; + let cleanup = () => { + if (disposed) return; + disposed = true; + observer?.disconnect(); + for (const resource of disposables) resource.dispose(); + renderer?.dispose(); + renderer?.forceContextLoss(); + if (activeSceneCleanup === cleanup) activeSceneCleanup = null; + }; + try { + const THREE = await loadThree(); + if (request !== sceneRequest) return { destroy() {} }; + const canvas = element('canvas', undefined, { tabindex: '0', role: 'img', 'aria-label': 'EC014 plane and pins. Drag to orbit, or use arrow keys. Camera movement changes the view only.' }); + canvas.style.width = '100%'; canvas.style.height = '350px'; canvas.style.display = 'block'; canvas.style.touchAction = 'none'; + // One renderer owns one canvas/context. No capability-probe canvas is made. + renderer = new THREE.WebGLRenderer({ canvas, antialias: true, alpha: false }); + renderer.setPixelRatio(Math.min(globalThis.devicePixelRatio || 1, 2)); + renderer.setClearColor('#eef3ef'); + const scene = new THREE.Scene(); + const camera = new THREE.PerspectiveCamera(35, 1, 0.1, 40); + const own = resource => { disposables.push(resource); return resource; }; + const plane = new THREE.Mesh(own(new THREE.PlaneGeometry(3, 1.7)), own(new THREE.MeshBasicMaterial({ color: '#dce7df', side: THREE.DoubleSide }))); + plane.rotation.x = -Math.PI / 2; + plane.position.y = -0.02; + scene.add(plane); + function addLine(points, color) { + const geometry = own(new THREE.BufferGeometry().setFromPoints(points.map(p => new THREE.Vector3(...p)))); + const material = own(new THREE.LineBasicMaterial({ color })); + scene.add(new THREE.Line(geometry, material)); + } + addLine([[-1.4, 0, 0], [1.4, 0, 0]], '#829b94'); + addLine([[0, 0, -0.76], [0, 0, 0.76]], '#829b94'); + addLine([[-0.5, 0.012, 0], [0.5, 0.012, 0]], ink); + const tags = []; + for (const [name, x, color] of [['M = (−r/2, 0)', -0.5, teal], ['S = (r/2, 0)', 0.5, amber]]) { + const pin = new THREE.Mesh(own(new THREE.SphereGeometry(0.065, 16, 12)), own(new THREE.MeshBasicMaterial({ color }))); + pin.position.set(x, 0, 0); scene.add(pin); + const tag = element('span', name); + Object.assign(tag.style, { position: 'absolute', transform: 'translate(-50%, -145%)', fontSize: '13px', fontWeight: '700', color, pointerEvents: 'none', whiteSpace: 'nowrap' }); + tags.push({ node: tag, position: new THREE.Vector3(x, 0, 0) }); + } + for (const [name, position] of [['t', [1.35, 0, 0]], ['s', [0, 0, 0.7]]]) { + const tag = element('span', name); + Object.assign(tag.style, { position: 'absolute', transform: 'translate(-50%, -50%)', pointerEvents: 'none', fontWeight: '700' }); + tags.push({ node: tag, position: new THREE.Vector3(...position) }); + } + stage.append(canvas, ...tags.map(t => t.node)); + let yaw = -0.12, elevation = 0.82, width = 720; + function render() { + if (disposed) return; + camera.position.set(4 * Math.cos(elevation) * Math.sin(yaw), 4 * Math.sin(elevation), 4 * Math.cos(elevation) * Math.cos(yaw)); + camera.lookAt(0, 0, 0); camera.updateMatrixWorld(); + renderer.render(scene, camera); + for (const tag of tags) { + const projected = tag.position.clone().project(camera); + tag.node.style.left = `${(projected.x + 1) * width / 2}px`; + tag.node.style.top = `${(1 - projected.y) * 350 / 2}px`; + } + } + function resize() { + width = Math.max(260, stage.clientWidth || host.clientWidth || 720); + renderer.setSize(width, 350, false); + camera.aspect = width / 350; camera.updateProjectionMatrix(); render(); + } + let drag = null; + canvas.addEventListener('pointerdown', event => { + drag = { x: event.clientX, y: event.clientY, id: event.pointerId }; + canvas.setPointerCapture(event.pointerId); + }); + canvas.addEventListener('pointermove', event => { + if (!drag || drag.id !== event.pointerId) return; + yaw -= (event.clientX - drag.x) * 0.008; + elevation = Math.max(0.2, Math.min(1.45, elevation + (event.clientY - drag.y) * 0.008)); + drag.x = event.clientX; drag.y = event.clientY; render(); + }); + for (const type of ['pointerup', 'pointercancel', 'lostpointercapture']) canvas.addEventListener(type, () => { drag = null; }); + canvas.addEventListener('keydown', event => { + if (!['ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown'].includes(event.key)) return; + event.preventDefault(); + if (event.key === 'ArrowLeft') yaw -= 0.12; + if (event.key === 'ArrowRight') yaw += 0.12; + if (event.key === 'ArrowUp') elevation = Math.min(1.45, elevation + 0.1); + if (event.key === 'ArrowDown') elevation = Math.max(0.2, elevation - 0.1); + render(); + }); + canvas.addEventListener('webglcontextlost', () => { + stage.hidden = true; fallback.hidden = false; controls.hidden = true; + status.textContent = '2D fallback: the graphics context became unavailable. The source-defined geometry remains visible.'; + cleanup(); + }); + const reset = element('button', 'Reset camera', { type: 'button' }); + reset.addEventListener('click', () => { yaw = -0.12; elevation = 0.82; render(); }); + const toggle = element('button', 'Show 2D diagram', { type: 'button' }); + toggle.addEventListener('click', () => { + stage.hidden = !stage.hidden; fallback.hidden = !stage.hidden; + toggle.textContent = stage.hidden ? 'Show 3D view' : 'Show 2D diagram'; + if (!stage.hidden) resize(); + }); + controls.append(reset, toggle); + stage.hidden = false; fallback.hidden = true; + status.textContent = '3D coordinate plane: drag with mouse or touch, or focus the canvas and use arrow keys. Orbit is a camera control only.'; + activeSceneCleanup = cleanup; + if (globalThis.ResizeObserver) { observer = new ResizeObserver(resize); observer.observe(stage); } + resize(); + return { destroy: cleanup }; + } catch { + cleanup(); stage.hidden = true; fallback.hidden = false; + status.textContent = '2D fallback: the optional 3D library or WebGL could not load. All pin coordinates and six data labels remain visible.'; + return { destroy() {} }; + } +} + +export async function mountGeometry(host, kind, source, _quote) { + if (!Object.hasOwn(SOURCE_PATHS, kind)) throw new Error('Unsupported geometry exhibit'); + if (!source || source.repository !== 'd6g8k5htny-coder/Math-' || source.path !== SOURCE_PATHS[kind] || + !/^[0-9a-f]{40}$/.test(source.commit) || !/^[0-9a-f]{64}$/.test(source.sha256) || + !Number.isSafeInteger(source.bytes) || source.bytes <= 0) throw new Error('Geometry source identity does not match the exhibit'); + if (!host || typeof host.append !== 'function') throw new Error('A geometry host is required'); + host.setAttribute('data-illustration', kind); + if (kind === 'ec014') return mountEC014(host); + if (kind === 'remote') drawRemote(host); + if (kind === 'annulus') drawAnnulus(host); + if (kind === 'p15') drawP15(host); + return { destroy() {} }; +} diff --git a/docs/site/index.html b/docs/site/index.html index c522fe43f..6dbe9bc70 100644 --- a/docs/site/index.html +++ b/docs/site/index.html @@ -2,23 +2,25 @@ - + Universal Law · Public research shop -
UNIVERSAL LAW PUBLIC RESEARCH
+
UNIVERSAL LAW PUBLIC RESEARCH
-

READ · REPLAY · REVIEW

Research you can open.
Evidence you can trace.

Explore the mathematics, inspect its limits, and contribute a reproducible result. Every view points back to public source bytes.

A plot is not a theorem. Publication, a merge, and green checks do not change mathematical acceptance.

+

READ · REPLAY · REVIEW

Research you can open.
Evidence you can trace.

This site is for verifying Universal Law mathematics. Pictures explain pinned sources. Submissions come back as packets. Status changes only when the maintainers land them.

A plot is not a theorem. Publication, a merge, and green checks do not change mathematical acceptance.

01 / THE BOARD

Read the scope with the status.

Current status source ↗

Loading the committed status snapshot…

-
+

02 / SCOPED EXPLORER

SIDE24 coefficients

Read the full proof ↗

Dimensions 2 and 3, SIDE24, normalized variance-one covariance. This view displays a committed arithmetic enclosure. It supplies no finite-radius error band or lifetime cutoff.

+

Verifying pinned source bytes…

Exact lower endpoint
—
Exact upper endpoint
—
Reference cone moment
—
Approximate display only. Bar lengths use binary floating point; the exact endpoints remain visible at left. The enclosure width is too small to show at this scale.
-

The enclosure retains its original scientific_acceptance: false flag. The board separately quotes the later scoped review. Neither overrides the parent theorem’s open dependencies.

Source identity and method
+

This engineering-only coefficient exhibit retains the artifact’s original scientific_acceptance: false. Read the later scoped coefficient review and its limits separately. The parent theorem’s open dependencies remain open.

Source identity and method

03 / THE EXISTING CATALOG

Find the full argument.

Reading guide ↗

The existing 2,138-file inventory includes proofs, partial arguments, reviews, and historical reading copies. It counts files, not accepted theorems. New imports and proposals have separate public links.

+

Verifying the original inventory and its shards…

Repository / full textCommitSHA-256

04 / JOIN THE WORK

Bring a result. Keep its evidence.

1. Claim a bounded task

Replay a pinned calculation, chart public data, document an import, or leave a source-bound review comment. Comment /claim; wait for assignment and keep one active claim.

Browse public tasks ↗

2. Submit a result PR

Fork main. Add an incoming/<id>/ package with your result, outputs, and source/file identities. Do not edit scientific status rows.

Contribution instructions ↗

3. Review before integration

A designated reviewer checks the sources, scope, and limitations. Intake checks validate packaging; accepted intake is not an accepted theorem.

Public review queue ↗
diff --git a/docs/site/museum.css b/docs/site/museum.css new file mode 100644 index 000000000..9d2ccb2f2 --- /dev/null +++ b/docs/site/museum.css @@ -0,0 +1,3 @@ +.museum-intro{padding-top:64px}.museum-intro h1{max-width:900px}.museum-intro .intro{max-width:900px}.museum-intro #museum-state{font-size:14px;color:#526568}.exhibit-links{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:24px 0}.exhibit-links a{display:block;padding:20px;border:2px dotted #49677c;border-radius:5px;text-decoration:none;background:#fff}.exhibit-links strong,.exhibit-links span{display:block}.exhibit-links span{font-size:13px;color:#526568;margin-top:6px}.exhibit-links a:hover{background:#edf2f1}.class-legend{display:flex;flex-wrap:wrap;gap:12px;margin:24px 0;font-size:12px}.class-legend span{padding:7px 10px;background:#fff}.legend-accept{border:2px solid #07596c}.legend-open{border:2px dashed #935214}.legend-engineering{border:3px double #5c6173}.legend-illustration{border:2px dotted #49677c}.museum-card{margin:24px 0;background:#fff;border:2px solid #07596c;border-radius:5px;overflow:hidden}.museum-card.amend-open{border:2px dashed #935214}.museum-card.engineering-only{border:3px double #5c6173}.museum-card.illustration{border:2px dotted #49677c}.museum-card.refused{border:2px dashed #993921;padding:20px}.museum-card-header{padding:20px 24px;border-bottom:1px solid #d5dfdb;display:block;background:#f0f5f2}.museum-card-header h3{font:500 25px/1.25 Georgia,serif;margin:7px 0 14px}.museum-card-header p{margin:6px 0}.object-label{font-size:12px;letter-spacing:.04em;font-weight:750;overflow-wrap:anywhere}.object-class{display:inline-block;font:700 11px/1.4 system-ui,sans-serif;text-transform:uppercase;border:1px solid currentColor;padding:3px 7px;border-radius:2px;margin-left:8px}.amend-open .object-class{color:#844600}.source-identity{margin:12px 0 0;display:grid;grid-template-columns:auto minmax(0,1fr);gap:3px 12px;font-size:12px}.source-identity dt{font-size:11px;font-weight:700;color:#41575c;margin:0}.source-identity dd{font-size:11px;margin:0;line-height:1.65;overflow-wrap:anywhere}.canvas-disclaimer{margin:14px 0 0!important;font-size:12px;font-weight:600;color:#3c5960}.claim-columns{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(0,1fr) minmax(0,.85fr)}.claim-column{padding:22px 24px;min-width:0}.claim-column+.claim-column{border-left:1px solid #d5dfdb}.claim-column h4{font-size:11px;text-transform:uppercase;letter-spacing:.11em;margin:0 0 16px;color:#3f6063}.claim-column p,.claim-column blockquote{font-size:13px;line-height:1.65;margin:10px 0;overflow-wrap:anywhere}.source-quote{white-space:pre-wrap;padding:0;border:0;color:#213d43}.claim-column details{font-size:12px;margin-top:14px}.claim-column .source-identity{display:block}.claim-column .source-identity dd{margin:0 0 7px}.claim-column .source-identity dt{margin:9px 0 1px}.claim-column a{overflow-wrap:anywhere;font-size:13px}.claim-column pre{white-space:pre-wrap;overflow-wrap:anywhere;background:#edf1ee;border:1px solid #d0dcd5;padding:10px;font-size:11px}.engineering-strip{border-top:1px solid #cbd7d1;background:#eaf0ed;padding:12px 24px;font-size:12px;color:#41585f}.engineering-strip strong{display:block;font-size:11px;text-transform:uppercase;letter-spacing:.06em}.engineering-strip p{margin:3px 0}.museum-visual{padding:24px}.geometry-host{max-width:100%;overflow:hidden}.geometry-host canvas{display:block;max-width:100%;height:auto}.geometry-host svg{max-height:600px}.geometry-host button,.geometry-host select{margin:5px}.fixture-body,.packet-body{padding:20px 24px;font-size:14px}.fixture-absent{border:2px dashed #935214;padding:18px;margin:0;background:#fcf8ef}.packet-body p{margin:7px 0}.geometry-host:focus{outline:3px solid #07596c}.view-back{display:inline-block;margin:12px 0 0;font-size:13px}#active-exhibit:empty{display:none}#d3-side24{display:block;scroll-margin-top:24px}@media(max-width:950px){.claim-columns{grid-template-columns:1fr 1fr}.claim-column:first-child{grid-column:1/-1;border-bottom:1px solid #d5dfdb}.claim-column:nth-child(2){border-left:0}}@media(max-width:600px){.exhibit-links,.claim-columns{grid-template-columns:1fr}.claim-column:first-child{grid-column:auto}.claim-column+.claim-column{border-left:0;border-top:1px solid #d5dfdb}.museum-card-header,.claim-column,.museum-visual,.fixture-body,.packet-body{padding:18px}.source-identity{grid-template-columns:1fr;gap:0}.source-identity dd{margin-bottom:6px}.museum-card-header h3{font-size:23px}.object-class{display:table;margin:7px 0 0}.class-legend{gap:7px}.class-legend span{font-size:11px}.engineering-strip{padding:12px 18px}}@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}} + +.geometry-controls{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0}.geometry-host>.museum-visual{padding:0}.geometry-host>.museum-visual svg{min-width:520px}.geometry-host>.museum-visual{overflow-x:auto}.museum-visual>details{margin-top:24px}.museum-visual>details .source-quote{font-size:13px;overflow-wrap:anywhere} diff --git a/docs/site/museum.html b/docs/site/museum.html new file mode 100644 index 000000000..be7360379 --- /dev/null +++ b/docs/site/museum.html @@ -0,0 +1,29 @@ + + + + + +Verification museum · Universal Law + + + + +
UNIVERSAL LAW VERIFICATION MUSEUM
+
+

OPEN THE SOURCE · READ THE SCOPE · REPLAY THE EVIDENCE

Verification museum

This site is for verifying Universal Law mathematics. Pictures explain pinned sources. Submissions come back as packets. Status changes only when the maintainers land them.

A scoped result and an open parent can coexist. A hash verifies bytes. It does not verify a theorem.

Verifying the pinned source index and status snapshot…

+

01 / PICTURES WITH SOURCES

Inspect one object.

SIDE24 exact endpoints ↗
+

Each picture is an illustration of a declared source. Open one to see its identity, scope and controls.

+ +
+
+

02 / SOURCE-BOUND CLAIM CARDS

Read the complete boundary.

Historical STATUS snapshot ↗
+

Eleven reviewed entries are quoted exactly from the pinned Math proof index. Three AMEND rows are quoted separately from STATUS. These source projections create no acceptance register.

+
Solid · ACCEPT-scopedDashed · AMEND/openDouble · engineering-onlyDotted · illustration
+
+
+

03 / REPLAY BOUNDARY

D2 lifetime fixture

Verifying the pinned D2 source contract…

+

04 / PACKETS RETURN TO REVIEW

Packet — not STATUS

These are pinned landed submissions. A packet's presence, output or passing check does not promote a claim. Review remains a separate process.

Prepare a source-bound incoming packet ↗

+
+ + diff --git a/docs/site/museum.json b/docs/site/museum.json new file mode 100644 index 000000000..07df74b52 --- /dev/null +++ b/docs/site/museum.json @@ -0,0 +1,709 @@ +{ + "canvas_notice": "This canvas explains the pinned source. It is not a proof and does not change status.", + "claims": [ + { + "class": "ACCEPT-scoped", + "id": "d2-lifetime-remainder", + "proof": { + "blob": "247b3ecf80bfbe896948d5d489b2d5842a81c481", + "bytes": 17734, + "commit": "d6628da09384728992dcbe6e921cc28ba85aebb0", + "html_url": "https://github.com/d6g8k5htny-coder/Math-/blob/d6628da09384728992dcbe6e921cc28ba85aebb0/frontiers/three_fronts_20260924/LIFETIME_REMAINDER.md", + "path": "frontiers/three_fronts_20260924/LIFETIME_REMAINDER.md", + "repository": "d6g8k5htny-coder/Math-", + "sha256": "380b7d0abdb0fe2de5a6564565af9560d3f1b1ce22fd5538927db0c52f4f3a4a", + "url": "https://raw.githubusercontent.com/d6g8k5htny-coder/Math-/d6628da09384728992dcbe6e921cc28ba85aebb0/frontiers/three_fronts_20260924/LIFETIME_REMAINDER.md" + }, + "replay": { + "checkout": "d6628da09384728992dcbe6e921cc28ba85aebb0", + "command": "python -B -S -m unittest discover -s frontiers/three_fronts_20260924 -p 'test_*.py' -v", + "notice": "From a Math- checkout at d6628da09384728992dcbe6e921cc28ba85aebb0, run at the repository root. Finite algebra or implementation replay only; it is not theorem acceptance.", + "source": { + "blob": "abe16871da7740fa28ae4dbb28fb31853a5868bd", + "bytes": 6023, + "commit": "d6628da09384728992dcbe6e921cc28ba85aebb0", + "html_url": "https://github.com/d6g8k5htny-coder/Math-/blob/d6628da09384728992dcbe6e921cc28ba85aebb0/README.md", + "path": "README.md", + "repository": "d6g8k5htny-coder/Math-", + "sha256": "89d4c618ad4560373f8fba3c787522cea8f0191fd8e176f3e0741c6230390730", + "url": "https://raw.githubusercontent.com/d6g8k5htny-coder/Math-/d6628da09384728992dcbe6e921cc28ba85aebb0/README.md" + }, + "url": null, + "working_directory": "Math- repository root" + }, + "review": { + "blob": "e4cb1d943eaeb2049d080fcc53a57e042aebc6e8", + "bytes": 12708, + "commit": "d6628da09384728992dcbe6e921cc28ba85aebb0", + "html_url": "https://github.com/d6g8k5htny-coder/Math-/blob/d6628da09384728992dcbe6e921cc28ba85aebb0/PROOF_INDEX.md", + "path": "PROOF_INDEX.md", + "pointer_only": true, + "repository": "d6g8k5htny-coder/Math-", + "review_notice": "The pinned source binds this review pointer; the linked review is not byte-frozen by this descriptor.", + "review_url": "https://github.com/d6g8k5htny-coder/main/issues/67#issuecomment-5841782206", + "sha256": "f9c4db77aeab1c61d2a0c02f88a964cbfc6be63d18619acf0e047c884e0c0249", + "url": "https://raw.githubusercontent.com/d6g8k5htny-coder/Math-/d6628da09384728992dcbe6e921cc28ba85aebb0/PROOF_INDEX.md" + }, + "scope_quote": "- D2 lifetime remainder: proof [frontiers/three_fronts_20260924/LIFETIME_REMAINDER.md](frontiers/three_fronts_20260924/LIFETIME_REMAINDER.md); [R1–R4 review](https://github.com/d6g8k5htny-coder/main/issues/67#issuecomment-5841270276) and [R5/R6 delta review](https://github.com/d6g8k5htny-coder/main/issues/67#issuecomment-5841782206) record ACCEPT for Theorem R at its stated existential `O(1)`-remainder scope. The delta identifies its exact parent imports and does not consume the still-open Theorem A cubic selection bound. Numerical constants/radii, a second coefficient, and RN/24-jet closure are outside this verdict. [main #67](https://github.com/d6g8k5htny-coder/main/issues/67) remains open for other bundled fronts.", + "source_label": "ACCEPT", + "status_quote": "Theorem R at its stated existential `O(1)` remainder scope: candidate and elder densities have leading `c ell^(-1/3)` term with bounded remainder for sufficiently small lifetime", + "title": "D2 lifetime remainder" + }, + { + "class": "ACCEPT-scoped", + "id": "d3-side24-coefficient", + "proof": { + "blob": "44b66f04f89fcd87383b3603fa69f1feb64cdddd", + "bytes": 10272, + "commit": "d6628da09384728992dcbe6e921cc28ba85aebb0", + "html_url": "https://github.com/d6g8k5htny-coder/Math-/blob/d6628da09384728992dcbe6e921cc28ba85aebb0/coefficients/side24_v1/PROOF.md", + "path": "coefficients/side24_v1/PROOF.md", + "repository": "d6g8k5htny-coder/Math-", + "sha256": "c06daccc4ba4b9168522b9888b76a7d599934fc3b91bd753ee5d492262917769", + "url": "https://raw.githubusercontent.com/d6g8k5htny-coder/Math-/d6628da09384728992dcbe6e921cc28ba85aebb0/coefficients/side24_v1/PROOF.md" + }, + "replay": { + "command": null, + "notice": "The notebook verifies and displays published coefficient bytes; no random field or lifetime solver runs.", + "source": { + "blob": "c7fcde5461305ff249384e873476d34a4f470976", + "bytes": 61961, + "commit": "71400b94f6cb354a8cf7aba73ffede2138a64efa", + "html_url": "https://github.com/d6g8k5htny-coder/main/blob/71400b94f6cb354a8cf7aba73ffede2138a64efa/docs/notebooks/SIDE24_PUBLIC_COEFFICIENTS.ipynb", + "path": "docs/notebooks/SIDE24_PUBLIC_COEFFICIENTS.ipynb", + "repository": "d6g8k5htny-coder/main", + "sha256": "e348db8e9d667caff2a8da1d85ffd5ad599db34b34e542d9662d0bc1edc84024", + "url": "https://raw.githubusercontent.com/d6g8k5htny-coder/main/71400b94f6cb354a8cf7aba73ffede2138a64efa/docs/notebooks/SIDE24_PUBLIC_COEFFICIENTS.ipynb" + }, + "url": "https://github.com/d6g8k5htny-coder/main/blob/71400b94f6cb354a8cf7aba73ffede2138a64efa/docs/notebooks/SIDE24_PUBLIC_COEFFICIENTS.ipynb" + }, + "review": { + "blob": "e4cb1d943eaeb2049d080fcc53a57e042aebc6e8", + "bytes": 12708, + "commit": "d6628da09384728992dcbe6e921cc28ba85aebb0", + "html_url": "https://github.com/d6g8k5htny-coder/Math-/blob/d6628da09384728992dcbe6e921cc28ba85aebb0/PROOF_INDEX.md", + "path": "PROOF_INDEX.md", + "pointer_only": true, + "repository": "d6g8k5htny-coder/Math-", + "review_notice": "The pinned source binds this review pointer; the linked review is not byte-frozen by this descriptor.", + "review_url": "https://github.com/d6g8k5htny-coder/main/issues/65#issuecomment-5841269490", + "sha256": "f9c4db77aeab1c61d2a0c02f88a964cbfc6be63d18619acf0e047c884e0c0249", + "url": "https://raw.githubusercontent.com/d6g8k5htny-coder/Math-/d6628da09384728992dcbe6e921cc28ba85aebb0/PROOF_INDEX.md" + }, + "scope_quote": "- D3 SIDE24 coefficient: proof [coefficients/side24_v1/PROOF.md](coefficients/side24_v1/PROOF.md); [C1–C6 review](https://github.com/d6g8k5htny-coder/main/issues/65#issuecomment-5841269490) verifies the coefficient calculation; [reconciliation](https://github.com/d6g8k5htny-coder/main/issues/65#issuecomment-5841779222) closes the coefficient-review work package. Interpretation as the parent lifetime law retains the parent's separate dependency and review boundaries.", + "source_label": "ACCEPT", + "status_quote": "The coefficient expression for SIDE24 in dimensions 2 and 3, including cone moments, all-direction periodization comparison, covariance/Schur transfer, and outward special-function arithmetic", + "title": "D3 SIDE24 coefficient" + }, + { + "class": "ACCEPT-scoped", + "id": "d4-fixed-remote-rn", + "proof": { + "blob": "b383bfcc88ec4ad497dff01fb6640e429ba24a84", + "bytes": 18355, + "commit": "d6628da09384728992dcbe6e921cc28ba85aebb0", + "html_url": "https://github.com/d6g8k5htny-coder/Math-/blob/d6628da09384728992dcbe6e921cc28ba85aebb0/frontiers/remote_window_20260924/PROOF.md", + "path": "frontiers/remote_window_20260924/PROOF.md", + "repository": "d6g8k5htny-coder/Math-", + "sha256": "a332bae9bdc0106ce17047f7e0409cc3d94eb610a0c7b74ba5ba2d01a1620cb7", + "url": "https://raw.githubusercontent.com/d6g8k5htny-coder/Math-/d6628da09384728992dcbe6e921cc28ba85aebb0/frontiers/remote_window_20260924/PROOF.md" + }, + "replay": { + "checkout": "d6628da09384728992dcbe6e921cc28ba85aebb0", + "command": "python -B -S -m unittest discover -s frontiers/remote_window_20260924 -p 'test_*.py' -v", + "notice": "From a Math- checkout at d6628da09384728992dcbe6e921cc28ba85aebb0, run at the repository root. Finite algebra or implementation replay only; it is not theorem acceptance.", + "source": { + "blob": "abe16871da7740fa28ae4dbb28fb31853a5868bd", + "bytes": 6023, + "commit": "d6628da09384728992dcbe6e921cc28ba85aebb0", + "html_url": "https://github.com/d6g8k5htny-coder/Math-/blob/d6628da09384728992dcbe6e921cc28ba85aebb0/README.md", + "path": "README.md", + "repository": "d6g8k5htny-coder/Math-", + "sha256": "89d4c618ad4560373f8fba3c787522cea8f0191fd8e176f3e0741c6230390730", + "url": "https://raw.githubusercontent.com/d6g8k5htny-coder/Math-/d6628da09384728992dcbe6e921cc28ba85aebb0/README.md" + }, + "url": null, + "working_directory": "Math- repository root" + }, + "review": { + "blob": "e4cb1d943eaeb2049d080fcc53a57e042aebc6e8", + "bytes": 12708, + "commit": "d6628da09384728992dcbe6e921cc28ba85aebb0", + "html_url": "https://github.com/d6g8k5htny-coder/Math-/blob/d6628da09384728992dcbe6e921cc28ba85aebb0/PROOF_INDEX.md", + "path": "PROOF_INDEX.md", + "pointer_only": true, + "repository": "d6g8k5htny-coder/Math-", + "review_notice": "The pinned source binds this review pointer; the linked review is not byte-frozen by this descriptor.", + "review_url": "https://github.com/d6g8k5htny-coder/main/issues/76#issuecomment-5841783172", + "sha256": "f9c4db77aeab1c61d2a0c02f88a964cbfc6be63d18619acf0e047c884e0c0249", + "url": "https://raw.githubusercontent.com/d6g8k5htny-coder/Math-/d6628da09384728992dcbe6e921cc28ba85aebb0/PROOF_INDEX.md" + }, + "scope_quote": "- D4 fixed-remote RN theorem: proof [frontiers/remote_window_20260924/PROOF.md](frontiers/remote_window_20260924/PROOF.md); [source-bound review](https://github.com/d6g8k5htny-coder/main/issues/76#issuecomment-5841783172) and [scoped reconciliation](https://github.com/d6g8k5htny-coder/main/issues/76#issuecomment-5841861362) record ACCEPT on the seven fixed-rho/fixed-eta interfaces. Shrinking spatial cutoffs, pin/intermediate regions, and shrinking witness separation are outside that review.", + "source_label": "ACCEPT", + "status_quote": "Fixed positive spatial separation `rho`, fixed witness separation `eta`, between-pin height window; conditioned covariance, three determinant factors, endpoint normalizer, contact kernel, and fixed-separation factorial moments", + "title": "D4 fixed-remote RN theorem" + }, + { + "class": "ACCEPT-scoped", + "id": "d5-all-height-annulus", + "proof": { + "blob": "6f317515b3d417661f86e2fed09bc7d950899c2b", + "bytes": 16948, + "commit": "d6628da09384728992dcbe6e921cc28ba85aebb0", + "html_url": "https://github.com/d6g8k5htny-coder/Math-/blob/d6628da09384728992dcbe6e921cc28ba85aebb0/frontiers/rn_annulus_bridge_20260925/PROOF.md", + "path": "frontiers/rn_annulus_bridge_20260925/PROOF.md", + "repository": "d6g8k5htny-coder/Math-", + "sha256": "d55e2c03bb17e7977ff94130cc1ff21e54840cd1e20dc4e41ea9ad52228beb05", + "url": "https://raw.githubusercontent.com/d6g8k5htny-coder/Math-/d6628da09384728992dcbe6e921cc28ba85aebb0/frontiers/rn_annulus_bridge_20260925/PROOF.md" + }, + "replay": { + "checkout": "d6628da09384728992dcbe6e921cc28ba85aebb0", + "command": "python3 -B -S reviews/pr28_annulus_bridge_nonauthor_20260925/algebra_check.py -v", + "notice": "From a Math- checkout at d6628da09384728992dcbe6e921cc28ba85aebb0, run at the repository root. Finite algebra or implementation replay only; it is not theorem acceptance.", + "source": { + "blob": "559d72242fdb7e4e3ac4a10d10641ae1da84f40e", + "bytes": 15925, + "commit": "d6628da09384728992dcbe6e921cc28ba85aebb0", + "html_url": "https://github.com/d6g8k5htny-coder/Math-/blob/d6628da09384728992dcbe6e921cc28ba85aebb0/reviews/pr28_annulus_bridge_nonauthor_20260925/REVIEW.md", + "path": "reviews/pr28_annulus_bridge_nonauthor_20260925/REVIEW.md", + "repository": "d6g8k5htny-coder/Math-", + "sha256": "69ea7a479a9e8a5150cbe07b373772ab22413a1d81194d5a6a78adf6ada5f03f", + "url": "https://raw.githubusercontent.com/d6g8k5htny-coder/Math-/d6628da09384728992dcbe6e921cc28ba85aebb0/reviews/pr28_annulus_bridge_nonauthor_20260925/REVIEW.md" + }, + "url": null, + "working_directory": "Math- repository root" + }, + "review": { + "blob": "559d72242fdb7e4e3ac4a10d10641ae1da84f40e", + "bytes": 15925, + "commit": "d6628da09384728992dcbe6e921cc28ba85aebb0", + "html_url": "https://github.com/d6g8k5htny-coder/Math-/blob/d6628da09384728992dcbe6e921cc28ba85aebb0/reviews/pr28_annulus_bridge_nonauthor_20260925/REVIEW.md", + "path": "reviews/pr28_annulus_bridge_nonauthor_20260925/REVIEW.md", + "repository": "d6g8k5htny-coder/Math-", + "sha256": "69ea7a479a9e8a5150cbe07b373772ab22413a1d81194d5a6a78adf6ada5f03f", + "url": "https://raw.githubusercontent.com/d6g8k5htny-coder/Math-/d6628da09384728992dcbe6e921cc28ba85aebb0/reviews/pr28_annulus_bridge_nonauthor_20260925/REVIEW.md" + }, + "scope_quote": "- D5 all-height fixed annulus: proof [frontiers/rn_annulus_bridge_20260925/PROOF.md](frontiers/rn_annulus_bridge_20260925/PROOF.md); review [reviews/pr28_annulus_bridge_nonauthor_20260925/REVIEW.md](reviews/pr28_annulus_bridge_nonauthor_20260925/REVIEW.md) records R1–R7 ACCEPT at fixed `d=2`, fixed `L`, compact positive-gap marks, and fixed annulus `1= 2`, all independent probabilities, `c_v <= phi(p_v)`, same palette `K >= K_H(d)`, sharp `rho*=1/(3-log(3e-2))`", + "title": "D6 P15 full price theorem" + }, + { + "class": "AMEND/open", + "id": "d1-parent-selection-open", + "proof": { + "blob": "dfed3b8d318a3ab1950957f393307733a4bef3f2", + "bytes": 40261, + "commit": "d6628da09384728992dcbe6e921cc28ba85aebb0", + "html_url": "https://github.com/d6g8k5htny-coder/Math-/blob/d6628da09384728992dcbe6e921cc28ba85aebb0/imports/lifetime_parent_20260925/UNIFORM_MATRIX_CAP_AND_LIFETIME.md", + "path": "imports/lifetime_parent_20260925/UNIFORM_MATRIX_CAP_AND_LIFETIME.md", + "repository": "d6g8k5htny-coder/Math-", + "sha256": "9350ad6eaba6626b93c3dedeef9e2ff816e5cdf1c8318e85fb27499141c84bc7", + "url": "https://raw.githubusercontent.com/d6g8k5htny-coder/Math-/d6628da09384728992dcbe6e921cc28ba85aebb0/imports/lifetime_parent_20260925/UNIFORM_MATRIX_CAP_AND_LIFETIME.md" + }, + "replay": { + "command": null, + "notice": "OPEN / NOT LANDED. No replay is presented as acceptance.", + "url": null + }, + "review": { + "blob": "52688102260e916dec1a38143186198b089a0261", + "bytes": 6881, + "commit": "71400b94f6cb354a8cf7aba73ffede2138a64efa", + "html_url": "https://github.com/d6g8k5htny-coder/main/blob/71400b94f6cb354a8cf7aba73ffede2138a64efa/STATUS.md", + "path": "STATUS.md", + "pointer_only": true, + "repository": "d6g8k5htny-coder/main", + "review_notice": "The pinned source binds this review pointer; the linked review is not byte-frozen by this descriptor.", + "review_url": "https://github.com/d6g8k5htny-coder/main/issues/63#issuecomment-5841830743", + "sha256": "9c3e21144423591a3dbff926858048c0363b9a32d6fe258a1de5088d38096141", + "url": "https://raw.githubusercontent.com/d6g8k5htny-coder/main/71400b94f6cb354a8cf7aba73ffede2138a64efa/STATUS.md" + }, + "scope_quote": "| **D1 — parent quantitative Theorem-A selection chain** | Later review accepted the load-bearing §8–§15 interfaces, but the quantitative §§2–§7 selection chain was reopened for independent review. A displayed congruence defect in §5 has an additive erratum and the remaining A1–A7 chain is not reconciled. | [Review issue #63](https://github.com/d6g8k5htny-coder/main/issues/63) · [fail-closed reopening](https://github.com/d6g8k5htny-coder/main/issues/63#issuecomment-5841830743) · [source-first erratum](https://github.com/d6g8k5htny-coder/main/issues/63#issuecomment-5841947606) |", + "source_label": "AMEND / open", + "status_quote": "Later review accepted the load-bearing §8–§15 interfaces, but the quantitative §§2–§7 selection chain was reopened for independent review. A displayed congruence defect in §5 has an additive erratum and the remaining A1–A7 chain is not reconciled.", + "title": "D1 — parent quantitative Theorem-A selection chain" + }, + { + "class": "AMEND/open", + "id": "d5-pin-neighborhoods-open", + "proof": { + "availability": "NO COMPLETE PROOF YET", + "blob": "e4cb1d943eaeb2049d080fcc53a57e042aebc6e8", + "bytes": 12708, + "commit": "d6628da09384728992dcbe6e921cc28ba85aebb0", + "html_url": "https://github.com/d6g8k5htny-coder/Math-/blob/d6628da09384728992dcbe6e921cc28ba85aebb0/PROOF_INDEX.md", + "path": "PROOF_INDEX.md", + "repository": "d6g8k5htny-coder/Math-", + "sha256": "f9c4db77aeab1c61d2a0c02f88a964cbfc6be63d18619acf0e047c884e0c0249", + "url": "https://raw.githubusercontent.com/d6g8k5htny-coder/Math-/d6628da09384728992dcbe6e921cc28ba85aebb0/PROOF_INDEX.md" + }, + "replay": { + "command": null, + "notice": "OPEN / NOT LANDED. No replay is presented as acceptance.", + "url": null + }, + "review": { + "blob": "e4cb1d943eaeb2049d080fcc53a57e042aebc6e8", + "bytes": 12708, + "commit": "d6628da09384728992dcbe6e921cc28ba85aebb0", + "html_url": "https://github.com/d6g8k5htny-coder/Math-/blob/d6628da09384728992dcbe6e921cc28ba85aebb0/PROOF_INDEX.md", + "path": "PROOF_INDEX.md", + "pointer_only": true, + "repository": "d6g8k5htny-coder/Math-", + "review_notice": "The pinned source binds this review pointer; the linked review is not byte-frozen by this descriptor.", + "review_url": "https://github.com/d6g8k5htny-coder/Math-/blob/4e188e25b1e1ef560f3eeb75c0d354d2ccf0ea22/reviews/d5_pin_neighborhood_20260926/REVIEW.md", + "sha256": "f9c4db77aeab1c61d2a0c02f88a964cbfc6be63d18619acf0e047c884e0c0249", + "url": "https://raw.githubusercontent.com/d6g8k5htny-coder/Math-/d6628da09384728992dcbe6e921cc28ba85aebb0/PROOF_INDEX.md" + }, + "scope_quote": "| **D5 — pin neighborhoods / microdisk** | The public reconnaissance has an AMEND review; the inner microdisk bound and collar to the reviewed annulus are not complete, and the claimed summed pin-neighborhood bound remains AMEND. | [Math proof index](https://github.com/d6g8k5htny-coder/Math-/blob/main/PROOF_INDEX.md) · [Math issue #58](https://github.com/d6g8k5htny-coder/Math-/issues/58) |", + "source_label": "AMEND / open", + "status_quote": "The public reconnaissance has an AMEND review; the inner microdisk bound and collar to the reviewed annulus are not complete, and the claimed summed pin-neighborhood bound remains AMEND.", + "title": "D5 — pin neighborhoods / microdisk" + }, + { + "class": "AMEND/open", + "id": "sard-g-a1-a6-open", + "proof": { + "availability": "OPEN / NOT LANDED", + "blob": "52688102260e916dec1a38143186198b089a0261", + "bytes": 6881, + "commit": "71400b94f6cb354a8cf7aba73ffede2138a64efa", + "html_url": "https://github.com/d6g8k5htny-coder/main/blob/71400b94f6cb354a8cf7aba73ffede2138a64efa/STATUS.md", + "path": "STATUS.md", + "proof_url": "https://github.com/d6g8k5htny-coder/main/pull/122", + "repository": "d6g8k5htny-coder/main", + "sha256": "9c3e21144423591a3dbff926858048c0363b9a32d6fe258a1de5088d38096141", + "url": "https://raw.githubusercontent.com/d6g8k5htny-coder/main/71400b94f6cb354a8cf7aba73ffede2138a64efa/STATUS.md" + }, + "replay": { + "command": null, + "notice": "OPEN / NOT LANDED. No replay is presented as acceptance.", + "url": null + }, + "review": { + "blob": "9fc61b47c2b4c4bcc3898a6c61a6dcf9cbe1d136", + "bytes": 25057, + "commit": "71400b94f6cb354a8cf7aba73ffede2138a64efa", + "html_url": "https://github.com/d6g8k5htny-coder/main/blob/71400b94f6cb354a8cf7aba73ffede2138a64efa/reviews/sard_g_successor_a1_a6_20260926/REVIEW.md", + "path": "reviews/sard_g_successor_a1_a6_20260926/REVIEW.md", + "repository": "d6g8k5htny-coder/main", + "sha256": "894d27c0de6dd4312ea5109ac2480a68cb1b5ded0b4a60749d4edee2288fb537", + "url": "https://raw.githubusercontent.com/d6g8k5htny-coder/main/71400b94f6cb354a8cf7aba73ffede2138a64efa/reviews/sard_g_successor_a1_a6_20260926/REVIEW.md" + }, + "scope_quote": "| **SARD-G A1/A6** | A1 remains AMEND as written; A6's slicing argument is conditionally valid but its source application remains AMEND until the required open-chart premise is repaired. | [Successor review](reviews/sard_g_successor_a1_a6_20260926/REVIEW.md) · [current PR](https://github.com/d6g8k5htny-coder/main/pull/122) |", + "source_label": "AMEND / open", + "status_quote": "A1 remains AMEND as written; A6's slicing argument is conditionally valid but its source application remains AMEND until the required open-chart premise is repaired.", + "title": "SARD-G A1/A6" + } + ], + "exhibit_quotes": { + "annulus": "## 1. Statement and exact scope\n\nFix L>0 and the centered variance-one Gaussian field on the two-dimensional torus with covariance\n\n K_L(h) = sum_(n in Z^2) exp(-|h+Ln|^2/2)\n / sum_(n in Z^2) exp(-|Ln|^2/2).\n\nFix a compact birth interval, 00, uniform in the stated marks, frames, Borel E and j=0,1,2, such that\n\n E_(Q_r^W) N_j(rE) <= C r^3 area(E), 0=k_->0, (2) can also be written <=C' k r^3 area(E), but that rewriting uses k_-: **there is no height-window factor in the proof and no assertion uniform as k approaches zero**.\n\nThis addresses the fixed scaled-annulus region in d=2. It does not include pin neighborhoods, A approaching 1/2, B growing with r, intermediate physical distances r<=3, uniform-L estimates, numerical all-cell certificates, elder selection or unrestricted lifetime acceptance. Choose r_* small enough that all local segments used below embed in the torus.\n\n", + "ec014": "2. Exact object proposed for closure\n\n\nLet M=x_m=(-r/2,0), S=x_s=(+r/2,0), r>0, with longitudinal coordinate t and transverse coordinate s. The raw ordered vector is\n\n\n X_r = ( f(M), f(S), f_t(M), f_s(M), f_t(S), f_s(S) ).\n\n\nThe corrected ordered frame is\n\n\n Y_r = ( V^+, V^-_corr, G_t^+, G_t^-, G_s^+, G_s^- ),\n\n\nwhere\n\n\n V^+ = [f(S)+f(M)]/2,\n V^-_corr = [f(S)-f(M)-r(f_t(S)+f_t(M))/2]/r^3,\n G_t^+ = [f_t(S)+f_t(M)]/2,\n G_t^- = [f_t(S)-f_t(M)]/r,\n G_s^+ = [f_s(S)+f_s(M)]/2,\n G_s^- = [f_s(S)-f_s(M)]/r.\n\n\nUnder those exact row and column orders, Y_r=T_rX_r with\n\n\n T_r =\n [ 1/2 1/2 0 0 0 0 ]\n [ -r^-3 r^-3 -1/(2r^2) 0 -1/(2r^2) 0 ]\n [ 0 0 1/2 0 1/2 0 ]\n [ 0 0 -r^-1 0 r^-1 0 ]\n [ 0 0 0 1/2 0 1/2]\n [ 0 0 0 -r^-1 0 r^-1].\n\n\nThe exact proposed terminal facts are only:\n\n\nA. The displayed ordering and matrix are correct.\n\n\nB. Under that ordering,\n\n\n det T_r = -r^-5.\n\n\n If a different column ordering is used, the sign may change by permutation parity, while the density invariant remains\n\n\n |det T_r| = r^-5.\n\n\nC. Under the declared change-of-variables convention,\n\n\n p_X(x_r) = |det T_r| p_Y(y_r)\n = r^-5 p_Y(y_r).\n\n\nD. For the canonical fold gap r^3/6 and the separate r^2 normalizer factor, the exact power ledger is\n\n\n (r^3/6) r^-5 r^2 = 1/6,\n\n\n with exponent cancellation 3-5+2=0.\n\n\n", + "p15": "## 5. Sharpness and the exact demand boundary\n\nTake one block, a=1,d=2,n=3, no macro edges and K=2. Every proper subset is two-decomposable and the full triple is not. At p_i=p_star and c_i=1, every possible generator has price one, including the empty generator. Any cover of the nonempty obstruction therefore costs at least one, and one generator attains it. The available hazard is h_star. Replacing rho_star by any smaller constant in (F2) would make its right side strictly less than one. This proves sharpness even among alternative covers, not only for our chosen full-block cover.\n\nIf d=1, n=a+1 and K=1, the sole obstruction is again the full block. At p_i=p_star,c_i=1 every cover costs at least one, but\n\n mu_p(D)=1-p_star^(a+1)>1-p_star=exp(-1),\n\nhence its hazard is less than one. The universal same-palette transformed-price guarantee is false in this demand-one family. This preserves and generalizes the earlier two-coordinate counterexample; it does not retract original P15-B, whose local-budget premise is missing in that case.\n\nThus d>=2 is sufficient for the realized capacity family on the full probability cube, while a uniform statement admitting all d=1 examples would be false. This is not a necessity claim for every multi-block instance with some demand one; other constraints may change its budget.\n\n", + "remote": "## 1. The count and the new scope\n\nThe earlier RN count interface identified a three-determinant integral whose unnormalized numerator must be O(r^5), but did not bound it. This note supplies that bound for a precise part of the problem: **a fixed remote spatial region and the shrinking height window between the pinned maximum and saddle**. The spatial exclusion radius must not shrink with r.\n\nFix d>=2 and L>0. On X=R^d/(L Z^d), use the centered variance-one Gaussian field with the exact normalized periodic covariance\n\n K_L(z)=sum_(n in Z^d) exp(-|z+Ln|^2/2)\n / sum_(n in Z^d) exp(-|Ln|^2/2).\n\nFix compact B=[b_-,b_+] and K=[k_-,k_+] with 00 the pins are\n\n M=-(r/2)u, S=(r/2)u,\n f(M)=b, f(S)=b-k r^3, grad f(M)=grad f(S)=0.\n\nQ_r denotes continuous Gaussian regression on these 2(d+1) observations. For a symmetric matrix H define\n\n F_j(H)=|det H| 1{H has j negative eigenvalues},\n\nwith value zero on singular matrices. Define the actual endpoint weight and FULL normalizer\n\n W_r=F_d(H_M) F_(d-1)(H_S),\n Z_r=E_(Q_r) W_r, dQ_r^W=(W_r/Z_r)dQ_r.\n\nThere is no adjacency condition, no additional pin-density factor, and no Jacobian inside Z_r.\n\nFix 0=rho}. For a Borel E contained in D_rho and j in {0,...,d}, let\n\n N_(r,j)(E)=#{x in E: grad f(x)=0, index H_x=j,\n b-k r^30 and C=1} <= C k r^3 |E|. (3)\n\nFor fixed E of positive volume the expected count is asymptotic to a strictly positive constant times r^3. This is NOT a matching lower bound on the event probability. Sum over the finitely many indices to count all critical types.\n\nThe normalized mean measures converge in total variation on D_rho at rate O(r): a density version differs uniformly from Lambda_j by O(r). No numerical value of C or r_* is supplied. No constant is claimed uniform as rho tends to zero, marks become unbounded, or d,L vary.\n\n" + }, + "exhibits": { + "annulus": { + "blob": "6f317515b3d417661f86e2fed09bc7d950899c2b", + "bytes": 16948, + "class": "illustration", + "commit": "d6628da09384728992dcbe6e921cc28ba85aebb0", + "html_url": "https://github.com/d6g8k5htny-coder/Math-/blob/d6628da09384728992dcbe6e921cc28ba85aebb0/frontiers/rn_annulus_bridge_20260925/PROOF.md", + "id": "annulus", + "notice": "This canvas explains the pinned source. It is not a proof and does not change status.", + "path": "frontiers/rn_annulus_bridge_20260925/PROOF.md", + "repository": "d6g8k5htny-coder/Math-", + "scope_boundary": "The reviewed fixed annulus and the AMEND pin-neighborhood row are distinct scopes.", + "sha256": "d55e2c03bb17e7977ff94130cc1ff21e54840cd1e20dc4e41ea9ad52228beb05", + "url": "https://raw.githubusercontent.com/d6g8k5htny-coder/Math-/d6628da09384728992dcbe6e921cc28ba85aebb0/frontiers/rn_annulus_bridge_20260925/PROOF.md" + }, + "ec014": { + "blob": "7189b4d1538866594c6d8c94f09e247a2cd65abe", + "bytes": 11331, + "class": "illustration", + "commit": "d6628da09384728992dcbe6e921cc28ba85aebb0", + "html_url": "https://github.com/d6g8k5htny-coder/Math-/blob/d6628da09384728992dcbe6e921cc28ba85aebb0/imports/hardening_ebedb780/EC-014/proof.md.export.txt", + "id": "ec014", + "notice": "This canvas explains the pinned source. It is not a proof and does not change status.", + "path": "imports/hardening_ebedb780/EC-014/proof.md.export.txt", + "repository": "d6g8k5htny-coder/Math-", + "sha256": "c5e64b9ba3a906535f1ae58a161d594a427371599c102ae4a68849b087a2f62c", + "url": "https://raw.githubusercontent.com/d6g8k5htny-coder/Math-/d6628da09384728992dcbe6e921cc28ba85aebb0/imports/hardening_ebedb780/EC-014/proof.md.export.txt" + }, + "lifetime": { + "availability": "NO COMMITTED SAMPLES", + "blob": "247b3ecf80bfbe896948d5d489b2d5842a81c481", + "bytes": 17734, + "class": "engineering-only", + "commit": "d6628da09384728992dcbe6e921cc28ba85aebb0", + "html_url": "https://github.com/d6g8k5htny-coder/Math-/blob/d6628da09384728992dcbe6e921cc28ba85aebb0/frontiers/three_fronts_20260924/LIFETIME_REMAINDER.md", + "id": "lifetime", + "notice": "This canvas explains the pinned source. It is not a proof and does not change status.", + "path": "frontiers/three_fronts_20260924/LIFETIME_REMAINDER.md", + "repository": "d6g8k5htny-coder/Math-", + "sample_available": false, + "sha256": "380b7d0abdb0fe2de5a6564565af9560d3f1b1ce22fd5538927db0c52f4f3a4a", + "unavailable_notice": "No committed persistence/lifetime sample JSON was found on the pinned main or Math default trees. The theorem source is linked for scope; no synthetic data is substituted.", + "url": "https://raw.githubusercontent.com/d6g8k5htny-coder/Math-/d6628da09384728992dcbe6e921cc28ba85aebb0/frontiers/three_fronts_20260924/LIFETIME_REMAINDER.md" + }, + "p15": { + "blob": "582180e41dca0ad815ad0f18574df42040912149", + "bytes": 11352, + "class": "illustration", + "commit": "d6628da09384728992dcbe6e921cc28ba85aebb0", + "html_url": "https://github.com/d6g8k5htny-coder/Math-/blob/d6628da09384728992dcbe6e921cc28ba85aebb0/frontiers/full_price_20260924/PROOF.md", + "id": "p15", + "notice": "This canvas explains the pinned source. It is not a proof and does not change status.", + "path": "frontiers/full_price_20260924/PROOF.md", + "repository": "d6g8k5htny-coder/Math-", + "sha256": "87521901ca8e5405b4d1e47f1deb1cd0326affbd6f5967b53c4178590da993f9", + "url": "https://raw.githubusercontent.com/d6g8k5htny-coder/Math-/d6628da09384728992dcbe6e921cc28ba85aebb0/frontiers/full_price_20260924/PROOF.md" + }, + "remote": { + "blob": "b383bfcc88ec4ad497dff01fb6640e429ba24a84", + "bytes": 18355, + "class": "illustration", + "commit": "d6628da09384728992dcbe6e921cc28ba85aebb0", + "html_url": "https://github.com/d6g8k5htny-coder/Math-/blob/d6628da09384728992dcbe6e921cc28ba85aebb0/frontiers/remote_window_20260924/PROOF.md", + "id": "remote", + "notice": "This canvas explains the pinned source. It is not a proof and does not change status.", + "path": "frontiers/remote_window_20260924/PROOF.md", + "repository": "d6g8k5htny-coder/Math-", + "sha256": "a332bae9bdc0106ce17047f7e0409cc3d94eb610a0c7b74ba5ba2d01a1620cb7", + "url": "https://raw.githubusercontent.com/d6g8k5htny-coder/Math-/d6628da09384728992dcbe6e921cc28ba85aebb0/frontiers/remote_window_20260924/PROOF.md" + } + }, + "index_source": { + "blob": "e4cb1d943eaeb2049d080fcc53a57e042aebc6e8", + "bytes": 12708, + "commit": "d6628da09384728992dcbe6e921cc28ba85aebb0", + "html_url": "https://github.com/d6g8k5htny-coder/Math-/blob/d6628da09384728992dcbe6e921cc28ba85aebb0/PROOF_INDEX.md", + "path": "PROOF_INDEX.md", + "repository": "d6g8k5htny-coder/Math-", + "sha256": "f9c4db77aeab1c61d2a0c02f88a964cbfc6be63d18619acf0e047c884e0c0249", + "url": "https://raw.githubusercontent.com/d6g8k5htny-coder/Math-/d6628da09384728992dcbe6e921cc28ba85aebb0/PROOF_INDEX.md" + }, + "inventory_url": "../public-math/sources.json", + "meaning": "Selected display projection only; the existing 2,138-row public source catalog remains the inventory.", + "packets": [ + { + "id": "side24-identity-replay-20260926", + "identity": { + "blob": "a1c211e58f72af9c5206ed6731b6771a7366e301", + "bytes": 673, + "commit": "71400b94f6cb354a8cf7aba73ffede2138a64efa", + "html_url": "https://github.com/d6g8k5htny-coder/main/blob/71400b94f6cb354a8cf7aba73ffede2138a64efa/incoming/side24-identity-replay-20260926/IDENTITY.json", + "path": "incoming/side24-identity-replay-20260926/IDENTITY.json", + "repository": "d6g8k5htny-coder/main", + "sha256": "6087bfe1ccc12bd52ebb169d00975ce44e846d611f0628333a0dbd71a4448176", + "url": "https://raw.githubusercontent.com/d6g8k5htny-coder/main/71400b94f6cb354a8cf7aba73ffede2138a64efa/incoming/side24-identity-replay-20260926/IDENTITY.json" + }, + "issue": null, + "output": { + "blob": "f1dd2c6ba5a74d9f52fe91d66dd3d136e7d2166e", + "bytes": 362, + "commit": "71400b94f6cb354a8cf7aba73ffede2138a64efa", + "html_url": "https://github.com/d6g8k5htny-coder/main/blob/71400b94f6cb354a8cf7aba73ffede2138a64efa/incoming/side24-identity-replay-20260926/output.json", + "path": "incoming/side24-identity-replay-20260926/output.json", + "repository": "d6g8k5htny-coder/main", + "sha256": "813bcf5d81e1d5d52d37c112df23716701809f03e7b55939a2afb2e8e57741be", + "url": "https://raw.githubusercontent.com/d6g8k5htny-coder/main/71400b94f6cb354a8cf7aba73ffede2138a64efa/incoming/side24-identity-replay-20260926/output.json" + }, + "result": { + "blob": "132cc35d978f46133f28a669ed6e35d1ddf2e7bb", + "bytes": 1118, + "commit": "71400b94f6cb354a8cf7aba73ffede2138a64efa", + "html_url": "https://github.com/d6g8k5htny-coder/main/blob/71400b94f6cb354a8cf7aba73ffede2138a64efa/incoming/side24-identity-replay-20260926/RESULT.md", + "path": "incoming/side24-identity-replay-20260926/RESULT.md", + "repository": "d6g8k5htny-coder/main", + "sha256": "fa40a6b8afc413646081145d6d5d7b01cc4b5b4ddec32f4c6e82caa399e38cd8", + "url": "https://raw.githubusercontent.com/d6g8k5htny-coder/main/71400b94f6cb354a8cf7aba73ffede2138a64efa/incoming/side24-identity-replay-20260926/RESULT.md" + }, + "review_status": "REVIEW_REQUIRED", + "scientific_effect": "NONE" + } + ], + "schema_version": 1, + "scientific_status_authority": false, + "status_source": { + "blob": "52688102260e916dec1a38143186198b089a0261", + "bytes": 6881, + "commit": "71400b94f6cb354a8cf7aba73ffede2138a64efa", + "html_url": "https://github.com/d6g8k5htny-coder/main/blob/71400b94f6cb354a8cf7aba73ffede2138a64efa/STATUS.md", + "path": "STATUS.md", + "repository": "d6g8k5htny-coder/main", + "sha256": "9c3e21144423591a3dbff926858048c0363b9a32d6fe258a1de5088d38096141", + "url": "https://raw.githubusercontent.com/d6g8k5htny-coder/main/71400b94f6cb354a8cf7aba73ffede2138a64efa/STATUS.md" + } +} diff --git a/docs/site/museum.mjs b/docs/site/museum.mjs new file mode 100644 index 000000000..ba9081f80 --- /dev/null +++ b/docs/site/museum.mjs @@ -0,0 +1,213 @@ +import {verifiedBytes, hex40, hex64} from './core.mjs'; + +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']; +const OPEN_IDS=['d1-parent-selection-open','d5-pin-neighborhoods-open','sard-g-a1-a6-open']; +const EXHIBITS={ec014:['EC-014 pair frame','EC-014'],remote:['Fixed-remote region','D4 fixed-remote RN'],annulus:['Fixed annulus','D5 all-height fixed annulus'],p15:['P15 discrete palette','D6 P15 full price']}; +const VIEW_LINKS={'d3-side24-coefficient':'index.html#coefficient','d4-fixed-remote-rn':'museum.html?view=remote#active-exhibit','d5-all-height-annulus':'museum.html?view=annulus#active-exhibit','d5-height-window-annulus':'museum.html?view=annulus#active-exhibit','d6-p15-full-price':'museum.html?view=p15#active-exhibit'}; +const D5_OPEN_REVIEW='https://github.com/d6g8k5htny-coder/Math-/blob/4e188e25b1e1ef560f3eeb75c0d354d2ccf0ea22/reviews/d5_pin_neighborhood_20260926/REVIEW.md'; +const decoder=new TextDecoder('utf-8',{fatal:true}); +const nonempty=value=>typeof value==='string'&&value.trim().length>0; +const sameIdentity=(left,right)=>['repository','path','commit','blob','bytes','sha256','url','html_url'].every(key=>left[key]===right[key]); + +// The deadline covers both headers and body. Responses are capped while streaming, +// before allocating a complete buffer or handing source bytes to the hash verifier. +export async function boundedFetch(url,fetcher=fetch,maxBytes=2*1024*1024,timeoutMs=20000){ + if(!Number.isSafeInteger(maxBytes)||maxBytes<1||!Number.isFinite(timeoutMs)||timeoutMs<=0)throw Error('Invalid request bound'); + const controller=new AbortController();let reader,timer; + const cancel=()=>{controller.abort();if(reader)void reader.cancel().catch(()=>{});}; + const deadline=new Promise((_,reject)=>{timer=setTimeout(()=>{cancel();reject(Error('Source request timed out'));},timeoutMs);}); + const read=async()=>{ + const response=await fetcher(url,{credentials:'omit',redirect:'error',signal:controller.signal}); + if(!response.ok)return {ok:false,status:response.status,bytes:new Uint8Array()}; + const declared=response.headers?.get('content-length'); + if(declared!==null&&declared!==undefined&&Number(declared)>maxBytes){cancel();throw Error('Response exceeds byte limit');} + if(!response.body)return {ok:true,status:response.status,bytes:new Uint8Array()}; + reader=response.body.getReader();const chunks=[];let total=0; + while(true){const {done,value}=await reader.read();if(done)break;total+=value.byteLength;if(total>maxBytes){cancel();throw Error('Response exceeds byte limit');}chunks.push(value);} + const bytes=new Uint8Array(total);let offset=0;for(const chunk of chunks){bytes.set(chunk,offset);offset+=chunk.byteLength;} + return {ok:true,status:response.status,bytes}; + }; + try{return await Promise.race([read(),deadline]);}finally{clearTimeout(timer);} +} + +export function validateDescriptor(source){ + if(!source||!/^d6g8k5htny-coder\/(main|Math-|query-)$/.test(source.repository)||!hex40.test(source.commit)||!hex40.test(source.blob)||!hex64.test(source.sha256)||!Number.isSafeInteger(source.bytes)||source.bytes<1||source.bytes>2*1024*1024||!nonempty(source.path)||source.path.split('/').some(p=>!p||p==='.'||p==='..')||/[\\\x00-\x1f\x7f]/.test(source.path))throw Error('Invalid museum source identity or path'); + const path=source.path.split('/').map(encodeURIComponent).join('/'); + const raw=`https://raw.githubusercontent.com/${source.repository}/${source.commit}/${path}`; + const html=`https://github.com/${source.repository}/blob/${source.commit}/${path}`; + if(source.url!==raw||source.html_url!==html)throw Error('Museum source URL does not match displayed identity'); + if(source.pointer_only===true&&((!/^https:\/\/github\.com\/d6g8k5htny-coder\/(main|Math-)\/issues\/\d+(?:#issuecomment-\d+)?$/.test(source.review_url)&&source.review_url!==D5_OPEN_REVIEW)||!nonempty(source.review_notice)))throw Error('Invalid review pointer'); + return source; +} +function section(text,heading){ + const marker=`## ${heading}\n`; + const pieces=text.replaceAll('\r\n','\n').split(marker); + if(pieces.length!==2)throw Error('Missing or repeated source section'); + return pieces[1].split('\n## ')[0]; +} +function statusCells(row){return row.slice(1,-1).split('|').map(value=>value.trim());} +function plainTitle(value){return value.replaceAll('**','').trim();} +function sourceContainsPath(text,source){ + return text.includes(`](${source.path})`)||text.includes(source.html_url)||text.includes(`/${source.path})`); +} +function firstSourceMatches(text,source){const first=text.match(/\[[^\]]+\]\(([^)]+)\)/)?.[1];return first===source.path||first===source.html_url;} +export function validateBoundManifest(manifest,indexText,statusText){ + if(manifest?.schema_version!==1||manifest.scientific_status_authority!==false)throw Error('Invalid museum schema or status authority'); + validateDescriptor(manifest.index_source);validateDescriptor(manifest.status_source); + if(!Array.isArray(manifest.claims)||manifest.claims.length!==14)throw Error('Claim projection count mismatch'); + const reviewed=section(indexText,'Reviewed scoped results').split('\n').filter(line=>line.startsWith('- ')); + const open=section(statusText,'AMEND / open').split('\n').filter(line=>line.startsWith('|')).slice(2); + if(reviewed.length!==11||open.length!==3)throw Error('Pinned source projection count mismatch'); + const acceptedRows=section(statusText,'ACCEPT — scoped').split('\n').filter(line=>line.startsWith('|')).slice(2); + const expectedIds=[...REVIEWED_IDS,...OPEN_IDS]; + manifest.claims.forEach((claim,i)=>{ + if(claim.id!==expectedIds[i])throw Error('Claim projection order or object identity mismatch'); + const isOpen=i>=11,quote=isOpen?open[i-11]:reviewed[i]; + if(claim.scope_quote!==quote)throw Error('Claim quote differs from exact source projection'); + const title=isOpen?plainTitle(statusCells(quote)[0]):quote.slice(2).split(':')[0]; + if(claim.title!==title)throw Error('Claim title differs from source projection'); + const expectedClass=isOpen?'AMEND/open':i===9?'engineering-only':'ACCEPT-scoped'; + const expectedLabel=isOpen?'AMEND / open':i===9?'EXACT_COUNTEREXAMPLE':'ACCEPT'; + if(claim.class!==expectedClass||claim.source_label!==expectedLabel)throw Error('Claim class promotion or source label mismatch'); + validateDescriptor(claim.proof); + if(!isOpen){ + if(!firstSourceMatches(quote,claim.proof)||claim.proof.repository!==manifest.index_source.repository||claim.proof.commit!==manifest.index_source.commit)throw Error('Claim proof is not bound by its own pinned source quote'); + }else if(claim.id==='d1-parent-selection-open'){ + const parent=section(indexText,'Open or conditional results with complete proof text in GitHub').split('\n').find(line=>line.startsWith('- D1 parent lifetime theorem:'))||''; + if(!firstSourceMatches(parent,claim.proof)||claim.proof.repository!==manifest.index_source.repository||claim.proof.commit!==manifest.index_source.commit)throw Error('Open D1 proof differs from its exact index pointer'); + }else if(!sameIdentity(claim.proof,claim.id==='d5-pin-neighborhoods-open'?manifest.index_source:manifest.status_source))throw Error('Open claim source pointer identity differs'); + if(claim.review!==null){ + validateDescriptor(claim.review); + if(claim.review.pointer_only){ + const pointerSource=claim.id==='d1-parent-selection-open'?manifest.status_source:manifest.index_source; + const pointerText=claim.id==='d5-pin-neighborhoods-open'?section(indexText,'Open obligations without a complete proof yet').split('\n').find(line=>line.startsWith('- D5 pin neighborhoods:'))||'':quote; + if(!pointerText.includes(claim.review.review_url)||claim.review.sha256!==pointerSource.sha256||claim.review.url!==pointerSource.url||(claim.id==='d5-pin-neighborhoods-open'&&claim.review.review_url!==D5_OPEN_REVIEW))throw Error('Review pointer is not bound by its pinned source quote'); + }else if(!sourceContainsPath(quote,claim.review))throw Error('Review file differs from the source quote'); + } + if(isOpen&&claim.status_quote!==statusCells(quote)[1])throw Error('AMEND reason differs from source quote'); + if(!isOpen){ + const statusID={0:'D2',1:'D3',2:'D4',10:'D6'}[i]; + const matching=statusID?acceptedRows.filter(row=>plainTitle(statusCells(row)[0]).startsWith(`${statusID} —`)):[]; + const expected=statusID&&matching.length===1?statusCells(matching[0])[1]:null; + if((statusID&&matching.length!==1)||claim.status_quote!==expected)throw Error('STATUS scope quote does not match this claim'); + } + const replay=claim.replay; + if(!replay||!(replay.command===null||nonempty(replay.command))||!(replay.url===null||/^https:\/\/github\.com\/d6g8k5htny-coder\/(main|Math-|query-)\/blob\/[0-9a-f]{40}\//.test(replay.url))||!nonempty(replay.notice))throw Error('Invalid replay declaration'); + if(replay.source){validateDescriptor(replay.source);if(replay.url!==null&&replay.url!==replay.source.html_url)throw Error('Replay source URL differs from its identity');} + if(replay.command&&(!replay.source||replay.source.repository!==claim.proof.repository||replay.source.commit!==claim.proof.commit||replay.checkout!==claim.proof.commit))throw Error('Replay command lacks a matching pinned checkout/source'); + }); + for(const key of [...Object.keys(EXHIBITS),'lifetime'])validateDescriptor(manifest.exhibits?.[key]); + if(!sameIdentity(manifest.exhibits.lifetime,manifest.claims[0].proof))throw Error('Lifetime source identity differs from D2'); + if(!Array.isArray(manifest.packets)||manifest.packets.length>1)throw Error('Unexpected packet projection'); + for(const packet of manifest.packets){ + if(packet.id!=='side24-identity-replay-20260926'||packet.issue!==null||packet.scientific_effect!=='NONE'||packet.review_status!=='REVIEW_REQUIRED')throw Error('Packet has unexpected identity or scientific effect'); + validateDescriptor(packet.result); + if(packet.result.repository!=='d6g8k5htny-coder/main'||packet.result.path!==`incoming/${packet.id}/RESULT.md`)throw Error('Packet result path differs from its identity'); + if(packet.result.commit!==manifest.status_source.commit)throw Error('Packet commit differs from the pinned main snapshot'); + } + return manifest; +} +export async function verifyClaim(claim,fetcher=fetch){ + validateDescriptor(claim.proof); + const proofText=decoder.decode(await verifiedBytes(claim.proof,fetcher)); + if(claim.review){validateDescriptor(claim.review);await verifiedBytes(claim.review,fetcher);} + if(claim.replay.command&&!claim.replay.source)throw Error('Replay command has no pinned source'); + if(claim.replay.source){ + validateDescriptor(claim.replay.source);const replayText=decoder.decode(await verifiedBytes(claim.replay.source,fetcher)); + if(claim.replay.command&&!replayText.replaceAll('\r\n','\n').split('\n').some(line=>line.trim()===claim.replay.command))throw Error('Replay command is not recorded exactly in its verified source'); + } + return {claim,proofText}; +} +function element(document,tag,text,className){const node=document.createElement(tag);if(text!==undefined)node.textContent=text;if(className)node.className=className;return node;} +function anchor(document,text,url){const node=element(document,'a',text);node.href=url;return node;} +function identity(document,source){ + const list=element(document,'dl',undefined,'source-identity'); + for(const [name,value] of [['Repository',source.repository],['Path',source.path],['Commit',source.commit],['SHA-256',source.sha256]])list.append(element(document,'dt',name),element(document,'dd',value)); + return list; +} +function card(document,id,title,className,source){ + const article=element(document,'article',undefined,`museum-card ${className==='AMEND/open'?'amend-open':className==='ACCEPT-scoped'?'accept-scoped':className}`);article.id=id; + article.setAttribute('data-object-id',id);article.setAttribute('data-object-class',className); + const header=element(document,'div',undefined,'museum-card-header'); + const label=element(document,'p',id,'object-label');label.append(element(document,'span',className,'object-class')); + header.append(label,element(document,'h3',title),identity(document,source),element(document,'p',DISCLAIMER,'canvas-disclaimer')); + article.append(header);return article; +} +function strip(document,text){const bar=element(document,'aside',undefined,'engineering-strip');bar.append(element(document,'strong','Engineering — not acceptance'),element(document,'p',text));return bar;} +function refusal(document,title,error){const article=element(document,'article',undefined,'museum-card refused');article.append(element(document,'h3',title),element(document,'p',`Unavailable: ${error.message}. No result inferred.`));return article;} +function renderClaim(document,claim){ + const article=card(document,claim.id,claim.title,claim.class,claim.proof); + if(claim.id==='d3-side24-coefficient'){const alias=element(document,'span');alias.id='d3-side24';article.append(alias);} + const columns=element(document,'div',undefined,'claim-columns'); + const scope=element(document,'div',undefined,'claim-column');scope.append(element(document,'h4','Claim and scope'),element(document,'p',`Source label: ${claim.source_label}`),element(document,'blockquote',claim.scope_quote,'source-quote')); + if(claim.class==='AMEND/open')scope.append(element(document,'p','OPEN / NOT LANDED — the claimed closure remains open.')); + if(claim.status_quote!==null){const detail=element(document,'details');detail.append(element(document,'summary','Separate STATUS scope / reason'),element(document,'blockquote',claim.status_quote,'source-quote'));scope.append(detail);} + const source=element(document,'div',undefined,'claim-column');source.append(element(document,'h4','Source and review'),anchor(document,claim.proof.availability?'Open pinned source contract ↗':'Open pinned full proof ↗',claim.proof.html_url),element(document,'p')); + source.append(anchor(document,'Open raw source ↗',claim.proof.url)); + if(claim.proof.availability)source.append(element(document,'p',claim.proof.availability),element(document,'p','No landed proof is supplied for this open obligation.')); + if(VIEW_LINKS[claim.id])source.append(element(document,'p'),anchor(document,'Open source illustration ↗',VIEW_LINKS[claim.id])); + if(claim.review){ + source.append(element(document,'p',claim.review.pointer_only?'Review pointer in the verified index':'Byte-verified review'),anchor(document,'Open review ↗',claim.review.review_url||claim.review.html_url)); + if(claim.review.pointer_only)source.append(element(document,'p',claim.review.review_notice)); + if(claim.id==='d5-pin-neighborhoods-open')source.append(element(document,'p','Unmerged review pointer only. Its target is not fetched or adopted by this viewer.')); + const details=element(document,'details');details.append(element(document,'summary',claim.review.pointer_only?'Identity of the pointer source':'Review source identity'),identity(document,claim.review));source.append(details); + }else source.append(element(document,'p','No separate byte-frozen review descriptor is supplied. Read the review links in the exact source quote.')); + const replay=element(document,'div',undefined,'claim-column');replay.append(element(document,'h4','Replay'),element(document,'p',claim.replay.notice)); + if(claim.replay.command){const pre=element(document,'pre');pre.append(element(document,'code',claim.replay.command));replay.append(pre);} + if(claim.replay.url)replay.append(anchor(document,'Open pinned replay source ↗',claim.replay.url)); + if(claim.replay.source){const details=element(document,'details');details.append(element(document,'summary','Replay source identity'),identity(document,claim.replay.source));replay.append(details);} + columns.append(scope,source,replay);article.append(columns,strip(document,'Source byte count and SHA-256 verified. Review wording is quoted at its declared scope. Hashes, browser controls and replay output do not change status.'));return article; +} +async function renderLifetime(document,source,fetcher){ + await verifiedBytes(validateDescriptor(source),fetcher); + const article=card(document,'d2-lifetime-fixture','D2 lifetime source contract','engineering-only',source); + const body=element(document,'div',undefined,'fixture-body'); + body.append(element(document,'p','Fixture absent — no pinned numeric lifetime fixture is supplied.','fixture-absent'),element(document,'p','The source gives an existential O(1) remainder for sufficiently small lifetime. It supplies no numerical remainder constant or numerical lifetime cutoff. No lifetime curve or error band is inferred.'),anchor(document,'Read the pinned D2 proof ↗',source.html_url)); + article.append(body,strip(document,'Replay unavailable until a source-bound fixture is supplied and reviewed. This is a source-contract stub.'));return article; +} +async function renderPacket(document,packet,fetcher){ + const text=decoder.decode(await verifiedBytes(packet.result,fetcher)); + if(!/Scientific effect:\s*\*\*NONE\*\*/.test(text)||!/Review status:\s*\*\*REVIEW_REQUIRED\*\*/.test(text))throw Error('Packet source declarations differ'); + const article=card(document,packet.id,'Packet — not STATUS','engineering-only',packet.result),body=element(document,'div',undefined,'packet-body'); + body.append(element(document,'p','packet — not STATUS'),element(document,'p',`Packet ID: ${packet.id}`),element(document,'p','Task issue: not stated in the packet'),element(document,'p','scientific_effect: NONE · review_status: REVIEW_REQUIRED'),anchor(document,'Open pinned RESULT.md ↗',packet.result.html_url)); + article.append(body,strip(document,'Landed packet bytes are visible for review. The result is not an accepted claim and is not inserted into STATUS.'));return article; +} +export async function startMuseum({document=globalThis.document,fetcher=globalThis.fetch,search=globalThis.location?.search||'',geometryLoader=()=>import('./geometry.mjs')}={}){ + 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];})); + try{ + const response=await boundedFetch('museum.json',fetcher,256*1024);if(!response.ok)throw Error(`Museum manifest unavailable (${response.status})`); + const raw=response.bytes; + const manifest=JSON.parse(decoder.decode(raw));validateDescriptor(manifest.index_source);validateDescriptor(manifest.status_source); + const cache=new Map(); + const cachedFetch=url=>{const key=String(url);if(!cache.has(key))cache.set(key,boundedFetch(url,fetcher));return cache.get(key).then(result=>({ok:result.ok,status:result.status,arrayBuffer:async()=>result.bytes.buffer}));}; + const [index,status]=await Promise.all([verifiedBytes(manifest.index_source,cachedFetch),verifiedBytes(manifest.status_source,cachedFetch)]); + validateBoundManifest(manifest,decoder.decode(index),decoder.decode(status)); + containers['museum-state'].textContent='Pinned source projections verified: 11 reviewed index entries and 3 separate AMEND rows. Verifying each linked source before display…'; + const placeholders=manifest.claims.map(claim=>{const host=element(document,'div');host.append(element(document,'p',`Verifying ${claim.title}…`));containers['claim-cards'].append(host);return host;}); + const jobs=manifest.claims.map(async(claim,i)=>{try{await verifyClaim(claim,cachedFetch);placeholders[i].replaceChildren(renderClaim(document,claim));}catch(error){placeholders[i].replaceChildren(refusal(document,claim.title,error));return false;}return true;}); + jobs.push((async()=>{try{containers['lifetime-fixture'].replaceChildren(await renderLifetime(document,manifest.exhibits.lifetime,cachedFetch));return true;}catch(error){containers['lifetime-fixture'].replaceChildren(refusal(document,'D2 lifetime fixture',error));return false;}})()); + if(!manifest.packets.length)containers['packet-cards'].append(element(document,'p','No packet appears in this pinned projection.')); + for(const packet of manifest.packets)jobs.push((async()=>{try{containers['packet-cards'].append(await renderPacket(document,packet,cachedFetch));return true;}catch(error){containers['packet-cards'].append(refusal(document,'Packet source',error));return false;}})()); + const kind=new URLSearchParams(search).get('view'); + if(kind){ + if(!Object.hasOwn(EXHIBITS,kind))containers['active-exhibit'].append(refusal(document,'Unknown exhibit',Error('Select one of the four declared source illustrations'))); + else jobs.push((async()=>{try{ + const source=manifest.exhibits[kind],sourceText=decoder.decode(await verifiedBytes(source,cachedFetch)); + const quote=manifest.exhibit_quotes?.[kind]; + if(!nonempty(quote)||!sourceText.replaceAll('\r\n','\n').includes(quote))throw Error('Exhibit quote differs from the pinned source'); + const [title,id]=EXHIBITS[kind],article=card(document,id,title,'illustration',source),body=element(document,'div',undefined,'museum-visual'),host=element(document,'div',undefined,'geometry-host'); + body.append(anchor(document,'Open pinned source ↗',source.html_url),host,anchor(document,'Return to all claim cards','museum.html#claims'));article.append(body,strip(document,'Illustrative coordinates and camera motion explain the pinned source. They compute no field, certificate or scientific status.'));containers['active-exhibit'].append(article); + const module=await geometryLoader();await module.mountGeometry(host,kind,source); + const quoted=element(document,'details');quoted.append(element(document,'summary','Exact source excerpt'),element(document,'blockquote',quote,'source-quote'));body.append(quoted);return true; + }catch(error){containers['active-exhibit'].replaceChildren(refusal(document,'Source illustration',error));return false;}})()); + } + const outcomes=await Promise.all(jobs),failed=outcomes.filter(value=>!value).length; + containers['museum-state'].textContent=failed?`Pinned source projections verified. ${failed} source view(s) unavailable; no result inferred for those views.`:'Source projections and displayed source bytes verified. These checks establish byte identity, not mathematical acceptance.'; + }catch(error){ + containers['museum-state'].textContent=`Unavailable: ${error.message}. No result inferred.`;containers['museum-state'].className='error'; + for(const id of ids.slice(1))containers[id].replaceChildren(); + } +} +if(typeof document!=='undefined')await startMuseum(); diff --git a/docs/site/style.css b/docs/site/style.css index 4768912f1..519e64045 100644 --- a/docs/site/style.css +++ b/docs/site/style.css @@ -1 +1,16 @@ *{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:#f6f5f0;color:#162f36;font:16px/1.65 system-ui,sans-serif}a{color:#07596c;text-underline-offset:4px}header{display:flex;justify-content:space-between;align-items:center;padding:24px 5vw;border-bottom:1px solid #ced5d2;gap:24px}header a{text-decoration:none}.brand{font-weight:850;letter-spacing:.1em;color:#162f36}.brand span{display:block;font-size:10px;color:#536b70;letter-spacing:.2em}nav{display:flex;gap:24px;font-size:14px;font-weight:650}main{max-width:1180px;margin:auto;padding:0 32px}section{padding:64px 0;border-bottom:1px solid #ced5d2;scroll-margin-top:20px}.hero{padding-top:76px}.eyebrow{font-size:12px;letter-spacing:.16em;font-weight:750;color:#53706c;margin:0 0 18px}h1{font-family:Georgia,serif;font-size:clamp(36px,5.4vw,66px);line-height:1.12;letter-spacing:-.04em;font-weight:500;margin:12px 0 26px}h2{font-family:Georgia,serif;font-size:clamp(27px,3.3vw,39px);line-height:1.2;font-weight:500;letter-spacing:-.025em;margin:0 0 12px}h3{line-height:1.35}.intro{font-size:19px;max-width:640px;color:#41575c}.actions{display:flex;gap:12px;margin:28px 0}.button,button{display:inline-block;border:1px solid #204c52;background:#204c52;color:white;padding:10px 18px;font:650 14px/1.5 system-ui;cursor:pointer;text-decoration:none;border-radius:4px}.button.secondary{color:#204c52;background:transparent}button:disabled{cursor:wait;opacity:.55}.boundary{font-size:14px;border-left:3px solid #bc893b;padding:9px 16px;background:#eeebe1;max-width:900px}.section-heading{display:flex;justify-content:space-between;align-items:end;gap:24px;margin-bottom:24px}.section-heading>a{font-size:14px;white-space:nowrap}.cards{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;margin:28px 0}.cards article{padding:24px;background:#fff;border:1px solid #dbe0dc;border-top:3px solid #538b77;border-radius:5px}.cards article.amend{border-top-color:#b48235}.cards article.engineering{border-top-color:#6d859d}.count{font:500 44px/1 Georgia,serif;display:block}.cards h3{font-size:16px;margin:15px 0 8px}.cards p{font-size:14px;color:#526568;margin:0}.status-group{margin:24px 0}.status-group summary{cursor:pointer;font-weight:700;padding:15px 0;border-bottom:1px solid #ccd6d0}.status-object{padding:16px 0;border-bottom:1px solid #dfe4df}.status-object h4{margin:0 0 8px}.status-object p{margin:7px 0;font-size:14px}.custody{padding:20px 24px;background:#e9eeea;margin-top:24px;border-radius:5px}.custody h3{margin-top:0}.custody p{font-size:14px}code,dd,.hash{font-family:ui-monospace,monospace;font-size:12px;overflow-wrap:anywhere}.explorer{display:grid;grid-template-columns:1fr 1.1fr;gap:40px;margin:32px 0;padding:28px;background:#fff;border:1px solid #dbe0dc;border-radius:6px}label{display:block;font-size:14px;font-weight:700;margin-bottom:7px}select,input{font:inherit;padding:10px 12px;border:1px solid #a4b7b1;border-radius:4px;background:white;color:#162f36}input{width:100%;margin-top:5px}dt{font-size:13px;color:#546c6b;margin-top:16px}dd{font-size:16px;margin:2px 0}figure{margin:0;align-self:center}svg{width:100%;height:auto}figcaption{font-size:12px;color:#576b70}details>summary{cursor:pointer}details p{font-size:14px}table{border-collapse:collapse;width:100%;font-size:13px}th{text-align:left;font-size:11px;letter-spacing:.09em;text-transform:uppercase;background:#e8ede8;padding:12px}td{vertical-align:top;padding:14px 12px;border-bottom:1px solid #d9e1db}td:first-child{max-width:460px;overflow-wrap:anywhere}td:nth-child(2){max-width:150px}td:nth-child(3){max-width:280px}.table-wrap{overflow:auto;margin:20px 0}td small{display:block;color:#54696d}.contribute a{display:block;margin-top:20px;font-size:14px}.error{color:#993921}.good{color:#22654d}.muted{color:#596e72}footer{max-width:1180px;margin:auto;padding:30px 32px 60px;font-size:13px;color:#576b70}a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid #bd8531;outline-offset:4px}@media(max-width:720px){header{align-items:start;padding:20px;flex-direction:column;gap:14px}nav{gap:22px}main{padding:0 20px}section{padding:44px 0}.hero{padding-top:42px}.section-heading{display:block}.cards{grid-template-columns:1fr}.cards article{padding:20px}.count{font-size:34px}.explorer{grid-template-columns:1fr;padding:20px;gap:24px}.boundary{font-size:13px}.contribute{gap:12px}footer{padding:26px 20px}} + +/* Source context stays visible beside the exhibit and selected status rows. */ +nav,.actions{flex-wrap:wrap} +.source-header{padding:16px 18px;margin:16px 0;border:1px solid #ced8d2;border-radius:4px;background:#f2f5f0;overflow-wrap:anywhere} +.source-header p,.cards .source-header p{margin:5px 0;font-size:12px;line-height:1.55} +.source-header>a{font-size:12px} +.source-header .canvas-disclaimer,.cards .source-header .canvas-disclaimer{margin-top:12px;padding-top:10px;border-top:1px solid #ced8d2;color:#304e55} +.status-object>.source-header{max-width:850px} +.catalog-filters{display:grid;grid-template-columns:minmax(170px,1fr) 3fr;gap:18px;margin:24px 0} +.catalog-filters select{width:100%;margin-top:5px} +#query-identity p{margin:5px 0;overflow-wrap:anywhere} +@media(max-width:720px){nav{gap:12px 20px}.actions{align-items:flex-start}.catalog-filters{grid-template-columns:1fr;gap:12px}.source-header{padding:12px}.cards .source-header{margin-bottom:0}} +.cards article.amend{border-top:3px dashed #b48235} +.status-object[data-class="AMEND/open"]{border-left:3px dashed #b48235;padding-left:18px} +.status-object[data-class="AMEND/open"]>.source-header{border-style:dashed} diff --git a/tests/test_museum_data.py b/tests/test_museum_data.py new file mode 100644 index 000000000..dddb2d78c --- /dev/null +++ b/tests/test_museum_data.py @@ -0,0 +1,134 @@ +"""Negative controls for byte-bound museum projections (no network).""" +import copy +import importlib.util +import json +from pathlib import Path +import subprocess +import tempfile +import unittest +from unittest.mock import patch + +ROOT = Path(__file__).resolve().parents[1] +SPEC = importlib.util.spec_from_file_location("museum_data", ROOT / "tools/museum_data.py") +museum = importlib.util.module_from_spec(SPEC) +SPEC.loader.exec_module(museum) +# Immutable public index fixture. It is evidence for extraction tests, not a catalog. +INDEX_BYTES = "# Proof availability index\n\nThis file links full proof text, exact reviews, and explicitly incomplete proof obligations. Local links open the retained files in this public repository; immutable external links identify sources still on other public branches. Scientific status is unchanged by this index. Review descriptions below report the linked records, checked on 2026-09-26; they do not replace the claim manifest or the source statements.\n\n## Imported source bytes — publication only\n\n[PR70](https://github.com/d6g8k5htny-coder/Math-/pull/70) landed these public imports at Math- commit `9d7b6802424fb4715b31999066aafca8ee2f3cca`.\nOpen the [custody ledger](https://github.com/d6g8k5htny-coder/Math-/blob/9d7b6802424fb4715b31999066aafca8ee2f3cca/imports/hardening_ebedb780/README.md) or [identity manifest](https://github.com/d6g8k5htny-coder/Math-/blob/9d7b6802424fb4715b31999066aafca8ee2f3cca/imports/hardening_ebedb780/MANIFEST.json) for paths, sizes, Git blobs, and SHA256 digests.\nThe nine `BYTE_COPY` IDs are `EC-014`, `EC-015`, `EC-021`, `P02-LM-001`, `P02-LM-002`, `P02-LM-005`, `P02-LM-007`, `P02-LM-008`, and `P15-B`.\nTheir destination root is [`imports/hardening_ebedb780/`](imports/hardening_ebedb780/); the source is `d6g8k5htny-coder/main@ebedb7802024fa557e9071e4c9cec7cddc474b89`.\nThe separate `main#59` carrier is a labeled `TRANSCRIPTION`, not original bytes and not one of the nine byte copies.\nVerify custody with `python -B -S imports/hardening_ebedb780/verify.py`.\n**Publication is not acceptance.** Source self-labels are quoted, not adopted; no verdict, `lemma_closed`, prize, premise, or landing claim changes here.\nThe shared [public inventory](https://github.com/d6g8k5htny-coder/main/tree/main/docs/public-math) remains the catalog; this pointer creates no second inventory.\n\n## Reviewed scoped results\n\n- D2 lifetime remainder: proof [frontiers/three_fronts_20260924/LIFETIME_REMAINDER.md](frontiers/three_fronts_20260924/LIFETIME_REMAINDER.md); [R1–R4 review](https://github.com/d6g8k5htny-coder/main/issues/67#issuecomment-5841270276) and [R5/R6 delta review](https://github.com/d6g8k5htny-coder/main/issues/67#issuecomment-5841782206) record ACCEPT for Theorem R at its stated existential `O(1)`-remainder scope. The delta identifies its exact parent imports and does not consume the still-open Theorem A cubic selection bound. Numerical constants/radii, a second coefficient, and RN/24-jet closure are outside this verdict. [main #67](https://github.com/d6g8k5htny-coder/main/issues/67) remains open for other bundled fronts.\n- D3 SIDE24 coefficient: proof [coefficients/side24_v1/PROOF.md](coefficients/side24_v1/PROOF.md); [C1–C6 review](https://github.com/d6g8k5htny-coder/main/issues/65#issuecomment-5841269490) verifies the coefficient calculation; [reconciliation](https://github.com/d6g8k5htny-coder/main/issues/65#issuecomment-5841779222) closes the coefficient-review work package. Interpretation as the parent lifetime law retains the parent's separate dependency and review boundaries.\n- D4 fixed-remote RN theorem: proof [frontiers/remote_window_20260924/PROOF.md](frontiers/remote_window_20260924/PROOF.md); [source-bound review](https://github.com/d6g8k5htny-coder/main/issues/76#issuecomment-5841783172) and [scoped reconciliation](https://github.com/d6g8k5htny-coder/main/issues/76#issuecomment-5841861362) record ACCEPT on the seven fixed-rho/fixed-eta interfaces. Shrinking spatial cutoffs, pin/intermediate regions, and shrinking witness separation are outside that review.\n- D5 all-height fixed annulus: proof [frontiers/rn_annulus_bridge_20260925/PROOF.md](frontiers/rn_annulus_bridge_20260925/PROOF.md); review [reviews/pr28_annulus_bridge_nonauthor_20260925/REVIEW.md](reviews/pr28_annulus_bridge_nonauthor_20260925/REVIEW.md) records R1–R7 ACCEPT at fixed `d=2`, fixed `L`, compact positive-gap marks, and fixed annulus `10`. NO COMPLETE PROOF YET: shrinking-separation factorial-moment/collision estimate.\n- D0 historical CH-LIFT/Piece-2/24-jet obligations outside reviewed regional bypasses: see [frontiers/downstream_gate_20260925/GRAPH.json](frontiers/downstream_gate_20260925/GRAPH.json). NO COMPLETE PROOF YET where not explicitly superseded; absent historical carriers remain ABSENT.\n\n## Repository rule\n\nA reviewed/closed theorem or lemma must have its full proof or immutable byte-bound mirror in this repository plus the exact review/certificate. An open theorem with a complete candidate proof must link it here. An open item without a complete proof must link the strongest partial derivation and state the missing proof explicitly. Superseded/refuted work stays available. Tests and hashes are evidence, not substitutes for analytic proof. A navigation refresh records source availability and existing review scope; any change to [claims/LANDING_CLAIMS.json](claims/LANDING_CLAIMS.json) or the D0-D7 graph requires its own source-bound reconciliation through the existing validators.\n".encode("utf-8") + + +class MuseumDataTests(unittest.TestCase): + def setUp(self): + self.status = (ROOT / "STATUS.md").read_bytes() + + def test_exact_fourteen_projections_and_distinct_d5_scopes(self): + claims = museum.project(INDEX_BYTES, self.status) + self.assertEqual(len(claims), 14) + self.assertEqual([c["class"] for c in claims].count("ACCEPT-scoped"), 10) + self.assertEqual([c["class"] for c in claims].count("AMEND/open"), 3) + self.assertEqual(claims[3]["title"], "D5 all-height fixed annulus") + self.assertEqual(claims[3]["class"], "ACCEPT-scoped") + self.assertIsNone(claims[3]["status_quote"]) + self.assertEqual(claims[12]["class"], "AMEND/open") + self.assertIn("inner microdisk", claims[12]["status_quote"]) + self.assertEqual(claims[9]["source_label"], "EXACT_COUNTEREXAMPLE") + self.assertEqual(claims[9]["class"], "engineering-only") + exact = INDEX_BYTES.decode().split("## Reviewed scoped results\n", 1)[1].split("\n## ", 1)[0] + self.assertEqual([c["scope_quote"] for c in claims[:11]], + [line for line in exact.splitlines() if line.startswith("- ")]) + + def test_changed_quote_refused_before_projection(self): + for raw in (INDEX_BYTES.replace(b"only.", b"globally.", 1), INDEX_BYTES + b" "): + with self.subTest(raw=raw[-10:]), self.assertRaisesRegex(ValueError, "identity mismatch"): + museum.project(raw, self.status) + + def test_status_promotion_refused(self): + with self.assertRaisesRegex(ValueError, "identity mismatch"): + museum.project(INDEX_BYTES, self.status.replace(b"AMEND", b"ACCEPT", 1)) + + def test_misdirected_review_pointer_refused(self): + specs = copy.deepcopy(museum.CLAIM_SPECS) + specs[3][2] = "reviews/pr16_fixed_transverse_nonauthor_20260925/REVIEW.md" + with patch.object(museum, "CLAIM_SPECS", specs), self.assertRaisesRegex(ValueError, "review pointer"): + museum.project(INDEX_BYTES, self.status) + + def test_replay_commands_bind_source_and_checkout(self): + claims = museum.project(INDEX_BYTES, self.status) + for index in (0, 2, 10): + replay = claims[index]["replay"] + self.assertEqual(replay.get("source", {}).get("path"), "README.md") + self.assertEqual(replay.get("working_directory"), "Math- repository root") + self.assertEqual(replay.get("checkout"), "d6628da09384728992dcbe6e921cc28ba85aebb0") + + def test_invalid_identity_fields_refused(self): + for field, value in (("commit", "main"), ("bytes", True), ("sha256", "0"*63), ("blob", "main")): + identity = dict(museum.INDEX, **{field: value}) + with self.subTest(field=field), self.assertRaisesRegex(ValueError, "identity"): + museum.verify_bytes(INDEX_BYTES, identity) + + def test_check_rejects_quote_identity_and_class_tampering(self): + expected = {"claims": museum.project(INDEX_BYTES, self.status)} + with tempfile.TemporaryDirectory() as tmp: + path = Path(tmp) / "museum.json" + for field, value in (("scope_quote", "Globally accepted"), ("class", "ACCEPT"), + ("source_label", "CLOSED")): + changed = copy.deepcopy(expected) + changed["claims"][12][field] = value + path.write_bytes(museum.dump(changed)) + with self.subTest(field=field), self.assertRaisesRegex(ValueError, "export differs"): + museum.check_export(path, expected) + changed = copy.deepcopy(expected) + changed["claims"][0]["proof"]["sha256"] = "0"*64 + path.write_bytes(museum.dump(changed)) + with self.assertRaisesRegex(ValueError, "export differs"): + museum.check_export(path, expected) + + def test_packet_selection_excludes_unknown_fork_packet(self): + packets = museum.packet_descriptors() + self.assertEqual([p["id"] for p in packets], ["side24-identity-replay-20260926"]) + self.assertIsNone(packets[0]["issue"]) + self.assertEqual(packets[0]["scientific_effect"], "NONE") + self.assertEqual(packets[0]["review_status"], "REVIEW_REQUIRED") + self.assertEqual(packets[0]["result"]["commit"], "71400b94f6cb354a8cf7aba73ffede2138a64efa") + # Only the frozen landed packet is selected; filesystem discovery must not add a fork. + self.assertNotIn("showcase", json.dumps(packets).lower()) + + def test_review_pointers_do_not_claim_comment_byte_custody(self): + claims = museum.project(INDEX_BYTES, self.status) + for claim in claims[:3]: + self.assertTrue(claim["review"]["pointer_only"]) + self.assertEqual(claim["review"]["path"], "PROOF_INDEX.md") + self.assertIn("#issuecomment-", claim["review"]["review_url"]) + self.assertNotIn("pointer_only", claims[3]["review"]) + self.assertEqual(claims[3]["review"]["path"], + "reviews/pr28_annulus_bridge_nonauthor_20260925/REVIEW.md") + + def test_landed_packet_can_be_read_from_pinned_sparse_checkout(self): + source = museum.packet_descriptors()[0]["result"] + raw = museum.read_source(source, ROOT, None) + self.assertEqual(len(raw), 1118) + self.assertEqual(__import__("hashlib").sha256(raw).hexdigest(), + "fa40a6b8afc413646081145d6d5d7b01cc4b5b4ddec32f4c6e82caa399e38cd8") + + def test_historical_snapshot_ignores_unrelated_working_tree_append(self): + with tempfile.TemporaryDirectory() as tmp: + checkout = Path(tmp) / "checkout" + subprocess.run(["git", "clone", "--shared", "--no-checkout", "--quiet", + str(ROOT), str(checkout)], check=True, capture_output=True) + changed = self.status + b"\nUnrelated later status note.\n" + (checkout / "STATUS.md").write_bytes(changed) + raw = museum.read_source(museum.STATUS, checkout, None) + self.assertEqual(raw, self.status) + self.assertEqual(museum.project(INDEX_BYTES, raw), + museum.project(INDEX_BYTES, self.status)) + self.assertEqual((checkout / "STATUS.md").read_bytes(), changed) + + def test_plain_fixture_directory_does_not_bypass_byte_verification(self): + with tempfile.TemporaryDirectory() as tmp: + fixture = Path(tmp) + (fixture / "STATUS.md").write_bytes(self.status + b"\nChanged fixture.\n") + with self.assertRaisesRegex(ValueError, "identity mismatch"): + museum.read_source(museum.STATUS, fixture, None) + + +if __name__ == "__main__": + unittest.main() diff --git a/tests/test_museum_frontend.mjs b/tests/test_museum_frontend.mjs new file mode 100644 index 000000000..ae966d042 --- /dev/null +++ b/tests/test_museum_frontend.mjs @@ -0,0 +1,151 @@ +import test from 'node:test'; +import assert from 'node:assert/strict'; +import fs from 'node:fs'; +import {createHash} from 'node:crypto'; +import {execFileSync} from 'node:child_process'; + +const moduleURL = new URL('../docs/site/museum.mjs', import.meta.url); +test('museum exposes source-bound rendering rather than silently omitting the page', () => { + assert.ok(fs.existsSync(moduleURL), 'The museum implementation is missing'); +}); +const museum = fs.existsSync(moduleURL) ? await import(moduleURL) : null; +const available = {skip: !museum}; +const digest = value => createHash('sha256').update(value).digest('hex'); +const pin = (path, value) => ({repository:'d6g8k5htny-coder/Math-', path, commit:'a'.repeat(40), blob:'b'.repeat(40), bytes:Buffer.byteLength(value), sha256:digest(value), url:`https://raw.githubusercontent.com/d6g8k5htny-coder/Math-/${'a'.repeat(40)}/${path}`, html_url:`https://github.com/d6g8k5htny-coder/Math-/blob/${'a'.repeat(40)}/${path}`}); +const 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']; +function fixture() { + const proof = pin('proof.md','Pinned proof.'); + const claims = ids.map((id,i) => ({id,title:`Object ${i}`,scope_quote:`- Object ${i}: [proof](proof.md). Scope ${i}.`,source_label:i===9?'EXACT_COUNTEREXAMPLE':'ACCEPT',class:i===9?'engineering-only':'ACCEPT-scoped',proof,review:null,replay:{command:null,url:null,notice:'No executable replay fixture is supplied.'},status_quote:null})); + for(const i of [0,1,2,10])claims[i].status_quote=`Accepted scope ${i}.`; + const open = ['d1-parent-selection-open','d5-pin-neighborhoods-open','sard-g-a1-a6-open'].map((id,i)=>({id,title:`Open ${i}`,scope_quote:`| **Open ${i}** | Still open ${i}. | [Proof](proof.md) |`,source_label:'AMEND / open',class:'AMEND/open',proof,review:null,replay:{command:null,url:null,notice:'No executable replay fixture is supplied.'},status_quote:`Still open ${i}.`})); + const index = `# Index\n\n## Reviewed scoped results\n\n${claims.map(c=>c.scope_quote).join('\n')}\n\n## Open or conditional results with complete proof text in GitHub\n- D1 parent lifetime theorem: full proof [proof](proof.md).\n`; + const acceptedRows=[[0,'D2'],[1,'D3'],[2,'D4'],[10,'D6']].map(([i,id])=>`| **${id} — scope** | Accepted scope ${i}. | Review | Limits |`).join('\n'); + const status = `# Status\n\n## ACCEPT — scoped\n\n| Object | Accepted scope | Source and review | Explicit limits |\n|---|---|---|---|\n${acceptedRows}\n\n## AMEND / open\n\n| Object | Current reason | Source |\n|---|---|---|\n${open.map(c=>c.scope_quote).join('\n')}\n\n## Engineering only\n`; + const indexSource=pin('PROOF_INDEX.md',index),statusSource=pin('STATUS.md',status);open[1].proof=indexSource;open[2].proof=statusSource; + return {index,status,manifest:{schema_version:1,scientific_status_authority:false,index_source:indexSource,status_source:statusSource,claims:[...claims,...open],exhibits:{ec014:proof,remote:proof,annulus:proof,p15:proof,lifetime:proof},packets:[]}}; +} + +test('full reviewed bullets and all three AMEND rows retain their classes and source wording',available,()=>{ + const {manifest,index,status}=fixture(); + assert.equal(museum.validateBoundManifest(manifest,index,status).claims.length,14); + const changed=structuredClone(manifest);changed.claims[0].scope_quote+=' Broader conclusion.'; + assert.throws(()=>museum.validateBoundManifest(changed,index,status),/projection|quote/i); + const omitted=structuredClone(manifest);omitted.claims.splice(2,1); + assert.throws(()=>museum.validateBoundManifest(omitted,index,status),/projection|count|order/i); +}); +test('source display cannot promote a counterexample or an AMEND row',available,()=>{ + for(const index of [9,11]) {const f=fixture();f.manifest.claims[index].class='ACCEPT-scoped';assert.throws(()=>museum.validateBoundManifest(f.manifest,f.index,f.status),/class|promotion/i);} + const f=fixture();f.manifest.scientific_status_authority=true;assert.throws(()=>museum.validateBoundManifest(f.manifest,f.index,f.status),/authority/i); +}); +test('a genuine source elsewhere in the index cannot replace this claim proof or scope',available,()=>{ + const f=fixture();f.index+='\n[Other proof](other.md)\n';f.manifest.index_source=pin('PROOF_INDEX.md',f.index); + f.manifest.claims[3].proof=pin('other.md','A genuine different proof.'); + assert.throws(()=>museum.validateBoundManifest(f.manifest,f.index,f.status),/proof|own.*quote/i); + const swapped=fixture();swapped.manifest.claims[3].status_quote=swapped.manifest.claims[10].status_quote; + assert.throws(()=>museum.validateBoundManifest(swapped.manifest,swapped.index,swapped.status),/STATUS.*scope/i); +}); +test('replay command must occur exactly in the verified replay source',available,async()=>{ + const f=fixture(),claim=f.manifest.claims[0];claim.replay.command='python invented-solver.py';claim.replay.source=claim.proof; + await assert.rejects(()=>museum.verifyClaim(claim,async()=>new Response('Pinned proof.')),/replay command/i); +}); +test('lifetime source identity must match D2 and packets must use the pinned main snapshot',available,()=>{ + const f=fixture();f.manifest.exhibits.lifetime=pin('other.md','Different source.'); + assert.throws(()=>museum.validateBoundManifest(f.manifest,f.index,f.status),/lifetime|D2/i); + const g=fixture(),result=pin('incoming/side24-identity-replay-20260926/RESULT.md','Packet');result.repository='d6g8k5htny-coder/main';result.commit='c'.repeat(40);result.url=`https://raw.githubusercontent.com/${result.repository}/${result.commit}/${result.path}`;result.html_url=`https://github.com/${result.repository}/blob/${result.commit}/${result.path}`; + g.manifest.packets=[{id:'side24-identity-replay-20260926',issue:null,result,scientific_effect:'NONE',review_status:'REVIEW_REQUIRED'}]; + assert.throws(()=>museum.validateBoundManifest(g.manifest,g.index,g.status),/Packet.*snapshot|Packet.*commit/i); +}); +test('malformed, mutable and falsely displayed source identities are refused before fetch',available,()=>{ + const source=pin('proof.md','Pinned proof.'); + for(const change of [{commit:'a'.repeat(8)},{sha256:'0'.repeat(63)},{path:'../proof.md'},{repository:'private'},{url:source.url.replace('/'+source.commit+'/','/main/')},{html_url:source.html_url.replace('/proof.md','/other.md')}]) assert.throws(()=>museum.validateDescriptor({...source,...change}),/identity|source|path|URL/i); +}); +test('verified source bytes are required before a claim can be presented',available,async()=>{ + const f=fixture(),claim=f.manifest.claims[0]; + const badFetch=async()=>new Response('Changed proof.'); + await assert.rejects(()=>museum.verifyClaim(claim,badFetch),/byte count|SHA-256/i); + const result=await museum.verifyClaim(claim,async()=>new Response('Pinned proof.')); + assert.equal(result.proofText,'Pinned proof.'); +}); +test('streamed responses stop at the byte cap and cancel the reader',available,async()=>{ + let cancelled=false; + const response=new Response(new ReadableStream({pull(controller){controller.enqueue(new Uint8Array(8));},cancel(){cancelled=true;}})); + await assert.rejects(()=>museum.boundedFetch('source',async()=>response,12,1000),/byte limit/i); + assert.equal(cancelled,true); +}); +test('a stalled response body is aborted within its request deadline',available,async()=>{ + let cancelled=false,signal; + const response=new Response(new ReadableStream({pull(){return new Promise(()=>{});},cancel(){cancelled=true;}})); + await assert.rejects(()=>museum.boundedFetch('source',async(_url,options)=>{signal=options.signal;return response;},32,15),/timed out/i); + assert.equal(signal.aborted,true);assert.equal(cancelled,true); +}); +test('review comment pointers cannot masquerade as byte-frozen comment content',available,()=>{ + const f=fixture();f.manifest.claims[0].review={...f.manifest.index_source,pointer_only:true,review_url:'https://github.com/d6g8k5htny-coder/main/issues/67#issuecomment-123',review_notice:'Pointer only.'}; + assert.throws(()=>museum.validateBoundManifest(f.manifest,f.index,f.status),/review pointer/i); +}); +test('AMEND pointers bind their declared STATUS row or the specific open-obligation index entry',available,()=>{ + const f=fixture(),claim=f.manifest.claims[11],url='https://github.com/d6g8k5htny-coder/main/issues/63#issuecomment-123'; + const row=claim.scope_quote.replace('[Proof](proof.md)',`[Review](${url})`); + f.status=f.status.replace(claim.scope_quote,row);claim.scope_quote=row;f.manifest.status_source=pin('STATUS.md',f.status);f.manifest.claims[13].proof=f.manifest.status_source; + claim.review={...f.manifest.status_source,pointer_only:true,review_url:url,review_notice:'Pointer only; linked comment is not byte-frozen.'}; + assert.equal(museum.validateBoundManifest(f.manifest,f.index,f.status).claims[11].class,'AMEND/open'); + const wrong=structuredClone(f.manifest);wrong.claims[11].review={...wrong.index_source,pointer_only:true,review_url:url,review_notice:'Pointer only.'}; + assert.throws(()=>museum.validateBoundManifest(wrong,f.index,f.status),/review pointer/i); +}); +test('packet index refuses a foreign packet, changed scientific effect and mismatched result path',available,()=>{ + const f=fixture(),result={...pin('incoming/side24-identity-replay-20260926/RESULT.md','scientific_effect: NONE\nreview_status: REVIEW_REQUIRED'),repository:'d6g8k5htny-coder/main'}; + result.url=result.url.replace('/Math-/','/main/');result.html_url=result.html_url.replace('/Math-/','/main/'); + const packet={id:'side24-identity-replay-20260926',issue:null,result,scientific_effect:'NONE',review_status:'REVIEW_REQUIRED'}; + f.manifest.packets=[packet];assert.equal(museum.validateBoundManifest(f.manifest,f.index,f.status).packets.length,1); + for(const change of [{id:'unlanded-draft'},{scientific_effect:'ACCEPT'},{result:{...result,path:'incoming/elsewhere/RESULT.md'}}]){const changed=structuredClone(f.manifest);Object.assign(changed.packets[0],change);assert.throws(()=>museum.validateBoundManifest(changed,f.index,f.status),/Packet|source URL/i);} +}); + +class Element { + constructor(tag){this.tagName=tag.toUpperCase();this.children=[];this.attributes={};this.listeners={};this.hidden=false;this._text='';} + set textContent(value){this._text=String(value);this.children=[];} get textContent(){return this._text+this.children.map(c=>c.textContent??String(c)).join('');} + append(...children){this.children.push(...children);} replaceChildren(...children){this._text='';this.children=children;} + setAttribute(k,v){this.attributes[k]=String(v);} addEventListener(k,f){this.listeners[k]=f;} +} +function documentFromHTML(){ + const html=fs.readFileSync(new URL('../docs/site/museum.html',import.meta.url),'utf8'); + const nodes=new Map([...html.matchAll(/<([a-z][a-z0-9]*)\b[^>]*\bid="([^"]+)"/gi)].map(m=>[m[2],new Element(m[1])])); + return {nodes,createElement:tag=>new Element(tag),createTextNode:value=>({textContent:value}),getElementById:id=>nodes.get(id)??null}; +} +test('rendered claims use declared HTML containers, complete identities and literal disclaimer',available,async()=>{ + const f=fixture(),document=documentFromHTML(); + const mapping=new Map([['museum.json',JSON.stringify(f.manifest)],[f.manifest.index_source.url,f.index],[f.manifest.status_source.url,f.status],[f.manifest.claims[0].proof.url,'Pinned proof.']]); + await museum.startMuseum({document,search:'',fetcher:async url=>{assert.ok(mapping.has(String(url)),`Unexpected URL ${url}`);return new Response(mapping.get(String(url)));}}); + const text=document.getElementById('claim-cards').textContent; + assert.match(text,/Object 0/);assert.match(text,/Claim and scope/);assert.match(text,/Source and review/);assert.match(text,/Replay/);assert.match(text,/Engineering — not acceptance/); + for(const field of ['d2-lifetime-remainder','ACCEPT-scoped','d6g8k5htny-coder/Math-','proof.md','a'.repeat(40),digest('Pinned proof.')]) assert.ok(text.includes(field),field); + assert.ok(text.includes('This canvas explains the pinned source. It is not a proof and does not change status.')); + assert.match(document.getElementById('lifetime-fixture').textContent,/fixture absent/i); + assert.equal(document.getElementById('undeclared-id'),null); + document.nodes.delete('claim-cards'); + await assert.rejects(()=>museum.startMuseum({document,search:'',fetcher:async()=>new Response(JSON.stringify(f.manifest))}),/Missing museum container/); +}); + +test('actual pinned museum renders all cards and rejects cross-claim source, scope and replay substitutions',{skip:!museum||(!process.env.MUSEUM_MATH_ROOT&&!process.env.MUSEUM_FIXTURE)},async()=>{ + const manifest=JSON.parse(fs.readFileSync(new URL('../docs/site/museum.json',import.meta.url))); + const root=new URL('..',import.meta.url).pathname; + const fixtures=process.env.MUSEUM_FIXTURE?JSON.parse(fs.readFileSync(process.env.MUSEUM_FIXTURE,'utf8')):null; + const read=source=>{if(fixtures){assert.ok(Object.hasOwn(fixtures,source.url),`Missing pinned source fixture: ${source.url}`);return Buffer.from(fixtures[source.url],'base64');}return execFileSync('git',['-C',source.repository.endsWith('/Math-')?process.env.MUSEUM_MATH_ROOT:root,'show',`${source.commit}:${source.path}`],{maxBuffer:3*1024*1024});}; + const index=read(manifest.index_source).toString('utf8'),status=read(manifest.status_source).toString('utf8'); + const fetcher=async url=>{ + if(url==='museum.json')return new Response(JSON.stringify(manifest)); + if(fixtures){assert.ok(Object.hasOwn(fixtures,String(url)),`Unexpected request: ${url}`);return new Response(Buffer.from(fixtures[String(url)],'base64'));} + const match=String(url).match(/^https:\/\/raw\.githubusercontent\.com\/(d6g8k5htny-coder\/(?:Math-|main))\/([0-9a-f]{40})\/(.+)$/); + assert.ok(match,`Unexpected request: ${url}`); + return new Response(read({repository:match[1],commit:match[2],path:decodeURIComponent(match[3])})); + }; + const document=documentFromHTML(); + await museum.startMuseum({document,fetcher,search:'',geometryLoader:()=>{throw Error('Home must not load a graphics context');}}); + assert.match(document.getElementById('museum-state').textContent,/displayed source bytes verified/); + assert.equal(document.getElementById('claim-cards').children.length,14); + assert.match(document.getElementById('packet-cards').textContent,/packet — not STATUS/); + const proof=structuredClone(manifest);proof.claims[3].proof=proof.claims[10].proof; + assert.throws(()=>museum.validateBoundManifest(proof,index,status),/own pinned source quote/); + const scope=structuredClone(manifest);scope.claims[3].status_quote=scope.claims[10].status_quote; + assert.throws(()=>museum.validateBoundManifest(scope,index,status),/STATUS scope/); + const replay=structuredClone(manifest.claims[0]);replay.replay.command='python invented-solver.py'; + await assert.rejects(()=>museum.verifyClaim(replay,fetcher),/Replay command.*recorded exactly/); +}); diff --git a/tests/test_museum_geometry.mjs b/tests/test_museum_geometry.mjs new file mode 100644 index 000000000..f1f1e3f3c --- /dev/null +++ b/tests/test_museum_geometry.mjs @@ -0,0 +1,134 @@ +import assert from 'node:assert/strict'; +import fs from 'node:fs'; +import test from 'node:test'; + +const moduleURL = new URL('../docs/site/geometry.mjs', import.meta.url); +assert.ok(fs.existsSync(moduleURL), 'The scope-safe museum geometry module must exist'); +const { ec014Model, remoteModel, annulusModel, p15Model, mountGeometry } = await import(moduleURL); + +test('EC014 rejects degenerate pins and retains the declared raw and corrected row orders', () => { + for (const radius of [0, -1, NaN, Infinity]) assert.throws(() => ec014Model(radius)); + const m = ec014Model(2); + assert.deepEqual(m.pins, [{ name: 'M', t: -1, s: 0 }, { name: 'S', t: 1, s: 0 }]); + assert.deepEqual(m.rawRows, ['f(M)', 'f(S)', 'f_t(M)', 'f_s(M)', 'f_t(S)', 'f_s(S)']); + assert.deepEqual(m.correctedRows, ['V+', 'V-_corr', 'G_t+', 'G_t-', 'G_s+', 'G_s-']); +}); + +test('remote membership keeps rho fixed and excludes all heights outside the open pin window', () => { + const remote = remoteModel({ L: 12, rho: 2 }); + assert.equal(remote.contains({ distance: 2, height: 9.5, b: 10, k: 1, r: 1 }), true); + for (const [distance, height] of [[1.999, 9.5], [2, 9], [2, 10], [2, 12]]) { + assert.equal(remote.contains({ distance, height, b: 10, k: 1, r: 1 }), false); + } + assert.equal(remote.contains({ distance: 1.99, height: 9.99, b: 10, k: 1, r: 0.5 }), false); + assert.throws(() => remoteModel({ L: 12, rho: 3 })); +}); + +test('annulus membership uses scaled coordinates with fixed A and B in dimension two', () => { + const annulus = annulusModel({ A: 2, B: 4, dimension: 2 }); + assert.equal(annulus.containsPhysical({ x: 1, y: 0, r: 0.5 }), true); + assert.equal(annulus.containsPhysical({ x: 2, y: 0, r: 0.5 }), true); + assert.equal(annulus.containsPhysical({ x: 0.25, y: 0, r: 0.5 }), false); + assert.equal(annulus.containsPhysical({ x: 2.01, y: 0, r: 0.5 }), false); + for (const value of [{ A: 1, B: 4 }, { A: 2, B: 2 }, { A: 2, B: Infinity }, { A: 2, B: 4, dimension: 3 }]) { + assert.throws(() => annulusModel(value)); + } + assert.equal(annulus.heightScope, 'all heights'); +}); + +test('P15 exact finite example partitions every proper subset and rejects the full triple', () => { + for (const selection of [[], [0], [1], [2], [0, 1], [0, 2], [1, 2]]) { + const model = p15Model(selection); + assert.equal(model.decomposable, true); + assert.equal(model.parts.length, 2); + assert.ok(model.parts.every(part => part.length <= 1)); + assert.deepEqual(model.parts.flat().sort(), selection); + } + const full = p15Model([0, 1, 2]); + assert.equal(full.decomposable, false); + assert.equal(full.parts, null); + assert.deepEqual(full.macroEdges, []); + assert.throws(() => p15Model([0, 3])); +}); + +// Minimal DOM: observes the module's actual rendered scope, interaction and +// network decision. It does not assert browser layout or GPU behavior. +class Element { + constructor(tag) { this.tagName = tag; this.children = []; this.attributes = {}; this.listeners = {}; this.style = {}; this._text = ''; this.hidden = false; } + set textContent(value) { this._text = String(value); this.children = []; } + get textContent() { return this._text + this.children.map(c => c.textContent ?? '').join(''); } + append(...children) { this.children.push(...children); } + replaceChildren(...children) { this.children = children; this._text = ''; } + setAttribute(key, value) { this.attributes[key] = String(value); } + addEventListener(key, callback) { this.listeners[key] = callback; } + removeEventListener() {} + remove() {} + querySelectorAll(tag) { return this.children.flatMap(child => [...(child.tagName === tag ? [child] : []), ...(child.querySelectorAll?.(tag) ?? [])]); } +} +let scripts = []; +globalThis.document = { + createElement: tag => new Element(tag), + createElementNS: (_, tag) => new Element(tag), + head: { append(script) { scripts.push(script); queueMicrotask(() => script.onerror()); } } +}; +const paths = { + ec014: 'imports/hardening_ebedb780/EC-014/proof.md.export.txt', + remote: 'frontiers/remote_window_20260924/PROOF.md', + annulus: 'frontiers/rn_annulus_bridge_20260925/PROOF.md', + p15: 'frontiers/full_price_20260924/PROOF.md' +}; +const source = kind => ({ repository: 'd6g8k5htny-coder/Math-', path: paths[kind], commit: 'd6628da09384728992dcbe6e921cc28ba85aebb0', sha256: 'a'.repeat(64), bytes: 42 }); + +test('unsupported kinds and mismatched source descriptors do not render geometry or request CDN code', async () => { + const host = new Element('div'); + await assert.rejects(mountGeometry(host, 'lifetime', source('ec014'))); + await assert.rejects(mountGeometry(host, 'remote', source('annulus'))); + await assert.rejects(mountGeometry(host, 'remote', { ...source('remote'), commit: 'main' })); + assert.equal(host.children.length, 0); + assert.equal(scripts.length, 0); +}); + +test('all static exhibits render with no WebGL or CDN dependency and preserve excluded regions', async () => { + for (const kind of ['remote', 'annulus', 'p15']) { + const host = new Element('div'); + await mountGeometry(host, kind, source(kind)); + assert.ok(host.querySelectorAll('svg').length > 0); + assert.equal(host.querySelectorAll('canvas').length, 0); + if (kind === 'remote') assert.match(host.textContent, /between-pin heights/); + if (kind === 'annulus') { + assert.match(host.textContent, /all heights/); + assert.ok(host.querySelectorAll('circle').some(circle => circle.attributes['stroke-dasharray'])); + assert.match(host.textContent, /OPEN/); + } + } + assert.equal(scripts.length, 0); +}); + +test('P15 vertex toggles change the actual decomposition result', async () => { + const host = new Element('div'); + await mountGeometry(host, 'p15', source('p15')); + assert.match(host.textContent, /full triple is not two-decomposable/); + const vertex = host.querySelectorAll('button').find(button => button.attributes['data-vertex'] === '2'); + vertex.listeners.click(); + assert.match(host.textContent, /proper subset is two-decomposable/); + assert.equal(vertex.attributes['aria-pressed'], 'false'); +}); + +test('EC014 retains complete two-dimensional content when WebGL is missing or CDN fails', async () => { + delete globalThis.WebGLRenderingContext; + const first = new Element('div'); + await mountGeometry(first, 'ec014', source('ec014')); + assert.ok(first.querySelectorAll('svg').length > 0); + assert.match(first.textContent, /f_t\(M\)/); + assert.equal(scripts.length, 0); + globalThis.WebGLRenderingContext = class {}; + const second = new Element('div'); + await mountGeometry(second, 'ec014', source('ec014')); + assert.equal(scripts.length, 1); + assert.match(scripts[0].src, /three@0\.160\.0\/build\/three\.js$/); + assert.match(scripts[0].integrity, /^sha384-/); + assert.equal(scripts[0].crossOrigin, 'anonymous'); + assert.ok(second.querySelectorAll('svg').length > 0); + assert.match(second.textContent, /2D/); + delete globalThis.WebGLRenderingContext; +}); diff --git a/tests/test_public_shop_app.mjs b/tests/test_public_shop_app.mjs index 96ca1a7fb..9ea751330 100644 --- a/tests/test_public_shop_app.mjs +++ b/tests/test_public_shop_app.mjs @@ -1,7 +1,8 @@ import assert from 'node:assert/strict'; import fs from 'node:fs'; import path from 'node:path'; -// Minimal DOM observation harness: exercises loading/search/selection/currency. +import test from 'node:test'; +// Minimal DOM observation harness: exercises loading/search/selection/identity. // This is not a browser layout or accessibility test. class Element { constructor(tag){this.tag=tag;this.children=[];this.attributes={};this.listeners={};this.value='';this.hidden=false;this.disabled=false;this._text='';} @@ -9,10 +10,17 @@ class Element { append(...children){this.children.push(...children);}replaceChildren(...c){this.children=c;this._text='';} setAttribute(k,v){this.attributes[k]=v;}addEventListener(k,f){this.listeners[k]=f;} } -const nodes=new Map(); -globalThis.document={getElementById:id=>{if(!nodes.has(id))nodes.set(id,new Element(id));return nodes.get(id);},createElement:tag=>new Element(tag),createElementNS:(_,tag)=>new Element(tag),createTextNode:t=>({textContent:t})}; -document.getElementById('dimension').value='2'; const root=path.resolve(import.meta.dirname,'..'); +const html=fs.readFileSync(path.join(root,'docs/site/index.html'),'utf8'); +const nodes=new Map(); +for(const match of html.matchAll(/<([a-z][a-z0-9-]*)\b[^>]*\bid="([^"]+)"[^>]*>/gi)) { + assert.ok(!nodes.has(match[2]),`Duplicate HTML ID ${match[2]}`); + nodes.set(match[2],new Element(match[1])); +} +// Missing HTML nodes stay missing, as they do in a browser. +globalThis.document={getElementById:id=>nodes.get(id)||null,createElement:tag=>new Element(tag),createElementNS:(_,tag)=>new Element(tag),createTextNode:t=>({textContent:t})}; +const required=id=>{assert.ok(nodes.has(id),`Missing real HTML element ${id}`);return nodes.get(id);}; +required('dimension').value='2'; const fixture=process.env.SHOP_MATH_FIXTURE; assert.ok(fixture,'Set SHOP_MATH_FIXTURE to exact public Math fixture directory'); const qfixture=process.env.SHOP_QUERY_FIXTURE; @@ -29,7 +37,7 @@ const mapping=new Map([ ]); let requested=[]; globalThis.fetch=async(url,options={})=>{requested.push(String(url));assert.equal(options.credentials,'omit'); - if(String(url).startsWith('https://api.github.com/'))return Response.json({ref:'refs/heads/main',object:{sha:config.query.math_pin}}); + if(String(url).startsWith('https:'))assert.match(String(url),/^https:\/\/raw\.githubusercontent\.com\/d6g8k5htny-coder\/(?:main|Math-|query-)\/[0-9a-f]{40}\//,'Every remote read must use an immutable public commit'); assert.ok(mapping.has(String(url)),`Unexpected request ${url}`);return new Response(fs.readFileSync(mapping.get(String(url))));}; await import('../docs/site/app.js'); assert.equal(document.getElementById('counts').children.length,3); @@ -41,8 +49,73 @@ assert.equal(document.getElementById('lower').textContent,'0.0417759318405983433 document.getElementById('search').value='EC-014';document.getElementById('search').listeners.input(); assert.ok(document.getElementById('catalog').children.length>0); assert.ok(document.getElementById('catalog').children.every(row=>row.textContent.toLowerCase().includes('ec-014'))); -await document.getElementById('check-tip').listeners.click(); -assert.match(document.getElementById('tip-result').textContent,/Commit pin current/); -assert.match(document.getElementById('tip-result').textContent,/Gate-byte equality was not tested/); assert.ok(!requested.some(url=>/sandbox|Drive|google-drive/i.test(url))); -console.log('Public shop interaction harness passed: 2138 rows, exact decimals, search, selection, read-only pin currency.'); +const disclaimer='This canvas explains the pinned source. It is not a proof and does not change status.'; +function showsIdentity(element,pin,canvas=true) { + for(const value of [pin.repository,pin.path,pin.commit,pin.sha256,...(canvas?[disclaimer]:[])])assert.ok(element.textContent.includes(value),`Visible source header missing ${value}`); +} +const descendants=element=>element.children.flatMap(child=>child instanceof Element?[child,...descendants(child)]:[]); +test('SIDE24 always identifies the engineering exhibit before the controls',()=>{ + const header=required('coefficient-source'); + showsIdentity(header,config.coefficient); + assert.match(header.textContent,/D3 SIDE24/); + assert.match(header.textContent,/SIDE24-COEFFICIENT-D23-20260924-v1/); + assert.match(header.textContent,/engineering-only/); + assert.ok(html.indexOf('id="coefficient-source"'){ + const status=JSON.parse(fs.readFileSync(path.join(root,'docs/site/status.json'))); + for(const [i,card] of required('counts').children.entries()) { + showsIdentity(card,status.source); + assert.ok(card.textContent.includes('status-count-'+status.sections[i].key)); + assert.match(card.textContent,/engineering-only/); + } + const rows=descendants(required('status-rows')).filter(n=>n.className==='status-object'); + assert.equal(rows.length,10); + const expected=status.sections.flatMap(section=>section.rows.map(row=>({section,row}))); + for(const [i,row] of rows.entries()) { + showsIdentity(row,status.source); + assert.match(row.textContent,/Object ID:/); + const classes={accept:'ACCEPT-scoped',amend:'AMEND/open',engineering:'engineering-only'}; + assert.ok(row.textContent.includes('Class: '+classes[expected[i].section.key])); + assert.equal(row.attributes['data-class'],classes[expected[i].section.key]); + assert.ok(row.textContent.includes(expected[i].row[1].replace(/\*\*|`/g,''))); + } + assert.ok(descendants(required('status-rows')).some(n=>n.href==='https://github.com/d6g8k5htny-coder/main/issues/65#issuecomment-5841269490')); +}); +test('repository and path filters combine with search and reset pagination',()=>{ + const repo=required('repository-filter'),pathFilter=required('path-filter'),search=required('search'); + search.value='';search.listeners.input(); + required('more').listeners.click(); + assert.equal(required('catalog').children.length,100); + repo.value='Math-';repo.listeners.change(); + assert.equal(required('catalog').children.length,50); + assert.ok(required('catalog').children.every(row=>row.children[0].children[0].textContent==='Math-')); + required('more').listeners.click(); + assert.equal(required('catalog').children.length,54); + pathFilter.value='coefficients/side24_v1/';pathFilter.listeners.input(); + assert.ok(required('catalog').children.length>0); + assert.ok(required('catalog').children.every(row=>row.textContent.includes('coefficients/side24_v1/'))); + search.value='PROOF.md';search.listeners.input(); + assert.equal(required('catalog').children.length,1); + assert.ok(required('catalog').children[0].children[0].children[1].href.includes('/blob/')); + repo.value='main';repo.listeners.change(); + assert.equal(required('catalog').children.length,0); + assert.match(required('inventory-state').textContent,/0 matches/); + assert.equal(required('more').hidden,true); + repo.value='';repo.listeners.change();pathFilter.value='';pathFilter.listeners.input();search.value='';search.listeners.input(); + assert.equal(required('catalog').children.length,50); + assert.match(required('inventory-state').textContent,/2,138 matches/); +}); +test('query view shows its pin and the local byte-check command without a live ref control',()=>{ + assert.equal(document.getElementById('check-tip'),null); + assert.equal(document.getElementById('tip-result'),null); + const query=required('query-identity'); + for(const value of [config.query.repository,config.query.path,config.query.commit,config.query.sha256,config.query.math_pin])assert.ok(query.textContent.includes(value)); + assert.ok(required('query-note').textContent.includes('python -B -S verify_portable_stubs.py --check-math-tip')); + assert.ok(!requested.some(url=>url.startsWith('https://api.github.com/'))); +}); +console.log('Public shop base interactions passed: 2138 original rows, exact decimals, search and selection.'); diff --git a/tools/museum_check.py b/tools/museum_check.py new file mode 100644 index 000000000..9e5e53c2f --- /dev/null +++ b/tools/museum_check.py @@ -0,0 +1,48 @@ +"""Read pinned museum bytes once, then check export and actual UI integration. + +Only local, reviewed display code is executed. Retrieved proof/review/notebook +bytes are test inputs, never imported or executed. +""" +import argparse +import base64 +from concurrent.futures import ThreadPoolExecutor +import json +import os +from pathlib import Path +import subprocess +import tempfile + +import museum_data + +ROOT = Path(__file__).resolve().parents[1] + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--math-root", type=Path) + args = parser.parse_args() + sources = list(museum_data.SOURCES.values()) + with ThreadPoolExecutor(max_workers=8) as pool: + inputs = list(pool.map( + lambda source: museum_data.read_source(source, ROOT, args.math_root), sources)) + with tempfile.TemporaryDirectory(prefix="museum-check-") as directory: + fixture = Path(directory) + mapping = {} + for source, raw in zip(sources, inputs): + repository = source["repository"].split("/")[-1] + target = fixture / repository / source["path"] + target.parent.mkdir(parents=True, exist_ok=True) + target.write_bytes(raw) + mapping[museum_data.descriptor(source["path"])["url"]] = base64.b64encode(raw).decode("ascii") + expected = museum_data.build(fixture / "main", fixture / "Math-") + museum_data.check_export(ROOT / "docs/site/museum.json", expected) + manifest = fixture / "verified-inputs.json" + manifest.write_text(json.dumps(mapping), encoding="utf-8") + env = dict(os.environ, MUSEUM_FIXTURE=str(manifest)) + subprocess.run(["node", "--test", "tests/test_museum_frontend.mjs"], + cwd=ROOT, env=env, check=True) + print("Museum source export and actual display integration verified. Scientific effect NONE.") + + +if __name__ == "__main__": + main() diff --git a/tools/museum_data.py b/tools/museum_data.py new file mode 100644 index 000000000..318150632 --- /dev/null +++ b/tools/museum_data.py @@ -0,0 +1,558 @@ +"""Build the museum display projection from immutable public source bytes. + +This is a selected view of PROOF_INDEX and STATUS, not a scientific register or +another source inventory. --check is read-only. Math input defaults to fixed raw +commit URLs; --math-root uses pinned Git objects or verified plain file fixtures. +The historical public_shop_data.py exporter is independent and unchanged. +""" +from __future__ import annotations + +import argparse +from concurrent.futures import ThreadPoolExecutor +import hashlib +import json +from pathlib import Path +import re +import subprocess +from urllib.parse import quote +from urllib.request import urlopen + +MAIN_COMMIT = "71400b94f6cb354a8cf7aba73ffede2138a64efa" +MATH_COMMIT = "d6628da09384728992dcbe6e921cc28ba85aebb0" +CANVAS_NOTICE = "This canvas explains the pinned source. It is not a proof and does not change status." +# Selected source identities audited through the public GitHub connector. +# The 2,138-artifact inventory remains docs/public-math/sources.json. +SOURCES = json.loads(r'''{ + "frontiers/three_fronts_20260924/LIFETIME_REMAINDER.md": { + "repository": "d6g8k5htny-coder/Math-", + "commit": "d6628da09384728992dcbe6e921cc28ba85aebb0", + "path": "frontiers/three_fronts_20260924/LIFETIME_REMAINDER.md", + "blob": "247b3ecf80bfbe896948d5d489b2d5842a81c481", + "bytes": 17734, + "sha256": "380b7d0abdb0fe2de5a6564565af9560d3f1b1ce22fd5538927db0c52f4f3a4a" + }, + "coefficients/side24_v1/PROOF.md": { + "repository": "d6g8k5htny-coder/Math-", + "commit": "d6628da09384728992dcbe6e921cc28ba85aebb0", + "path": "coefficients/side24_v1/PROOF.md", + "blob": "44b66f04f89fcd87383b3603fa69f1feb64cdddd", + "bytes": 10272, + "sha256": "c06daccc4ba4b9168522b9888b76a7d599934fc3b91bd753ee5d492262917769" + }, + "frontiers/remote_window_20260924/PROOF.md": { + "repository": "d6g8k5htny-coder/Math-", + "commit": "d6628da09384728992dcbe6e921cc28ba85aebb0", + "path": "frontiers/remote_window_20260924/PROOF.md", + "blob": "b383bfcc88ec4ad497dff01fb6640e429ba24a84", + "bytes": 18355, + "sha256": "a332bae9bdc0106ce17047f7e0409cc3d94eb610a0c7b74ba5ba2d01a1620cb7" + }, + "frontiers/rn_annulus_bridge_20260925/PROOF.md": { + "repository": "d6g8k5htny-coder/Math-", + "commit": "d6628da09384728992dcbe6e921cc28ba85aebb0", + "path": "frontiers/rn_annulus_bridge_20260925/PROOF.md", + "blob": "6f317515b3d417661f86e2fed09bc7d950899c2b", + "bytes": 16948, + "sha256": "d55e2c03bb17e7977ff94130cc1ff21e54840cd1e20dc4e41ea9ad52228beb05" + }, + "frontiers/rn_thin_tube_20260925/FIXED_ANNULUS_CANDIDATE.md": { + "repository": "d6g8k5htny-coder/Math-", + "commit": "d6628da09384728992dcbe6e921cc28ba85aebb0", + "path": "frontiers/rn_thin_tube_20260925/FIXED_ANNULUS_CANDIDATE.md", + "blob": "081abc13c5e66342c13df2af2bd6b114f320486f", + "bytes": 17646, + "sha256": "1fd9fe7141e464fd1c09ebf0318d8a701729c9c61ea24f73f7e20a9cf10c552b" + }, + "frontiers/rn_thin_tube_20260925/TWO_SCALE_ADDENDUM.md": { + "repository": "d6g8k5htny-coder/Math-", + "commit": "d6628da09384728992dcbe6e921cc28ba85aebb0", + "path": "frontiers/rn_thin_tube_20260925/TWO_SCALE_ADDENDUM.md", + "blob": "89cae3a9734f2ec7172cd0b6b0b3af3ddd355d73", + "bytes": 15902, + "sha256": "079f9399aef401d58749b3684f3acbb7f49ffdcbcac9f501b79e06c28a7f4e7d" + }, + "frontiers/axial_density_20260925/PROOF.md": { + "repository": "d6g8k5htny-coder/Math-", + "commit": "d6628da09384728992dcbe6e921cc28ba85aebb0", + "path": "frontiers/axial_density_20260925/PROOF.md", + "blob": "a72418d78fd3c1ec96260dbf19f9a2f3f4ca35ba", + "bytes": 10858, + "sha256": "8b9376a69fda9f0f231d9502be839ae45d8006d1891ff3e700fa521cc96f6cb4" + }, + "reviews/downstream_boundary_20260925/TRANSVERSE_BOUND_CANDIDATE.md": { + "repository": "d6g8k5htny-coder/Math-", + "commit": "d6628da09384728992dcbe6e921cc28ba85aebb0", + "path": "reviews/downstream_boundary_20260925/TRANSVERSE_BOUND_CANDIDATE.md", + "blob": "024d927779f79fadaf932541ea6474f2995f8c50", + "bytes": 9902, + "sha256": "f64c954245f17bcbc64a5ccf58a60689cf2a2fd85362f8321c0f64ff66584e36" + }, + "reviews/collision_mechanism_20260925/CUMULATIVE_TRANSFER_CORRECTION.md": { + "repository": "d6g8k5htny-coder/Math-", + "commit": "d6628da09384728992dcbe6e921cc28ba85aebb0", + "path": "reviews/collision_mechanism_20260925/CUMULATIVE_TRANSFER_CORRECTION.md", + "blob": "044ac5fdaf403a38e33983e31f0ad69f8e76d6d5", + "bytes": 3272, + "sha256": "83f653393dc6245980f6848e2bfc65ac9ad4c7d8304b028b88764356fd3825b6" + }, + "frontiers/three_fronts_20260924/P15_PRICE_BOUNDARY.md": { + "repository": "d6g8k5htny-coder/Math-", + "commit": "d6628da09384728992dcbe6e921cc28ba85aebb0", + "path": "frontiers/three_fronts_20260924/P15_PRICE_BOUNDARY.md", + "blob": "1d6946658e00e2446d68e8a4884425d4bcec62fb", + "bytes": 2266, + "sha256": "498af650ef7139c39d2630561dbfd0822c495ce6308a6cac8b767aefe0c2a40b" + }, + "frontiers/full_price_20260924/PROOF.md": { + "repository": "d6g8k5htny-coder/Math-", + "commit": "d6628da09384728992dcbe6e921cc28ba85aebb0", + "path": "frontiers/full_price_20260924/PROOF.md", + "blob": "582180e41dca0ad815ad0f18574df42040912149", + "bytes": 11352, + "sha256": "87521901ca8e5405b4d1e47f1deb1cd0326affbd6f5967b53c4178590da993f9" + }, + "PROOF_INDEX.md": { + "repository": "d6g8k5htny-coder/Math-", + "commit": "d6628da09384728992dcbe6e921cc28ba85aebb0", + "path": "PROOF_INDEX.md", + "blob": "e4cb1d943eaeb2049d080fcc53a57e042aebc6e8", + "bytes": 12708, + "sha256": "f9c4db77aeab1c61d2a0c02f88a964cbfc6be63d18619acf0e047c884e0c0249" + }, + "claims/LANDING_CLAIMS.json": { + "repository": "d6g8k5htny-coder/Math-", + "commit": "d6628da09384728992dcbe6e921cc28ba85aebb0", + "path": "claims/LANDING_CLAIMS.json", + "blob": "1e178c2d948bab4de696c6b66724dd7a37fb34f1", + "bytes": 16417, + "sha256": "c6fb2fa2bda1fdae9eeaaaf13008497921537b77aa4d4537aec30c9b961b989e" + }, + "imports/hardening_ebedb780/EC-014/proof.md.export.txt": { + "repository": "d6g8k5htny-coder/Math-", + "commit": "d6628da09384728992dcbe6e921cc28ba85aebb0", + "path": "imports/hardening_ebedb780/EC-014/proof.md.export.txt", + "blob": "7189b4d1538866594c6d8c94f09e247a2cd65abe", + "bytes": 11331, + "sha256": "c5e64b9ba3a906535f1ae58a161d594a427371599c102ae4a68849b087a2f62c" + }, + "coefficients/side24_v1/ENCLOSURE.json": { + "repository": "d6g8k5htny-coder/Math-", + "commit": "d6628da09384728992dcbe6e921cc28ba85aebb0", + "path": "coefficients/side24_v1/ENCLOSURE.json", + "blob": "57af39a05e14ed0ba8ebc00a9b4aca4dffb067c7", + "bytes": 1090, + "sha256": "72b6cd92d31394cdaf5da8919a5d548e902228af1f095cc184158a71d8287811" + }, + "reviews/pr28_annulus_bridge_nonauthor_20260925/REVIEW.md": { + "repository": "d6g8k5htny-coder/Math-", + "commit": "d6628da09384728992dcbe6e921cc28ba85aebb0", + "path": "reviews/pr28_annulus_bridge_nonauthor_20260925/REVIEW.md", + "blob": "559d72242fdb7e4e3ac4a10d10641ae1da84f40e", + "bytes": 15925, + "sha256": "69ea7a479a9e8a5150cbe07b373772ab22413a1d81194d5a6a78adf6ada5f03f" + }, + "reviews/pr22_fixed_annulus_nonauthor_20260925/REVIEW.md": { + "repository": "d6g8k5htny-coder/Math-", + "commit": "d6628da09384728992dcbe6e921cc28ba85aebb0", + "path": "reviews/pr22_fixed_annulus_nonauthor_20260925/REVIEW.md", + "blob": "1f153966dae48d10574db0d272f75d08ca3a8b23", + "bytes": 12741, + "sha256": "29a0c6d00ce739baf1d29a3163977d8e707e2079e216fba4fee3669cebec127d" + }, + "reviews/replacement_20260925_pr19_pr21/TWO_SCALE_REVIEW.md": { + "repository": "d6g8k5htny-coder/Math-", + "commit": "d6628da09384728992dcbe6e921cc28ba85aebb0", + "path": "reviews/replacement_20260925_pr19_pr21/TWO_SCALE_REVIEW.md", + "blob": "8988251631cab8e65eb2b01a08f7fc593b018570", + "bytes": 10073, + "sha256": "04cf4c986f29ac7ac33b3cc87feac23f3cf494e0c1b3bf4476e4e6666de46574" + }, + "reviews/replacement_20260925_pr19_pr21/REVIEW.md": { + "repository": "d6g8k5htny-coder/Math-", + "commit": "d6628da09384728992dcbe6e921cc28ba85aebb0", + "path": "reviews/replacement_20260925_pr19_pr21/REVIEW.md", + "blob": "f1868bd92b600d92901146af1caf7baf960dba9c", + "bytes": 15615, + "sha256": "7ff9e4a028f24afc731200b14bc5b993c0a874906cf6ea25e8c890afed8cdc53" + }, + "reviews/pr16_fixed_transverse_nonauthor_20260925/REVIEW.md": { + "repository": "d6g8k5htny-coder/Math-", + "commit": "d6628da09384728992dcbe6e921cc28ba85aebb0", + "path": "reviews/pr16_fixed_transverse_nonauthor_20260925/REVIEW.md", + "blob": "4003ff13cf696389b9530fd445ee46daf3b4c646", + "bytes": 12510, + "sha256": "20d6451412f304a20f70e0bc6aabb87bdd0bb9761b17834469d60867407ebd9c" + }, + "reviews/d2_cumulative_correction_20260925/REVIEW.md": { + "repository": "d6g8k5htny-coder/Math-", + "commit": "d6628da09384728992dcbe6e921cc28ba85aebb0", + "path": "reviews/d2_cumulative_correction_20260925/REVIEW.md", + "blob": "3ab51b0112bbcd29febc433881f459240645056d", + "bytes": 3723, + "sha256": "910d371ebb4a310a7e2248348ba8cd09d6f3229740525d74ec7d06d8d1470717" + }, + "reviews/p15_full_price_nonauthor_20260926/REVIEW.md": { + "repository": "d6g8k5htny-coder/Math-", + "commit": "d6628da09384728992dcbe6e921cc28ba85aebb0", + "path": "reviews/p15_full_price_nonauthor_20260926/REVIEW.md", + "blob": "07db19f826763b8faa7414ba2e403d9c45bc0b6e", + "bytes": 15569, + "sha256": "691ea0db5c0f073326c9f7208c9804c6f5d0daf92ba7467529c9d57e08b15eb7" + }, + "STATUS.md": { + "repository": "d6g8k5htny-coder/main", + "commit": "71400b94f6cb354a8cf7aba73ffede2138a64efa", + "path": "STATUS.md", + "blob": "52688102260e916dec1a38143186198b089a0261", + "bytes": 6881, + "sha256": "9c3e21144423591a3dbff926858048c0363b9a32d6fe258a1de5088d38096141" + }, + "reviews/sard_g_successor_a1_a6_20260926/REVIEW.md": { + "repository": "d6g8k5htny-coder/main", + "commit": "71400b94f6cb354a8cf7aba73ffede2138a64efa", + "path": "reviews/sard_g_successor_a1_a6_20260926/REVIEW.md", + "blob": "9fc61b47c2b4c4bcc3898a6c61a6dcf9cbe1d136", + "bytes": 25057, + "sha256": "894d27c0de6dd4312ea5109ac2480a68cb1b5ded0b4a60749d4edee2288fb537" + }, + "incoming/side24-identity-replay-20260926/IDENTITY.json": { + "repository": "d6g8k5htny-coder/main", + "commit": "71400b94f6cb354a8cf7aba73ffede2138a64efa", + "path": "incoming/side24-identity-replay-20260926/IDENTITY.json", + "blob": "a1c211e58f72af9c5206ed6731b6771a7366e301", + "bytes": 673, + "sha256": "6087bfe1ccc12bd52ebb169d00975ce44e846d611f0628333a0dbd71a4448176" + }, + "incoming/side24-identity-replay-20260926/output.json": { + "repository": "d6g8k5htny-coder/main", + "commit": "71400b94f6cb354a8cf7aba73ffede2138a64efa", + "path": "incoming/side24-identity-replay-20260926/output.json", + "blob": "f1dd2c6ba5a74d9f52fe91d66dd3d136e7d2166e", + "bytes": 362, + "sha256": "813bcf5d81e1d5d52d37c112df23716701809f03e7b55939a2afb2e8e57741be" + }, + "docs/notebooks/SIDE24_PUBLIC_COEFFICIENTS.ipynb": { + "repository": "d6g8k5htny-coder/main", + "commit": "71400b94f6cb354a8cf7aba73ffede2138a64efa", + "path": "docs/notebooks/SIDE24_PUBLIC_COEFFICIENTS.ipynb", + "blob": "c7fcde5461305ff249384e873476d34a4f470976", + "bytes": 61961, + "sha256": "e348db8e9d667caff2a8da1d85ffd5ad599db34b34e542d9662d0bc1edc84024" + }, + "incoming/side24-identity-replay-20260926/RESULT.md": { + "repository": "d6g8k5htny-coder/main", + "commit": "71400b94f6cb354a8cf7aba73ffede2138a64efa", + "path": "incoming/side24-identity-replay-20260926/RESULT.md", + "blob": "132cc35d978f46133f28a669ed6e35d1ddf2e7bb", + "bytes": 1118, + "sha256": "fa40a6b8afc413646081145d6d5d7b01cc4b5b4ddec32f4c6e82caa399e38cd8" + }, + "imports/lifetime_parent_20260925/UNIFORM_MATRIX_CAP_AND_LIFETIME.md": { + "path": "imports/lifetime_parent_20260925/UNIFORM_MATRIX_CAP_AND_LIFETIME.md", + "blob": "dfed3b8d318a3ab1950957f393307733a4bef3f2", + "bytes": 40261, + "repository": "d6g8k5htny-coder/Math-", + "commit": "d6628da09384728992dcbe6e921cc28ba85aebb0", + "sha256": "9350ad6eaba6626b93c3dedeef9e2ff816e5cdf1c8318e85fb27499141c84bc7" + } +}''') +SOURCES["README.md"] = {"repository":"d6g8k5htny-coder/Math-","commit":"d6628da09384728992dcbe6e921cc28ba85aebb0","path":"README.md","blob":"abe16871da7740fa28ae4dbb28fb31853a5868bd","bytes":6023,"sha256":"89d4c618ad4560373f8fba3c787522cea8f0191fd8e176f3e0741c6230390730"} +INDEX = SOURCES["PROOF_INDEX.md"] +STATUS = SOURCES["STATUS.md"] +NOTEBOOK_PATH = "docs/notebooks/SIDE24_PUBLIC_COEFFICIENTS.ipynb" +CLAIM_SPECS = json.loads(r'''[ + [ + "d2-lifetime-remainder", + "frontiers/three_fronts_20260924/LIFETIME_REMAINDER.md", + "https://github.com/d6g8k5htny-coder/main/issues/67#issuecomment-5841782206", + "D2", + "python -B -S -m unittest discover -s frontiers/three_fronts_20260924 -p 'test_*.py' -v" + ], + [ + "d3-side24-coefficient", + "coefficients/side24_v1/PROOF.md", + "https://github.com/d6g8k5htny-coder/main/issues/65#issuecomment-5841269490", + "D3", + null + ], + [ + "d4-fixed-remote-rn", + "frontiers/remote_window_20260924/PROOF.md", + "https://github.com/d6g8k5htny-coder/main/issues/76#issuecomment-5841783172", + "D4", + "python -B -S -m unittest discover -s frontiers/remote_window_20260924 -p 'test_*.py' -v" + ], + [ + "d5-all-height-annulus", + "frontiers/rn_annulus_bridge_20260925/PROOF.md", + "reviews/pr28_annulus_bridge_nonauthor_20260925/REVIEW.md", + null, + "python3 -B -S reviews/pr28_annulus_bridge_nonauthor_20260925/algebra_check.py -v" + ], + [ + "d5-height-window-annulus", + "frontiers/rn_thin_tube_20260925/FIXED_ANNULUS_CANDIDATE.md", + "reviews/pr22_fixed_annulus_nonauthor_20260925/REVIEW.md", + null, + "python3 -B -S reviews/pr22_fixed_annulus_nonauthor_20260925/algebra_check.py" + ], + [ + "d5-two-scale", + "frontiers/rn_thin_tube_20260925/TWO_SCALE_ADDENDUM.md", + "reviews/replacement_20260925_pr19_pr21/TWO_SCALE_REVIEW.md", + null, + null + ], + [ + "d5-inner-belt-density", + "frontiers/axial_density_20260925/PROOF.md", + "reviews/replacement_20260925_pr19_pr21/REVIEW.md", + null, + null + ], + [ + "d5-fixed-transverse", + "reviews/downstream_boundary_20260925/TRANSVERSE_BOUND_CANDIDATE.md", + "reviews/pr16_fixed_transverse_nonauthor_20260925/REVIEW.md", + null, + "python3 -B -S reviews/pr16_fixed_transverse_nonauthor_20260925/algebra_check.py" + ], + [ + "cumulative-transfer-correction", + "reviews/collision_mechanism_20260925/CUMULATIVE_TRANSFER_CORRECTION.md", + "reviews/d2_cumulative_correction_20260925/REVIEW.md", + null, + null + ], + [ + "p15-demand-one-counterexample", + "frontiers/three_fronts_20260924/P15_PRICE_BOUNDARY.md", + "https://github.com/d6g8k5htny-coder/main/issues/67", + null, + null + ], + [ + "d6-p15-full-price", + "frontiers/full_price_20260924/PROOF.md", + "reviews/p15_full_price_nonauthor_20260926/REVIEW.md", + "D6", + "python -B -S frontiers/full_price_20260924/full_price.py" + ] +]''') + + +def verify_bytes(raw, expected): + """Reject invalid descriptors and changed bytes before any parsing.""" + if (not isinstance(expected, dict) + or expected.get("repository") not in ("d6g8k5htny-coder/main", "d6g8k5htny-coder/Math-") + or not re.fullmatch(r"[0-9a-f]{40}", expected.get("commit", "")) + or not re.fullmatch(r"[0-9a-f]{40}", expected.get("blob", "")) + or not re.fullmatch(r"[0-9a-f]{64}", expected.get("sha256", "")) + or type(expected.get("bytes")) is not int or expected["bytes"] <= 0 + or not isinstance(expected.get("path"), str) + or expected["path"].startswith("/") or ".." in expected["path"].split("/")): + raise ValueError("invalid source identity") + blob = hashlib.sha1(b"blob " + str(len(raw)).encode("ascii") + b"\0" + raw).hexdigest() + if (len(raw) != expected["bytes"] or blob != expected["blob"] + or hashlib.sha256(raw).hexdigest() != expected["sha256"]): + raise ValueError("source identity mismatch: " + expected["path"]) + return raw + + +def descriptor(path, **extra): + identity = dict(SOURCES[path]) + base = identity["repository"] + "/" + identity["commit"] + "/" + quote(path, safe="/") + identity["url"] = "https://raw.githubusercontent.com/" + base + identity["html_url"] = ("https://github.com/" + identity["repository"] + + "/blob/" + identity["commit"] + "/" + quote(path, safe="/")) + return dict(identity, **extra) + + +def pointer(path, target): + return descriptor(path, pointer_only=True, review_url=target, + review_notice="The pinned source binds this review pointer; the linked review is not byte-frozen by this descriptor.") + + +def section(text, heading): + marker = "## " + heading + "\n" + if text.count(marker) != 1: + raise ValueError("missing or duplicated projection heading: " + heading) + return text.split(marker, 1)[1].split("\n## ", 1)[0] + + +def status_rows(text, heading): + rows = [line for line in section(text, heading).splitlines() if line.startswith("|")] + return [(line, [cell.strip() for cell in line[1:-1].split("|")]) + for line in rows[2:]] + + +def project(index_raw, status_raw): + """Return the exact eleven reviewed bullets and three open table rows.""" + index = verify_bytes(index_raw, INDEX).decode("utf-8") + status = verify_bytes(status_raw, STATUS).decode("utf-8") + bullets = [line for line in section(index, "Reviewed scoped results").splitlines() + if line.startswith("- ")] + if len(bullets) != 11: + raise ValueError("reviewed projection must have eleven bullets") + accepted_rows = status_rows(status, "ACCEPT — scoped") + claims = [] + for bullet, (claim_id, proof_path, review_path, status_id, command) in zip(bullets, CLAIM_SPECS): + title = bullet[2:].split(":", 1)[0] + if "](" + proof_path + ")" not in bullet: + raise ValueError("proof pointer differs from audited projection") + if "](" + review_path + ")" not in bullet: + raise ValueError("review pointer differs from audited projection") + review = (pointer("PROOF_INDEX.md", review_path) if review_path.startswith("https://") + else descriptor(review_path)) + counterexample = claim_id == "p15-demand-one-counterexample" + status_quote = next((cells[1] for _, cells in accepted_rows + if status_id and cells[0].startswith("**" + status_id + " —")), None) + replay = {"command": command, "url": None, + "notice": ("Finite algebra or implementation replay only; it is not theorem acceptance." + if command else "No replay command is recorded in the pinned proof/review.")} + if command: + replay_source = "README.md" if status_id in ("D2", "D4", "D6") else review_path + replay.update(source=descriptor(replay_source), checkout=MATH_COMMIT, + working_directory="Math- repository root", + notice="From a Math- checkout at " + MATH_COMMIT + + ", run at the repository root. Finite algebra or implementation replay only; it is not theorem acceptance.") + if claim_id == "d3-side24-coefficient": + replay = {"command": None, "url": descriptor(NOTEBOOK_PATH)["html_url"], + "source": descriptor(NOTEBOOK_PATH), + "notice": "The notebook verifies and displays published coefficient bytes; no random field or lifetime solver runs."} + claims.append(dict(id=claim_id, title=title, scope_quote=bullet, + source_label="EXACT_COUNTEREXAMPLE" if counterexample else "ACCEPT", + **{"class": "engineering-only" if counterexample else "ACCEPT-scoped"}, + proof=descriptor(proof_path), review=review, replay=replay, status_quote=status_quote)) + open_rows = status_rows(status, "AMEND / open") + if len(open_rows) != 3: + raise ValueError("open projection must have three rows") + open_specs = [ + ("d1-parent-selection-open", "imports/lifetime_parent_20260925/UNIFORM_MATRIX_CAP_AND_LIFETIME.md", + "https://github.com/d6g8k5htny-coder/main/issues/63#issuecomment-5841830743"), + ("d5-pin-neighborhoods-open", "PROOF_INDEX.md", + "https://github.com/d6g8k5htny-coder/Math-/blob/4e188e25b1e1ef560f3eeb75c0d354d2ccf0ea22/reviews/d5_pin_neighborhood_20260926/REVIEW.md"), + ("sard-g-a1-a6-open", "STATUS.md", "reviews/sard_g_successor_a1_a6_20260926/REVIEW.md") + ] + for (row, cells), (claim_id, proof_path, review_target) in zip(open_rows, open_specs): + proof = descriptor(proof_path) + if claim_id == "d5-pin-neighborhoods-open": + proof["availability"] = "NO COMPLETE PROOF YET" + elif claim_id == "sard-g-a1-a6-open": + proof.update(availability="OPEN / NOT LANDED", + proof_url="https://github.com/d6g8k5htny-coder/main/pull/122") + review = (pointer("STATUS.md" if claim_id.startswith("d1-") else "PROOF_INDEX.md", review_target) + if review_target.startswith("https://") else descriptor(review_target)) + claims.append(dict(id=claim_id, title=cells[0].replace("**", ""), scope_quote=row, + source_label="AMEND / open", **{"class": "AMEND/open"}, + proof=proof, review=review, + replay={"command": None, "url": None, "notice": "OPEN / NOT LANDED. No replay is presented as acceptance."}, + status_quote=cells[1])) + return claims + + +def packet_descriptors(): + """Only the packet already present on the pinned main tree is selected.""" + prefix = "incoming/side24-identity-replay-20260926/" + return [dict(id="side24-identity-replay-20260926", issue=None, + result=descriptor(prefix + "RESULT.md"), identity=descriptor(prefix + "IDENTITY.json"), + output=descriptor(prefix + "output.json"), + scientific_effect="NONE", review_status="REVIEW_REQUIRED")] + + +def read_source(identity, main_root, math_root): + root = main_root if identity["repository"].endswith("/main") else math_root + if root is not None: + # Regenerate historical displays from the exact object even when the + # repository's working file has since changed. Plain fixture folders + # have no Git object and remain subject to the same byte checks below. + result = subprocess.run(["git", "show", identity["commit"] + ":" + identity["path"]], + cwd=root, capture_output=True) + if result.returncode == 0: + raw = result.stdout + else: + raw = (Path(root) / identity["path"]).read_bytes() + else: + # No branch alias, latest-release endpoint, registry discovery, or code execution. + with urlopen(descriptor(identity["path"])["url"], timeout=30) as response: + raw = response.read(identity["bytes"] + 1) + return verify_bytes(raw, identity) + + +def excerpt(text, start, end): + if text.count(start) != 1 or end not in text.split(start, 1)[1]: + raise ValueError("source excerpt boundary changed") + return start + text.split(start, 1)[1].split(end, 1)[0] + + +def build(main_root, math_root=None): + """Verify all selected sources and generate the read-only display payload.""" + identities = list(SOURCES.values()) + with ThreadPoolExecutor(max_workers=8) as pool: + raw_files = dict(zip(SOURCES, pool.map( + lambda identity: read_source(identity, main_root, math_root), identities))) + text = {path: raw.decode("utf-8") for path, raw in raw_files.items()} + claims = project(raw_files["PROOF_INDEX.md"], raw_files["STATUS.md"]) + exhibit_paths = { + "ec014": "imports/hardening_ebedb780/EC-014/proof.md.export.txt", + "remote": "frontiers/remote_window_20260924/PROOF.md", + "annulus": "frontiers/rn_annulus_bridge_20260925/PROOF.md", + "p15": "frontiers/full_price_20260924/PROOF.md", + "lifetime": "frontiers/three_fronts_20260924/LIFETIME_REMAINDER.md", + } + exhibits = {key: descriptor(path, id=key, **{"class": "illustration"}, + notice=CANVAS_NOTICE) for key, path in exhibit_paths.items()} + exhibits["lifetime"].update( + **{"class": "engineering-only"}, availability="NO COMMITTED SAMPLES", + sample_available=False, + unavailable_notice="No committed persistence/lifetime sample JSON was found on the pinned main or Math default trees. The theorem source is linked for scope; no synthetic data is substituted.") + exhibits["annulus"]["scope_boundary"] = ( + "The reviewed fixed annulus and the AMEND pin-neighborhood row are distinct scopes.") + normalized_ec = text[exhibit_paths["ec014"]].replace("\r\n", "\n") + quotes = { + "ec014": excerpt(normalized_ec, "2. Exact object proposed for closure", "3. Evidence package"), + "remote": excerpt(text[exhibit_paths["remote"]], "## 1. The count and the new scope", "## 2."), + "annulus": excerpt(text[exhibit_paths["annulus"]], "## 1. Statement and exact scope", "## 2."), + "p15": excerpt(text[exhibit_paths["p15"]], "## 5. Sharpness and the exact demand boundary", "## 6."), + } + identity = json.loads(raw_files["incoming/side24-identity-replay-20260926/IDENTITY.json"]) + output = json.loads(raw_files["incoming/side24-identity-replay-20260926/output.json"]) + if (identity.get("scientific_effect") != "NONE" or identity.get("review_status") != "REVIEW_REQUIRED" + or output.get("scientific_acceptance") is not False): + raise ValueError("landed packet authority fields changed") + return dict(schema_version=1, scientific_status_authority=False, + index_source=descriptor("PROOF_INDEX.md"), status_source=descriptor("STATUS.md"), + claims=claims, exhibits=exhibits, exhibit_quotes=quotes, packets=packet_descriptors(), + inventory_url="../public-math/sources.json", + meaning="Selected display projection only; the existing 2,138-row public source catalog remains the inventory.", + canvas_notice=CANVAS_NOTICE) + + +def dump(data): + return (json.dumps(data, indent=2, ensure_ascii=False, sort_keys=True) + "\n").encode("utf-8") + + +def check_export(path, expected): + if not Path(path).exists() or Path(path).read_bytes() != dump(expected): + raise ValueError("generated museum export differs: " + str(path)) + + +def main(argv=None): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--main-root", type=Path, default=Path(__file__).resolve().parents[1]) + parser.add_argument("--math-root", type=Path) + parser.add_argument("--check", action="store_true") + args = parser.parse_args(argv) + data = build(args.main_root, args.math_root) + destination = args.main_root / "docs/site/museum.json" + if args.check: + check_export(destination, data) + else: + destination.parent.mkdir(parents=True, exist_ok=True) + destination.write_bytes(dump(data)) + print("Museum projection verified: 11 reviewed bullets, 3 AMEND rows, 1 landed packet; scientific effect NONE.") + return 0 + + +if __name__ == "__main__": + raise SystemExit(main()) From cd32303bcf0fe4a91a1a1f2aad2b5b6eb45088d6 Mon Sep 17 00:00:00 2001 From: Dylan Roy Date: Sat, 26 Sep 2026 12:27:56 -0500 Subject: [PATCH 2/2] Make pinned-history regression independent of checkout depth Create a local Git fixture inside the test; retain production source guards. --- tests/test_museum_data.py | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/tests/test_museum_data.py b/tests/test_museum_data.py index dddb2d78c..805fef3dc 100644 --- a/tests/test_museum_data.py +++ b/tests/test_museum_data.py @@ -112,11 +112,22 @@ def test_landed_packet_can_be_read_from_pinned_sparse_checkout(self): def test_historical_snapshot_ignores_unrelated_working_tree_append(self): with tempfile.TemporaryDirectory() as tmp: checkout = Path(tmp) / "checkout" - subprocess.run(["git", "clone", "--shared", "--no-checkout", "--quiet", - str(ROOT), str(checkout)], check=True, capture_output=True) + subprocess.run(["git", "init", "--quiet", str(checkout)], + check=True, capture_output=True) + (checkout / "STATUS.md").write_bytes(self.status) + subprocess.run(["git", "add", "STATUS.md"], cwd=checkout, + check=True, capture_output=True) + subprocess.run(["git", "-c", "user.name=Museum Test Fixture", + "-c", "user.email=museum-fixture@example.invalid", + "-c", "core.hooksPath=/dev/null", "commit", "--quiet", + "--no-gpg-sign", "-m", "Pin historical status fixture"], + cwd=checkout, check=True, capture_output=True) + fixture_commit = subprocess.check_output( + ["git", "rev-parse", "HEAD"], cwd=checkout).decode("ascii").strip() + source = dict(museum.STATUS, commit=fixture_commit) changed = self.status + b"\nUnrelated later status note.\n" (checkout / "STATUS.md").write_bytes(changed) - raw = museum.read_source(museum.STATUS, checkout, None) + raw = museum.read_source(source, checkout, None) self.assertEqual(raw, self.status) self.assertEqual(museum.project(INDEX_BYTES, raw), museum.project(INDEX_BYTES, self.status))