Repository navigation
fix(component-contract): check-gen-contract.sh finds the engine beside specfuse - #200
Merged
Merged
Conversation
…e specfuse The script only tried `python3`, so it failed on a pipx or uv install, where the engine lives in the tool's own environment, and told the user to pip-install into an interpreter that may refuse it. Under the loop that is a failed gate on every attempt. Try the interpreter beside the `specfuse` command first, when it has the engine, and name pipx and uv in the hint. SPECFUSE_PYTHON still wins. CI pip-installs the engine into python3, the one case that worked, so the template test stubs python3. Seeded scripts are owned by the component, so existing ones keep the old lookup; the guide says how to pick this up. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 3, 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.
Fixes the kit half of internal-ideas#3.
check-gen-contract.shtriedspecfuse gen-contract, which the CLI does not have yet, thenpython3. On a pipx or uv install the engine is in the tool's own environment, so the script failed withthe engine is not importable by python3. The issue reports uv; pipx fails the same way. Its hint,python3 -m pip install, is refused on a Homebrew Python (externally-managed-environment).Changes
SPECFUSE_PYTHON, the interpreter beside thespecfusecommand when it has the engine, thenpython3. The script follows symlinks, as pipx and uv install one. It does not parse the shebang, because uv's reads#!/bin/sh.pipx install specfuseanduv tool install specfuse. The template README and C# guide say the same.test-csharp-contract-template.shstubspython3. CI pip-installs the engine there, the one case that always worked, so nothing covered this.Not fixed here
Seeded scripts belong to the component and the kit never rewrites them, so existing components keep the old lookup. The guide tells them to set
SPECFUSE_PYTHONor copy the script again. Aspecfuse gen-contractcommand in the umbrella CLI fixes them without re-seeding, because their scripts already try it first; that is specfuse/specfuse#245.Verification
specfusetoo old to carry the engine withpython3as fallback, nothing available (exit 2 with hint), and explicitSPECFUSE_PYTHONnot overridden.PATHpipx and a temporaryuv tool install specfuseboth reach the engine. That probe used a contract withbuiltins:removed, so it stopped at the engine's GEN-040 error, not a green run.check-shipped-docs.pyandcheck-csharp-page.pypass.Not measured: Linux locally (CI covers it), Windows, or a run under
specfuse run.No version bump; that belongs to the release.
🤖 Generated with Claude Code