Skip to content

docs: take the memory svgs back out of LFS - #3700

Draft
spomichter wants to merge 1 commit into
mainfrom
fix/docs-svg-not-lfs
Draft

docs: take the memory svgs back out of LFS#3700
spomichter wants to merge 1 commit into
mainfrom
fix/docs-svg-not-lfs

Conversation

@spomichter

Copy link
Copy Markdown
Contributor

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 says 3 lines (3 loc) · 809 KB — the three lines being the LFS pointer, the size coming from LFS metadata.

docs/capabilities/memory/assets/** filter=lfs catches the svgs along with the rasters. Github serves the pointer where the drawing should be.

Not new, and not from #3645color_image.svg was 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 .gitattributes too, 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.png and plants.png still resolve to filter: lfs.

Both renderers also now emit what the whitespace hooks expect: space/svg.py was leaving off the final newline, and matplotlib pads some of its lines in plot/svg.py. Neither surfaced while these files were pointers. Without this the hooks would rewrite the assets on every md-babel regeneration 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.

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.
@mintlify

mintlify Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
dimensional 🔴 Failed Aug 26, 2026, 4:57 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@greptile-apps

greptile-apps Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This 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 blocked

Runtime rendering of the changed Space SVG renderer could not be completed because the required Python package dimos_lcm is missing. Both the parent and updated revisions stop during import with ModuleNotFoundError: No module named 'dimos_lcm', so no renderer-output comparison was performed.

Confidence Score: 5/5

No 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 dimos_lcm is not installed.

Files Needing Attention: No files require author action. If renderer behavior needs additional local confirmation, install dimos_lcm and rerun the SVG renderer harness for dimos/memory/vis/space/svg.py.

T-Rex T-Rex Logs

What T-Rex did

  • The team authored the PR 3700 SVG validation script to render representative Plot and Space inputs, parse SVG XML, check whitespace and written output, and validate Git attributes.
  • I ran the harness against both revisions, but each run halted before renderer output could be observed due to ModuleNotFoundError: No module named 'dimos_lcm'.
  • The captured logs from both runs were preserved, documenting the blocked attempts and lack of renderer-output evidence.
  • The harness source used for validation is exactly trex-artifacts/pr3700-svg-validation.py.
  • The before and after logs show the same missing 'dimos_lcm' prerequisite, so no renderer-output comparison was claimed.

View all artifacts

T-Rex Ran code and verified through T-Rex

Reviews (1): Last reviewed commit: "docs: take the memory svgs back out of L..." | Re-trigger Greptile

@codecov

codecov Bot commented Aug 26, 2026

Copy link
Copy Markdown

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
4446 1 4445 177
View the top 1 failed test(s) by shortest run time
dimos.memory.vis.space.test_space.TestSVGRender::test_empty_space
Stack Traces | 0.007s run time
self = <dimos.memory.vis.space.test_space.TestSVGRender object at 0xffe46209e840>

    def test_empty_space(self):
        svg = Space().to_svg()
        assert svg.startswith("<svg")
>       assert svg.endswith("</svg>")
E       assert False
E        +  where False = <built-in method endswith of str object at 0xffe4638b6c90>('</svg>')
E        +    where <built-in method endswith of str object at 0xffe4638b6c90> = '<svg xmlns="http://www.w3.org/2000/svg" width="800" height="800" viewBox="-0.5000 -0.5000 2.0000 2.0000">\n</svg>\n'.endswith

self       = <dimos.memory.vis.space.test_space.TestSVGRender object at 0xffe46209e840>
svg        = '<svg xmlns="http://www.w3.org/2000/svg" width="800" height="800" viewBox="-0.5000 -0.5000 2.0000 2.0000">\n</svg>\n'

.../vis/space/test_space.py:255: AssertionError

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@spomichter
spomichter marked this pull request as draft August 26, 2026 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant