Repository navigation
Museum conditional route: all hypotheses preserved, no status promotion #166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
2072c09
Add source-bound conditional proof route to the verification museum
d6g8k5htny-coder a66366a
Bind conditional projection to the audited commit and retain full ide…
d6g8k5htny-coder f9ae228
Share one verified museum startup with the conditional route and test…
cursoragent 64a0ac9
Merge remote-tracking branch 'origin/main' into chatgpt/museum-condit…
cursoragent File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| name: Museum conditional source route | ||
| on: | ||
| pull_request: | ||
| paths: | ||
| - 'docs/site/**' | ||
| - 'tools/museum_conditionals.mjs' | ||
| - 'tests/test_museum*.mjs' | ||
| - 'tests/fixtures/cumulative_transfer_source.txt' | ||
| - '.github/workflows/museum-conditionals.yml' | ||
| workflow_dispatch: | ||
| permissions: | ||
| contents: read | ||
| jobs: | ||
| conditional-projection: | ||
| runs-on: ubuntu-24.04 | ||
| timeout-minutes: 5 | ||
| steps: | ||
| - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 | ||
| with: | ||
| persist-credentials: false | ||
| - name: Record runner Node version | ||
| run: node --version | ||
| - name: Museum frontend and conditional-route controls | ||
| run: node --test tests/test_museum*.mjs tests/test_public_shop_frontend.mjs | ||
| - name: Replay the actual committed museum source selection | ||
| run: | | ||
| node tools/museum_conditionals.mjs --source tests/fixtures/cumulative_transfer_source.txt > /tmp/conditional-route.json | ||
| node tools/museum_conditionals.mjs --source tests/fixtures/cumulative_transfer_source.txt --check /tmp/conditional-route.json > /tmp/conditional-route-replay.json | ||
| cmp /tmp/conditional-route.json /tmp/conditional-route-replay.json |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,126 @@ | ||
| # Conditional proof routes — cumulative-transfer pilot | ||
|
|
||
| Engineering projection only. Scientific effect: NONE. | ||
| This page describes one added view, not a new claim database, theorem verdict, | ||
| or general-purpose theorem prover. The original museum cards, source inventory, | ||
| STATUS snapshot, config and manifest retain their existing identities and meaning. | ||
|
|
||
| ## The first route | ||
|
|
||
| `conditionals.mjs` reads the already-indexed cumulative-transfer correction from | ||
| `museum.json`. Its exact source is | ||
| `reviews/collision_mechanism_20260925/CUMULATIVE_TRANSFER_CORRECTION.md` in Math-, | ||
| Git blob `044ac5fdaf403a38e33983e31f0ad69f8e76d6d5`, 3272 bytes, | ||
| SHA256 `83f653393dc6245980f6848e2bfc65ac9ad4c7d8304b028b88764356fd3825b6`. | ||
| The audited commit is `d6628da09384728992dcbe6e921cc28ba85aebb0`. | ||
| Both interfaces require that exact commit and matching immutable URLs. | ||
| A different 40-character string is not evidence that these bytes belong to it. | ||
| The exported projection retains the complete source descriptor as well as its digest. | ||
| The checked source fixture under `tests/fixtures/` is an exact reading copy of | ||
| those public bytes, not a new proof body or an authoritative source. | ||
|
|
||
| The view retains six inputs: the setup/quantifiers, four numbered hypotheses, | ||
| and the definition of N. One ALL edge joins those inputs to the conditional | ||
| limit. The positive-coefficient and zero-coefficient conclusions remain separate. | ||
| The warning that a cumulative asymptotic does not imply a density asymptotic | ||
| is retained. The ratio h/(kappa*r^m) -> 1 and one fixed lower comparison constant | ||
| are not replaced by pointwise comparisons or a fitted exponent. | ||
|
|
||
| Application evaluation is always NOT_EVALUATED in this pilot. Hypotheses are | ||
| not declared satisfied merely because their implication has a reviewed source. | ||
| The existing source/review card remains the source of quoted review information. | ||
| No independence credit, lemma closure or promotion is computed here. | ||
|
|
||
| ## One projection, two interfaces | ||
|
|
||
| The browser reuses the museum module's single verified startup | ||
| (`verifiedMuseum`): config-to-manifest digest, central source projection and the | ||
| per-page byte cache are fetched and verified once per page fetch and shared by | ||
| `museum.mjs` and `conditionals.mjs`, so the route repeats no central request and | ||
| reads the cumulative proof bytes from the same cache the claim card verified. | ||
| It then checks the audited proof descriptor and its complete byte and Git-blob | ||
| identities before parsing any hypotheses. A rejected startup is not retained; a | ||
| later caller re-verifies instead of inheriting a stale refusal. A failed load | ||
| clears the conditional view and reports unavailable. Source text is rendered | ||
| with textContent, not HTML. | ||
| The new HTML section is an accessible text dependency view, not a new 3D exhibit. | ||
|
|
||
| The read-only CLI uses the same projection function. It checks the existing | ||
| config-to-manifest digest, selects the one source descriptor, and verifies a | ||
| local source file against it. The CLI makes no network request, does not execute | ||
| the source, and does not replay the central index or review semantics. The | ||
| browser retains those extra existing checks. A projection supplied via --check | ||
| must equal the complete regenerated statement: missing premises, ALL-to-ANY | ||
| changes, extra nodes, cycles or status fields are refused rather than adopted. | ||
|
|
||
| Run from the main repository root: | ||
|
|
||
| ```sh | ||
| node --test tests/test_museum_conditionals.mjs tests/test_museum_conditionals_startup.mjs tests/test_museum_conditionals_cli.mjs tests/test_museum_identity.mjs | ||
| node tools/museum_conditionals.mjs --source tests/fixtures/cumulative_transfer_source.txt > /tmp/conditional-route.json | ||
| node tools/museum_conditionals.mjs --source tests/fixtures/cumulative_transfer_source.txt --check /tmp/conditional-route.json | ||
| ``` | ||
|
|
||
| `--root CHECKOUT` selects a different local checkout for config/manifest reads. | ||
| The emitted JSON is a disposable projection, not a committed second inventory. | ||
| The source must remain byte-identical to the named proof. A new mathematical | ||
| statement requires an explicitly reviewed update to this bounded projection. | ||
| The CLI tests use temporary metadata fixtures around the real proof bytes; | ||
| the hosted workflow also exercises the actual committed config and manifest. | ||
|
|
||
| ## Scope and deployment | ||
|
|
||
| This adds a pilot to museum.html, not an exhaustive graph of P0.1, D1, D5, | ||
| SARD-G or all research obligations. No OR route is invented. Future alternative | ||
| proof routes need their own exact statements and source-bound interfaces; | ||
| induction must state its base case and a well-founded decreasing parameter. | ||
| A larger graph cannot turn circular support into proof. | ||
|
|
||
| The separate Math- scalar and one-endpoint Hessian certificates in PR89 are | ||
| author derivations awaiting review. They are deliberately not added to the | ||
| museum's accepted result cards. Neither supplies the additional-witness | ||
| covariance or determinant-weighted Palm estimate. query- remains a read-only | ||
| identity lookup. | ||
|
|
||
| Local verification covers the new module, CLI, source integrity, HTML wiring, | ||
| a lightweight DOM refusal harness, and a mocked successful browser startup | ||
| (`tests/test_museum_conditionals_startup.mjs`): shared config/manifest reuse | ||
| with `startMuseum`, claim selection, proof loading, host replacement, and the | ||
| fail-closed paths for altered proof bytes, a non-audited descriptor and a stale | ||
| manifest. It is not a real-browser, layout, GPU or live | ||
| network test, nor a replay of every unrelated repository test. The hosted workflow | ||
| records its own results. A draft PR is not a deployed change to the public site. | ||
|
|
||
| ## Reconnaissance and next mathematical interface | ||
|
|
||
| Lean blueprints are an inspected precedent for making dependencies visible: | ||
| https://github.com/PatrickMassot/leanblueprint. This implementation installs no | ||
| Lean toolchain and creates no kernel-checked proof. The analogy concerns | ||
| presentation and source navigation only, not formalization or acceptance. | ||
| The full local source/proof identities and limits are the controlling context | ||
| for this pilot; literature analogies do not discharge its hypotheses. | ||
|
|
||
| For a future D5 multiscale proof, a useful conditional interface is explicit: | ||
| if a complete weighted counting partition yields E[N]=sum_j J_j(r)/Z_r, | ||
| Z_r>=c_Z*r^2, and J_j(r)<=A*r^5*2^(-gamma*j) uniformly with gamma>0, | ||
| then E[N]<=A*r^3/[c_Z*(1-2^(-gamma))]. This is geometric-series arithmetic, | ||
| not evidence that these bounds or the partition hold for D5. Every collar, | ||
| axis, remainder and law-identification interface must be supplied. A first | ||
| moment does not by itself establish the separate elder-event inclusion. | ||
| No cumulant hierarchy or new PDE/gravitational interpretation is installed. | ||
|
|
||
| ## Identity follow-through | ||
|
|
||
| The initial offline implementation checked commit syntax, digest and URL | ||
| consistency, but could accept correct bytes attributed to a different, | ||
| syntactically valid commit if the fixture manifest and URLs were changed | ||
| coherently. Three test-first controls exposed that gap (24 old tests passed, | ||
| 3 new tests failed). The source selector now requires the audited commit; the | ||
| exported route also carries the complete repository/path/commit/blob/bytes/hash | ||
| and URL descriptor. Changing source revision requires a reviewed projection | ||
| update, not relabeling a local proof. This is an author correction, not a | ||
| nonauthor review or a change to mathematical status. | ||
|
|
||
| A Chromium smoke-test attempt in this continuation was blocked at localhost | ||
| navigation with ERR_BLOCKED_BY_ADMINISTRATOR, before any module assertion. | ||
| No browser protection was changed; this is a recorded verification gap, not a pass. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,114 @@ | ||
| // One dependency transcription of an already-indexed proof. No status engine. | ||
| const CLAIM_ID='cumulative-transfer-correction'; | ||
| const SOURCE_COMMIT='d6628da09384728992dcbe6e921cc28ba85aebb0'; | ||
| const SOURCE_PATH='reviews/collision_mechanism_20260925/CUMULATIVE_TRANSFER_CORRECTION.md'; | ||
| const SOURCE_SHA256='83f653393dc6245980f6848e2bfc65ac9ad4c7d8304b028b88764356fd3825b6'; | ||
| const SOURCE_BLOB='044ac5fdaf403a38e33983e31f0ad69f8e76d6d5'; | ||
| const encoder=new TextEncoder(),decoder=new TextDecoder('utf-8',{fatal:true}); | ||
| const hex40=v=>typeof v==='string'&&/^[0-9a-f]{40}$/.test(v); | ||
|
|
||
| function validateSource(source){ | ||
| if(!source||source.repository!=='d6g8k5htny-coder/Math-'||!hex40(source.commit)||source.commit!==SOURCE_COMMIT | ||
| ||source.path!==SOURCE_PATH||source.sha256!==SOURCE_SHA256||source.blob!==SOURCE_BLOB | ||
| ||source.bytes!==3272)throw Error('Conditional source identity mismatch'); | ||
| const suffix=`${source.repository}/${source.commit}/${SOURCE_PATH}`; | ||
| if(source.url!==`https://raw.githubusercontent.com/${suffix}` | ||
| ||source.html_url!==`https://github.com/${source.repository}/blob/${source.commit}/${SOURCE_PATH}`) | ||
| throw Error('Conditional source URL identity mismatch'); | ||
| return source; | ||
| } | ||
| async function digest(algorithm,raw,crypto){ | ||
| if(!crypto?.subtle)throw Error('Source identity hashing unavailable'); | ||
| return [...new Uint8Array(await crypto.subtle.digest(algorithm,raw))].map(v=>v.toString(16).padStart(2,'0')).join(''); | ||
| } | ||
| function between(text,start,end){ | ||
| if(text.split(start).length!==2)throw Error('Conditional source boundary changed'); | ||
| const tail=text.split(start)[1]; | ||
| if(tail.split(end).length!==2)throw Error('Conditional source boundary changed'); | ||
| return tail.split(end)[0]; | ||
| } | ||
| function projectText(text){ | ||
| const theorem=between(text,'## Corrected cumulative theorem\n\n','\n## Proof\n').trim(); | ||
| const nodes=[{id:'setup',role:'hypothesis',quote:theorem.split('\n1. ')[0].trim()}]; | ||
| for(let i=1;i<=4;i++){ | ||
| const start=`${i}. `,end=i<4?`\n${i+1}. `:'\n\nNeither a derivative'; | ||
| nodes.push({id:`H${i}`,role:'hypothesis',quote:(start+between(theorem,start,end)).trim()}); | ||
| } | ||
| nodes.push({id:'definition',role:'definition',quote:(' N(ell)='+between(theorem,' N(ell)=','\n\nThen')).trim()}); | ||
| nodes.push({id:'conclusion',role:'conditional-conclusion',quote:(' lim_(ell->0)'+between(theorem,' lim_(ell->0)','\n\nIf the displayed')).trim()}); | ||
| return { | ||
| schema_version:1,projection_kind:'conditional-proof-route',claim_id:CLAIM_ID, | ||
| scientific_status_authority:false,scientific_effect:'NONE',application_evaluation:'NOT_EVALUATED', | ||
| source_sha256:SOURCE_SHA256,nodes, | ||
| routes:[{id:'cumulative-limit',logic:'ALL',requires:['setup','H1','H2','H3','H4','definition'],concludes:'conclusion'}], | ||
| case_split:'If the displayed'+theorem.split('If the displayed')[1], | ||
| boundary:text.slice(text.lastIndexOf('This corrects an underspecified theorem statement;')).trim(), | ||
| }; | ||
| } | ||
| export async function projectVerified(raw,source,crypto=globalThis.crypto){ | ||
| validateSource(source); | ||
| if(!(raw instanceof Uint8Array)||raw.byteLength!==source.bytes | ||
| ||await digest('SHA-256',raw,crypto)!==source.sha256)throw Error('Conditional source byte identity mismatch'); | ||
| const header=encoder.encode(`blob ${raw.byteLength}\0`),blob=new Uint8Array(header.length+raw.length); | ||
| blob.set(header);blob.set(raw,header.length); | ||
| if(await digest('SHA-1',blob,crypto)!==source.blob)throw Error('Conditional Git blob identity mismatch'); | ||
| const identity=Object.fromEntries(['repository','path','commit','blob','bytes','sha256','url','html_url'].map(key=>[key,source[key]])); | ||
| return {...projectText(decoder.decode(raw)),source:identity}; | ||
| } | ||
| function stable(value){ | ||
| if(value===null||typeof value==='string'||typeof value==='boolean')return JSON.stringify(value); | ||
| if(typeof value==='number'&&Number.isSafeInteger(value))return String(value); | ||
| if(Array.isArray(value))return '['+value.map(stable).join(',')+']'; | ||
| if(value&&Object.getPrototypeOf(value)===Object.prototype) | ||
| return '{'+Object.keys(value).sort().map(k=>JSON.stringify(k)+':'+stable(value[k])).join(',')+'}'; | ||
| throw Error('Unsupported projection value'); | ||
| } | ||
| export async function verifyProjection(data,raw,source,crypto=globalThis.crypto){ | ||
| const expected=await projectVerified(raw,source,crypto); | ||
| if(stable(data)!==stable(expected))throw Error('Conditional projection differs from the complete pinned statement'); | ||
| return expected; | ||
| } | ||
| function el(document,tag,text){const n=document.createElement(tag);if(text!==undefined)n.textContent=text;return n;} | ||
| export function renderProjection(document,host,data,source){ | ||
| const article=el(document,'article');article.className='museum-card engineering-only'; | ||
| article.setAttribute('data-object-class','engineering-only'); | ||
| article.append(el(document,'h3','Conditional route: cumulative transfer'), | ||
| el(document,'p','ALL six inputs are required. These are hypotheses and definitions, not newly discharged obligations.'), | ||
| el(document,'p','Application evaluation: NOT_EVALUATED. A proved implication is not proof that its hypotheses hold for a particular field.')); | ||
| const identity=el(document,'dl');identity.className='source-identity'; | ||
| for(const key of ['repository','path','commit','sha256'])identity.append(el(document,'dt',key),el(document,'dd',source[key])); | ||
| article.append(identity); | ||
| const list=el(document,'ol'); | ||
| for(const node of data.nodes.filter(n=>n.id!=='conclusion')){ | ||
| const item=el(document,'li'),details=el(document,'details'); | ||
| details.append(el(document,'summary',`${node.id} — ${node.role}`),el(document,'blockquote',node.quote)); | ||
| item.append(details);list.append(item); | ||
| } | ||
| article.append(list,el(document,'p','setup + H1 + H2 + H3 + H4 + definition → conclusion (ALL)'), | ||
| el(document,'pre',data.nodes.find(n=>n.id==='conclusion').quote), | ||
| el(document,'p',data.case_split),el(document,'p',data.boundary)); | ||
| const sourceLink=el(document,'a','Open the exact source');sourceLink.href=source.html_url; | ||
| const reviewLink=el(document,'a','Read the existing source/review card');reviewLink.href='#'+CLAIM_ID; | ||
| article.append(sourceLink,el(document,'p'),reviewLink, | ||
| el(document,'p','Generated from verified source bytes. This graph is not formal verification, a proof review, or a scientific-status register.')); | ||
| host.replaceChildren(article); | ||
| } | ||
| const services=()=>import('./museum.mjs'); | ||
| // The museum module already verifies config → manifest → index/status once per | ||
| // page fetch and caches every pinned byte request. This route consumes that same | ||
| // verified startup, so it adds only the audited-descriptor check and projection. | ||
| export async function startConditionals({document=globalThis.document,fetcher=globalThis.fetch,loadServices=services}={}){ | ||
| const host=document?.getElementById('conditional-route');if(!host)return false; | ||
| host.replaceChildren(el(document,'p','Verifying the conditional route source…')); | ||
| try{ | ||
| const s=await loadServices(); | ||
| const {manifest,cachedFetch}=await s.verifiedMuseum({fetcher}); | ||
| const selected=manifest.claims.filter(c=>c.id===CLAIM_ID); | ||
| if(selected.length!==1)throw Error('Conditional source claim is missing or duplicated'); | ||
| const claim=selected[0];validateSource(claim.proof); | ||
| const {proofText}=await s.verifyClaim(claim,cachedFetch); | ||
| const data=await projectVerified(encoder.encode(proofText),claim.proof); | ||
| renderProjection(document,host,data,claim.proof);return true; | ||
| }catch(error){host.replaceChildren(el(document,'p',`Unavailable: ${error.message}. No conditional result inferred.`));return false;} | ||
| } | ||
| if(typeof document!=='undefined')void startConditionals(); | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.