From 4a200159af37656d7215bf4fd5c5423cd1252df4 Mon Sep 17 00:00:00 2001 From: Safi Date: Tue, 2 Jun 2026 22:10:08 +0100 Subject: [PATCH] ship the references sidecar for gemini installs gemini has no _PLATFORM_CONFIG entry and installs claude's skill.md body verbatim. Since #1121 that body is the lean progressive core that links to references/, but _packaged_skill_refs_dir returned None for gemini, so the install laid down a SKILL.md with 8 dead reference pointers. Resolve gemini to the claude references bundle (the same body it already ships) and guard it in test_claude_twins_ride_the_claude_bundle. Co-Authored-By: Claude Opus 4.8 --- graphify/__main__.py | 13 ++++++++++--- tests/test_install_references.py | 9 +++++++-- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/graphify/__main__.py b/graphify/__main__.py index 582c7fd..8a7e851 100644 --- a/graphify/__main__.py +++ b/graphify/__main__.py @@ -171,7 +171,13 @@ def _packaged_skill_refs_dir(platform_name: str) -> Path | None: A platform opts into progressive disclosure by setting ``skill_refs`` in its ``_PLATFORM_CONFIG`` entry. The value names a bundle under ``graphify/skills//references/``. Reuse keys (e.g. trae-cn) point at - their twin's bundle. ``gemini`` has no config entry and is never progressive. + their twin's bundle. + + ``gemini`` has no ``_PLATFORM_CONFIG`` entry: it installs claude's + ``skill.md`` body verbatim (see ``_copy_skill_file``). Since that body is the + lean progressive core that links to ``references/``, gemini needs claude's + references/ sidecar too, or its SKILL.md ships with dead pointers. So gemini + resolves to the claude bundle rather than opting out. Bundles ship one platform-group at a time. A host whose bundle directory ``graphify/skills//`` is not in this build has not gone progressive @@ -182,8 +188,9 @@ def _packaged_skill_refs_dir(platform_name: str) -> Path | None: the empty-sidecar regression the wheel-content test also guards). """ if platform_name == "gemini": - return None - bundle = _PLATFORM_CONFIG[platform_name].get("skill_refs") + bundle = "claude" + else: + bundle = _PLATFORM_CONFIG[platform_name].get("skill_refs") if not bundle: return None bundle_dir = Path(__file__).parent / "skills" / bundle diff --git a/tests/test_install_references.py b/tests/test_install_references.py index 07c806b..11fa56f 100644 --- a/tests/test_install_references.py +++ b/tests/test_install_references.py @@ -269,8 +269,13 @@ def test_claude_install_ships_lean_core_and_references(tmp_path): def test_claude_twins_ride_the_claude_bundle(tmp_path): - """antigravity and kimi reuse claude's split bundle, so they go progressive too.""" - for platform in ("antigravity", "kimi"): + """antigravity and kimi reuse claude's split bundle, so they go progressive too. + + gemini has no _PLATFORM_CONFIG entry but installs claude's skill.md body + verbatim; that body is the lean progressive core, so gemini must ride the + claude references bundle as well or it ships a SKILL.md with dead pointers. + """ + for platform in ("antigravity", "kimi", "gemini"): refs_src = mainmod._packaged_skill_refs_dir(platform) assert refs_src is not None assert refs_src == PKG_DIR / "skills" / "claude" / "references"