diff --git a/BASELINE.md b/BASELINE.md index f897f57c7..9ccd67b18 100644 --- a/BASELINE.md +++ b/BASELINE.md @@ -6,6 +6,28 @@ 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 operational-consolidation binding — 9 November 2026 + +Observed sequentially before this candidate: + +| Repository | Default revision | +|---|---| +| Main | `7712277ced9170c8d61d8f324319f40177c145b1`, tree `1bafc1d181ddc161c51d58bfe3084a118d2d9bbf` | +| Math- | `f532c3e2d91a0c7679a37c733741660917a9b21b` | +| Universal-Law-Workspace | `6064d7b96eb60f5f4e50f410c89c1f0dee813a52`, pinning Main `7712277ced9170c8d61d8f324319f40177c145b1` | + +The organization-visible open-PR search returned zero. Durable v136 and its +byte readback are recorded in +[STATUS.md](STATUS.md#current-g11-consolidation-candidate--9-november-2026). +The exact candidate removes two current-tree unreferenced and undocumented +historical browser drivers while preserving their native blobs and the frozen +evidence record. Its census has zero production findings, retains 21 tools and +exits 1. Complete discovery is not green: both modes ran 2,459 tests with the +same two managed Chromium socket errors and 23 skips. 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. Older 23-, 24- and 32-tool snapshots below remain historical. + ## Current G11 retirement binding — 9 November 2026 Observed sequentially before this candidate: diff --git a/DECISIONS.md b/DECISIONS.md index fe7b82902..b2bdd02e2 100644 --- a/DECISIONS.md +++ b/DECISIONS.md @@ -105,3 +105,4 @@ Append-only. Historical source outcomes remain in their original records. | 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`. | +| 2026-11-09 04:55 | 2 | B/tooling | Retired two undocumented, unreferenced historical Atlas browser drivers from the current operational surface while preserving their exact native Git blobs and the unchanged frozen F973 evidence record that names the accessibility audit. Fresh pre-deletion censuses in both modes were byte-identical and explicitly marked both targets `referenced=false` and `documented=false`. Exact committed-tree post-deletion censuses are byte-identical, have zero production findings, reduce the residue from 23 to 21 tools and still exit 1; G11 remains FAIL. The exact workflow suite passed 265/265 and the designated self-test killed 328/328 mutants per mode. An initial discovery command without `-s tests` ran zero tests, was corrected immediately and receives no credit. Complete corrected discovery ran 2,459 tests per mode and preserved exactly two managed Chromium singleton-socket errors and 23 skips, so full-regression 100% remains false. Refreshed all five canonical surfaces to durable v136 and the exact Main #774 / Workspace #48 binding. No theorem, proof, bound, axiom, kernel outcome, authorship, historical failure or scientific status changed; no CBZ criterion is awarded. | Yes | Base Main `7712277ced9170c8d61d8f324319f40177c145b1`; deletion commit `0a36115eefd1d4d26dd575e720e6e9ded172999a`; removed blobs `df4738e0df42b7f6ae320482be86194ce2d4bd66` / `6b36d770624c846f2d6411b7a55d20885954019e`; removed SHA-256 `e133b8c5a7df0b261d676cd3d686c92607b90a9305f92d0d0bbca4675e5e3bac` / `1c760214db84a1ec011be66f78d62f569ec191f15e0ccbb93b14f94651a8e972`; census SHA-256 `67a6c46c4752b1a9276502dd6ebfe8c9e127a38adefc5c3f7b8da64a5d1312c5`; durable v136 status/evidence SHA-256 `423a1b558c99a73b43cedfb10765d810ad8a6a2e9dd5eb74899bedb0b8aa4fae` / `2b53f6cfae4343f468e2f3c80c6ac7211fff7c2e8f47ff8c12b3c908fc41b83d`. | diff --git a/GOVERNANCE.md b/GOVERNANCE.md index 01a397d5b..aa848ec59 100644 --- a/GOVERNANCE.md +++ b/GOVERNANCE.md @@ -18,6 +18,26 @@ 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 consolidation checkpoint — 9 November 2026 + +The current candidate begins at signed Main default +`7712277ced9170c8d61d8f324319f40177c145b1`. Workspace default +`6064d7b96eb60f5f4e50f410c89c1f0dee813a52` pins that exact Main revision; +the latest organization-visible open-PR search returned zero. Durable v136 is +bound by +[STATUS.md](STATUS.md#current-g11-consolidation-candidate--9-november-2026). + +An undocumented, unreferenced historical executable must not remain an +operational tool merely because a frozen evidence manifest records its former +byte identity. It may be retired only after current-tree reference analysis, +exact native blob/size/digest recovery, preservation of the historical record, +fresh committed-tree census in both modes, and the G11 control and mutation +suites. That rule retires the two named Atlas drivers without awarding A8, +G11 or any Layer A criterion. The exact candidate retains 21 tools and exits 1; +the complete regression also retains two managed Chromium errors. G11 and +full-regression-100% therefore remain false. A later Main merge again requires +a guarded Workspace pin refresh before current-tip agreement can be claimed. + ## Current G11 retirement checkpoint — 9 November 2026 The current candidate begins at signed Main default diff --git a/PROOF_INDEX.md b/PROOF_INDEX.md index af0671c20..26e4ee93b 100644 --- a/PROOF_INDEX.md +++ b/PROOF_INDEX.md @@ -8,6 +8,20 @@ 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 operational-retirement binding — 9 November 2026 + +This candidate starts from Main +`7712277ced9170c8d61d8f324319f40177c145b1`, with Math- +`f532c3e2d91a0c7679a37c733741660917a9b21b` and Workspace +`6064d7b96eb60f5f4e50f410c89c1f0dee813a52` sequentially observed and +Workspace pinning that exact Main revision. Durable v136 is bound in +[STATUS.md](STATUS.md#current-g11-consolidation-candidate--9-november-2026). +Removing two unreferenced historical browser drivers removes no theorem or +proof source and does not alter the frozen F973 source record that names one +of them. This increment does not run Lean, axiom closure, kernel verification +or statement alignment and does not add, remove, promote, refute or rebind a +proof or quarantine. The older proof snapshot below remains historical. + ## Current tooling-only binding — 9 November 2026 This candidate starts from Main diff --git a/STATUS.md b/STATUS.md index 898d5a1ab..c00c7431a 100644 --- a/STATUS.md +++ b/STATUS.md @@ -8,6 +8,51 @@ 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 consolidation candidate — 9 November 2026 + +This candidate starts from signed Main default +`7712277ced9170c8d61d8f324319f40177c145b1`, tree +`1bafc1d181ddc161c51d58bfe3084a118d2d9bbf`. The fresh sequential Math- +and Workspace defaults are `f532c3e2d91a0c7679a37c733741660917a9b21b` +and `6064d7b96eb60f5f4e50f410c89c1f0dee813a52`; Workspace pins that exact +Main revision. The organization-visible open-pull-request search returned zero. + +`tools/atlas_accessibility_audit.py` and +`tools/atlas_resilience_browser_check.py` were both current-tree +`referenced=false`, `documented=false` historical browser drivers. The first +is retained by exact name, byte count and SHA-256 only in the frozen F973 +evidence-source record; the second has no current reference. They are removed +from the operational surface without altering that historical record. Their +exact sources remain recoverable at native blobs +`df4738e0df42b7f6ae320482be86194ce2d4bd66` (21,485 bytes, SHA-256 +`e133b8c5a7df0b261d676cd3d686c92607b90a9305f92d0d0bbca4675e5e3bac`) +and `6b36d770624c846f2d6411b7a55d20885954019e` (15,397 bytes, SHA-256 +`1c760214db84a1ec011be66f78d62f569ec191f15e0ccbb93b14f94651a8e972`). + +At exact deletion commit `0a36115eefd1d4d26dd575e720e6e9ded172999a`, +normal and optimized censuses are byte-identical at SHA-256 +`67a6c46c4752b1a9276502dd6ebfe8c9e127a38adefc5c3f7b8da64a5d1312c5`. +They contain zero production findings, retain 21 documentation or +no-current-exercise tools and exit 1, so G11 remains FAIL. The exact workflow +suite passes 265/265 and the designated self-test kills 328/328 mutants in +both modes. Complete discovery ran 2,459 tests in each mode and preserved the +same two managed-executor Chromium singleton-socket errors and 23 skips; it is +not a 100% regression pass. The preceding zero-test discovery invocation is +preserved and receives no credit. + +Durable checkpoint v136 is byte-read back at stable status identity +`libfile_9551d0182bcc819188edfe9f998165b3`, 540,053 bytes, SHA-256 +`423a1b558c99a73b43cedfb10765d810ad8a6a2e9dd5eb74899bedb0b8aa4fae`, +and evidence identity `libfile_1f9ec8ce62708191972f9e2bf6295816`, +358,573,202 bytes, SHA-256 +`2b53f6cfae4343f468e2f3c80c6ac7211fff7c2e8f47ff8c12b3c908fc41b83d`. +The ZIP has 13,114 unique members and retains all 13,110 v135 members. This +candidate does not rerun Lean/kernel verification, 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. All twelve criteria remain unawarded; CBZ-0 and +terminal Partial are not established. + ## Current G11 retirement candidate — 9 November 2026 This candidate starts from signed Main default diff --git a/TOOLING.md b/TOOLING.md index a947acf46..64831be17 100644 --- a/TOOLING.md +++ b/TOOLING.md @@ -9,6 +9,39 @@ 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 unreferenced-driver retirement — 9 November 2026 + +This candidate starts from Main +`7712277ced9170c8d61d8f324319f40177c145b1`. The registered verification +commands are: + +```sh +python3 -B -S -m unittest tests.test_g11_census tests.test_g11_current_architecture_references tests.test_g11_current_atlas_formal_bridge_reference +python3 -B -S -O -m unittest tests.test_g11_census tests.test_g11_current_architecture_references tests.test_g11_current_atlas_formal_bridge_reference +python3 -B -S tools/cbz/g11_mutation_selftest.py +python3 -B -S -O tools/cbz/g11_mutation_selftest.py +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 +python3 -B -m unittest discover -s tests -v +python3 -B -O -m unittest discover -s tests -v +``` + +At exact deletion commit `0a36115eefd1d4d26dd575e720e6e9ded172999a`, +both reports are byte-identical at SHA-256 +`67a6c46c4752b1a9276502dd6ebfe8c9e127a38adefc5c3f7b8da64a5d1312c5`, +have zero production findings, retain 21 tools and exit 1. The first four +commands pass 265/265 controls and kill 328/328 designated mutants per mode. +The two complete discoveries each run 2,459 tests and preserve two managed +Chromium socket errors plus 23 skips; they do not establish regression 100%. + +The removed accessibility audit is recoverable at blob +`df4738e0df42b7f6ae320482be86194ce2d4bd66`; its frozen F973 evidence +manifest is unchanged. The removed resilience driver is recoverable at blob +`6b36d770624c846f2d6411b7a55d20885954019e`. Neither driver was documented +or referenced by the current exercise graph. Removal is maintenance reduction, +not accessibility, resilience, mathematical, scientific or G11 acceptance. +No command here is the final federation G0--G11 orchestrator. + ## Current retirement correction — 9 November 2026 This candidate starts from Main diff --git a/tools/atlas_accessibility_audit.py b/tools/atlas_accessibility_audit.py deleted file mode 100644 index df4738e0d..000000000 --- a/tools/atlas_accessibility_audit.py +++ /dev/null @@ -1,187 +0,0 @@ -#!/usr/bin/env python3 -"""Finite F973 browser accessibility audit. Explicit immutable input; fresh output. -Tool injection and text-spacing stylesheet are DEV-only same-origin audit routes. -No input/product writes, source adoption, spoken AT or conformance certification. -""" -import argparse, datetime, hashlib, importlib.metadata, json, os, platform -import threading, traceback, time -from functools import partial -from http.server import SimpleHTTPRequestHandler, ThreadingHTTPServer -from pathlib import Path -from urllib.parse import urlsplit -from playwright.sync_api import sync_playwright, expect - -NOW=lambda:datetime.datetime.now(datetime.timezone.utc).isoformat() -SELECTED='math.uniform-matrix-cap-lifetime' -SPACING='*{line-height:1.5!important;letter-spacing:.12em!important;word-spacing:.16em!important}p{margin-bottom:2em!important}' -FOCUS='''()=>{const e=document.activeElement,r=e.getBoundingClientRect(),s=getComputedStyle(e),mid=document.elementFromPoint(Math.max(0,Math.min(innerWidth-1,r.x+r.width/2)),Math.max(0,Math.min(innerHeight-1,r.y+r.height/2)));return {tag:e.tagName,id:e.id,text:(e.getAttribute('aria-label')||e.textContent||'').slice(0,180),connected:e.isConnected,focus_visible:e.matches(':focus-visible'),outline:{style:s.outlineStyle,width:s.outlineWidth,color:s.outlineColor,offset:s.outlineOffset},shadow:s.boxShadow,rect:{x:r.x,y:r.y,width:r.width,height:r.height},viewport:{width:innerWidth,height:innerHeight},center_hit:mid?.tagName,center_unobscured:!!mid&&(mid===e||e.contains(mid)),fully_inside:r.x>=0&&r.y>=0&&r.right<=innerWidth&&r.bottom<=innerHeight,outerHTML:e.outerHTML.slice(0,600)};}''' - -def main(): - ap=argparse.ArgumentParser(description=__doc__) - ap.add_argument('--input',type=Path,required=True);ap.add_argument('--binding',type=Path,required=True) - ap.add_argument('--axe',type=Path,required=True);ap.add_argument('--toolchain',type=Path,required=True) - ap.add_argument('--out',type=Path,required=True);ap.add_argument('--only',default='') - ap.add_argument('--expected-observation-main',default='f973ead67ec139dcfef9b97f1758523639c835b3',help='Explicit full40hex main pin for the actual data observation; defaults to this F973 audit') - ap.add_argument('--target-label',default='F973 frozen public baseline, NOT938/current candidate',help='Explicit product target label; candidate runs require product_source in their own new input binding') - args=ap.parse_args();args.out.mkdir(parents=True,exist_ok=False) - binding=json.loads(args.binding.read_bytes());assert len(args.expected_observation_main)==40 and all(c in '0123456789abcdef' for c in args.expected_observation_main),'Expected observation pin must be full40hex';assert binding['main']==args.expected_observation_main,'Input observation does not match explicitly selected pin' - if args.target_label!='F973 frozen public baseline, NOT938/current candidate':assert binding.get('product_source',{}).get('revision'),'A nonbaseline product needs its own explicit product_source.revision binding' - for row in binding['files']: - raw=(args.input/row['path']).read_bytes();assert len(raw)==row['bytes'] and hashlib.sha256(raw).hexdigest()==row['sha256'],row['path'] - payload_raw=(args.input/'current.json').read_bytes();assert hashlib.sha256(payload_raw).hexdigest()==binding['payload_sha256'] and len(payload_raw)==binding['payload_bytes'],'Payload identity metadata mismatch' - payload=json.loads(payload_raw);assert next(r['commit'] for r in payload['repositories'] if r['repository'].endswith('/main'))==args.expected_observation_main,'Payload repository pin mismatch';assert SELECTED in payload['graph']['data']['nodes'],'Audit selected-node contract is absent' - tc=json.loads(args.toolchain.read_bytes());assert hashlib.sha256(args.axe.read_bytes()).hexdigest()==tc['script_sha256'] - requests=[] - class Handler(SimpleHTTPRequestHandler): - def log_message(self,*a):pass - def do_GET(self): - requests.append({'path':self.path,'at':NOW()}) - path=urlsplit(self.path).path - if path in ['/__audit__/axe.min.js','/__audit__/spacing.css']: - body=args.axe.read_bytes() if path.endswith('.js') else SPACING.encode() - self.send_response(200);self.send_header('Content-Type','text/javascript' if path.endswith('.js') else 'text/css');self.send_header('Content-Length',str(len(body)));self.end_headers();self.wfile.write(body);return - return super().do_GET() - server=ThreadingHTTPServer(('127.0.0.1',0),partial(Handler,directory=str(args.input))) - threading.Thread(target=server.serve_forever,daemon=True).start() - origin=f'http://127.0.0.1:{server.server_port}' - report={'started_at':NOW(),'audit_target':'F973 frozen public baseline, NOT938/current candidate','main':binding['main'],'tree':binding['tree'],'payload_sha256':binding['payload_sha256'],'payload_bytes':binding['payload_bytes'],'driver_sha256':hashlib.sha256(Path(__file__).read_bytes()).hexdigest(),'toolchain':tc,'environment':{'platform':platform.platform(),'python':platform.python_version(),'playwright':importlib.metadata.version('playwright'),'browser_executable':'/usr/bin/chromium','sandbox':True,'renderer':'software SwiftShader','origin':origin,'local_only':True,'reduced_motion':'reduce'},'cases':[],'limits':['Scoped automated and operator browser evidence, not full WCAG conformance certification.','No physical device, spoken AT, assistive technology user or new scientific review.','axe incomplete results need human assessment; automated passes do not prove every criterion.','Prior source/reviewer exposure, same GPT-6 family/provider/shared principal, org0/scienceNONE.','The frozen capture contains one Atlas page and exact captured assets; missing other page/favicon/history captures are fixture limits, not live-site defects.']} - def save(): - (args.out/'REPORT.json').write_text(json.dumps(report,indent=2)+'\n') - report['audit_target']=args.target_label - report['input_binding_sha256']=hashlib.sha256(args.binding.read_bytes()).hexdigest() - report['observation_source']={'main':binding['main'],'tree':binding['tree'],'payload_sha256':binding['payload_sha256']} - report['product_source']=binding.get('product_source',{'revision':binding['main'],'tree':binding['tree'],'meaning':'F973 captured public product byte tree; all input members individually hash-bound'}) - def check(row,name,ok,detail=None,criterion=None): - row.setdefault('manual',[]).append({'check':name,'result':'PASS' if ok else 'FAIL','detail':detail,'criterion':criterion}) - def snapshot(p,row,label): - name=row['case']+'-'+label+'.png';p.screenshot(path=str(args.out/name));row.setdefault('screenshots',[]).append(name) - def axe(p,row): - p.add_script_tag(url=origin+'/__audit__/axe.min.js') - result=p.evaluate('''async()=>await axe.run(document,{runOnly:{type:'tag',values:['wcag2a','wcag2aa','wcag21a','wcag21aa','wcag22aa','best-practice']},resultTypes:['violations','incomplete','passes','inapplicable']})''') - name=row['case']+'-axe.json';(args.out/name).write_text(json.dumps(result,indent=2)+'\n') - row['axe']={'report':name,'version':result['testEngine']['version'],'violations':[{'id':x['id'],'impact':x['impact'],'nodes':len(x['nodes']),'tags':x['tags']}for x in result['violations']],'incomplete':[{'id':x['id'],'nodes':len(x['nodes']),'tags':x['tags']}for x in result['incomplete']],'passes':[{'id':x['id'],'tags':x['tags'],'nodes':len(x['nodes'])}for x in result['passes']],'inapplicable':[x['id'] for x in result['inapplicable']]} - cases=[] - for width in [1200,390]: - for scheme in ['light','dark']: - for mode in ['graph','reader','3d']: - cases.append({'case':f'{mode}-{width}-{scheme}','width':width,'scheme':scheme,'mode':mode}) - for width in [320,390]: - for scheme in ['light','dark']: - cases.append({'case':f'spacing-reader-{width}-{scheme}','width':width,'scheme':scheme,'mode':'reader','spacing':True}) - for scheme in ['light','dark']: - cases.extend([{'case':f'nojs-320-{scheme}','width':320,'scheme':scheme,'mode':'nojs'}, - {'case':f'refused-390-{scheme}','width':390,'scheme':scheme,'mode':'refused'}]) - cases.extend([{'case':'fetch-failure-320-dark','width':320,'scheme':'dark','mode':'fetch-failure'}, - {'case':'webgl-failure-390-light','width':390,'scheme':'light','mode':'webgl-failure'}, - {'case':'forced-colors-320','width':320,'scheme':'light','mode':'reader','forced':True}]) - try: - with sync_playwright() as pw: - browser=pw.chromium.launch(executable_path='/usr/bin/chromium',chromium_sandbox=True,args=['--enable-unsafe-swiftshader','--disable-background-networking']) - report['environment']['browser_version']=browser.version - for spec in cases: - if args.only and args.only not in spec['case']:continue - row={**spec,'completed':False,'manual':[],'page_errors':[],'blocked_external':[],'http_failures':[]};report['cases'].append(row) - context=browser.new_context(viewport={'width':spec['width'],'height':900},color_scheme=spec['scheme'],reduced_motion='reduce',java_script_enabled=spec['mode']!='nojs') - def route(r): - if urlsplit(r.request.url).hostname=='127.0.0.1':r.continue_() - else:row['blocked_external'].append(r.request.url);r.abort() - context.route('**/*',route) - if spec['mode']=='fetch-failure':context.route('**/current.json',lambda r:r.abort()) - if spec['mode']=='webgl-failure':context.add_init_script("const original=HTMLCanvasElement.prototype.getContext;HTMLCanvasElement.prototype.getContext=function(type,...args){return String(type).includes('webgl')?null:original.call(this,type,...args)}") - p=context.new_page();p.set_default_timeout(9000) - p.on('pageerror',lambda e:row['page_errors'].append(str(e))) - p.on('response',lambda response:row['http_failures'].append({'url':response.url,'status':response.status}) if response.status>=400 else None) - try: - url=origin+'/dependencies.html?atlas-node='+SELECTED+'&atlas-view='+('graph' if spec['mode'] in ['graph','3d','webgl-failure'] else 'list') - if spec['mode']=='refused':url+='&snapshot='+'0'*40+'&atlas-panel=evidence' - elif spec['mode']=='reader':url+='&atlas-panel=evidence' - p.goto(url) - if spec['mode']=='nojs': - row['axe']={'not_run':'product JavaScript disabled; no axe execution in this state'} - check(row,'static source observation readable',p.locator('.current-state').count()>0,p.locator('.current-state').first.inner_text() if p.locator('.current-state').count() else None,'1.3.1') - check(row,'product controller not executed',p.locator('#atlas-reader').count()==0) - p.locator('#current-research').scroll_into_view_if_needed();snapshot(p,row,'static-source') - elif spec['mode']=='fetch-failure': - expect(p.locator('#atlas-status')).to_contain_text('Unavailable') - check(row,'source failure visible and status semantics',p.locator('#atlas-status').is_visible() and p.locator('#atlas-status').evaluate('(e)=>!!e.closest("[role=status],[aria-live]")'),p.locator('#atlas-status').inner_text(),'4.1.3') - check(row,'failure does not substitute inspector relationships',p.locator('.atlas-relations').count()==0) - snapshot(p,row,'unavailable');axe(p,row) - elif spec['mode']=='refused': - expect(p.locator('#atlas-error')).to_be_visible() - check(row,'refusal alert semantics',p.locator('#atlas-error').get_attribute('role')=='alert',p.locator('#atlas-error').inner_text(),'4.1.3') - check(row,'refusal does not substitute relationships',p.locator('.atlas-relations').count()==0) - p.locator('#atlas-error').scroll_into_view_if_needed();snapshot(p,row,'refused');axe(p,row) - else: - expect(p.locator('#atlas-inspector h3')).to_have_text(SELECTED) - row['source_status']=p.locator('#atlas-status').inner_text() - if spec.get('forced'):p.emulate_media(forced_colors='active') - if spec.get('spacing'): - p.add_style_tag(url=origin+'/__audit__/spacing.css') - row['text_spacing_css']=SPACING - if spec['mode'] in ['3d','webgl-failure']: - p.locator('#atlas-space-toggle').click() - if spec['mode']=='webgl-failure': - expect(p.locator('#atlas-space-status')).to_contain_text('unavailable') - check(row,'WebGL failure has named status and 2D/list fallback',p.locator('#atlas-space-status').evaluate('(e)=>!!e.closest("[role=status]")') and p.locator('#atlas-stage').is_visible(),p.locator('#atlas-space-status').inner_text(),'4.1.3') - else: - canvas=p.locator('#atlas-space-host canvas');expect(canvas).to_have_count(1) - p.locator('#atlas-space-host').scroll_into_view_if_needed() - expect(p.locator('#atlas-space-host')).to_have_attribute('data-ready','true') - row['3d']={'canvas':True,'nodes':p.locator('#atlas-space-host').get_attribute('data-nodes'),'edges':p.locator('#atlas-space-host').get_attribute('data-edges'),'accessible_nodes':p.locator('.atlas-space > details > ul').first.locator('button').count()} - canvas.focus();before=canvas.screenshot();p.keyboard.press('ArrowRight');p.wait_for_timeout(150);after=canvas.screenshot() - check(row,'3D keyboard orbit changes real canvas',before!=after,{'before_sha256':hashlib.sha256(before).hexdigest(),'after_sha256':hashlib.sha256(after).hexdigest()},'2.1.1') - row['canvas_focus']=p.evaluate(FOCUS) - p.keyboard.press('Tab');check(row,'keyboard can leave 3D canvas',p.evaluate('document.activeElement.tagName')!='CANVAS',p.evaluate(FOCUS),'2.1.2') - elif spec['mode']=='reader': - # Native disclosure activation, not a direct open-attribute edit. - for sel in ['#atlas-source-details > summary','#atlas-formal-details > summary','#atlas-formal-packages > summary','#atlas-dependencies details > summary']: - loc=p.locator(sel).first - if loc.count(): - loc.focus();p.keyboard.press('Enter');check(row,'native disclosure keyboard '+sel,loc.evaluate('(e)=>e.parentElement.open'),p.evaluate(FOCUS),'2.1.1') - p.locator('#atlas-formal-details > summary').focus();row['disclosure_focus']=p.evaluate(FOCUS) - snapshot(p,row,'formal-disclosure-focus') - # Selection via real keyboard, reading focus and next-source link. - button=p.locator('#atlas-dependencies button').first;target=button.evaluate('(e)=>e.firstChild.textContent');button.focus();p.keyboard.press('Space') - expect(p.locator('#atlas-inspector h3')).to_have_text(target) - check(row,'selection focus lands on admitted inspector',p.evaluate('document.activeElement.id')=='atlas-inspector',p.evaluate(FOCUS),'2.4.3') - p.keyboard.press('Tab');row['source_link_focus']=p.evaluate(FOCUS) - check(row,'next Tab reaches immutable source',p.get_by_role('link',name='Immutable source reference',exact=False).evaluate('(e)=>e===document.activeElement'),row['source_link_focus'],'2.4.3') - snapshot(p,row,'source-focus') - # Common document semantics and reflow signals; clipping decisions reviewed later. - row['document']=p.evaluate('''()=>({width:innerWidth,scrollWidth:document.documentElement.scrollWidth,lang:document.documentElement.lang,title:document.title,main:document.querySelectorAll('main').length,h1:document.querySelectorAll('h1').length,headings:[...document.querySelectorAll('h1,h2,h3,h4,h5,h6')].filter(e=>e.getClientRects().length).map(e=>({tag:e.tagName,text:e.textContent})),navs:[...document.querySelectorAll('nav')].map(e=>({name:e.getAttribute('aria-label'),visible:!!e.getClientRects().length})),duplicates:[...document.querySelectorAll('[id]')].map(e=>e.id).filter((x,i,a)=>a.indexOf(x)!==i),reducedMotion:matchMedia('(prefers-reduced-motion:reduce)').matches})''') - check(row,'document does not require horizontal page scroll',row['document']['scrollWidth']<=row['document']['width'],{'width':row['document']['width'],'scrollWidth':row['document']['scrollWidth']},'1.4.10') - check(row,'main, title, language and unique IDs',row['document']['main']==1 and bool(row['document']['title']) and row['document']['lang']=='en' and not row['document']['duplicates'],row['document'],'1.3.1/2.4.2/3.1.1') - if spec['mode']=='graph': - # Measure live DOM messages after ordinary typing; no speech claim. - p.evaluate('''()=>{window.auditLive=[];window.auditMO=new MutationObserver(records=>{for(const rec of records){const e=rec.target.nodeType===1?rec.target:rec.target.parentElement;const live=e?.closest('[role=status],[role=alert],[aria-live]');if(live)auditLive.push({id:live.id,role:live.getAttribute('role'),live:live.getAttribute('aria-live'),text:live.textContent});}});auditMO.observe(document.body,{subtree:true,childList:true,characterData:true});}''') - p.locator('#atlas-search').fill('NO-MATCH-ACCESSIBILITY-PROBE');p.wait_for_timeout(120) - row['search_live_changes']=p.evaluate('auditLive');row['search_result_count']=p.locator('#atlas-count').inner_text() - check(row,'search result count has a live equivalent',any('0 displayed' in x['text'] for x in row['search_live_changes']),row['search_live_changes'],'4.1.3') - p.locator('#atlas-search').fill('');p.locator('#equation-search').fill('coefficient');expect(p.locator('#equation-announcement')).to_contain_text('matching excerpts',timeout=3000) - row['equation_announcement']=p.locator('#equation-announcement').inner_text();check(row,'equation count text reaches status region',p.locator('#equation-announcement').evaluate('(e)=>!!e.closest("[role=status],[aria-live]")') and bool(row['equation_announcement']),row['equation_announcement'],'4.1.3') - # First Tab/Enter skip link uses actual browser keyboard. - p.goto(url);expect(p.locator('#atlas-inspector h3')).to_have_text(SELECTED);p.keyboard.press('Tab');row['first_tab']=p.evaluate(FOCUS);p.keyboard.press('Enter') - check(row,'skip link sends keyboard focus to main',p.evaluate('document.activeElement.id')=='main-content',p.evaluate(FOCUS),'2.4.1') - p.locator('#atlas-heading').scroll_into_view_if_needed() if spec['mode'] in ['graph','3d','webgl-failure'] else None - snapshot(p,row,'viewport');axe(p,row) - if spec['mode']=='reader': - # Accessibility-tree text for source/formal/relationships; not AT speech. - (args.out/(row['case']+'-inspector-ax.txt')).write_text(p.locator('#atlas-inspector').aria_snapshot()) - row['completed']=True - except Exception as e: - row['setup_or_execution_error']=str(e);row['traceback']=traceback.format_exc() - try:snapshot(p,row,'error') - except Exception:pass - finally: - context.close();save();print(json.dumps({'case':row['case'],'completed':row['completed'],'axe_violations':len(row.get('axe',{}).get('violations',[])),'manual_failures':[x['check'] for x in row['manual'] if x['result']=='FAIL'],'error':row.get('setup_or_execution_error')}),flush=True) - browser.close() - finally: - server.shutdown();server.server_close();report['finished_at']=NOW();report['completed_cases']=sum(x['completed'] for x in report['cases']);report['total_cases']=len(report['cases']);report['requests']=requests - # Verify immutable input again after every browser/server has closed. - unchanged=True - for x in binding['files']: - unchanged &= hashlib.sha256((args.input/x['path']).read_bytes()).hexdigest()==x['sha256'] - report['input_unchanged_after']=unchanged;save() - return 0 if report['completed_cases']==report['total_cases'] and report['input_unchanged_after'] else 1 - -if __name__=='__main__':raise SystemExit(main()) diff --git a/tools/atlas_resilience_browser_check.py b/tools/atlas_resilience_browser_check.py deleted file mode 100644 index 6b36d7706..000000000 --- a/tools/atlas_resilience_browser_check.py +++ /dev/null @@ -1,109 +0,0 @@ -#!/usr/bin/env python3 -"""Optional-status resilience and actual source-derived 3D camera regressions.""" -from __future__ import annotations -import argparse,hashlib,json,subprocess,threading,time,traceback -from pathlib import Path -from functools import partial -from http.server import SimpleHTTPRequestHandler,ThreadingHTTPServer -from urllib.parse import urlsplit -from playwright.sync_api import sync_playwright,expect - -ROOT=Path(__file__).resolve().parents[1] -def require(value,message): - if not value:raise AssertionError(message) - -def main(): - ap=argparse.ArgumentParser(description=__doc__);ap.add_argument('--site',type=Path,default=ROOT/'docs/site');ap.add_argument('--origin',help='Served site directory, independently source-qualified before replay.');ap.add_argument('--output',type=Path,required=True);ap.add_argument('--browser',default='/usr/bin/chromium');ap.add_argument('--overlay-source',action='store_true',help='Use current Atlas modules over the supplied admitted observation.');ap.add_argument('--observe',action='store_true');ap.add_argument('--only',help='Run one exact named regression.');a=ap.parse_args();a.output.mkdir(parents=True,exist_ok=True) - require(not (a.origin and a.overlay_source),'A remote source cannot be replaced by a local overlay') - class Handler(SimpleHTTPRequestHandler): - def log_message(self,*args):pass - def translate_path(self,path): - name=urlsplit(path).path.rsplit('/',1)[-1] - if a.overlay_source and name in ('atlas.mjs','atlas-spatial.mjs'):return str(ROOT/'docs/site'/name) - return super().translate_path(path) - server=ThreadingHTTPServer(('127.0.0.1',0),partial(Handler,directory=str(a.site.parent)));thread=threading.Thread(target=server.serve_forever,daemon=True);thread.start();origin=f'http://127.0.0.1:{server.server_port}';url=origin+'/'+a.site.name+'/dependencies.html' - if a.origin: - parsed=urlsplit(a.origin);require(parsed.scheme in ('http','https') and parsed.netloc and not parsed.username and not parsed.password,'Expected an ordinary HTTP(S) site directory');origin=parsed.scheme+'://'+parsed.netloc;url=a.origin.rstrip('/')+'/dependencies.html' - report={'local_checkout_commit':subprocess.check_output(['git','rev-parse','HEAD'],cwd=ROOT,text=True).strip(),'local_source_files':{n:hashlib.sha256((ROOT/'docs/site'/n).read_bytes()).hexdigest() for n in ('atlas.mjs','atlas-spatial.mjs')},'overlay_source':a.overlay_source,'local_payload_sha256':hashlib.sha256((a.site/'current.json').read_bytes()).hexdigest(),'mode':'served-origin' if a.origin else 'local-site','served_page':url,'source_qualification':'Local checkout and fixture metadata do not identify remote served bytes; separate source/public byte evidence is required.','chromium_sandbox':True,'cases':[],'page_errors':[],'scientific_effect':'NONE'} - statuses=json.loads((a.site/'node-status.json').read_text()) - def snapshot(page):return page.evaluate(r'''async()=>{const u=performance.getEntriesByType('resource').find(x=>/\/current\.mjs\?/.test(x.name)).name;return (await import(u)).currentSnapshot.then(d=>d?{nodes:Object.keys(d.graph.data.nodes).length}:null)}''') - try: - with sync_playwright() as p: - browser=p.chromium.launch(executable_path=a.browser,headless=True,chromium_sandbox=True,args=['--enable-unsafe-swiftshader','--disable-background-networking']);report['browser']=browser.version - for kind in ['held-valid','held-bookmark-refusal','held-source-failure','late-current-selection','late-focused-resume','late-after-refusal','pagehide-late-status','pageshow-retry','late-stale-status','optional-feed-failure','optional-feed-malformed','actual-camera-scope']: - if a.only and a.only!=kind:continue - row={'case':kind};report['cases'].append(row);context=browser.new_context(viewport={'width':1440,'height':900},reduced_motion='reduce');page=context.new_page();page.set_default_timeout(5000);held=[] - page.on('pageerror',lambda error:report['page_errors'].append(str(error))) - def route(request): - path=urlsplit(request.request.url).path - if path.endswith('/node-status.json'): - if kind=='optional-feed-failure':request.fulfill(status=503,body='unavailable') - elif kind=='optional-feed-malformed':request.fulfill(status=200,content_type='application/json',body='{broken-json') - elif kind=='actual-camera-scope':request.continue_() - else:held.append(request) - elif kind=='held-source-failure' and path.endswith('/current.json'):request.abort() - elif request.request.url.startswith(origin+'/'):request.continue_() - else:request.abort() - context.route('**/*',route) - try: - page.goto(url+('?snapshot='+'0'*40 if kind=='held-bookmark-refusal' else ''),wait_until='domcontentloaded');row['primary_snapshot']=snapshot(page) - if kind=='held-source-failure': - page.wait_for_timeout(100);require('Unavailable:' in page.locator('#atlas-status').inner_text(),'Source failure waited for optional status');require(page.locator('#atlas-search').is_disabled(),'Failed source enabled search');require(page.locator('#atlas-list button').count()==0,'Failed source exposed nodes') - elif kind=='held-bookmark-refusal': - page.wait_for_timeout(100);require(page.locator('#atlas-error').is_visible(),'Bookmark refusal waited for optional status');require(page.locator('#atlas-list button').count()==0,'Refused bookmark substituted nodes');require(page.locator('#atlas-formal-evidence').count()==0,'Refused bookmark exposed formal evidence') - else: - page.wait_for_timeout(100);require(not page.locator('#atlas-search').is_disabled(),'Primary Atlas initialization waited for optional node status');expect(page.locator('#atlas-status')).to_contain_text('Source snapshot') - if kind=='held-valid':require(page.locator('#atlas-list button').count()>0,'No primary graph without optional status') - elif kind in ['optional-feed-failure','optional-feed-malformed']: - page.locator('#atlas-review-details').evaluate('(e)=>e.open=true') - require('not recorded in this snapshot' in page.locator('#atlas-resume').inner_text().lower(),'Failed optional feed lost the snapshot-only projection') - elif kind in ['late-current-selection','late-focused-resume','late-after-refusal','pagehide-late-status','pageshow-retry','late-stale-status']: - require(len(held)==1,'Expected one held optional request') - initial=page.locator('#atlas-inspector h3').inner_text();page.locator('#atlas-review-details').evaluate('(e)=>e.open=true');page.locator('#atlas-node-details').evaluate('(e)=>e.open=true') - if kind=='late-current-selection': - page.locator('#atlas-view').select_option('list');target=page.locator('#atlas-list button').nth(1);target_id=target.evaluate('(e)=>e.firstChild.textContent');target.click();expect(page.locator('#atlas-inspector h3')).to_have_text(target_id);page.locator('#atlas-review-details').evaluate('(e)=>e.open=true');page.locator('#atlas-node-details').evaluate('(e)=>e.open=true') - else:target_id=initial - fixture=json.loads(json.dumps(statuses));fixture[target_id]={**next(iter(fixture.values())),'node_id':target_id,'next_action':'LATE_OPERATIONAL_STATUS_TEST_MARKER'} - if kind=='late-stale-status':fixture[target_id].update(status='fresh',observed_at='2020-01-01T00:00:00Z') - page.locator('#atlas-resume').evaluate('(e)=>{const a=document.createElement("a");a.href="#";a.id="resilience-focus-probe";a.textContent="Focused operational evidence";e.append(a)}') - focus=page.locator('#resilience-focus-probe') if kind=='late-focused-resume' else page.locator('#atlas-search');focus.focus();before_url=page.url;before_history=page.evaluate('history.length');page.evaluate('window.__resilienceInspector=document.querySelector("#atlas-inspector");window.__resilienceHeading=document.querySelector("#atlas-inspector h3");window.__resilienceResume=document.querySelector("#atlas-resume")') - if kind=='late-after-refusal': - page.evaluate('''()=>{const u=new URL(location);u.searchParams.set('snapshot','0'.repeat(40));history.pushState(null,'',u);dispatchEvent(new PopStateEvent('popstate'))}''');expect(page.locator('#atlas-error')).to_be_visible() - elif kind in ['pagehide-late-status','pageshow-retry']:page.evaluate("dispatchEvent(new PageTransitionEvent('pagehide',{persisted:true}))") - try:held.pop().fulfill(status=200,content_type='application/json',body=json.dumps(fixture)) - except Exception: - require(kind in ['pagehide-late-status','pageshow-retry'],'Unexpected failed route fulfillment') - page.wait_for_timeout(120) - if kind=='late-after-refusal':require(page.locator('#atlas-resume').count()==0 and page.locator('#atlas-formal-evidence').count()==0,'Late status revived refused evidence') - elif kind=='pagehide-late-status':require('LATE_OPERATIONAL_STATUS_TEST_MARKER' not in page.locator('#atlas-resume').inner_text(),'Late status changed a hidden/disposed page') - elif kind=='pageshow-retry': - require('LATE_OPERATIONAL_STATUS_TEST_MARKER' not in page.locator('#atlas-resume').inner_text(),'Late status changed a hidden page');page.evaluate("dispatchEvent(new PageTransitionEvent('pageshow',{persisted:true}))");page.wait_for_timeout(100);require(len(held)==1,'Restored page did not make one fresh optional request');held.pop().fulfill(status=200,content_type='application/json',body=json.dumps(fixture));expect(page.locator('#atlas-resume')).to_contain_text('LATE_OPERATIONAL_STATUS_TEST_MARKER') - else: - require(page.evaluate('window.__resilienceInspector===document.querySelector("#atlas-inspector")&&window.__resilienceHeading===document.querySelector("#atlas-inspector h3")'),'Late status rebuilt the inspector');require(page.url==before_url and page.evaluate('history.length')==before_history,'Late status wrote navigation');require(page.locator('#atlas-node-details').evaluate('(e)=>e.open'),'Late status closed disclosure');expect(focus).to_be_focused();expect(page.locator('#atlas-inspector h3')).to_have_text(target_id) - if kind=='late-focused-resume': - require(page.evaluate('window.__resilienceResume===document.querySelector("#atlas-resume")'),'Late status replaced a focused resume link');require('LATE_OPERATIONAL_STATUS_TEST_MARKER' not in page.locator('#atlas-resume').inner_text(),'Focused operational block changed early');page.locator('#atlas-search').focus() - expect(page.locator('#atlas-resume')).to_contain_text('LATE_OPERATIONAL_STATUS_TEST_MARKER') - if kind=='late-stale-status':expect(page.locator('#atlas-resume')).to_contain_text('Node-status view stale') - elif kind=='actual-camera-scope': - # Observational original-calling camera hook; not a timing benchmark. - page.evaluate("""async()=>{const T=await import('./vendor/three-0.160.0/three.module.js?site-release=f2988301e38ea3d44631f3220044accc019d63ae79b737e79b7b8ab7a2d5f778');window.__auditThree=T;const old=T.PerspectiveCamera.prototype.updateProjectionMatrix;T.PerspectiveCamera.prototype.updateProjectionMatrix=function(...args){window.__auditCamera=this;return old.apply(this,args)}}""") - page.locator('#atlas-space-toggle').click();page.locator('#atlas-space-host').scroll_into_view_if_needed();expect(page.locator('#atlas-space-host')).to_have_attribute('data-ready','true') - def camera():return page.evaluate(r'''async()=>{await new Promise(resolve=>requestAnimationFrame(()=>requestAnimationFrame(resolve)));const rs=performance.getEntriesByType('resource');const m=await import(rs.find(x=>/\/atlas-spatial-model\.mjs\?/.test(x.name)).name),d=await (await import(rs.find(x=>/\/current\.mjs\?/.test(x.name)).name)).currentSnapshot;const ids=[...document.querySelectorAll('#atlas-list button')].map(e=>e.firstChild.textContent),id=document.querySelector('#atlas-inspector h3').textContent,focus=document.querySelector('.atlas-space-toolbar button[aria-pressed]:not(#atlas-space-toggle)')?.getAttribute('aria-pressed')==='true';const v=m.spatialProjection(d.graph.data,ids,id,focus),T=window.__auditThree,c=window.__auditCamera;return{nodes:v.ids.length,inside:v.ids.filter(id=>{const p=new T.Vector3(...v.positions[id]).project(c);return p.x>=-1&&p.x<=1&&p.y>=-1&&p.y<=1&&p.z>=-1&&p.z<=1}).length,position:c.position.toArray(),quaternion:c.quaternion.toArray(),frames:document.querySelector('#atlas-space-host').dataset.frames}}''') - row['initial']=camera();page.locator('#atlas-search').fill('.');page.locator('#atlas-space-host').scroll_into_view_if_needed();page.wait_for_function("document.querySelector('#atlas-space-host').dataset.nodes==='49'");row['expanded']=camera();require(row['expanded']['inside']==49,'Displayed-set expansion did not fit all49 source node centres') - canvas=page.locator('#atlas-space-host canvas');canvas.focus();page.keyboard.press('ArrowRight');page.keyboard.press('+');page.wait_for_timeout(70);pose=camera();target=page.locator('.atlas-space > details ul').first.locator('button').nth(2);target.click();page.locator('#atlas-space-host').scroll_into_view_if_needed();page.wait_for_timeout(80);same=camera();require(same['position']==pose['position'] and same['quaternion']==pose['quaternion'],'Same-set selection reset user camera') - page.locator('#atlas-list').evaluate('(e)=>e.replaceChildren(...[...e.children].reverse())');page.wait_for_timeout(80);reordered=camera();require(reordered['position']==same['position'] and reordered['quaternion']==same['quaternion'],'Reordered same set reset user camera') - page.get_by_role('button',name='Focus dependencies',exact=True).click();page.locator('#atlas-space-host').scroll_into_view_if_needed();page.wait_for_timeout(80);focused=camera();require(focused['inside']==focused['nodes'],'Focused set did not fit') - page.get_by_role('button',name='Focus dependencies',exact=True).click();page.locator('#atlas-search').fill('ZZZ_NO_SOURCE_MATCH');page.wait_for_function("document.querySelector('#atlas-space-host').dataset.nodes==='0'");page.locator('#atlas-search').fill('.');page.locator('#atlas-space-host').scroll_into_view_if_needed();page.wait_for_function("document.querySelector('#atlas-space-host').dataset.nodes==='49'");restored=camera();require(restored['inside']==49,'Restored nonempty set did not fit');row['focused']=focused;row['restored']=restored;frames=restored['frames'];page.wait_for_timeout(160);require(camera()['frames']==frames,'Camera changes introduced an idle render loop');page.locator('#atlas-space-host').screenshot(path=str(a.output/'camera49.png')) - row['passed']=True - except Exception as error: - row['passed']=False;row['error']=str(error);row['traceback']=traceback.format_exc();page.screenshot(path=str(a.output/(kind+'-failure.png'))) - finally: - for request in held: - try:request.abort() - except Exception:pass - context.close() - browser.close() - finally: - server.shutdown();server.server_close();thread.join(5);report['owned_server_closed']=not thread.is_alive();report['passed']=sum(c['passed'] for c in report['cases']);report['failed']=len(report['cases'])-report['passed'];(a.output/'report.json').write_text(json.dumps(report,indent=2)+'\n') - print(json.dumps({k:report[k] for k in ['passed','failed','page_errors','owned_server_closed']}));return 1 if (report['failed'] or report['page_errors']) and not a.observe else 0 -if __name__=='__main__':raise SystemExit(main())