docs: take the memory svgs back out of LFS - #3700
Conversation
The assets directory is covered by a filter=lfs ** glob, which caught the svgs along with the rasters. Github serves the three line pointer where the drawing should be, so the file preview fails with an invalid image source and none of the memory pages can be read on github. They are text, they want diffing, and they come to 2.9 MB, which is nothing against what the repo already keeps in LFS. The rasters beside them stay where they are. Both renderers now emit what the whitespace hooks expect: the space renderer was leaving off the final newline and matplotlib pads some of its lines. Neither showed up while these files were pointers, and both would have fought the hooks on every regeneration.
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
Greptile SummaryThis change stores the memory documentation diagrams as regular SVG text so they can be rendered and diffed directly, while adjacent PNG assets remain managed by LFS. The committed SVG assets were confirmed to be valid XML with normalized whitespace, and their Git attributes distinguish SVG text assets from LFS-managed raster assets. No defect was found. T-Rex validation blockedRuntime rendering of the changed Space SVG renderer could not be completed because the required Python package Confidence Score: 5/5No product defect was found in the converted documentation assets or their Git attribute handling. The final finding set is empty. XML validity, whitespace normalization, and SVG-versus-PNG attribute behavior were checked; runtime output comparison remains unavailable because Files Needing Attention: No files require author action. If renderer behavior needs additional local confirmation, install
What T-Rex did
Reviews (1): Last reviewed commit: "docs: take the memory svgs back out of L..." | Re-trigger Greptile |
❌ 1 Tests Failed:
View the top 1 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
None of the memory capability pages can be read on github: every drawing shows
Error rendering embedded code / Invalid image source, and the file header says3 lines (3 loc) · 809 KB— the three lines being the LFS pointer, the size coming from LFS metadata.docs/capabilities/memory/assets/** filter=lfscatches the svgs along with the rasters. Github serves the pointer where the drawing should be.Not new, and not from #3645 —
color_image.svgwas already a pointer at that PR's parent commit. The**glob dates from #1769 back in April, and it was broad enough that it swept up the directory's own.gitattributestoo, which is what #1918 went on to patch. #3645 only made it visible by moving the docs into this repo, where people now read them.So the svgs are excluded from the glob. They are text, they want diffing, and all twenty come to 2.9 MB, which is nothing against what this repo already keeps in LFS. The rasters beside them stay exactly where they are — verified
grid.pngandplants.pngstill resolve tofilter: lfs.Both renderers also now emit what the whitespace hooks expect:
space/svg.pywas leaving off the final newline, and matplotlib pads some of its lines inplot/svg.py. Neither surfaced while these files were pointers. Without this the hooks would rewrite the assets on everymd-babelregeneration and fight the committed copies forever.One thing I could not verify from here: whether LFS is definitely the cause rather than the 809 KB file size. I ruled out the embedded raster — github renders
href="data:image/png;base64,…"svgs fine, confirmed against a public repo — but a private repo's blob preview cannot be loaded headlessly, so size and LFS could not be separated. If the previews are still broken once this lands, the cause is size and the fix is rasterising these to png instead.