Repository navigation
fix(export): honest AADL fallback in the REAL html export path (REQ-200, #468) - #473
Merged
Merged
Conversation
…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 Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
📐 Rivet artifact delta
Graphgraph 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
Added
Posted by |
There was a problem hiding this comment.
⚠️ 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.
This was referenced Jun 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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) andartifacts/ARCH-SYS-001.html— with no honest fallback.Root cause: REQ-196 patched the wrong function
REQ-196 added
static_aadl_fallbackinsiderivet_core::export::render_document_body_for_export. Butrivet export --format htmlis implemented bycmd_export_htmlin rivet-cli, which renders pages via the rivet-clirender/serve renderers and wraps them in awrap_pagelayout — 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 incmd_export_html, so every exported page is covered regardless of which renderer produced it.Test
export_html_replaces_perpetual_aadl_loading_placeholderwalks 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 --checkclean ·clippy --all-targets -- -D warningsexit 0 ·rivet validatePASS. Manually confirmed the real export now has 0 raw placeholders. Implements + Verifies REQ-200.🤖 Generated with Claude Code