specfuse 0.2.3__tar.gz → 0.2.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: specfuse
3
- Version: 0.2.3
3
+ Version: 0.2.4
4
4
  Summary: Specfuse umbrella CLI — bridges the pip-installed driver and the Claude Code plugin (init / upgrade).
5
5
  Author: Specfuse contributors
6
6
  License: Apache-2.0
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "specfuse"
7
- version = "0.2.3"
7
+ version = "0.2.4"
8
8
  description = "Specfuse umbrella CLI — bridges the pip-installed driver and the Claude Code plugin (init / upgrade)."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -31,7 +31,7 @@ from pathlib import Path
31
31
 
32
32
  from specfuse.loop import scaffold
33
33
 
34
- __version__ = "0.2.3"
34
+ __version__ = "0.2.4"
35
35
 
36
36
  MARKETPLACE = "specfuse/specfuse"
37
37
  PLUGIN = "specfuse@specfuse"
@@ -113,7 +113,12 @@ def cmd_upgrade(args: argparse.Namespace, *, runner=None) -> int:
113
113
  tmp_target.mkdir()
114
114
  src = target / ".specfuse"
115
115
  if src.exists():
116
- shutil.copytree(src, tmp_target / ".specfuse")
116
+ # symlinks=True copies links as links (don't follow); without it,
117
+ # a legacy init.sh scaffold's dangling .specfuse/skills/* symlinks
118
+ # make copytree raise on the missing targets. ignore_dangling_symlinks
119
+ # is belt-and-suspenders for the same case.
120
+ shutil.copytree(src, tmp_target / ".specfuse",
121
+ symlinks=True, ignore_dangling_symlinks=True)
117
122
  try:
118
123
  written = scaffold.upgrade_specfuse(tmp_target, ci_check=ci_check)
119
124
  except scaffold.ScaffoldDowngradeError as exc:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: specfuse
3
- Version: 0.2.3
3
+ Version: 0.2.4
4
4
  Summary: Specfuse umbrella CLI — bridges the pip-installed driver and the Claude Code plugin (init / upgrade).
5
5
  Author: Specfuse contributors
6
6
  License: Apache-2.0
@@ -138,6 +138,23 @@ class TestUpgrade(unittest.TestCase):
138
138
  self.assertEqual(runner.calls, [], "dry-run must not pip-upgrade")
139
139
  self.assertIn("dry-run", out.getvalue())
140
140
 
141
+ def test_upgrade_dry_run_tolerates_dangling_symlinks(self):
142
+ """A legacy init.sh scaffold leaves dangling .specfuse/skills/* symlinks.
143
+ The dry-run copies .specfuse/ to a temp dir; copytree must not choke on
144
+ them (regression: shutil.Error 'No such file or directory')."""
145
+ with tempfile.TemporaryDirectory() as d:
146
+ self._init(d)
147
+ skills = Path(d) / ".specfuse" / "skills"
148
+ skills.mkdir(parents=True, exist_ok=True)
149
+ # Point at a target that does not exist → dangling symlink.
150
+ (skills / "roadmap-add").symlink_to("../../nonexistent/roadmap-add")
151
+ runner = _ok_runner(0)
152
+ out = io.StringIO()
153
+ with redirect_stdout(out):
154
+ rc = cli.cmd_upgrade(_args(target=d, dry_run=True), runner=runner)
155
+ self.assertEqual(rc, 0, "dry-run must survive dangling legacy symlinks")
156
+ self.assertIn("dry-run", out.getvalue())
157
+
141
158
 
142
159
  class TestParser(unittest.TestCase):
143
160
 
File without changes
File without changes
File without changes
File without changes