feat(scripts): Zola export build smoke check (REQ-138, #378)#391
Merged
Conversation
Adds scripts/zola-export-smoke.sh: exports the corpus into a scaffolded Zola site whose base_url is a sub-directory deploy, runs a real `zola build`, and fails on a build error OR on any built-HTML artifact/document link that drops the deploy sub-path. This is the end-to-end gate the string-asserting unit tests can't give — "export succeeded" now provably implies "the site builds and its links resolve under a sub-directory deploy." It catches the REQ-115/116/118 absolute-link class that previously shipped undetected. The script skips cleanly (exit 0 + notice) when `zola` is absent, so it can gate on availability. Verified locally: passes on the current corpus (1219 pages, 0 leaks); the leak detector fires on the pre-fix `/<prefix>/artifacts/…` pattern while ignoring correctly-resolved full-URL links. Wiring it as a gated CI job (needs a zola install on the runner) is a follow-up. Implements: REQ-138 Refs: REQ-115 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
📐 Rivet artifact delta
Graphgraph LR
REQ_138["REQ-138"]:::modified
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
Modified
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: 08e4228 | Previous: 02b6893 | Ratio |
|---|---|---|---|
traceability_matrix/1000 |
60112 ns/iter (± 580) |
44805 ns/iter (± 286) |
1.34 |
This comment was automatically generated by workflow using github-action-benchmark.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
Closes #378 (the script half of REQ-138).
What
scripts/zola-export-smoke.shis the end-to-end check the string-asserting unit tests can't give: it scaffolds a Zola site whosebase_urlis a sub-directory deploy (GitHub-Pages project-site style), runsrivet export --format zola --shortcodesinto it, runs a realzola build, and fails if:zola builderrors (broken shortcode, dangling@/internal link, missing taxonomy, …), orhref/srcis an absolute/<prefix>/artifacts/…or/<prefix>/documents/…path that drops the deploy sub-path (the REQ-115/116/118 class)."export succeeded" now provably implies "the site builds and its links resolve under a sub-directory." Skips cleanly (exit 0 + notice) when
zolaisn't installed, so it can gate on availability.Verification (local, zola 0.22.1)
zola buildOK, 1219 pages, 0 leaks./rivet/artifacts/req-001/and/rivet/documents/doc-x/(2 leaks) while correctly ignoring a resolved full-URL linkhttps://example.test/rivet-docs/rivet/artifacts/…. So it would have failed on the pre-fix(export): Zola links survive a sub-directory deploy (REQ-115/116/118) #377 export — it's not a no-op that always passes.rivet validatePASS;rivet docs checkPASS.Follow-up
Wiring this as a gated CI job needs a
zolainstall step on the self-hosted runners (no existing zola-in-CI pattern to reuse); I deliberately didn't commit an unverifiable workflow change. The script is runnable in CI today viaRIVET_BIN=… scripts/zola-export-smoke.shonce zola is on PATH.Implements: REQ-138
🤖 Generated with Claude Code