Integration and Artifact Verification Tests Specification
This document provides a comprehensive, centralized specification of the 12 specialized post-build integration and artifact verification tests of the Universal Documentation Engine (UDE). These tests operate at the integration, semantic, and artifact validation levels to ensure 100% correctness of compiled documentation without testing raw internal code logic.
๐ Summary of Verification Suitesโ
| Test Suite / Tool | Purpose & Scope | Implementation Status | Verified Functionality Status | Primary Script(s) / Traced Req |
|---|---|---|---|---|
| 1. Golden Master Regression | Verifies parsing and rendering consistency against portable baselines. | Implemented โ | Already Implemented (Parser & Renderers) | engine/tests/test_golden_master.py โ
ude_tests/regression/run_regression_tests.py โ
REQ-FUN-48 |
| 2. Docomatic Alignment | Ensures semantic and ToC alignment with legacy Docomatic outputs. | Implemented โ | Already Implemented (ToC & Structure Mapping) | engine/tests/test_docomatic_alignment.py โ
REQ-FUN-49 |
| 3. Page Integrity Verifier | Ensures compiled pages physically exist on disk and contain correct heading signatures. | Implemented โ | Already Implemented (HTML Page Layouts) | ude_tests/regression/verify_pages.py โ
REQ-FUN-31, REQ-FUN-32 |
| 4. Post-Build Link Checker | Crawls generated HTML to validate local pathways and external URLs. | Implemented โ | Already Implemented (Routing & Delimiter Layouts) | ude_tests/regression/check_links.py โ
REQ-FUN-31 |
| 5. Incremental Build Integrity | Validates that changes to source files write only the affected compiled assets. | Planned (v2.0) | Already Implemented (BuildCacheManager) | test_incremental_build.py (Planned) REQ-FUN-29, TSK-DAT-03 |
| 6. Multi-Language Cross-Link Resolver | Verifies cross-reference resolution for mixed-language APIs (C++, C#, Python). | Implemented โ | Already Implemented (Polymorphic Delimiters) | ude_tests/regression/check_links.py โ
REQ-FUN-31, TSK-RND-09 |
| 7. RAG-Friendly Export Schema Validator | Validates structure, metadata coverage, and schema compliance of exported JSON datasets. | Planned (v3.0+, depends on RAG feature) | Already Implemented (Pydantic IR Schema & Gzip Storage) | test_rag_schema.py (Planned) REQ-FUN-05, REQ-BUS-04 |
| 8. Robustness against Doxygen Versions | Runs parser over pre-defined XML schemas from various Doxygen releases to ensure compatibility. | Planned (v2.0) | Planned (Cross-Version Parser) | test_doxygen_compatibility.py (Planned) REQ-FUN-19, TSK-PAR-02 |
| 9. API Coverage Audit | Analyzes the ratio of documented code entities and alerts on undocumented structures. | Planned (v2.0, depends on GAP-09) | Already Implemented (Docstring Extraction & IR Metadata) | test_api_coverage.py (Planned) REQ-FUN-48 |
| 10. CSS Visual Regression | Uses headless rendering to perform screenshot pixel-diff checks on page templates. | Planned (v3.0+) | Already Implemented (Template HTML & CSS Compilation) | test_visual_regression.py (Planned) |
| 11. Search Index Validity | Validates that compiled search engine index JSON keys match physical page anchors. | Planned (v3.0+) | Already Implemented (Search Engine Indexing) | test_search_index.py (Planned) REQ-FUN-31 |
| 12. Wrapper Boundary Integrity | Verifies parameter mapping consistency across multi-language API wrappers (SWIG/JNI). | Planned (v3.0+, depends on SWIG-aware parser) | Already Implemented (SWIG Wrappers & Core Parsing) | test_boundary_integrity.py (Planned) TSK-RND-09 |
โ GAP-31 โ External Integration Scripts Resolved: The three legacy scripts have been located, migrated to
ude_tests/regression/, integrated via aggregators, and validated.
[!IMPORTANT] Strict Template Existence Policy: Under the strict pipeline validation design, if physical layout templates are missing or corrupted on disk, the compilation process must explicitly fail and crash with a
RendererErrorinstead of reverting to hot-reload inline fallbacks. This ensures visual regressions are caught immediately.
๐ Detailed Specificationsโ
๐ฆ 1. Golden Master Regression Testingโ
This suite prevents behavioral drift in the parser and rendering components. It maintains and compares output state snapshots.
- Workflow:
- Developers run
prepare_baseline.pyto freeze the state of Doxygen XML parsing, Pydantic IR catalogs (.json.gz), rendered standalone HTML, and Hugo Markdown. - During continuous integration,
run_regression_tests.pyregenerates these outputs on-the-fly and runs a multi-stage comparison (JSON structure match and directory diffing).
- Developers run
- Language Feasibility Matrix:
- Current Status: Implemented in Python (
prepare_baseline.py&run_regression_tests.py) - Easy: Python (native serialization of Pydantic JSON schemas, folder comparison utilities without compilation overhead).
- Medium: C#, Java (robust built-in directory scanning and JSON support, but require compiling separate verification utilities).
- Hard: Delphi (Object Pascal) (requires custom integration of external JSON parser frameworks).
- Extremely Hard: C++ (requires tedious cross-platform linking of JSON libraries, directory diffing algorithms, and compilation).
- Current Status: Implemented in Python (
- Key Files:
Tests/prepare_baseline.pyTests/run_regression_tests.py
๐งฌ 2. Docomatic Semantic Alignment & Difference Trackingโ
This suite verifies that the newly built UDE output matches the exact semantic contents and structural hierarchy of legacy Docomatic documentation, regardless of visual differences.
- Workflow:
- Automatically extracts legacy TOC sidebar configurations from Docomatic's
contents.html. - Recursively strips layouts, styles, and empty blocks, comparing text blocks.
- Handles known layout differences via the
AlignmentAllowancesdatabase. - Automatically writes new discrepancies into
difference_mock_sdk_{lang}.jsonand enforces CI blocks under strict mode.
- Automatically extracts legacy TOC sidebar configurations from Docomatic's
- Language Feasibility Matrix:
- Current Status: Implemented in Python (
test_docomatic_alignment.py) - Easy: Python (highly recommended due to specialized HTML parsing libraries like BeautifulSoup/lxml).
- Medium: C#, Java (supported by HTML parsers like HtmlAgilityPack or JSoup, but strict static typing makes the dynamic alignment mapping rigid).
- Hard: Delphi (Object Pascal) (parsing unstructured HTML and hierarchical ToCs without robust modern HTML-DOM engines is labor-intensive).
- Extremely Hard: C++ (practically unfeasible due to absence of standard high-level HTML-DOM engines, resulting in high implementation overhead).
- Current Status: Implemented in Python (
- Key Files:
engine/tests/test_docomatic_alignment.py
๐ 3. Compiled Pages Integrity Verifierโ
This validator performs a physical sanity check on compiled static pages on disk.
- Workflow:
- Scans source Markdown directories in
user-docs. - Builds a dictionary of expected target routes and page heading signatures.
- Traverses compiled directory structures to verify that every expected route corresponds to a compiled file (e.g.
index.html). - Asserts that the physical HTML files contain the exact page heading signature.
- Scans source Markdown directories in
- Language Feasibility Matrix:
- Current Status: Implemented in Python (
verify_pages.py) - Easy: Python (native directory walk and lightweight regex heading verification).
- Medium: C#, Java, Delphi (Object Pascal), Python (all support quick file scanning and directory routing natively with negligible boilerplate).
- Hard: C++ (filesystem
<filesystem>operations are verbose and regex matching requires extra boilerplate).
- Current Status: Implemented in Python (
- Key Files:
Tests/verify_pages.py
๐ 4. Post-Build Link Validation & Cross-Link Resolutionโ
This crawling tool ensures zero broken navigation links exist in the published portal, verifying language-specific entity delimiters and layouts.
- Workflow:
- Scans all generated HTML files in the output directory.
- Parses anchor tags (
<a href="...">) using a robust parser class. - Resolves local path links to physical disk locations relative to the output root.
- Validates C++, C#, Java, and Python delimiter layouts (e.g. namespace resolution via
::vs.). - Performs real-world concurrent network requests (utilizing HTTP
HEADwith dynamicGETfallbacks) for external web links.
- Language Feasibility Matrix:
- Current Status: Implemented in Python (
check_links.py) - Easy: Python (built-in concurrent networking with requests/aiohttp, making URL verification highly performant).
- Medium: C#, Java, Python (easy HTTP/HTTPS network clients and standard async processing).
- Hard: Delphi (Object Pascal) (asynchronous concurrent sockets require tedious configuration using Indy or WinINet frameworks).
- Extremely Hard: C++ (building a multi-threaded, SSL-enabled asynchronous web crawler is extremely complex and bloating).
- Current Status: Implemented in Python (
- Key Files:
Tests/check_links.py
๐ 5. Incremental Build Integrityโ
This suite validates the correctness of the two-level build cache (BuildCacheManager), ensuring only modified files trigger file writing.
- Workflow:
- Compiles a full project reference catalog, tracking
mtimeand SHA-256 signatures of all output files. - Modifies a single source entity (XML file) and triggers an incremental compilation.
- Verifies that only the changed entity's page and TOC index file are updated, and other files remain untouched.
- Compiles a full project reference catalog, tracking
- Language Feasibility Matrix:
- Current Status: Planned (Target Language: Java)
- Easy: Python (integrated directly into the compiler's build pipeline).
- Medium: C#, Java (excellent built-in libraries for SHA-256 hashing and directory mapping).
- Hard: Delphi (Object Pascal) (requires custom wrapping of system crypto APIs for secure file hashing).
- Extremely Hard: C++ (highly complex platform-specific calls to monitor file metadata/timestamps cross-platform).
- Traced Tasks:
TSK-DAT-03(Build Cache Manager)
๐งฌ 6. Multi-Language Cross-Link Resolverโ
This test tracks routing accuracy across cross-referenced API frameworks utilizing distinct language scopes.
- Workflow:
- Parsers resolve polymorphic entities (e.g. SWIG-generated Python wrappers referencing underlying C++ core classes).
- The Link Checker scrolls the compiled assets, verifying that references dynamically mapped between C# or Python scopes correctly navigate back to C++ source modules.
- Language Feasibility Matrix:
- Current Status: Implemented in Python (bundled inside
check_links.py) - Easy: Python (highly flexible dynamic type mapping in memory across different programming languages).
- Medium: C#, Java (strict static typing requires implementing custom type adapters).
- Hard: Delphi (Object Pascal) (parsing module namespaces and custom units is tedious).
- Extremely Hard: C++ (requires managing complex dynamic cross-language pointer and type reference graphs).
- Current Status: Implemented in Python (bundled inside
- Traced Tasks:
TSK-RND-09(Signature strategizer),Tests/check_links.py
๐ค 7. RAG-Friendly Export Schema Validatorโ
Ensures the machine-readable outputs generated for enterprise AI systems are mathematically correct and structured according to standard contracts.
- Workflow:
- Triggers compilation of structured data outputs (
--format json_rag). - Reads the output JSON files and runs validation against strict JSON/Pydantic schemas.
- Asserts the presence of mandatory metadata keys (
entity_type,fully_qualified_name,signature_hash,line_range,dependencies).
- Triggers compilation of structured data outputs (
- Language Feasibility Matrix:
- Current Status: Planned (Target Language: Python)
- Easy: Python (native schema enforcement via built-in Pydantic validators).
- Medium: C#, Java (robust JSON Schema verification libraries).
- Hard: Delphi (Object Pascal) (lack of built-in data contract schema validators).
- Extremely Hard: C++ (extremely difficult to enforce dynamic schema validation without native reflection features).
- Traced Requirements:
REQ-FUN-05,REQ-BUS-04(RAG Hierarchical Export)
๐งช 8. Robustness against Doxygen Versionsโ
Verifies backward-compatible parsing against varied Doxygen XML dialects produced by different compiler releases.
- Workflow:
- Runs the UDE parser engine over identical source modules pre-compiled via distinct Doxygen versions (e.g.
1.9.x,1.10.x,1.12.x). - Asserts that the resulting
ProjectCatalogmodel instances are structurally identical, preventing breaking parsing regressions.
- Runs the UDE parser engine over identical source modules pre-compiled via distinct Doxygen versions (e.g.
- Language Feasibility Matrix:
- Current Status: Planned
- Easy: Python (highly robust XML parsing and XPath queries using lxml/xml.etree).
- Medium: C#, Java (excellent XML/XPath querying using LINQ-to-XML or JSoup).
- Hard: Delphi (Object Pascal) (native XML libraries have verbose syntax and lack modern XPath query optimization).
- Extremely Hard: C++ (low-level parsing of nested XML trees requires substantial boilerplate and error handling).
- Traced Requirements:
REQ-FUN-19,TSK-PAR-02
๐ 9. API Coverage Audit & Undocumented Entities Alertโ
Analyzes the ratio of documented code entities and alerts in continuous integration pipelines on undocumented structures to guarantee comprehensive reference coverage.
- Workflow:
- Parses the compiled database IR (
.json.gz) to cross-reference total entity definitions against entities containing non-empty docstrings. - Computes the final API documentation coverage ratio (%).
- Triggers build errors or alerts in CI if coverage drops below the strict threshold (e.g. 90%).
- Parses the compiled database IR (
- Language Feasibility Matrix:
- Current Status: Planned (Target Language: C#)
- Easy: Python (parsing generated JSON catalogs, performing dynamic ratio calculation, and printing reports).
- Medium: C#, Java (strong collections support for grouping and counting, easy HTML output writing).
- Hard: Delphi (Object Pascal) (tedious JSON processing and custom data sorting).
- Extremely Hard: C++ (demands excessive boilerplate to generate report layouts and perform file processing).
- Traced Requirements:
REQ-FUN-48
๐ผ๏ธ 10. CSS Visual Regression & Screenshot Diff Testerโ
Uses headless rendering engines to perform automated screenshot pixel-diff checks on page templates to protect responsive designs from regressions.
- Workflow:
- Launches a headless web browser (e.g. Playwright or Selenium) to render local offline HTML pages.
- Captures high-resolution PNG screenshots of major layout views (namespaces, structures, collapsible sidebars).
- Runs a pixel-by-pixel comparisons (image subtraction) against pre-defined visual baseline files.
- Automatically flags and exports visual layouts shifts exceeding 0.1% threshold.
- Prerequisite (v3.0+): Stable HTML template architecture โ the v2.0
sidebar.tomlrefactor and custom page rendering (GAP-06, GAP-26) must be complete before screenshot baselines are meaningful. - Language Feasibility Matrix:
- Current Status: Planned (v3.0+; Primary Target Language: Python)
- Easy: Python (native integration with Playwright or Selenium, immediate screenshot comparison using Pillow/OpenCV).
- Medium: C#, Java (strong bindings to Playwright/Selenium, robust image manipulation libraries).
- Hard / Extremely Hard: Delphi (Object Pascal), C++ (extremely difficult to integrate headless rendering engines and image diffing tools without bloating external binaries).
๐ 11. Search Index Integrity & Anchor Verifierโ
Validates that compiled search engine index JSON keys match physical page anchors to prevent dead ends in live searching.
- Workflow:
- Reads compiled searchable indexes (
search.jsonassets used in VitePress/Hugo portals). - Verifies that each logical item's URL structure maps directly to a generated static HTML file on disk.
- For anchor references (e.g.,
#ClassEntity), parses target HTML files using DOM selectors to guarantee that elements with matchingidornameattributes actually exist.
- Reads compiled searchable indexes (
- Language Feasibility Matrix:
- Current Status: Planned (Target Language: Delphi)
- Easy: Python (fast JSON loading, simple HTML element parsing via lxml).
- Medium: C#, Java (easy JSON schema validation and file structure checking).
- Hard: Delphi (Object Pascal) (tedious DOM parsing and routing checking).
- Extremely Hard: C++ (demands excessive code for JSON/HTML processing cross-platform).
- Traced Requirements:
REQ-FUN-31
๐ 12. Wrapper Boundary Parameter Integrityโ
Verifies parameter mapping consistency across multi-language API wrappers (SWIG/JNI) to avoid documentation desynchronization.
- Workflow:
- Dynamically parses C++ core headers alongside generated target language wrappers (Python, C#, Java, or Delphi modules).
- Correlates parameter lists, data types, and default values across boundaries.
- Triggers alerts on any parameters that are renamed or missed in translation mapping tables.
- Prerequisite (v3.0+): The v3.0+ SWIG wrapper-aware parser (Section 6 of
requirements_v3_deferred.md) must be implemented first for this test to have meaningful source-of-truth data. - Language Feasibility Matrix:
- Current Status: Planned (v3.0+; Target Language: Python)
- Easy: Python (flexible runtime class introspection and C++ header parsing).
- Medium: C#, Java (reflection and meta-programming support for boundary parameter checks).
- Hard: Delphi (Object Pascal) (inspecting flat C-style DLL interfaces requires manual schema declarations).
- Extremely Hard: C++ (demands extensive parsing of complex header ASTs to match dynamic wrapping types).
- Traced Tasks:
TSK-RND-09(Signature strategizer)
๐งช Open Architectural Items (Technical Debt)โ
GAP-31 โ External Integration Script Location Unconfirmed (RESOLVED)โ
During the 2026-06-28 testing audit, the integration scripts were initially missing. They have since been successfully located, validated, and hardened under ude_tests/regression/ along with aggregator wrappers in ude_tests/regression/api_ref_validation/.
| Script | Spec Reference | Status |
|---|---|---|
ude_tests/regression/run_regression_tests.py | TEST-INT-01, REQ-FUN-48 | Resolved โ |
ude_tests/regression/verify_pages.py | TEST-INT-03, REQ-FUN-31/REQ-FUN-32 | Resolved โ |
ude_tests/regression/check_links.py | TEST-INT-04, TEST-INT-06, REQ-FUN-31 | Resolved โ |
The in-engine test suite (engine/tests/) contains confirmed implementations covering the same scope:
test_golden_master.pyโ covers TEST-INT-01 scope (golden master regression)test_docomatic_alignment.pyโ covers TEST-INT-02 scope (Docomatic alignment)test_integration_scripts.pyโ integration wrappers testing the external scripts
v2.0 Action: Completed.
GAP-32 โ Per-Language Integration Test Suites Missingโ
Current test coverage per language is limited to golden master regression (structure-level comparison). Each language requires a dedicated integration test suite exercising the full parse โ render pipeline from Doxygen XML input through to output file structure verification.
Missing coverage per language (independent of v3.0+ render parity work โ GAP-28):
| Language | Current Coverage | Missing Coverage | Priority |
|---|---|---|---|
| C++ | Golden master (structure only) | Category landing pages (!!CLASSES, !!FUNCTIONS), overload dispatcher pages (!!OVERLOADED_*), member-type index pages (!!MEMBERTYPE_*) | v2.0 |
| C# | Golden master (structure only) | Interface/delegate/event entity rendering, namespace index pages | v2.0 |
| Java | Golden master (structure only) | extends/implements relationship rendering, package-level index pages | v2.0 |
| Python | Golden master + _post_render coverage | fget/fset property rendering, dunder method edge cases | v2.0 |
Each suite should exercise the full parse โ render cycle for the target language using engine/tests/assets/doxygen/ fixture XMLs (or augmented per-language fixtures) and verify the presence and structural correctness of all currently generated page types. These suites are independent of the v3.0+ language parity work (GAP-28) โ they validate existing output structure, not new rendering features.
Traced Tasks: TSK-RND-06 (empty group pruning), TSK-RND-07 / TSK-RND-08 (static/inline/redirect pages โ defer to v3.0+)