#!/usr/bin/python3 """Create a portable HTML report from reviewed screenshots and recorded results.""" import base64 from datetime import datetime, timezone import html import json from pathlib import Path root = Path(__file__).resolve().parent.parent report = root / 'test_report/ide-config' data = json.loads((report / 'results.json').read_text()) e = html.escape def photo(name, caption): content = base64.b64encode((report / name).read_bytes()).decode() url = 'data:image/png;base64,' + content return f'
{e(caption)} · PNG
' cases = data['cases'] total = len(cases) passed = sum(c['status'] == 'pass' for c in cases) rows = [] cards = [] for case in cases: ident = case['id'] rows.append(f'{e(case["ide"])}{e(case["language"])}{e(case["status"].upper())}{e(case["action"])}') pictures = ''.join(photo(p['file'], p['caption']) for p in case['screenshots']) cards.append(f'

{e(case["ide"])} · {e(case["language"])} {e(case["status"].upper())}

Action: {e(case["action"])}

{e(case["evidence"])}

{pictures}
') logs = [] for name, title in [('integration-check.txt', 'Compiler and configuration integration checks'), ('feature-check.txt', 'Image feature checks'), ('technotes-check.txt', 'Technical notes checks'), ('idempotence.txt', 'Configuration reapplied without changes'), ('reset-check.txt', 'Team-home reset and restored configuration'), ('reset-integration-check.txt', 'Compiler integration checks after the team-home reset'), ('build-summary.txt', 'Final image build and installed file checksums'), ('gui-artifacts.txt', 'Artifacts created by graphical runs')]: path = report / name if path.exists(): logs.append(f'
{e(title)}
{e(path.read_text())}
') sources = ''.join(f'
  • {e(s["title"])}
  • ' for s in data['sources']) fixtures = ''.join(f'
    {e(p.name)} — test source
    {e(p.read_text())}
    ' for p in sorted((root / 'tests/ide_samples').iterdir()) if p.is_file()) options = ''.join(f'' for ide in dict.fromkeys(c['ide'] for c in cases)) notes = ''.join(f'
  • {e(note)}
  • ' for note in data['notes']) build = e(data['build']) notes_page = report / 'technotes-final-3.png' instructions = ('

    Instructions supplied to teams

    Page 3 of the updated TechNotes explains the tested action for every IDE and the first-launch dialogs. The PDF installed in the final image was checked against this copy.

    ' + photo(notes_page.name, 'TechNotes · IDE instructions, page 3') + '
    ') if notes_page.exists() else '' page = f''' ACPC 2026 — IDE compiler verification
    ACPC 2026 · contest USB image

    IDE compiler verification

    {e(data['verdict'])}

    {passed}/{total}language workflows passed
    7IDEs on the real VM desktop
    3000000004expected result for 3000000000 + 4

    {build}

    Screenshots are embedded in this file. Click any image to inspect it, or download its PNG. No external service is needed to view this report.

    What was tested

    Each recorded workflow was launched through the IDE interface, built or interpreted the supplied source, accepted input typed on the VM keyboard and produced the expected result. The screenshots were opened and visually inspected. Configuration was installed by Ansible; compiler settings were not repaired manually during the final GUI pass.

    C rejects accidental C++ compilation and requires C23. C++ requires C++23 and uses std::println. Java asserts the exact runtime version and the required VM flags. Python asserts PyPy and its version. Supplementary checks inspect static C/C++ executables and Java class versions.

    Results

    {''.join(rows)}
    IDELanguageResultAction tested

    {''.join(cards)} {instructions}

    Supporting checks

    {''.join(logs)}{fixtures}

    Configuration references

    The installed IDE files and their serialized settings were also inspected. These primary references explain the supported configuration mechanisms.

    Report generated {datetime.now(timezone.utc).strftime('%Y-%m-%d %H:%M UTC')}.

    ''' (report / 'index.html').write_text(page) print(f'{report / "index.html"}: {passed}/{total} passed; {len(page):,} bytes')