Add frozen TikZRefinery demo baseline and build pipeline
vpn-dns-gateway/pipeline/head This commit looks good
vpn-dns-gateway/pipeline/pr-main This commit looks good

This commit is contained in:
2026-11-25 22:46:33 -05:00
parent 6064cce05e
commit 27b82c169e
456 changed files with 66509 additions and 0 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 201 KiB

@@ -0,0 +1,5 @@
TikZRefinery report autobuild | Version 0.1.4-alpha
PASS TikZRefinerySubmission.pdf | TinyTeX, bibliography, index
PASS TikZRefinery.pdf | TinyTeX, bibliography, index
PASS TikZRefinery-0.1.4-alpha.zip | 1414385 bytes
ZIP contains TikZRefinery-0.1.4-alpha.pdf
@@ -0,0 +1,65 @@
from pathlib import Path
import re,json,hashlib,subprocess
from collections import Counter
from pypdf import PdfReader
root=next(p for p in Path(__file__).resolve().parents if (p/'AGENTS.md').is_file())
task=root/'work/undo-redo-package'
evidence=root/'documents/assets/undo-redo-2026-11-24'
sha=lambda p:hashlib.sha256(p.read_bytes()).hexdigest()
protected=json.loads((root/'code/tests/evidence/undo-redo-2026-11-24/protected-before.json').read_text(encoding='utf-8-sig'))
for path,expected in protected.items():
assert sha(root/path)==expected,path
latex=root/'documents/latex'
alltex='\n'.join(p.read_text(encoding='utf-8-sig') for p in latex.glob('*.tex'))
counts={}
for macro,prefix,expected in [('RequirementID','REQ-',111),('TestCaseID','TC-',82),('VerificationID','VER-',111),('AIRequirementID','AI-REQ-',17),('UseCaseID','UC-',9),('UserStoryID','US-',11),('ValidationID','VAL-',11)]:
ids=re.findall(r'\\'+macro+r'\{('+prefix+r'[^}]+)\}',alltex)
assert len(ids)==expected,(macro,len(ids))
assert len(ids)==len(set(ids)),macro
counts[macro]=len(ids)
def rows(file,macro):
source=(latex/file).read_text(encoding='utf-8-sig')
pattern=r'(?ms)^\\'+macro+r'\{([^}]+)\}(.*?)(?=^\\'+macro+r'\{|^\\end\{tabularx\})'
return dict(re.findall(pattern,source))
requirements=rows('tkrRequirements.tex','RequirementID')
tests=rows('tkrTests.tex','TestCaseID')
verification=rows('tkrVerification.tex','VerificationID')
usecases=(latex/'tkrUseCases.tex').read_text(encoding='utf-8-sig')
case=re.search(r'(?s)\\section\{Undo or Redo an Edit\}(.*?)(?=\\clearpage)',usecases)[1]
case_ids=set(re.findall(r'\\RequirementRef\{([^}]+)\}',case))
req_ids={k for k,v in requirements.items() if r'\UseCaseRef{UC-004}' in v}
assert req_ids==case_ids,(req_ids^case_ids)
for rid in req_ids:
for tid in re.findall(r'\\TestCaseRef\{([^}]+)\}',requirements[rid]):
assert r'\RequirementRef{'+rid+'}' in tests[tid],(rid,tid)
for vid in re.findall(r'\\VerificationRef\{([^}]+)\}',requirements[rid]):
assert r'\RequirementRef{'+rid+'}' in verification[vid],(rid,vid)
for tid in re.findall(r'\\TestCaseRef\{([^}]+)\}',verification[vid]):
assert r'\VerificationRef{'+vid+'}' in tests[tid],(tid,vid)
# New log/approval guidance cannot change the controlled directive statuses.
directives=(latex/'tkrAIAgentRequirements.tex').read_text(encoding='utf-8-sig')
assert directives.count(r'\ReqStatusInProgress')==18 # purpose + 17 rows
assert not re.search(r'\\ReqStatusDone',directives)
pdf_checks={}
for edition in ['TikZRefinerySubmission','TikZRefinery']:
base=task/'report'/edition;reader=PdfReader(base/(edition+'.pdf'));destinations=reader.named_destinations
links=0;bad=[]
for i,page in enumerate(reader.pages):
for ref in page.get('/Annots',[]):
item=ref.get_object();dest=item.get('/Dest');action=item.get('/A')
if action and action.get('/S')=='/GoTo':dest=action.get('/D')
if dest is None:continue
links+=1
if isinstance(dest,str) and dest not in destinations:bad.append((i+1,str(dest)))
assert not bad,bad
log=(base/(edition+'.log')).read_text(errors='replace')
bad_log=re.findall(r'^.*(?:Overfull|Float too large|undefined references|undefined citations|Citation .+ undefined|Reference .+ undefined|destination with the same identifier|LaTeX Error).*$' ,log,re.M)
assert not bad_log,bad_log
aux='\n'.join(p.read_text(errors='replace') for p in base.glob('*.aux'))
labels=dict((m[1],m[3]) for m in re.finditer(r'\\newlabel\{([^}]+)\}\{\{([^}]*)\}\{([^}]*)\}',aux))
required=['Figure:PlannedTransactionClasses','Figure:TransactionDetails','Figure:TransactionActivity','Figure:TransactionSequence','Figure:UC004Diagram']
assert all(k in labels for k in required)
pdf_checks[edition]=dict(pages=len(reader.pages),internalLinks=links,namedDestinations=len(destinations),figurePages={k:labels[k] for k in required},underfullNotices=log.count('Underfull'))
result=dict(date='2026-11-24',reportVersion='0.1.4-alpha',applicationVersion='0.1.4-alpha',demoSlideVersion='0.1.3-alpha',protectedFilesUnchanged=len(protected),registers=counts,undoRequirementsReciprocallyChecked=len(req_ids),pdfs=pdf_checks,applicationTestsRun=True,debugSuites=8,releaseSuites=8,source='Authored TeX; PDF metadata/navigation only, no PDF text extraction')
(evidence/'checks.json').write_text(json.dumps(result,indent=2)+'\n')
print(json.dumps(result,indent=2))
@@ -0,0 +1,49 @@
{
"date": "2026-11-24",
"reportVersion": "0.1.4-alpha",
"applicationVersion": "0.1.4-alpha",
"demoSlideVersion": "0.1.3-alpha",
"protectedFilesUnchanged": 287,
"registers": {
"RequirementID": 111,
"TestCaseID": 82,
"VerificationID": 111,
"AIRequirementID": 17,
"UseCaseID": 9,
"UserStoryID": 11,
"ValidationID": 11
},
"undoRequirementsReciprocallyChecked": 29,
"pdfs": {
"TikZRefinerySubmission": {
"pages": 248,
"internalLinks": 3568,
"namedDestinations": 1057,
"figurePages": {
"Figure:PlannedTransactionClasses": "95",
"Figure:TransactionDetails": "99",
"Figure:TransactionActivity": "216",
"Figure:TransactionSequence": "218",
"Figure:UC004Diagram": "58"
},
"underfullNotices": 5
},
"TikZRefinery": {
"pages": 314,
"internalLinks": 3803,
"namedDestinations": 1279,
"figurePages": {
"Figure:PlannedTransactionClasses": "95",
"Figure:TransactionDetails": "99",
"Figure:TransactionActivity": "216",
"Figure:TransactionSequence": "218",
"Figure:UC004Diagram": "58"
},
"underfullNotices": 5
}
},
"applicationTestsRun": true,
"debugSuites": 8,
"releaseSuites": 8,
"source": "Authored TeX; PDF metadata/navigation only, no PDF text extraction"
}
@@ -0,0 +1,6 @@
{
"removed": "C:\\Users\\vince\\Documents\\Projects\\TikZRefinery\\work\\undo-redo-package",
"removedFiles": 565,
"reclaimedBytes": 76098632.0,
"retained": "Runnable package, both reports/archives, source, prior-work patch, native captures, compact document review, final logs and incremental Debug build"
}
@@ -0,0 +1,29 @@
$ErrorActionPreference = 'Stop'
$workspace = [IO.Path]::GetFullPath('C:\Users\vince\Documents\Projects\TikZRefinery')
$scratch = [IO.Path]::GetFullPath((Join-Path $workspace 'work\undo-redo-package'))
if ($scratch -ne (Join-Path $workspace 'work\undo-redo-package') -or
!$scratch.StartsWith($workspace + '\work\', [StringComparison]::OrdinalIgnoreCase)) {
throw 'Unexpected cleanup target'
}
$required = @('code\packages\0.1.4-alpha\TikZRefinery.exe',
'documents\TikZRefinery.pdf','documents\TikZRefinery-Developers-Edition.pdf',
'code\tests\evidence\undo-redo-2026-11-24\prior-uncommitted.patch',
'documents\assets\undo-redo-2026-11-24\checks.json')
foreach ($relative in $required) {
if (!(Test-Path -LiteralPath (Join-Path $workspace $relative) -PathType Leaf)) { throw "Missing $relative" }
}
$items = @(Get-ChildItem -LiteralPath $scratch -Recurse -File)
$bytes = ($items | Measure-Object -Property Length -Sum).Sum
$count = $items.Count
Remove-Item -LiteralPath $scratch -Recurse -Force
foreach ($relative in $required) {
if (!(Test-Path -LiteralPath (Join-Path $workspace $relative) -PathType Leaf)) { throw "Missing after cleanup: $relative" }
}
$record = [ordered]@{
removed = $scratch
removedFiles = $count
reclaimedBytes = $bytes
retained = 'Runnable package, both reports/archives, source, prior-work patch, native captures, compact document review, final logs and incremental Debug build'
}
$record | ConvertTo-Json | Set-Content -LiteralPath (Join-Path $workspace 'documents\assets\undo-redo-2026-11-24\cleanup.json') -Encoding utf8
$record | ConvertTo-Json
@@ -0,0 +1,7 @@
{
"documents\\TikZRefinery.pdf": "a25fc12b77d1dcbb3602c756b3ad657d22297a3249127bf2f15afb772e36b72c",
"documents\\TikZRefinery-Developers-Edition.pdf": "51b82c63b7e279c0826831a3f5cbabd80d97da42a6a37a95d6c6f113ef8c248e",
"code\\packages\\0.1.4-alpha\\TikZRefinery.exe": "5599a68f94ad3ed63e745b4fe682c0c6f5ce086684e6431d428ad06b92176ff5",
"documents\\submissions\\architecture-0.1.4-alpha-history\\TikZRefinery-0.1.4-alpha.pdf": "a25fc12b77d1dcbb3602c756b3ad657d22297a3249127bf2f15afb772e36b72c",
"documents\\submissions\\architecture-0.1.4-alpha-history\\TikZRefinery-0.1.4-alpha.zip": "0c6f2737f1a6ba8bb49c34e33618b21e3fa673b39f87fd049ff24078a989088f"
}
@@ -0,0 +1,24 @@
# Change-impact review — 0.1.4-alpha history follow-up
November 24, 2026. Authorized package implementation following the separate
report-only pause. No automatic snapshot eviction was explicitly approved after
Vincent requested an explanation. Package and report share the agreed 0.1.4-alpha
baseline; old report PDFs are retained before publishing updated canonical copies.
| Family | Disposition and evidence |
|---|---|
| Requirements | Updated REQ-D-011's initial retention policy. Existing edit/restoration and repaint obligations already cover the behavior; no new ID needed. Product acceptance statuses remain Open. |
| Stories, use cases and mappings | Stories reviewed unchanged: no new actor goal. Updated UC-004's prepare/validate-before-publication order and implementation boundary. IDs and reciprocal mappings retained. |
| Data/API | Exact private history entries store before/after bytes and description, with a separate cursor. CoordinateEdit and shape API v1 remain unchanged. Generic transaction/ABI records remain proposed. |
| Ownership/classes/MVC | Added concrete tkrEditHistory, document composition, source-based detail view, operations/actions and MVC model allocation. Thirteen concrete host classes plus provider interface/implementation. File-store extraction and shared plugin services stay deferred. |
| Component/deployment | Shape interface and loader boundaries reviewed unchanged; refreshed actual package version in the current deployment. Frozen 0.10.3 deployment is untouched. |
| Behavior and UI | Current drag activity publishes prepared source/records/history together. General transaction sequences remain broader design sketches. Current screenshot, UC-004 and action descriptions updated. Viewport repaint corrects stale foreground handles after restoration. |
| Tests/verification/validation | Extended TC-050 and VER-037 retention oracle; added bounded execution evidence for existing history cases. All eight suites pass Debug/Release. Full verification and participant validation remain Planned. No allocation-failure injection or memory benchmark. |
| Roadmap/history/identity | Current summaries, roadmap links, Document History and matching package identity updated. The pre-implementation report baseline is archived; the original architecture-0.1.4-alpha submission archive remains untouched. |
| Glossary/references | Reviewed unchanged: transaction, revision, history and existing UML/Qt references already cover the added implementation. No new external material or dependencies. |
| AI directives and log | Directives/AGENTS reviewed unchanged: AI-REQ-017 already requires this impact review. Updated the guide's package-baseline example and added actual authorization, retention, repaint defect, work and limits to the prompt log. |
| Repository guidance | Updated README, code guide, changelog and HANDOFF. Prior uncommitted sidebar/document work is preserved. No commit/push/upload. |
| Deferred work | Creation, catalogue, folder tree, compiler, generic transactions, file-store extraction, migrations and provider lifetime management remain separate future implementation/review. A memory limit requires observed usage evidence. Demo 3 slide refresh remains a separate follow-up; the runnable package can demonstrate history now. |
See checks.json, retained final TeX logs and compact visual review for actual
document QA, and code/tests/evidence/undo-redo-2026-11-24 for application evidence.
@@ -0,0 +1,40 @@
from pathlib import Path
import json,hashlib,shutil,math
root=Path(__file__).resolve().parents[2]
task=root/'work/undo-redo-package'
evidence=root/'documents/assets/undo-redo-2026-11-24'
code_evidence=root/'code/tests/evidence/undo-redo-2026-11-24'
checks=json.loads((evidence/'checks.json').read_text(encoding='utf-8'))
assert checks['applicationVersion']=='0.1.4-alpha'
for edition,name in [('TikZRefinerySubmission','TikZRefinery.pdf'),('TikZRefinery','TikZRefinery-Developers-Edition.pdf')]:
shutil.copy2(task/'report'/edition/(edition+'.pdf'),root/'documents'/name)
shutil.copy2(task/'report'/edition/(edition+'.log'),evidence/(edition+'-final.log'))
archive=root/'documents/submissions/architecture-0.1.4-alpha-history'
archive.mkdir(exist_ok=True)
for suffix in ['pdf','zip']:shutil.copy2(task/'report'/('TikZRefinery-0.1.4-alpha.'+suffix),archive)
shutil.copy2(task/'report/build-result.txt',evidence/'build-result.txt')
review=evidence/'review';review.mkdir(exist_ok=True)
selection=json.loads((task/'review/selection.json').read_text(encoding='utf-8'))
for edition,prefix in [('TikZRefinerySubmission','sub'),('TikZRefinery','dev')]:
count=len(selection[edition]['pages'])
for number in range(1,math.ceil(count/6)+1):
shutil.copy2(task/'review'/f'{prefix}-sheet-{number}.jpg',review)
shutil.copy2(task/'review/selection.json',review)
for number in [99,100,101,106,121,240]:shutil.copy2(task/'review'/f'sub-{number}.png',review)
for filename in ['check_report.py','render_review.py','publish.py']:
shutil.copy2(task/filename,evidence/filename)
for filename in ['preserve.py','package.py','finalize_manifest.py','prior-uncommitted.patch']:
shutil.copy2(task/filename,code_evidence/filename)
sha=lambda p:hashlib.sha256(p.read_bytes()).hexdigest()
delivered=[root/'documents/TikZRefinery.pdf',root/'documents/TikZRefinery-Developers-Edition.pdf',
root/'code/packages/0.1.4-alpha/TikZRefinery.exe',*(p for p in archive.iterdir() if p.is_file())]
(evidence/'delivered-files.json').write_text(json.dumps({str(p.relative_to(root)):sha(p) for p in delivered},indent=2),encoding='utf-8')
(evidence/'review-result.json').write_text(json.dumps(dict(
submissionPagesRenderedAndReviewed=len(selection['TikZRefinerySubmission']['pages']),
developerPagesRenderedAndReviewed=len(selection['TikZRefinery']['pages']),
keyDiagramPagesReviewed=[99,100,101,106,121,240],
finalDeltaReviewed=[256,257],
source='Authored TeX for content; PDF metadata, navigation and raster layout only',
diagnostics='No errors, unresolved references/citations, duplicate destinations, overfull boxes or oversized floats; five underfull spacing notices per edition',
limits='Bounded execution evidence; full verification and validation statuses unchanged'),indent=2),encoding='utf-8')
print('Published both canonical PDFs, separate history archive and compact review evidence.')
@@ -0,0 +1,54 @@
from pathlib import Path
import re,json
from pypdf import PdfReader
import pypdfium2 as pdfium
from PIL import Image,ImageDraw
root=next(p for p in Path(__file__).resolve().parents if (p/'AGENTS.md').is_file())
task=root/'work/undo-redo-package'
out=task/'review';out.mkdir(exist_ok=True)
# Content checks use authored TeX. PDF access here is metadata and raster rendering.
focus=['Figure:PlannedTransactionClasses','Figure:TransactionDetails','Figure:TransactionActivity','Figure:TransactionSequence','Figure:UC004Diagram','Figure:CurrentClasses','Figure:CurrentPluginDeployment','Section:TransactionDesign','Section:PlannedTransactionClasses','Section:ReviewedOperations','Section:AIChangeImpact','Section:AIGuideChecklist','Section:AIVersionPolicy','Section:UndoRedoReportLog','Table:AIAgentRequirements','Chapter:UseCases','Chapter:Tests','Chapter:SoftwareArchitecture','Figure:ClassEditHistory','Figure:ClassTikzDocument','Figure:ClassMainWindow','Figure:ClassEditorController','Figure:MVCAllocation','Figure:DragActivity','Figure:CurrentUIWireframe','Section:SessionHistoryCheck','Section:CurrentPlugin','Section:CurrentProviderClasses','Section:CurrentPluginDeployment','Chapter:OpenDesignDecisions']
selections={}
for edition in ['TikZRefinerySubmission','TikZRefinery']:
base=task/'report'/edition;pdf=base/(edition+'.pdf')
if not pdf.exists():continue
reader=PdfReader(pdf);labels=reader.page_labels
aux='\n'.join(p.read_text(errors='replace') for p in base.glob('*.aux'))
locations=dict((m[1],m[3]) for m in re.finditer(r'\\newlabel\{([^}]+)\}\{\{([^}]*)\}\{([^}]*)\}',aux))
selected={i for i,label in enumerate(labels) if not label.isdigit()}
for label in focus:
if label not in locations:continue
page=labels.index(locations[label])
selected.update(range(max(0,page-1),min(len(labels),page+2)))
# The changed levels/entry wording follows the complete planned-test register.
for name,printed in locations.items():
if name.endswith(':TC-082'):
page=labels.index(printed);selected.update(range(page,min(len(labels),page+5)))
# All affected roadmap rows and status wording, plus test oracle TC-039.
for key in ['RPT-029','RPT-033','REQ-D-011','TC-050','VER-037']:
for name,printed in locations.items():
if name.endswith(':'+key):
page=labels.index(printed);selected.update(range(max(0,page-1),min(len(labels),page+2)))
if edition=='TikZRefinery':
for begin,end in [('Chapter:AIAgentRequirements','Chapter:AIAgentGuide')]:
if begin in locations and end in locations:
selected.update(range(labels.index(locations[begin]),labels.index(locations[end])))
doc=pdfium.PdfDocument(str(pdf));thumbs=[];changed=[];prefix='dev' if edition=='TikZRefinery' else 'sub'
for i in sorted(selected):
im=doc[i].render(scale=1.35).to_pil()
previous=out/f'{prefix}-{i+1}.png'
if previous.exists():
before=Image.open(previous)
if before.size!=im.size or before.convert('RGB').tobytes()!=im.convert('RGB').tobytes():changed.append(i+1)
before.close()
else:changed.append(i+1)
im.save(previous)
thumb=im.copy();thumb.thumbnail((540,700));tile=Image.new('RGB',(560,735),'#dddddd')
tile.paste(thumb,((560-thumb.width)//2,25));ImageDraw.Draw(tile).text((8,7),f'{prefix} physical {i+1} / label {labels[i]}',fill='black');thumbs.append(tile)
for start in range(0,len(thumbs),6):
sheet=Image.new('RGB',(1120,2205),'white')
for n,tile in enumerate(thumbs[start:start+6]):sheet.paste(tile,((n%2)*560,(n//2)*735))
sheet.save(out/f'{prefix}-sheet-{start//6+1}.jpg',quality=86)
selections[edition]=dict(pages=[dict(physical=i+1,label=labels[i]) for i in sorted(selected)],changedSincePreviousRender=changed,figures={label:dict(physical=labels.index(locations[label])+1,label=locations[label]) for label in focus if label in locations})
(out/'selection.json').write_text(json.dumps(selections,indent=2)+'\n')
print(json.dumps({edition:dict(rendered=len(info['pages']),changedSincePreviousRender=info['changedSincePreviousRender'],figures={key:value['physical'] for key,value in info['figures'].items() if key.startswith('Figure:')}) for edition,info in selections.items()},indent=2))
@@ -0,0 +1,19 @@
{
"submissionPagesRenderedAndReviewed": 94,
"developerPagesRenderedAndReviewed": 112,
"keyDiagramPagesReviewed": [
99,
100,
101,
106,
121,
240
],
"finalDeltaReviewed": [
256,
257
],
"source": "Authored TeX for content; PDF metadata, navigation and raster layout only",
"diagnostics": "No errors, unresolved references/citations, duplicate destinations, overfull boxes or oversized floats; five underfull spacing notices per edition",
"limits": "Bounded execution evidence; full verification and validation statuses unchanged"
}