The research website
Use main’s citation metadata for this public guide and reproduction surface. GitHub’s “Cite this repository” menu supplies APA and BibTeX formats.
A REFERENCE SOMEONE ELSE CAN FOLLOW
A research program, a proof, and a calculation are different sources. Point readers to the exact object and version that support your work.
Use main’s citation metadata for this public guide and reproduction surface. GitHub’s “Cite this repository” menu supplies APA and BibTeX formats.
Link the exact proof in Math-, its full commit and the review you used. Preserve the authorship and hypotheses stated by that object; a repository maintainer is not automatically every proof’s author.
Name the package or artifact, its version or commit, and its own citation guidance. query- identifies source bytes; it does not certify the mathematical claim they contain.
Use main’s citation metadata for this public guide and reproduction surface. GitHub’s “Cite this repository” menu supplies APA and BibTeX formats.
Find the result in Math-’s current proof index, then cite its exact proof, full commit and the review you used. Preserve the authorship and hypotheses stated by that object; a repository maintainer is not automatically every proof’s author.
Name the package or artifact, its version or commit, and its own citation guidance. query- identifies source bytes; it does not certify the mathematical claim they contain.
EXACT SOURCES
Use a commit permalink for the content you read. Branch links such as main can change. Record the repository, complete Git commit and file path; include a SHA-256 or artifact identifier when the source provides one.
A source reference locates bytes. Add the source’s own authors, title and publication details when preparing a bibliography. A review should be cited separately when your argument relies on that review’s scope.
No DOI or tagged-release version is declared in main’s current citation metadata. Use a commit reference now. A future archive deposit must supply its actual identifier before a DOI is advertised. Citation and archival identifiers do not establish scientific acceptance.
SIDE24 coefficient proof, Math- commit f430fdecbb1d8802d8af40419b701f12af87c039, coefficients/side24_v1/PROOF.md. Pair this source with its recorded review and scope when discussing acceptance. Replay its calculation.
LOCAL REFERENCE BUILDER
This tool formats the identity you enter. It does not contact GitHub, check that the commit exists, retrieve a file, assign authorship, or evaluate its correctness. Everything stays in your browser.
diff --git a/docs/site/dependencies.mjs b/docs/site/dependencies.mjs index f1c630340..2f3725962 100644 --- a/docs/site/dependencies.mjs +++ b/docs/site/dependencies.mjs @@ -220,7 +220,7 @@ function run({ index, provenance }) { function renderSearch() { const query = search.value.trim(); const results = searchNodes(index, query); - searchResults.replaceChildren(...results.slice(0, 30).map(node => { + searchResults.replaceChildren(...results.map(node => { const item = element('li'); item.append(buttonFor(node, choose)); return item; @@ -228,7 +228,7 @@ function run({ index, provenance }) { searchSummary.textContent = !query ? 'Enter a claim ID, source, status, note, or relation.' : results.length - ? `${results.length} result${results.length === 1 ? '' : 's'}${results.length > 30 ? '; showing the first 30' : ''}.` + ? `${results.length} result${results.length === 1 ? '' : 's'}.` : 'No node in this snapshot matches that search.'; } search.disabled = false; diff --git a/docs/site/museum.mjs b/docs/site/museum.mjs index 4e1513072..fdf85da7c 100644 --- a/docs/site/museum.mjs +++ b/docs/site/museum.mjs @@ -221,9 +221,37 @@ export function revealClaimFragment(document,hash,allowedIds){ target.tabIndex=-1;target.scrollIntoView({block:'start'}); target.focus?.({preventScroll:true});return true; } -export async function startMuseum({document=globalThis.document,fetcher=globalThis.fetch,search=globalThis.location?.search||'',geometryLoader=()=>import('./geometry.mjs'),currentHash=()=>globalThis.location?.hash||''}={}){ +function prepareClaimFragment(document,window,currentHash) { + const hash=currentHash(); + let id;try{id=decodeURIComponent(hash.replace(/^#/,''));}catch{return ()=>false;} + if(![...REVIEWED_IDS,D1_ID,...OPEN_IDS].includes(id))return ()=>false; + if(!window?.addEventListener)return allowedIds=>revealClaimFragment(document,hash,allowedIds); + const events=['wheel','touchstart','touchmove','keydown','pointerdown','pointermove','focusin','hashchange','popstate','pagehide']; + const options={capture:true,passive:true}; + let cancelled=false,finished=false; + const cleanup=()=>events.forEach(event=>window.removeEventListener(event,cancel,options)); + const cancel=event=>{ + if(event.type==='pointermove'&&!event.buttons)return; + // Native fragment focus on the requested card is not a new reader action. + if(event.type==='focusin'&&event.target?.id===id)return; + cancelled=true;cleanup(); + }; + events.forEach(event=>window.addEventListener(event,cancel,options)); + return allowedIds=>{ + if(finished)return false; + finished=true; + window.requestAnimationFrame(()=>{ + cleanup(); + if(!cancelled&¤tHash()===hash)revealClaimFragment(document,hash,allowedIds); + }); + return true; + }; +} +export async function startMuseum({document=globalThis.document,window=globalThis.window,fetcher=globalThis.fetch,search=globalThis.location?.search||'',geometryLoader=()=>import('./geometry.mjs'),currentHash=()=>globalThis.location?.hash||''}={}){ const ids=['museum-state','claim-cards','lifetime-fixture','packet-cards','active-exhibit']; const containers=Object.fromEntries(ids.map(id=>{const node=document.getElementById(id);if(!node)throw Error(`Missing museum container: ${id}`);return [id,node];})); + const finishFragment=prepareClaimFragment(document,window,currentHash); + let claimIds=[]; try{ const {manifest,cachedFetch}=await verifiedMuseum({fetcher}); containers['museum-state'].textContent='Pinned source projections verified: 11 reviewed index entries, the separately reconciled D1 row and 2 AMEND rows. Verifying each linked source before display…'; @@ -247,10 +275,10 @@ export async function startMuseum({document=globalThis.document,fetcher=globalTh } 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.'; - revealClaimFragment(document,currentHash(),manifest.claims.map(claim=>claim.id)); + claimIds=manifest.claims.map(claim=>claim.id); }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(); - } + }finally{finishFragment(claimIds);} } if(typeof document!=='undefined')await startMuseum(); diff --git a/tests/test_dependency_viewer.mjs b/tests/test_dependency_viewer.mjs index 2dcb42bd9..b2da679cc 100644 --- a/tests/test_dependency_viewer.mjs +++ b/tests/test_dependency_viewer.mjs @@ -21,6 +21,37 @@ const pageURL = new URL('docs/site/dependencies.html', root); const appURL = new URL('docs/site/dependencies.mjs', root); const styleURL = new URL('docs/site/dependencies.css', root); +test('broad dependency searches expose every matching node including later coefficient sources', async () => { + class Element extends EventTarget { + constructor(){super();this.children=[];this.value='';this._text='';} + set textContent(value){this._text=String(value);this.children=[];} + get textContent(){return this._text+this.children.map(child=>child.textContent||'').join('');} + append(...children){this.children.push(...children);} + replaceChildren(...children){this.children=children;this._text='';} + } + const html=await readFile(pageURL,'utf8'); + const nodes=new Map([...html.matchAll(/\bid="([^"]+)"/g)].map(match=>[match[1],new Element()])); + const saved=new Map(['window','document','fetch'].map(name=>[name,Object.getOwnPropertyDescriptor(globalThis,name)])); + const window=new EventTarget();window.location={hash:'',search:'',href:'https://example.test/dependencies.html'}; + globalThis.window=window; + globalThis.document={getElementById:id=>nodes.get(id),createElement:()=>new Element(),createTextNode:text=>({textContent:text})}; + globalThis.fetch=async url=>{ + assert.ok(['./dependency-source/GRAPH.json','./dependency-source/PROVENANCE.json'].includes(url)); + return new Response(await readFile(new URL('docs/site/'+url,root))); + }; + try { + await import('../docs/site/dependencies.mjs?visitor-search'); + // Wait for asynchronous byte validation and real DOM initialization. + for(let turn=0;turn<20&&!nodes.get('load-status').textContent.startsWith('Pinned Math');turn++)await new Promise(resolve=>setTimeout(resolve,5)); + const search=nodes.get('dependency-search');search.value='math';search.dispatchEvent(new Event('input')); + assert.equal(nodes.get('search-results').children.length,39); + assert.match(nodes.get('search-results').textContent,/math.side24-coefficient/); + assert.match(nodes.get('search-results').textContent,/math.uniform-matrix-cap-lifetime/); + } finally { + for(const [name,descriptor] of saved)if(descriptor)Object.defineProperty(globalThis,name,descriptor);else delete globalThis[name]; + } +}); + async function fixture() { return JSON.parse(await readFile(graphURL, 'utf8')); } diff --git a/tests/test_museum_frontend.mjs b/tests/test_museum_frontend.mjs index fed278c4e..44225b17b 100644 --- a/tests/test_museum_frontend.mjs +++ b/tests/test_museum_frontend.mjs @@ -10,6 +10,42 @@ test('museum exposes source-bound rendering rather than silently omitting the pa }); const museum = fs.existsSync(moduleURL) ? await import(moduleURL) : null; const available = {skip: !museum}; + +async function delayedClaimPage(interaction) { + const f=fixture(),document=documentFromHTML(),window=new EventTarget(),events=[]; + window.location={hash:'#d3-side24-coefficient'}; + const frames=[];window.requestAnimationFrame=callback=>frames.push(callback); + const create=document.createElement; + document.createElement=tag=>{ + const node=create(tag); + node.focus=()=>{document.activeElement=node;events.push('focus:'+node.id);}; + node.scrollIntoView=()=>events.push('scroll:'+node.id); + return node; + }; + const find=(node,id)=>node.id===id?node:node.children?.map(child=>find(child,id)).find(Boolean); + document.getElementById=id=>document.nodes.get(id)||[...document.nodes.values()].map(node=>find(node,id)).find(Boolean); + const raw=JSON.stringify(f.manifest),config=JSON.stringify({museum_json:{url:'museum.json',bytes:Buffer.byteLength(raw),sha256:digest(raw)}}); + const mapping=new Map([['config.json',config],['museum.json',raw],[f.manifest.index_source.url,f.index],[f.manifest.status_source.url,f.status],[f.manifest.claims[0].proof.url,'Pinned proof.'],[f.manifest.claims[11].review.url,'Pinned reconciliation.']]); + let release,started;const gate=new Promise(resolve=>release=resolve),requested=new Promise(resolve=>started=resolve); + const loading=museum.startMuseum({document,window,search:'',currentHash:()=>window.location.hash,fetcher:async url=>{ + if(url===f.manifest.claims[0].proof.url){started();await gate;} + assert.ok(mapping.has(url),'Unexpected museum source '+url);return new Response(mapping.get(url)); + }}); + await requested; + if(interaction)window.dispatchEvent(new Event(interaction)); + release();await loading; + for(const frame of frames)frame(); + return {events,document}; +} +test('a delayed initial museum bookmark still reaches its verified claim when untouched',async()=>{ + const page=await delayedClaimPage(); + assert.deepEqual(page.events,['scroll:d3-side24-coefficient','focus:d3-side24-coefficient']); +}); +for(const interaction of ['wheel','keydown','pointerdown','focusin','hashchange','popstate','pagehide']) { + test(`museum ${interaction} while verifying sources cancels delayed focus and scroll`,async()=>{ + const page=await delayedClaimPage(interaction);assert.deepEqual(page.events,[]); + }); +} test('full reviewed bullets, the reconciled D1 row and both AMEND rows retain their classes and source wording',available,()=>{ const {manifest,index,status}=fixture(); assert.equal(museum.validateBoundManifest(manifest,index,status).claims.length,14); diff --git a/tests/test_public_shop_browser_contract.py b/tests/test_public_shop_browser_contract.py index 1a2b3266e..f42a181e1 100644 --- a/tests/test_public_shop_browser_contract.py +++ b/tests/test_public_shop_browser_contract.py @@ -51,7 +51,7 @@ def test_browser_dependencies_are_separate_and_version_pinned(self): class ReaderSourceBrowserContract(unittest.TestCase): def test_existing_runner_covers_source_quote_and_keyboard_disclosure(self): source=(ROOT/'tools/public_shop_browser_check.py').read_text() - for token in ['check_source_card_flow','source-quote-readable','source-quote-original','Exact source quote','issuecomment-5841270276','len(report["cases"])==13']: + for token in ['check_source_card_flow','source-quote-readable','source-quote-original','Exact source quote','issuecomment-5841270276','len(report["cases"])==15']: self.assertIn(token,source) def test_reader_tools_have_desktop_and_mobile_browser_evidence(self): @@ -69,7 +69,7 @@ def test_reader_tools_have_desktop_and_mobile_browser_evidence(self): 'dated claim-dependency snapshot', 'page.keyboard.press("Tab")', 'page.keyboard.press("Enter")', 'documentElement.scrollWidth', - 'len(report["cases"])==13', + 'len(report["cases"])==15', ]: self.assertIn(token,source) diff --git a/tests/test_workspace_navigation.mjs b/tests/test_workspace_navigation.mjs index a62f82fee..99c26b11a 100644 --- a/tests/test_workspace_navigation.mjs +++ b/tests/test_workspace_navigation.mjs @@ -1,12 +1,13 @@ import test from 'node:test'; import assert from 'node:assert/strict'; import fs from 'node:fs'; +import {createHash} from 'node:crypto'; // Exercise actual app startup and source validation. Only the browser and // network boundaries are replaced; this is not a browser layout test. const root=new URL('../',import.meta.url); const html=fs.readFileSync(new URL('docs/site/workspace.html',root),'utf8'); -const config=JSON.parse(fs.readFileSync(new URL('docs/site/config.json',root))); +const originalConfig=JSON.parse(fs.readFileSync(new URL('docs/site/config.json',root))); const deferred=()=>{let resolve;const promise=new Promise(r=>{resolve=r;});return {promise,resolve};}; let run=0; @@ -19,7 +20,13 @@ class Element extends EventTarget { setAttribute(name,value){this.attributes[name]=String(value);} } -function page(hash='#inventory',{configFailure=false}={}) { +function page(hash='#inventory',{configFailure=false,importSuccess=false,querySuccess=false}={}) { + const config=structuredClone(originalConfig); + const importBytes=JSON.stringify({scientific_effect:'NONE',byte_copies:Array.from({length:config.imports.count},()=>({kind:'BYTE_COPY',source_label_adopted:false}))}); + const queryBytes=JSON.stringify({math_tip:config.query.math_pin,scientific_status_authority:false}); + for(const [key,bytes] of [['imports',importBytes],['query',queryBytes]]){ + config[key].bytes=Buffer.byteLength(bytes);config[key].sha256=createHash('sha256').update(bytes).digest('hex'); + } const events=[],nodes=new Map(),window=new EventTarget(),listeners=new Set(),frames=[]; window.location={hash}; window.requestAnimationFrame=callback=>{frames.push(callback);return frames.length;}; @@ -49,8 +56,9 @@ function page(hash='#inventory',{configFailure=false}={}) { globalThis.fetch=async url=>{ if(url==='config.json'){requested.resolve();await configuration.promise;return configFailure?new Response('',{status:503}):new Response(JSON.stringify(config));} if(url===config.status.url){statusRequested.resolve();await status.promise;} - if(url===config.imports.url){custodyRequested.resolve();await custody.promise;return new Response('',{status:503});} + if(url===config.imports.url){custodyRequested.resolve();await custody.promise;return importSuccess?new Response(importBytes):new Response('',{status:503});} if(url===config.coefficient.url)return new Response('',{status:503}); + if(url===config.query.url)return querySuccess?new Response(queryBytes):new Response('',{status:503}); assert.ok(mapping.has(url),`Unexpected fetch ${url}`); return new Response(fs.readFileSync(new URL(mapping.get(url),root))); }; @@ -155,3 +163,28 @@ test('reader movement between source settlement and final rendering prevents cor p.window.dispatchEvent(new Event('wheel'));p.flushFrames(); assert.deepEqual(p.events,[]);assert.equal(p.listeners.size,0); }); + +test('an import refusal does not leave the separate query source loading forever',async()=>{ + const p=page();await complete(p); + assert.match(p.nodes.get('query-note').textContent,/Unavailable:.*503.*No result inferred/); + assert.doesNotMatch(p.nodes.get('query-note').textContent,/Loading/); + assert.equal(p.nodes.get('query-identity').children.length,0); +}); + +test('a config refusal settles every pending source note',async()=>{ + const p=page('',{configFailure:true});await complete(p); + assert.match(p.nodes.get('query-note').textContent,/Unavailable: Shop config unavailable/); +}); + +test('a query refusal preserves verified import custody information',async()=>{ + const p=page('',{importSuccess:true});await complete(p); + assert.match(p.nodes.get('custody-note').textContent,/9 byte-copy imports landed/); + assert.match(p.nodes.get('query-note').textContent,/Unavailable:.*503/); +}); + +test('a successful query remains usable when the unrelated import source fails',async()=>{ + const p=page('',{querySuccess:true});await complete(p); + assert.match(p.nodes.get('custody-note').textContent,/Unavailable:.*503/); + assert.match(p.nodes.get('query-note').textContent,/performs no live tip check/); + assert.match(p.nodes.get('query-identity').textContent,/c88768bb11efd1f7d6bda188f13064bedec54a06/); +}); diff --git a/tools/public_shop_browser_check.py b/tools/public_shop_browser_check.py index 821573ddb..f6ea35471 100644 --- a/tools/public_shop_browser_check.py +++ b/tools/public_shop_browser_check.py @@ -253,6 +253,11 @@ def check_reader_tools_flow(page, origin, expect, result, output): expect(page.locator("#unresolved-count")).to_have_text("15") expect(page.locator(".boundary")).to_contain_text("Dated read-only snapshot") expect(page.get_by_role("link",name="Provenance record",exact=True)).to_have_attribute("href","dependency-source/PROVENANCE.json") + page.locator("#dependency-search").fill("math") + expect(page.locator("#search-results > li")).to_have_count(39) + expect(page.locator("#search-results")).to_contain_text("math.side24-coefficient") + expect(page.locator("#search-results")).to_contain_text("math.uniform-matrix-cap-lifetime") + result["steps"].append("broad dependency search exposes all 39 matching nodes") page.locator("#dependency-search").fill("reviews/pr22_fixed_annulus_nonauthor_20260925/REVIEW.md") expect(page.locator("#search-results > li")).to_have_count(1) result_button=page.locator("#search-results button") @@ -292,6 +297,38 @@ def check_reader_tools_flow(page, origin, expect, result, output): result["steps"].append("Pinned 49/55/15 graph, review-source search, post-layout saved-link focus, invalid-ID refusal and narrow overflow checked") +def check_visitor_recovery(page, origin, expect, result): + if result["case"] == "query-refusal": + config=json.loads((ROOT/"docs/site/config.json").read_text()) + hits=[] + def refuse_query(route): + hits.append(route.request.url) + route.fulfill(status=503,headers={"Access-Control-Allow-Origin":"*"},body="") + page.route(config["query"]["url"],refuse_query) + page.goto(origin+"workspace.html#board") + expect(page.locator("#query-note")).to_contain_text("Source unavailable (503). No result inferred.",timeout=45000) + expect(page.locator("#custody-note")).to_contain_text("9 byte-copy imports landed",timeout=45000) + expect(page.locator("#query-identity")).to_be_empty() + require(len(hits)==1,"Expected exactly one refused query request") + result["steps"].append("query 503 ends loading without erasing verified import information") + else: + manifest=json.loads((ROOT/"docs/site/museum.json").read_text()) + held=[] + page.route(manifest["claims"][0]["proof"]["url"],lambda route:held.append(route)) + page.goto(origin+"museum.html#d3-side24-coefficient",wait_until="domcontentloaded") + expect(page.locator("#claim-cards")).to_contain_text("Verifying",timeout=45000) + page.get_by_role("link",name="Reproduce",exact=True).first.focus() + page.keyboard.press("Tab") + focused=page.get_by_role("link",name="Cite",exact=True).first + expect(focused).to_be_focused() + require(len(held)==1,"The delayed source was not intercepted") + held[0].fulfill(response=held[0].fetch()) + expect(page.locator("#museum-state")).to_contain_text("displayed source bytes verified",timeout=45000) + expect(focused).to_be_focused() + require(page.evaluate("Math.abs(document.querySelector('#d3-side24-coefficient').getBoundingClientRect().top)>100"),"Delayed claim completion pulled the reader back") + result["steps"].append("keyboard navigation during museum verification keeps focus and reading position") + + def main(): parser=argparse.ArgumentParser(description=__doc__) parser.add_argument("--output",type=Path,required=True) @@ -381,6 +418,25 @@ def main(): finally: result["page_errors"]=errors context.close() + for label in ["query-refusal","museum-reader-intent"]: + result={"case":label,"steps":[],"passed":False};report["cases"].append(result) + context=browser.new_context(viewport={"width":390,"height":844},color_scheme="light",reduced_motion="reduce") + page=context.new_page();page.set_default_timeout(15000);errors=[] + page.on("pageerror",lambda error:errors.append(str(error))) + try: + check_visitor_recovery(page,origin,expect,result) + require(not errors,f"Visitor recovery page errors: {errors}") + result["passed"]=True + except Exception: + result["error"]=traceback.format_exc() + finally: + result["page_errors"]=errors;shot=output/f"{label}.png" + try: + page.screenshot(path=str(shot)) + result["screenshot"]={"path":shot.name,"sha256":sha256(shot.read_bytes()).hexdigest()} + except Exception: + result["screenshot_error"]=traceback.format_exc();result["passed"]=False + context.close() result={"case":"inventory-refusal","steps":[],"passed":False};report["cases"].append(result) context=browser.new_context(viewport={"width":390,"height":844},color_scheme="dark") page=context.new_page();refusal_errors=[];route_hits=[] @@ -415,7 +471,7 @@ def refuse_inventory(route): context.close() finally: browser.close() - report["passed"]=len(report["cases"])==13 and all(case["passed"] for case in report["cases"]) + report["passed"]=len(report["cases"])==15 and all(case["passed"] for case in report["cases"]) except Exception: report["passed"]=False;report["error"]=traceback.format_exc() finally: From a9f05a47286cee5e5c1dc4bb88ce0ea08cacb994 Mon Sep 17 00:00:00 2001 From: Dylan Roy <249851642+d6g8k5htny-coder@users.noreply.github.com> Date: Sat, 3 Oct 2026 09:45:00 -0700 Subject: [PATCH 2/4] Await viewer startup and settled animation frames in regressions --- docs/site/dependencies.mjs | 2 +- tests/test_dependency_viewer.mjs | 19 ++++++++++++++----- tools/public_shop_browser_check.py | 7 ++++++- 3 files changed, 21 insertions(+), 7 deletions(-) diff --git a/docs/site/dependencies.mjs b/docs/site/dependencies.mjs index 2f3725962..3b8e20bc3 100644 --- a/docs/site/dependencies.mjs +++ b/docs/site/dependencies.mjs @@ -246,7 +246,7 @@ function run({ index, provenance }) { } const initialSelectionRestore = prepareInitialSelectionRestore(); -load().then(data => { +export const initialization = load().then(data => { run(data); initialSelectionRestore.finish(); }).catch(error => { diff --git a/tests/test_dependency_viewer.mjs b/tests/test_dependency_viewer.mjs index b2da679cc..de27d8723 100644 --- a/tests/test_dependency_viewer.mjs +++ b/tests/test_dependency_viewer.mjs @@ -1,6 +1,7 @@ import test from 'node:test'; import assert from 'node:assert/strict'; import { readFile } from 'node:fs/promises'; +import { webcrypto } from 'node:crypto'; import { buildGraphIndex, @@ -21,7 +22,7 @@ const pageURL = new URL('docs/site/dependencies.html', root); const appURL = new URL('docs/site/dependencies.mjs', root); const styleURL = new URL('docs/site/dependencies.css', root); -test('broad dependency searches expose every matching node including later coefficient sources', async () => { +for (const digestDelay of [0, 150]) test(`broad dependency searches expose every matching node after ${digestDelay} ms digest delay`, async () => { class Element extends EventTarget { constructor(){super();this.children=[];this.value='';this._text='';} set textContent(value){this._text=String(value);this.children=[];} @@ -31,7 +32,11 @@ test('broad dependency searches expose every matching node including later coeff } const html=await readFile(pageURL,'utf8'); const nodes=new Map([...html.matchAll(/\bid="([^"]+)"/g)].map(match=>[match[1],new Element()])); - const saved=new Map(['window','document','fetch'].map(name=>[name,Object.getOwnPropertyDescriptor(globalThis,name)])); + const saved=new Map(['window','document','fetch','crypto'].map(name=>[name,Object.getOwnPropertyDescriptor(globalThis,name)])); + if (digestDelay) Object.defineProperty(globalThis,'crypto',{configurable:true,value:{subtle:{async digest(...args){ + await new Promise(resolve=>setTimeout(resolve,digestDelay)); + return webcrypto.subtle.digest(...args); + }}}}); const window=new EventTarget();window.location={hash:'',search:'',href:'https://example.test/dependencies.html'}; globalThis.window=window; globalThis.document={getElementById:id=>nodes.get(id),createElement:()=>new Element(),createTextNode:text=>({textContent:text})}; @@ -39,15 +44,19 @@ test('broad dependency searches expose every matching node including later coeff assert.ok(['./dependency-source/GRAPH.json','./dependency-source/PROVENANCE.json'].includes(url)); return new Response(await readFile(new URL('docs/site/'+url,root))); }; + let initialization; try { - await import('../docs/site/dependencies.mjs?visitor-search'); - // Wait for asynchronous byte validation and real DOM initialization. - for(let turn=0;turn<20&&!nodes.get('load-status').textContent.startsWith('Pinned Math');turn++)await new Promise(resolve=>setTimeout(resolve,5)); + ({initialization}=await import(`../docs/site/dependencies.mjs?visitor-search-${digestDelay}`)); + // Await the actual startup lifecycle, including byte validation and rendering. + await initialization; + assert.match(nodes.get('load-status').textContent,/^Pinned Math/); const search=nodes.get('dependency-search');search.value='math';search.dispatchEvent(new Event('input')); assert.equal(nodes.get('search-results').children.length,39); assert.match(nodes.get('search-results').textContent,/math.side24-coefficient/); assert.match(nodes.get('search-results').textContent,/math.uniform-matrix-cap-lifetime/); } finally { + // Keep the DOM/network globals alive until all startup work has settled. + await initialization; for(const [name,descriptor] of saved)if(descriptor)Object.defineProperty(globalThis,name,descriptor);else delete globalThis[name]; } }); diff --git a/tools/public_shop_browser_check.py b/tools/public_shop_browser_check.py index f6ea35471..1b069b4bf 100644 --- a/tools/public_shop_browser_check.py +++ b/tools/public_shop_browser_check.py @@ -14,6 +14,7 @@ from pathlib import Path import subprocess import threading +import time import traceback from urllib.parse import parse_qs, urlsplit @@ -317,13 +318,17 @@ def refuse_query(route): page.route(manifest["claims"][0]["proof"]["url"],lambda route:held.append(route)) page.goto(origin+"museum.html#d3-side24-coefficient",wait_until="domcontentloaded") expect(page.locator("#claim-cards")).to_contain_text("Verifying",timeout=45000) + deadline=time.monotonic()+45 + while not held and time.monotonic()The existing 2,138-file inventory includes proofs, partial arguments, reviews, and historical reading copies. It counts files, not accepted theorems. For recent packets and current source routes, use Latest public work. This inventory retains its 2026-09-26 source cut.
Search links become available after catalog verification.
Verifying the original inventory and its shards…
| Repository / full text | Commit | SHA-256 |
|---|
04 / JOIN THE WORK
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.
Fork main. Add an incoming/<id>/ package with your result, outputs, and source/file identities. Do not edit scientific status rows.
A designated reviewer checks the sources, scope, and limitations. Intake checks validate packaging; accepted intake is not an accepted theorem.
Public review queue ↗04 / JOIN THE WORK
Replay a pinned calculation, chart public data, document an import, or leave a source-bound review comment. Check current ownership, comment /claim with your scope before beginning, and keep one active claim.
Fork main. Add an incoming/<id>/ package with your result, outputs, and source/file identities. Do not edit scientific status rows.
A designated reviewer checks the sources, scope, and limitations. Intake checks validate packaging; accepted intake is not an accepted theorem.
Public review queue ↗