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
@@ -0,0 +1,65 @@
# Undo/redo report reconciliation - November 24, 2026
Report 0.1.4-alpha; application and Demo 3 remain 0.1.3-alpha.
Vincent authorized the focused documentation plan, then explicitly requested
finishing the report and pausing before any undo/redo implementation.
No application code/test/package/demo file changed in this task; no new runtime
test execution, commit, push, email or upload is claimed.
## Changes and impact review
Updated: planned transaction overview labels and ownership; four-class details
including document operations; separate new-edit/restoration sequence panels;
new-edit activity with explicit preparation outcomes and future compile-on-save;
UC-004 annotation and links; stale provider summaries; test TC-039's compiler
trigger; TC-056 and VER-061/062 file-store terminology; report metadata, abstract,
roadmap, history, prompt log, diagram index, changelog, README and handoff.
Reduced the existing current-class overview's layout footprint to remove its
oversized-float warning; class content and current implementation status stay intact.
Fixed the deployed-package diagram at 0.1.3-alpha instead of the latest report
macro, preventing a documentation revision from implying a package rebuild.
AI-REQ-017, guide and AGENTS.md now make explicit that design approval during
ongoing development authorizes routine report updates unless narrower instructions
apply. Unclear approval or approved decisions left undocumented must be flagged.
Linked diagram content, captions, ownership, ordering and implementation status
must be checked. Code, commits and external publication need separate authority.
All seventeen directive statuses retain their previous review state.
Reviewed unchanged: 111 product requirements, their priorities/statuses, story/
use-case identities and obligations, validation plans, source-acceptance invariants,
API v1, current twelve-host-class semantics, glossary terminology and references.
The 29 UC-004 requirements have matching reciprocal use-case/test/verification
references. No new use case or product requirement is necessary.
Deferred: memory budget/eviction, history work depending on providers and exact
implementation signatures await implementation review. Undo/redo code, controls,
runtime tests, package rebuild and Demo 3 refresh await a new instruction.
Creation/insertion and shared-service design decisions remain on the existing agenda.
## Checks and evidence
Both editions completed the shared TinyTeX pdflatex/bibtex/makeindex/final-pass
sequence. checks.json records actual PDF page/link/destination counts, stable
register counts, mapped-requirement checks and protected hashes. Final logs have
no unresolved references/citations, errors, overfull boxes or oversized floats;
existing underfull spacing notices remain and affected layouts were inspected.
No PDF text extraction was used: content checks read authored TeX; PDF access
was limited to metadata, navigation and raster visual review.
review/selection.json lists the affected content pages rendered and inspected in
both editions. Contact sheets and full-size key diagrams retain compact evidence.
The abstract fits one page; checklist/new prompt record start on clean pages.
Diagram routes/labels and current/planned evidence boundaries were checked.
protected-before.json covers application source/tests/APIs/packages, all local
demo material and prior submission/baseline files. Every recorded hash matches.
baseline.json identifies the preserved matching 0.1.3-alpha report PDFs/archive.
HANDOFF-before.md and prior-uncommitted.patch retain the initial work checkpoint.
To reproduce after a normal report build, use:
./documents/build-report.ps1 -OutputDirectory work/undo-redo-report-0.1.4/build
python documents/assets/undo-redo-report-2026-11-24/check_report.py
python documents/assets/undo-redo-report-2026-11-24/render_review.py
Use the bundled Python with pypdf, pypdfium2 and Pillow, and inspect renders.
Scratch build/raster files are removed after final delivery verification.
@@ -0,0 +1,25 @@
{
"version": "0.1.3-alpha",
"reportDate": "2026-11-23",
"retainedOn": "2026-11-24",
"head": "7a2965a4f14e8ac8ca6dbb531e605b91ee6dccb3",
"workingTree": "modified; prior shell and documentation work retained",
"files": [
{
"path": "documents/submissions/baselines/architecture-0.1.3-alpha-sidebar-shell-2026-11-24/TikZRefinery-0.1.3-alpha.pdf",
"sha256": "61aced01e7062a4bb853a24f6daf5cb8151114197ce8411d12f9db7589333a03"
},
{
"path": "documents/submissions/baselines/architecture-0.1.3-alpha-sidebar-shell-2026-11-24/TikZRefinery-0.1.3-alpha.zip",
"sha256": "8f6e243da935d107bc05c3d61918f4f38c0f9d7ef6af55e3e8cc9a8d880fc7da"
},
{
"path": "documents/submissions/baselines/architecture-0.1.3-alpha-sidebar-shell-2026-11-24/TikZRefinery-Developers-Edition.pdf",
"sha256": "1cd79d6b2fdadda944377b80dc48bd6bbb226a30d1b961ef0779dbeeec9e6c88"
},
{
"path": "documents/submissions/baselines/architecture-0.1.3-alpha-sidebar-shell-2026-11-24/TikZRefinery.pdf",
"sha256": "61aced01e7062a4bb853a24f6daf5cb8151114197ce8411d12f9db7589333a03"
}
]
}
@@ -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 | 1488263 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-report-0.1.4'
evidence=root/'documents/assets/undo-redo-report-2026-11-24'
sha=lambda p:hashlib.sha256(p.read_bytes()).hexdigest()
protected=json.loads((evidence/'protected-before.json').read_text())
for item in protected:
p=root/item['path'];assert p.exists() and sha(p)==item['sha256'],p
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()
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()
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()
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/'build'/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',applicationAndDemoVersion='0.1.3-alpha',protectedFilesUnchanged=len(protected),registers=counts,undoRequirementsReciprocallyChecked=len(req_ids),pdfs=pdf_checks,applicationTestsRun=False,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,46 @@
{
"date": "2026-11-24",
"reportVersion": "0.1.4-alpha",
"applicationAndDemoVersion": "0.1.3-alpha",
"protectedFilesUnchanged": 443,
"registers": {
"RequirementID": 111,
"TestCaseID": 82,
"VerificationID": 111,
"AIRequirementID": 17,
"UseCaseID": 9,
"UserStoryID": 11,
"ValidationID": 11
},
"undoRequirementsReciprocallyChecked": 29,
"pdfs": {
"TikZRefinerySubmission": {
"pages": 247,
"internalLinks": 3548,
"namedDestinations": 1053,
"figurePages": {
"Figure:PlannedTransactionClasses": "95",
"Figure:TransactionDetails": "99",
"Figure:TransactionActivity": "215",
"Figure:TransactionSequence": "217",
"Figure:UC004Diagram": "58"
},
"underfullNotices": 4
},
"TikZRefinery": {
"pages": 312,
"internalLinks": 3782,
"namedDestinations": 1273,
"figurePages": {
"Figure:PlannedTransactionClasses": "95",
"Figure:TransactionDetails": "99",
"Figure:TransactionActivity": "215",
"Figure:TransactionSequence": "217",
"Figure:UC004Diagram": "58"
},
"underfullNotices": 4
}
},
"applicationTestsRun": false,
"source": "Authored TeX; PDF metadata/navigation only, no PDF text extraction"
}
@@ -0,0 +1,8 @@
{
"date": "2026-11-24",
"target": "C:\\Users\\vince\\Documents\\Projects\\TikZRefinery\\work\\undo-redo-report-0.1.4",
"removedFiles": 283,
"reclaimedBytes": 46682924.0,
"retained": "Canonical PDFs/archive, editable TeX/TikZ, compact review evidence/logs, matching 0.1.3-alpha baselines, prior uncommitted patch, code/build, all other work",
"deliveredHashesRechecked": true
}
@@ -0,0 +1,22 @@
[
{
"path": "documents/TikZRefinery.pdf",
"sha256": "b662c498af4217b4f1f054add485f5ade1087c86f4e8c795a1ac7171fc9dae1e",
"bytes": 1558145
},
{
"path": "documents/TikZRefinery-Developers-Edition.pdf",
"sha256": "dca725806da5c7702c68334a7d40bf0d7684ccde99b1f1891c8fbb9e13ed4bd1",
"bytes": 1716767
},
{
"path": "documents/submissions/architecture-0.1.4-alpha/TikZRefinery-0.1.4-alpha.pdf",
"sha256": "b662c498af4217b4f1f054add485f5ade1087c86f4e8c795a1ac7171fc9dae1e",
"bytes": 1558145
},
{
"path": "documents/submissions/architecture-0.1.4-alpha/TikZRefinery-0.1.4-alpha.zip",
"sha256": "1790785aa539c006f4a5384f699e0217fc68a62d82bceef226eec2463645b7f4",
"bytes": 1488263
}
]
@@ -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-report-0.1.4'
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']
selections={}
for edition in ['TikZRefinerySubmission','TikZRefinery']:
base=task/'build'/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','TC-039','VER-014','VER-063']:
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))