Skip to content

fix(export): honest AADL fallback in the REAL html export path (REQ-200, #468) - #473

Merged
avrabe merged 1 commit into
mainfrom
fix/req-200-export-aadl-fallback-real-path
Jun 5, 2026
Merged

avrabe merged 1 commit into
mainfrom
fix/req-200-export-aadl-fallback-real-path

Conversation

@avrabe

@avrabe avrabe commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Refs #468. Fixes a regression that REQ-196 (#469) silently missed.

What I found (dogfooding the real export)

Building the current binary and running the actual rivet export --format html (then scanning all 988 pages) showed the perpetual <p class="aadl-loading">Loading AADL diagram...</p> placeholder still shipping in 2 pages — documents/ARCH-001.html (the exact page from #468) and artifacts/ARCH-SYS-001.html — with no honest fallback.

Root cause: REQ-196 patched the wrong function

REQ-196 added static_aadl_fallback inside rivet_core::export::render_document_body_for_export. But rivet export --format html is implemented by cmd_export_html in rivet-cli, which renders pages via the rivet-cli render/ serve renderers and wraps them in a wrap_page layout — it never calls the rivet-core function REQ-196 patched. So REQ-196 was effectively a no-op for the real export (and the published compliance report) — yet it was marked implemented on a unit test of the helper, not an end-to-end export check. (Lesson logged: verify acceptance against real output, not a helper unit test.)

Fix

Apply the placeholder → honest-note replacement in wrap_page, the universal per-page wrapper in cmd_export_html, so every exported page is covered regardless of which renderer produced it.

before:  raw "Loading AADL diagram..." pages: 2, honest-fallback pages: 0
after:   raw "Loading AADL diagram..." pages: 0, honest-fallback pages: present

Test

export_html_replaces_perpetual_aadl_loading_placeholder walks the full export output and asserts zero pages contain the raw placeholder — an end-to-end assertion (the gap that let REQ-196 slip through).

Verification

cargo test -p rivet-cli --test export_html … (pass) · fmt --check clean · clippy --all-targets -- -D warnings exit 0 · rivet validate PASS. Manually confirmed the real export now has 0 raw placeholders. Implements + Verifies REQ-200.

🤖 Generated with Claude Code

…00, #468)

Dogfooding the actual `rivet export --format html` (build + export + scan)
showed the perpetual `<p class="aadl-loading">Loading AADL diagram...</p>`
placeholder STILL shipping in 2 of 988 pages — `documents/ARCH-001.html` (the
exact #468 page) and `artifacts/ARCH-SYS-001.html` — with no honest fallback.

Root cause: REQ-196 patched `static_aadl_fallback` inside
`rivet_core::export::render_document_body_for_export`, but `rivet export
--format html` is implemented by `cmd_export_html` (rivet-cli), which renders
pages via the rivet-cli `render/` serve renderers and wraps them in a
`wrap_page` layout — it never calls the rivet-core function REQ-196 fixed. So
REQ-196 was effectively a no-op for the real export (and the published
compliance report), yet was marked implemented on a unit test of the helper
rather than an e2e export check.

Fix: apply the placeholder→honest-note replacement in `wrap_page`, the universal
per-page wrapper, so every exported page is covered.

Test (export_html): export_html_replaces_perpetual_aadl_loading_placeholder
walks the full export output and asserts ZERO pages contain the raw placeholder.

Confirmed with: cargo test -p rivet-cli --test export_html
export_html_replaces_perpetual_aadl_loading_placeholder (pass), cargo fmt
--check, cargo clippy --all-targets -- -D warnings (exit 0), rivet validate PASS.
Manually verified the real export now has 0 raw placeholders and the honest
fallback present (was 2 raw, 0 fallback).

Implements: REQ-200
Verifies: REQ-200
Refs: REQ-196
@codecov

codecov Bot commented Jun 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@avrabe
avrabe merged commit f7fc2d0 into main Jun 5, 2026
24 of 40 checks passed
@avrabe
avrabe deleted the fix/req-200-export-aadl-fallback-real-path branch June 5, 2026 08:15
@github-actions

github-actions Bot commented Jun 5, 2026

Copy link
Copy Markdown

📐 Rivet artifact delta

Change Count
Added 1
Removed 0
Modified 0
Downstream impacted (depth ≤ 5) 0

Graph

graph LR
  REQ_200["REQ-200"]:::added
  classDef added fill:#d4edda,stroke:#28a745,color:#155724
  classDef removed fill:#f8d7da,stroke:#dc3545,color:#721c24
  classDef modified fill:#fff3cd,stroke:#ffc107,color:#856404
  classDef overflow fill:#e2e3e5,stroke:#6c757d,color:#495057,stroke-dasharray: 3 3
Loading
Added
  • REQ-200

📎 Full HTML dashboard attached as workflow artifact rivet-delta-pr-473 — download from the workflow run.

Posted by rivet-delta workflow. The graph shows only changed artifacts; open the HTML dashboard (above) for full context.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'Rivet Criterion Benchmarks'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.20.

Benchmark suite Current: bc4f900 Previous: 448f4db Ratio
link_graph_build/10000 37109658 ns/iter (± 3060870) 27364774 ns/iter (± 142273) 1.36
traceability_matrix/1000 59925 ns/iter (± 374) 43392 ns/iter (± 258) 1.38
query/10000 325983 ns/iter (± 2267) 229838 ns/iter (± 5303) 1.42

This comment was automatically generated by workflow using github-action-benchmark.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant