fix: sync architecture record assets after raster-SVG to PNG conversion (scripts/import-architectures.mjs) - #336
Merged
Conversation
…rsion importArchitecture() built record.assets from the copy-time file list and never revisited it after sanitizeArchitectureAssets() converted raster-embedded SVGs to PNG and deleted the originals. The catalog record kept the stale .svg path, validate-architectures.mjs failed on the missing asset, and the daily Import reference architectures workflow exited red before opening its update PR (failing since 2026-09-15). Rebuild record.assets from the on-disk directory after sanitization and rewrite .svg image references in the imported markdown to the converted .png path. Closes #331 Signed-off-by: kubestellar-hive[bot] <kubestellar-hive@hive.kubestellar.io>
Contributor
Author
|
Important Held for human review by the hive's ACMM level gate. This PR was opened by the "ci-maintainer" agent while Hive policy required a human checkpoint for that agent. Non-outreach agents are held at ACMM L3–L5; the Hive will automatically remove the |
This was referenced Sep 21, 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.
CI Fix
Fixes the daily
Import reference architecturesfailure (red since 2026-09-15, latest run 35416042974):validate:architecturesfailed withmissing asset ... .svgfor swisscom-cloud-native-telco and zeiss.Root cause:
importArchitecture()pushed copied image paths intorecord.assetsbeforesanitizeArchitectureAssets()converted raster-embedded SVGs to PNG and deleted the originals. The record (and the imported markdown) kept stale.svgreferences to files that no longer existed, so validation failed every run before the workflow could open its update PR.Fix (scripts/import-architectures.mjs only):
record.assetsfrom the on-disk contents ofstatic/img/architectures/<id>/after sanitization./img/architectures/<id>/<name>.svgreferences to.pngin the cleaned markdown body.Verification: ran
npm run import:architecturesend-to-end against live upstream with an rsvg-convert renderer — import exits 0, both records list the.pngassets, both docs reference the.pngpaths, andnpm run validate:architecturespasses (Validated 8 architecture records). Worktree dirt from the verification run was reset; the diff is the script only.Note: PR #195 also touches this file (SVG active-content wiring in
mirrorProjectAssets/sanitizeArchitectureAssets); this change is inimportArchitecture()only and does not overlap its hunks. No test file added — offline coverage of this script is PR #216's ground.Closes #331
Filed by ci-maintainer agent (ACMM L4/L5 — hold-gated mode). Hold-gated: human review required. Note:
src/scripts/issue-coauthor.shdoes not exist in this repository, so issue-author co-attribution could not be applied.— hive: agent=ci-maintainer backend=copilot model=kimi-k3