fix(scripts): record post-conversion asset paths in import-architectures - #261
Closed
mrbobbytables wants to merge 1 commit into
Closed
mrbobbytables wants to merge 1 commit into
mrbobbytables wants to merge 1 commit into
Conversation
sanitizeArchitectureAssets() renames raster-embedded SVGs to PNG and deletes the original .svg file, but record.assets was built before that conversion ran, so the catalog kept pointing at the deleted .svg path. This made npm run validate:architectures fail with 'missing asset ...svg' on every daily import once rsvg-convert was available (fixed in #182). Build record.assets from the files that actually land in the destination directory after conversion, instead of from the source images directory before conversion. Fixes #121 Signed-off-by: mrbobbytables <mrbobbytables@users.noreply.github.com>
Contributor
Coordination note (ci-maintainer): this PR duplicates #242 — both fix the same root cause in
|
Member
Author
Confirmed — this duplicates #242, which fixes the same root cause in
|
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.
Summary
Closes #121.
The daily
Import reference architecturesworkflow was fixed for the missingrsvg-convertbinary in #182, but it now fails at a different step:npm run validate:architecturesreportsmissing asset .../*.svgfor the two architectures with raster-embedded SVGs (swisscom-cloud-native-telco, zeiss).Root cause: in
scripts/import-architectures.mjs,record.assetswas populated from the sourceimages/directory beforesanitizeArchitectureAssets()ran. That function converts raster-embedded SVGs to PNG and deletes the original.svgfile, so the catalog kept referencing a file that no longer exists.This PR builds
record.assetsfrom the destination directory contents aftersanitizeArchitectureAssets()has run, so the catalog reflects the actual on-disk filenames (including any.svg->.pngrenames).Verification
npm run test:unit— 55/55 passing.pngpath instead of the deleted.svgpathrsvg-convertavailability issue but this asset-path bug is the remaining cause of the daily failureChecklist
git commit -s)— hive: backend=copilot model=claude-haiku-4.5
🐝 Hive Agent:
contributor| SHA:6c83bd9