From 52c24401d1c0b58c9f1940ead30fe5d1518259de Mon Sep 17 00:00:00 2001 From: Dylan Roy <249851642+d6g8k5htny-coder@users.noreply.github.com> Date: Sun, 8 Nov 2026 21:46:00 -0600 Subject: [PATCH] cbz: retire unsupported Atlas formal browser driver Remove the unexercised historical acceptance driver from the operational tool surface, keep its exact Git history, and localize the byte-identity helpers in the two current qualified browser checks. Bind the five canonical CBZ surfaces to Main #773, Workspace #47, durable v135, and the exact 23-tool G11 residue without changing proof or scientific status. --- BASELINE.md | 21 ++ DECISIONS.md | 1 + GOVERNANCE.md | 19 ++ PROOF_INDEX.md | 13 + STATUS.md | 43 ++++ TOOLING.md | 34 +++ tools/atlas_accessibility_regression.py | 8 +- tools/atlas_formal_evidence_browser_check.py | 243 ------------------- tools/atlas_source_bridge_browser_check.py | 11 +- 9 files changed, 148 insertions(+), 245 deletions(-) delete mode 100644 tools/atlas_formal_evidence_browser_check.py diff --git a/BASELINE.md b/BASELINE.md index ffccdb7c1..f897f57c7 100644 --- a/BASELINE.md +++ b/BASELINE.md @@ -6,6 +6,27 @@ This ledger binds the currently observed repository snapshot to the twelve owner criteria and final gate matrix. It records evidence and gaps; it is not a completion certificate. +## Current G11 retirement binding — 9 November 2026 + +Observed sequentially before this candidate: + +| Repository | Default revision | +|---|---| +| Main | `e18798544f16479436283d71689ae635a1817b20`, tree `b8a678df6ea8b03c28e1ccef0e34baf89bc7274d` | +| Math- | `f532c3e2d91a0c7679a37c733741660917a9b21b` | +| Universal-Law-Workspace | `400e03ca5f154e8d236e7126ea1525e78b3b595c`, pinning Main `e18798544f16479436283d71689ae635a1817b20` | + +The organization-visible open-pull-request search returned zero. Durable +checkpoint v135 and its readback hashes are recorded in +[STATUS.md](STATUS.md#current-g11-retirement-candidate--9-november-2026). +The exact candidate G11 census has zero production findings, retains 23 tools, +and exits 1 after one unsupported historical browser driver was removed from +the operational surface. A merge advances Main beyond the Workspace pin until +another guarded refresh lands. No final G7, G11, federation Lean/kernel pass, +full regression, Layer A clearance, STATUS-only cold start or same-pass +G0--G11 matrix is recorded. All twelve criteria remain unawarded. The older +24- and 32-tool snapshots below remain historical and are not rebound. + ## Current bound-snapshot correction — 9 November 2026 Observed sequentially before this documentation-only candidate: diff --git a/DECISIONS.md b/DECISIONS.md index 4ab33fe30..fe7b82902 100644 --- a/DECISIONS.md +++ b/DECISIONS.md @@ -104,3 +104,4 @@ Append-only. Historical source outcomes remain in their original records. | 2026-11-07 17:30 | 2 | B/tooling | Repaired two fresh exact-head #764 findings after reproducing both supplied counterexamples red in normal and optimized modes. Nested-helper mutations are now recorded against the caller alias origins present at the exact call site, and JavaScript class bodies are found only after delimiter-balanced heritage expressions. The first native implementation was not accepted: both whole-tree censuses actually failed with `RecursionError`. A second source replaced recursive collector re-entry with a precomputed, signature-checked per-call mutation map and added a recursive-helper termination control. The stronger call-site capture made the older defect-196 union mutant behaviorally equivalent; that mutant is explicitly retired while its historical RED test remains. Fresh native source passes 249/249 controls and kills 314/314 sealed mutants in both modes with zero skips. Exact mutation receipts are byte-identical at 194,963 bytes; exact native censuses are byte-identical at 56,059 bytes, contain zero production failures, retain 32 candidates and exit 1; G11 remains FAIL. The distinct review/adverse total is 200. Earlier outcomes and the failed intermediate source remain historical and unrebound. No theorem, proof, axiom, bound, kernel outcome, authorship, failure or scientific status changed. | Yes | Failed intermediate source `3f3dc9166a79b7d0bb7ec97b6422621a7da90f85`; qualified native source `4e4caefd6455f6a1f684d645eb20d308e59053d5`; parent `3f3dc9166a79b7d0bb7ec97b6422621a7da90f85`; tree `0f0a47d015669edb0a92f80b8e2c0140d1e4026e`; mutation inventory SHA-256 `4d98c77db9bfa666cecb0bb967dc9ea5fb5f0f2b56be543684efbcd6d60174a4`; mutation receipt SHA-256 `c3d778617ba328841033104cefacdf0b4fb2b4e4f414c3ec22ea1a00ade9e8e5`; report SHA-256 `88760e3878bce1cb2e1dfd9bad7c7deade0d8a8b33b195e1643232eb4a882007`; review threads `PRRT_kwDOQpeC2s604zJq` and `PRRT_kwDOQpeC2s604zJx`; review comments `4502902509` and `4502902515`; [#764](https://github.com/d6g8k5htny-coder/main/pull/764) | | 2026-11-07 18:29 | 2 | B/tooling | Repaired three fresh #764 review findings and three adjacent independent-audit defects after reproducing the supplied or derived counterexamples. Class-body discovery skips nested braced class/function expressions in a heritage expression; ordinary and annotated assignment RHS effects execute before formal-alias rebinding; multiline computed names are delimiter-balanced; malformed class structures fail closed; valid `#class`/`#function` private names remain executable; and import/export specifier reserved words are excluded from expression-keyword reachability. Assignment mutants now preserve RHS traversal and isolate ordering. Earlier 319/320-case harness attempts did not satisfy that contract and receive no credit. The exact hosted source tree passed 256/256 controls and killed 321/321 sealed mutants in both modes with zero skips when run at a local exact-tree commit. Byte-identical mutation receipts are 199,677 bytes; byte-identical censuses are 56,059 bytes, contain zero production failures, retain 32 candidates and exit 1. G11 remains FAIL; the distinct review/adverse total is 206. Earlier outcomes remain historical and unrebound. No theorem, proof, axiom, bound, kernel outcome, authorship, failure or scientific status changed. | Yes | Hosted source `8038863c04cc96acfcfc0d2953ab8575ccce213e`; parent `d962c4e1593cd3b35d655aee9c7a582da6b63ca3`; tree `de8e2c664116803643cfda2f324756e7716c57af`; local exact-tree qualification `1616b31889a8b242ff6950dbd7af4d437e54648c`; mutation inventory SHA-256 `d7021d5cc7e464c423335c7b56b67b5ef1844c09865683d728a998e1661a5652`; mutation receipt SHA-256 `367a13fed18c0880fcc73590ffb1f615bb48ba1baf76ecc621f427637f31f687`; report SHA-256 `bcd9605e448a4e3d121f8e9a03733190f376367e5c2ab690b17a90675605ef8f`; review comments `4503059547`, `4503059552`, and `4503059559`; [#764](https://github.com/d6g8k5htny-coder/main/pull/764) | | 2026-11-09 02:43 | 2 | B/status | Refreshed all five canonical CBZ reading surfaces from the stale 7 November snapshot to the exact serial Main #772 / Workspace #46 integration boundary and durable checkpoint v134. The correction records Main `6deca3198c4b11b2d1208df904f5b942cd3e4bfb`, Math- `f532c3e2d91a0c7679a37c733741660917a9b21b`, Workspace `a3d4c50b8b94ae1e02a032f68c5411007d695fa0`, exact Main pin agreement at the observation, zero organization-visible open pull requests, 24 retained G11 tools, and the preserved local Chromium socket failure. Older snapshot text and all historical mathematical statements, authorship, outcomes and failures remain unchanged. No criterion, final G7, G11, same-pass G0–G11, Lean/kernel replay, full-regression 100%, scientific review or CBZ-0 result is awarded. A later Main merge requires another guarded Workspace pin refresh. | Yes | Base Main `6deca3198c4b11b2d1208df904f5b942cd3e4bfb`; Workspace `a3d4c50b8b94ae1e02a032f68c5411007d695fa0`; durable checkpoint v134 at Main #684 comment `6730912447`; status SHA-256 `a33611e2434f508e249c4effed5cbd33380c6b2bcc894ab6222cbe25101d8d5c`; evidence SHA-256 `f99bcae69fd7ae7d6117e66ba6454cae6423647d32c926b8a60e518f9c854e30`. | +| 2026-11-09 03:36 | 2 | B/tooling | Retired `tools/atlas_formal_evidence_browser_check.py` from the operational tool surface instead of manufacturing documentation or A8 credit for an executable acceptance path that no current workflow ran. Its only current consumers imported byte-identity helpers; those two already-qualified browser tools now carry the same small functions locally and preserve their existing scope. The original 20,118-byte source remains exactly recoverable in native Git. Deliberate deletion first produced six expected import failures; the repair then passed all 11 runner/adverse tests in normal and optimized modes. G11 controls passed 265/265 and killed 328/328 designated mutants in each mode. Exact committed-tree censuses are byte-identical, have zero production findings, retain 23 tools and exit 1; G11 remains FAIL. Refreshed all five canonical surfaces to Main #773 / Workspace #47 / durable v135 while preserving prior current sections as history. No theorem, proof, bound, axiom, kernel outcome, failure, authorship or scientific status changed; no CBZ criterion is awarded. | Yes | Base Main `e18798544f16479436283d71689ae635a1817b20`; intermediate retirement commit `724cb93bd6f3fdd0e407d48c5c3f267eb4c5bef0`; removed blob `9576fd34806528484a3898665c19cabe9eb3797c`, SHA-256 `4ce981b7b9c0d422f099fcd8556a144d01de8a6c18de9431a6a045fecce55af7`; exact-commit census SHA-256 `7ad72c9771a5859b465f7a4c2dc668a59c917a7a7d3770ddb0b6614ea8583455`; durable v135 status/evidence SHA-256 `c97603a63431df8cbbacf25e83cdcd908c3b246c760ead12ffd6d6ceffa09fe3` / `230bc21590ce8171890269201ac9cd1675d93f849a8e1f91b8d2380f2f805df6`. | diff --git a/GOVERNANCE.md b/GOVERNANCE.md index 89119c9d8..01a397d5b 100644 --- a/GOVERNANCE.md +++ b/GOVERNANCE.md @@ -18,6 +18,25 @@ Its team-model sections 1.5, 7.4 and 8 supersede older exclusive-owner and monitor-specific integration restrictions. Historical decisions retain their original timestamps and outcomes; the latest directive controls future action. +## Current G11 retirement checkpoint — 9 November 2026 + +The current candidate begins at signed Main default +`e18798544f16479436283d71689ae635a1817b20`. Workspace default +`400e03ca5f154e8d236e7126ea1525e78b3b595c` pins that exact Main revision; +the latest organization-visible open-pull-request observation returned zero. +Durable checkpoint v135 is bound by +[STATUS.md](STATUS.md#current-g11-retirement-candidate--9-november-2026). + +Operational tools must not receive G11 or A8 credit merely because another +tool imports a helper from them. The unsupported historical Atlas formal +browser acceptance driver is therefore retired from `tools/`, recoverable by +its exact blob and ancestry recorded in STATUS and DECISIONS. Its two live +consumers retain only their byte-identity helpers and their existing current +runner/adverse coverage. The exact candidate census retains 23 tools and exits +1, so G11 remains FAIL. This retirement changes no Layer A rule and awards no +CBZ criterion. Any later Main integration still requires a guarded Workspace +pin refresh before current-tip agreement can be claimed. + ## Current serial checkpoint — 9 November 2026 The current candidate begins at signed Main default diff --git a/PROOF_INDEX.md b/PROOF_INDEX.md index e907b8992..af0671c20 100644 --- a/PROOF_INDEX.md +++ b/PROOF_INDEX.md @@ -8,6 +8,19 @@ into a kernel proof. A theorem is CLOSED only for the literal statement and allowed-axiom boundary actually checked. Anything else must remain OPEN or be placed in a complete dormant quarantine. +## Current tooling-only binding — 9 November 2026 + +This candidate starts from Main +`e18798544f16479436283d71689ae635a1817b20`; the freshly observed Math- and +Workspace defaults are `f532c3e2d91a0c7679a37c733741660917a9b21b` and +`400e03ca5f154e8d236e7126ea1525e78b3b595c`, with Workspace pinning that +exact Main revision. Durable checkpoint v135 is linked from +[STATUS.md](STATUS.md#current-g11-retirement-candidate--9-november-2026). +This operational retirement removes no theorem or proof source and does not +rerun Lean, axiom closure, kernel verification or statement alignment. It +does not add, remove, promote, refute or rebind a proof or quarantine. The +older proof snapshot below remains the exact historical record. + ## Current binding correction — 9 November 2026 This candidate starts from Main diff --git a/STATUS.md b/STATUS.md index 1d1bc210c..898d5a1ab 100644 --- a/STATUS.md +++ b/STATUS.md @@ -8,6 +8,49 @@ The inherited scientific material below is explicitly the 29 September snapshot, not a fresh CLOSED decision or an empirical-validation receipt. Its mathematical statements, source cuts and review limits are preserved. +## Current G11 retirement candidate — 9 November 2026 + +This candidate starts from signed Main default +`e18798544f16479436283d71689ae635a1817b20`, tree +`b8a678df6ea8b03c28e1ccef0e34baf89bc7274d`. The freshly observed +sequential defaults are Math- +`f532c3e2d91a0c7679a37c733741660917a9b21b` and Workspace +`400e03ca5f154e8d236e7126ea1525e78b3b595c`; the latter's published +`repos/main` gitlink is exactly `e18798544f16479436283d71689ae635a1817b20`. +The fresh organization-visible open-pull-request search returned zero. A merge +of this later Main candidate will again require a guarded Workspace pin refresh +before final G7 or criterion 8 can be awarded. + +`tools/atlas_formal_evidence_browser_check.py` was an unqualified historical +acceptance driver whose only current executable references imported its byte +identity helpers; no current workflow exercised the driver. It is removed from +the operational tool surface and remains exactly recoverable at Git blob +`9576fd34806528484a3898665c19cabe9eb3797c` (20,118 bytes, SHA-256 +`4ce981b7b9c0d422f099fcd8556a144d01de8a6c18de9431a6a045fecce55af7`) +and in Main ancestry. The two current qualified browser tools now carry the +same small hashing functions locally. Their 11 runner/adverse tests pass in +normal and optimized modes. The bounded G11 controls pass 265/265 and the +designated self-test kills 328/328 mutants in each mode. At exact retirement +commit `724cb93bd6f3fdd0e407d48c5c3f267eb4c5bef0`, normal and optimized +censuses are byte-identical at SHA-256 +`7ad72c9771a5859b465f7a4c2dc668a59c917a7a7d3770ddb0b6614ea8583455`, +contain zero production findings, retain 23 documentation or +no-current-exercise tools, and exit 1. G11 therefore remains FAIL. + +Durable checkpoint v135 preserves the preceding Main #773 and Workspace #47 +integrations. Stable status identity `libfile_9551d0182bcc819188edfe9f998165b3` +is version 135, 536,616 bytes, SHA-256 +`c97603a63431df8cbbacf25e83cdcd908c3b246c760ead12ffd6d6ceffa09fe3`. +Stable evidence identity `libfile_1f9ec8ce62708191972f9e2bf6295816` is +version 135, 358,567,704 bytes, SHA-256 +`230bc21590ce8171890269201ac9cd1675d93f849a8e1f91b8d2380f2f805df6`. +Byte readback matched; the ZIP has 13,110 unique members and zero duplicate +names. This candidate does not rerun federation Lean/kernel checks, establish +full-regression 100%, complete a STATUS-only cold start, or run G0--G11 in one +pass. No theorem, proof disposition, bound, axiom, authorship, historical +failure, kernel outcome or scientific status changes. CBZ-0 and terminal +Partial are not established. + ## Current serial integration correction — 9 November 2026 This candidate starts from signed Main default diff --git a/TOOLING.md b/TOOLING.md index 47aa1ab3b..a947acf46 100644 --- a/TOOLING.md +++ b/TOOLING.md @@ -9,6 +9,40 @@ that contains this file. Its candidate source parent is command, verification and scope. A component passing in isolation does not complete a CBZ gate or the final G0–G11 matrix. +## Current retirement correction — 9 November 2026 + +This candidate starts from Main +`e18798544f16479436283d71689ae635a1817b20`. The bounded census commands are: + +```sh +python3 -B -S tools/cbz/g11_census.py --rev HEAD --json /tmp/g11.json +python3 -B -S -O tools/cbz/g11_census.py --rev HEAD --json /tmp/g11-opt.json +``` + +At exact retirement commit `724cb93bd6f3fdd0e407d48c5c3f267eb4c5bef0`, +the reports are byte-identical at SHA-256 +`7ad72c9771a5859b465f7a4c2dc668a59c917a7a7d3770ddb0b6614ea8583455`, +contain zero production findings and exactly 23 retained documentation or +no-current-exercise tools, and exit 1. The current G11 verification commands +also pass 265 tests and kill all 328 designated mutants in normal and +optimized modes. G11 remains FAIL. + +The removed `tools/atlas_formal_evidence_browser_check.py` was not a current +qualified certifier: current code imported only its `identity` and `digest` +helpers, while no workflow exercised its acceptance path. The exact source is +recoverable at Git blob `9576fd34806528484a3898665c19cabe9eb3797c` and the +preceding Main tree. `tools/atlas_accessibility_regression.py` and +`tools/atlas_source_bridge_browser_check.py` now carry those small functions +locally; their purpose, commands and bounded scope remain in the current site +verification guide, and their 11 runner/adverse tests pass in both modes. +Removing an unsupported executable surface is not runtime, accessibility, +formal-alignment, mathematical or scientific acceptance. + +Durable v135 and the exact sequential Main/Math-/Workspace state are recorded +in [STATUS.md](STATUS.md#current-g11-retirement-candidate--9-november-2026). +No final orchestrator is admitted and no registry command yet runs one bound +federation G0--G11 pass. + ## Current registry correction — 9 November 2026 This candidate starts from Main diff --git a/tools/atlas_accessibility_regression.py b/tools/atlas_accessibility_regression.py index 0467b6e1c..b874e85cb 100644 --- a/tools/atlas_accessibility_regression.py +++ b/tools/atlas_accessibility_regression.py @@ -5,12 +5,18 @@ """ import argparse from functools import partial +import hashlib from http.server import SimpleHTTPRequestHandler,ThreadingHTTPServer import json from pathlib import Path import threading from playwright.sync_api import sync_playwright,expect -from atlas_formal_evidence_browser_check import identity + + +def identity(path): + raw=path.read_bytes() + return {'bytes':len(raw),'sha256':hashlib.sha256(raw).hexdigest(), + 'git_blob':hashlib.sha1(b'blob '+str(len(raw)).encode()+b'\0'+raw).hexdigest()} def main(): diff --git a/tools/atlas_formal_evidence_browser_check.py b/tools/atlas_formal_evidence_browser_check.py deleted file mode 100644 index 9576fd348..000000000 --- a/tools/atlas_formal_evidence_browser_check.py +++ /dev/null @@ -1,243 +0,0 @@ -#!/usr/bin/env python3 -"""Matched source-connection browser acceptance; actual source identities remain separate. - -Run with --site PATH --output PATH --payload frozen/current.json. -Uses system Chromium with its sandbox and the site's original CSP. No interception. -""" -from __future__ import annotations - -import argparse -from collections import Counter -from functools import partial -import hashlib -from http.server import SimpleHTTPRequestHandler, ThreadingHTTPServer -import importlib.metadata -import json -from pathlib import Path -import platform -import statistics -import subprocess -import threading -import time -import traceback -from urllib.parse import urlencode, urlsplit, parse_qs - -from playwright.sync_api import sync_playwright, expect - -NODE='math.side24-coefficient' - -def digest(raw): - return hashlib.sha256(raw).hexdigest() - -def identity(path): - raw=path.read_bytes() - return {'bytes':len(raw),'sha256':digest(raw),'git_blob':hashlib.sha1(b'blob '+str(len(raw)).encode()+b'\0'+raw).hexdigest()} - -GEOMETRY='''() => { - const panel=document.querySelector('#atlas-inspector'),base=panel.getBoundingClientRect(); - const box=e=>{if(!e)return null; const r=e.getBoundingClientRect();return {x:r.x,y:r.y,width:r.width,height:r.height,top_relative_inspector:r.top-base.top,left_relative_inspector:r.left-base.left,viewport_intersects:r.bottom>0&&r.top0&&r.lefta.textContent.includes('Immutable source reference')); - return {inspector:box(panel),reader:box(document.querySelector('#atlas-reader')),source:box(source),scope:box(document.querySelector('#atlas-claim-summary > p')),formal:box(document.querySelector('#atlas-formal-evidence')),formal_details:box(document.querySelector('#atlas-formal-details')),formal_summary:box(document.querySelector('#atlas-formal-details > summary')),scroll:{x:scrollX,y:scrollY},document_width:document.documentElement.scrollWidth,viewport_width:innerWidth}; -}''' - -PERFORMANCE='''() => ({navigation:performance.getEntriesByType('navigation').map(e=>e.toJSON()),resources:performance.getEntriesByType('resource').map(e=>({name:e.name,initiatorType:e.initiatorType,startTime:e.startTime,duration:e.duration,transferSize:e.transferSize,encodedBodySize:e.encodedBodySize,decodedBodySize:e.decodedBodySize,responseEnd:e.responseEnd}))})''' - -def record_check(row, name, value, detail=None): - row['checks'].append({'name':name,'passed':bool(value),'detail':detail}) - if not value: row['failures'].append(name) - -def inspect_signature(page): - return {'selected':page.locator('#atlas-inspector h3').inner_text(), - 'source':page.locator('#atlas-claim-summary a').first.get_attribute('href'), - 'scope':page.locator('#atlas-claim-summary > p').first.inner_text(), - 'pins':{k:parse_qs(urlsplit(page.url).query).get(k) for k in ['snapshot','main-snapshot','atlas-node']}} - -def main(): - p=argparse.ArgumentParser(description=__doc__) - p.add_argument('--site',type=Path,required=True) - p.add_argument('--output',type=Path,required=True) - p.add_argument('--payload',type=Path,required=True) - p.add_argument('--browser',default='/usr/bin/chromium') - args=p.parse_args() - args.site=args.site.resolve(); args.output=args.output.resolve(); args.payload=args.payload.resolve() - args.output.mkdir(parents=True,exist_ok=True) - raw=args.payload.read_bytes(); data=json.loads(raw) - if (args.site/'current.json').read_bytes()!=raw: raise SystemExit('Site current.json differs from frozen payload') - meta=json.loads((args.site/'current-meta.json').read_bytes()) - if meta['sha256']!=digest(raw) or meta['bytes']!=len(raw): raise SystemExit('Site metadata does not match frozen payload') - mainpin=next(r['commit'] for r in data['repositories'] if r['repository'].endswith('/main')) - mathpin=data['graph']['identity']['commit']; node=data['graph']['data']['nodes'][NODE] - modules={p.name:identity(p) for p in sorted(args.site.iterdir()) if p.suffix in ['.mjs','.css'] or p.name=='dependencies.html'} - requests=[] - class Handler(SimpleHTTPRequestHandler): - def log_message(self,fmt,*values): - requests.append({'path':self.path,'message':fmt % values}) - server=ThreadingHTTPServer(('127.0.0.1',0),partial(Handler,directory=str(args.site))) - threading.Thread(target=server.serve_forever,daemon=True).start() - origin=f'http://127.0.0.1:{server.server_port}' - query={'atlas-node':NODE,'atlas-view':'graph','snapshot':mathpin,'main-snapshot':mainpin} - start_url=origin+'/dependencies.html?'+urlencode(query)+'#current-atlas' - report={'mode':'local-formal-source-connection-acceptance','identity':{'observer':'Actual operator must be identified in its execution receipt; this script does not infer provider/model.','review_credit':False,'scientific_credit':False}, - 'site':str(args.site),'frozen_payload':str(args.payload),'payload':identity(args.payload), - 'payload_repositories':data['repositories'],'graph_identity':data['graph']['identity'], - 'observed_at':data['observed_at'],'selected':NODE,'node':node, - 'tested_site_modules':modules,'driver':{'path':str(Path(__file__).resolve()),**identity(Path(__file__))}, - 'browser_executable':{'path':args.browser,**identity(Path(args.browser))}, - 'browser_command_version':subprocess.check_output([args.browser,'--version'],text=True).strip(), - 'platform':platform.platform(),'playwright':importlib.metadata.version('playwright'), - 'chromium_sandbox':True,'reduced_motion':'reduce','network':'loopback only application journeys; inherited normal proxy/CA retained', - 'csp':'unmodified site policy; no bypass_csp, routes, security-disable flags, or injected application code', - 'scope':'Four matched formal-source reader journeys, real links/keyboard/history and refused selection; no AT or scientific acceptance.', - 'started_at_utc':time.strftime('%Y-%m-%dT%H:%M:%SZ',time.gmtime()),'cases':[]} - try: - with sync_playwright() as pw: - browser=pw.chromium.launch(executable_path=args.browser,chromium_sandbox=True, - args=['--disable-background-networking']) - report['browser_version']=browser.version - for width,height in [(1200,900),(390,844)]: - for scheme in ['light','dark']: - row={'case':f'{width}x{height}-{scheme}','viewport':{'width':width,'height':height}, - 'color_scheme':scheme,'checks':[],'failures':[],'pageerrors':[],'console_errors':[], - 'failed_requests':[],'http_errors':[],'screenshots':{}} - report['cases'].append(row) - context=browser.new_context(viewport=row['viewport'],color_scheme=scheme,reduced_motion='reduce') - page=context.new_page(); page.set_default_timeout(15000) - page.on('pageerror',lambda err,r=row:r['pageerrors'].append(str(err))) - page.on('console',lambda msg,r=row:r['console_errors'].append(msg.text) if msg.type=='error' else None) - page.on('requestfailed',lambda req,r=row:r['failed_requests'].append({'url':req.url,'failure':req.failure})) - page.on('response',lambda res,r=row:r['http_errors'].append({'url':res.url,'status':res.status}) if res.status>=400 else None) - try: - started=time.perf_counter() - response=page.goto(start_url,wait_until='load') - expect(page.locator('#atlas-inspector h3')).to_have_text(NODE) - expect(page.locator('#atlas-formal-evidence')).to_be_attached() - row['ready_ms']=(time.perf_counter()-started)*1000 - row['initial_url']=page.url - row['navigation_status']=response.status - row['performance_initial']=page.evaluate(PERFORMANCE) - nav=row['performance_initial']['navigation'][0] - resources=row['performance_initial']['resources'] - row['load_metrics']={'load_event_ms':nav['loadEventEnd'],'dom_content_loaded_ms':nav['domContentLoadedEventEnd'], - 'resource_count':len(resources), - 'resource_transfer_bytes':sum(r['transferSize'] for r in resources), - 'resource_encoded_body_bytes':sum(r['encodedBodySize'] for r in resources), - 'resource_decoded_body_bytes':sum(r['decodedBodySize'] for r in resources), - 'document_transfer_bytes':nav['transferSize'],'document_encoded_body_bytes':nav['encodedBodySize']} - if width<721: - t=time.perf_counter(); page.locator('#atlas-open-reader').click() - expect(page.locator('#atlas-inspector')).to_be_visible() - row['open_reader_ms']=(time.perf_counter()-t)*1000 - inspector=page.locator('#atlas-inspector') - source=inspector.locator('a',has_text='Immutable source reference').first - expect(source).to_be_visible() - row['source']={'href':source.get_attribute('href'),'text':source.inner_text(),'visible':source.is_visible()} - row['scope']={'text':page.locator('#atlas-claim-summary > p').first.inner_text(), - 'visible':page.locator('#atlas-claim-summary > p').first.is_visible()} - row['formal_gap_text']=page.locator('#atlas-formal-evidence > p').first.inner_text() - signature=inspect_signature(page); row['initial_signature']=signature - record_check(row,'full literal scope visible',row['scope']['visible'] and row['scope']['text']==node['scope']) - expected_source=f'https://github.com/{data["graph"]["identity"]["repository"]}/blob/{mathpin}/{node["source"]}' - record_check(row,'immutable selected proof source visible',row['source']['visible'] and row['source']['href']==expected_source) - formal=page.locator('#atlas-formal-details') - record_check(row,'native formal disclosure initially closed',not formal.evaluate('(e)=>e.open')) - row['geometry_before']=page.evaluate(GEOMETRY) - inspector.evaluate('(e)=>e.scrollIntoView({block:"start",behavior:"auto"})') - row['geometry_reader_viewport']=page.evaluate(GEOMETRY) - for kind,locator in [('reader',None),('full-inspector',inspector)]: - name=f'{kind}-{row["case"]}.png'; target=args.output/name - if locator is None: page.screenshot(path=str(target)) - else: locator.screenshot(path=str(target)) - row['screenshots'][kind]=name - summary=formal.locator(':scope > summary') - summary.focus(); expect(summary).to_be_focused() - row['formal_focus_before_enter']=summary.evaluate('(e)=>({tag:e.tagName,focused:document.activeElement===e,outlineWidth:getComputedStyle(e).outlineWidth,outlineStyle:getComputedStyle(e).outlineStyle})') - row['geometry_focused_formal']=page.evaluate(GEOMETRY) - started=time.perf_counter() - page.keyboard.press('Enter'); expect(formal).to_have_attribute('open','') - row['formal_enter_to_open_ms']=(time.perf_counter()-started)*1000 - row['formal_fields']=formal.locator(':scope > dl > dt').evaluate_all('(els)=>els.map(e=>({name:e.textContent,value:e.nextElementSibling.textContent}))') - row['formal_disclosure_text']=formal.inner_text() - row['formal_disclosure_links']=formal.locator('a').evaluate_all('(els)=>els.map(e=>({text:e.textContent,href:e.href}))') - connection=page.locator('#atlas-formal-connection') - expect(connection).to_be_visible(timeout=1000) - expect(connection).to_contain_text('UniversalLaw.Side24.pairing_sum_six') - expect(connection).to_contain_text('theorem pairing_sum_six : pairingSum 6 = 76') - expect(formal).to_contain_text('PENDING_INDEPENDENT_REVIEW') - expect(formal).to_contain_text('REJECTED') - expect(page.locator('#atlas-formal-evidence > p').first).to_contain_text('does not prove the coefficient or parent theorem') - row['connection_name']=connection.locator('p').first.inner_text() - record_check(row,'adverse package review remains explicit', 'REJECTED' in formal.inner_text()) - page.screenshot(path=str(args.output/f'formal-first-viewport-{row["case"]}.png')) - link=connection.get_by_role('link',name='Original execution receipt (JSON)',exact=True) - receipt_page=context.new_page();receipt_response=receipt_page.goto(link.get_attribute('href')) - receipt_bytes=receipt_response.body();receipt_page.close() - row['receipt_sha256']=digest(receipt_bytes) - record_check(row,'actual original receipt link returns exact bytes',row['receipt_sha256']=='1ae8341c86a043ba917ec1fe68bf7e66ec528cd94b15170528487009f090c7e0') - type_detail=page.locator('#atlas-formal-type-details');type_detail.locator('summary').focus();page.keyboard.press('Enter') - expect(type_detail).to_have_attribute('open','') - expect(type_detail).to_contain_text('@Eq Nat') - record_check(row,'original elaborated type is keyboard readable',type_detail.locator('pre').is_visible()) - row['geometry_expanded_formal']=page.evaluate(GEOMETRY) - name=f'expanded-formal-{row["case"]}.png'; formal.screenshot(path=str(args.output/name));row['screenshots']['expanded-formal']=name - name=f'expanded-formal-viewport-{row["case"]}.png'; page.screenshot(path=str(args.output/name));row['screenshots']['expanded-formal-viewport']=name - row['inspector_text']=inspector.inner_text() - # Matched behavior checks, intentionally independent of future formal mapping content. - if width<721: page.locator('#atlas-browse-link').click() - page.locator('#atlas-view').select_option('list') - record_check(row,'Graph/List same claim source scope and pins',inspect_signature(page)==signature) - record_check(row,'same-claim layout retains formal disclosure',formal.evaluate('(e)=>e.open')) - row['share_url']=page.locator('#atlas-share').get_attribute('href') - shared=parse_qs(urlsplit(row['share_url']).query) - record_check(row,'share link retains selected source pins',all(shared.get(k)==[v] for k,v in [('atlas-node',NODE),('snapshot',mathpin),('main-snapshot',mainpin)])) - # Selection creates native history; restoring must recover the original source. - alternate=page.locator('#atlas-list button').filter(has_not_text=NODE).first - if alternate.count(): - alternate_id=alternate.evaluate('(e)=>e.firstChild.textContent') - alternate.click(); expect(page.locator('#atlas-inspector h3')).to_have_text(alternate_id) - record_check(row,'changed selection resets formal disclosure',not formal.evaluate('(e)=>e.open')) - record_check(row,'changed claim removes old arithmetic connection',page.locator('#atlas-formal-connection').count()==0) - page.go_back(); expect(page.locator('#atlas-inspector h3')).to_have_text(NODE) - record_check(row,'native Back restores same claim source and pins',inspect_signature(page)==signature) - page.go_forward(); expect(page.locator('#atlas-inspector h3')).to_have_text(alternate_id) - page.go_back(); expect(page.locator('#atlas-inspector h3')).to_have_text(NODE) - row['history']={'alternate_node':alternate_id,'back_forward_back':'completed'} - else: row['history']={'skipped':'No alternate node in loaded neighborhood'} - page.goto(row['share_url']); expect(page.locator('#atlas-inspector h3')).to_have_text(NODE) - record_check(row,'share navigation restores exact selection',inspect_signature(page)==signature) - page.reload(); expect(page.locator('#atlas-inspector h3')).to_have_text(NODE) - record_check(row,'reload restores exact selection',inspect_signature(page)==signature) - record_check(row,'reload starts formal disclosure closed',not formal.evaluate('(e)=>e.open')) - row['final_geometry']=page.evaluate(GEOMETRY) - record_check(row,'no document overflow',page.evaluate('document.documentElement.scrollWidth<=innerWidth')) - row['final_url']=page.url - refused_query={**query,'main-snapshot':'0'*40} - page.goto(origin+'/dependencies.html?'+urlencode(refused_query)) - expect(page.locator('#atlas-error')).to_be_visible() - record_check(row,'refused source removes arithmetic connection',page.locator('#atlas-formal-connection').count()==0) - except Exception as err: - row['failures'].append(str(err));row['traceback']=traceback.format_exc() - try: page.screenshot(path=str(args.output/f'failure-{row["case"]}.png')) - except Exception: pass - finally: - record_check(row,'no pageerrors',not row['pageerrors']) - record_check(row,'no failed application requests',not row['failed_requests']) - record_check(row,'no HTTP errors',not row['http_errors']) - row['passed']=not row['failures']; context.close() - (args.output/'formal-browser.json').write_text(json.dumps(report,indent=2)+'\n') - browser.close() - finally: - server.shutdown(); server.server_close() - (args.output/'server-requests.json').write_text(json.dumps(requests,indent=2)+'\n') - report['finished_at_utc']=time.strftime('%Y-%m-%dT%H:%M:%SZ',time.gmtime()) - report['passed']=sum(c.get('passed',False) for c in report['cases']);report['total']=len(report['cases']) - report['metric_summary']={} - for key in ['ready_ms','formal_enter_to_open_ms']: - values=[c[key] for c in report['cases'] if key in c] - if values: report['metric_summary'][key]={'values':values,'median':statistics.median(values),'min':min(values),'max':max(values)} - report['external_application_requests']=[r for c in report['cases'] for r in c['failed_requests'] if not r['url'].startswith(origin)] - (args.output/'formal-browser.json').write_text(json.dumps(report,indent=2)+'\n') - print(json.dumps({k:report[k] for k in ['passed','total','metric_summary']})) - return 0 if report['passed']==report['total']==4 else 1 - -if __name__=='__main__': - raise SystemExit(main()) diff --git a/tools/atlas_source_bridge_browser_check.py b/tools/atlas_source_bridge_browser_check.py index e415ad25c..e336f5214 100644 --- a/tools/atlas_source_bridge_browser_check.py +++ b/tools/atlas_source_bridge_browser_check.py @@ -5,6 +5,7 @@ """ import argparse from functools import partial +import hashlib from http.server import SimpleHTTPRequestHandler,ThreadingHTTPServer import importlib.metadata import json @@ -15,7 +16,15 @@ from playwright.sync_api import sync_playwright,expect -from atlas_formal_evidence_browser_check import identity,digest + +def digest(raw): + return hashlib.sha256(raw).hexdigest() + + +def identity(path): + raw=path.read_bytes() + return {'bytes':len(raw),'sha256':digest(raw), + 'git_blob':hashlib.sha1(b'blob '+str(len(raw)).encode()+b'\0'+raw).hexdigest()} NODE='math.side24-coefficient' PROFILES={