Skip to content

fix: derive paths-only branch from feature directory#3060

Open
luohui1 wants to merge 1 commit into
github:mainfrom
luohui1:fix/3026-paths-only-branch-fallback
Open

fix: derive paths-only branch from feature directory#3060
luohui1 wants to merge 1 commit into
github:mainfrom
luohui1:fix/3026-paths-only-branch-fallback

Conversation

@luohui1

@luohui1 luohui1 commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Description

Closes #3026 by deriving the paths-only BRANCH value from the resolved feature directory basename when no explicit SPECIFY_FEATURE is available.

This keeps check-prerequisites --paths-only / -PathsOnly useful for feature-context invocations that rely on .specify/feature.json instead of an active feature branch environment variable.

Split out from #3053 after maintainer feedback to keep each bug fix in its own PR.

Testing

  • Tested locally with uv run specify --help
  • Ran existing tests with uv sync && uv run pytest
  • Tested with a sample project (if applicable)

Additional validation run locally:

  • uv run --extra test pytest tests/test_check_prerequisites_paths_only.py -q - 4 passed, 5 skipped
  • uvx ruff check tests/test_check_prerequisites_paths_only.py - passed
  • git diff --check - passed

Manual test results

Agent: Codex (GPT-5) | OS/Shell: Windows 11 / PowerShell 7.5.4

Command tested Notes
.specify/scripts/powershell/check-prerequisites.ps1 -Json -PathsOnly Covered by regression test for non-empty BRANCH fallback from feature directory basename.

AI Disclosure

  • I did not use AI assistance for this contribution
  • I did use AI assistance (describe below)

This PR was implemented by Codex (GPT-5) acting as an AI coding agent on behalf of @luohui1. The agent read the repository contribution/security/code-of-conduct docs and issue templates, inspected the relevant code paths, implemented the changes, ran the validation listed above, and prepared this PR description.

@luohui1 luohui1 requested a review from mnriem as a code owner June 18, 2026 14:15
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.

[Bug]: get_feature_paths emits empty CURRENT_BRANCH when SPECIFY_FEATURE unset, despite feature context via SPECIFY_FEATURE_DIRECTORY/feature.json

1 participant