fix: allow prerelease spec-kit versions in compatibility checks#2695
Draft
DyanGalih wants to merge 31 commits into
Draft
fix: allow prerelease spec-kit versions in compatibility checks#2695DyanGalih wants to merge 31 commits into
DyanGalih wants to merge 31 commits into
Conversation
…-markdown - Remove standalone scripts/generate_integrations_reference.py - Strip doc injection machinery from catalog_docs.py; keep only table rendering - Wire render_integrations_table() into existing --markdown flag of integration search - Remove old simple markdown table block from integration_search (was Name|ID|Version|Description|Author) - Simplify tests: drop subprocess/doc-path tests, keep table rendering and metadata tests - Clean up docs/reference/integrations.md: remove generated markers, update note
…search - Warn when --markdown is combined with filters (query/--tag/--author) which are silently ignored; catch ValueError/FileNotFoundError and surface clean error via console instead of raw traceback (r3244821516) - Add coverage enforcement in list_integrations_for_docs(): raises ValueError with actionable message if any registry key is missing from INTEGRATION_DOC_URLS, preventing silently incomplete doc tables (r3244821589) - Rename test to accurately reflect sources: label derives from registry config, URL comes from INTEGRATION_DOC_URLS doc map — not solely from registry (r3244821607) - Simplify test dict construction to idiomatic dict comprehension (r3244821619)
…ve sync test (GH Actions job will handle)
…, fix docstring, drop FileNotFoundError
…n header assertion
…pace, optimize missing calculation
…on test for docs sync
- Rename _get_mocked_cli_runner() to _get_catalog_docs_patches() for clarity - Use ExitStack context manager for guaranteed patch cleanup - Add explicit UTF-8 encoding to file reads - Skip doc sync test gracefully when docs aren't present - Remove exception chaining from typer.Exit to avoid noisy tracebacks
…cell rendering, fix table parser for escaped pipes
…t_markdown_table for escaped pipes, guard community tests with skip
… escape integration URLs
…to prevent double-escaping
… ExitStack, update warning message
…r message, validate test rows, prevent double newline
Allow prerelease/dev builds to satisfy extension and preset compatibility checks when their version number falls within the required specifier range. Also harden the integrations docs rendering helpers and add regression coverage for the markdown table parsing and version gating paths. Tests: pytest -q; python3 -m compileall -q .; black/flake8 unavailable Reference: branch 002-generate-integrations-docs; source patch /tmp/spec-kit-changes.patch
Keep the prerelease/version compatibility fix on its own branch and remove the unrelated integrations docs updates that belong with PR 2563. Tests: full suite passed on the prerelease branch before splitting; docs branch covered by targeted docs tests Reference: upstream/main; source patch /tmp/spec-kit-changes.patch
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR updates spec-kit compatibility checks to treat prerelease/dev builds as satisfying version constraints, and adds regression tests for the new behavior.
Changes:
- Allow prerelease versions to satisfy
SpecifierSetchecks by usingspecifier.contains(..., prereleases=True). - Add test coverage for prerelease compatibility for extensions and
version_satisfies().
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| tests/test_extensions.py | Adds tests asserting prerelease/dev versions are treated as compatible. |
| src/specify_cli/presets.py | Updates preset compatibility check to include prerelease versions. |
| src/specify_cli/extensions.py | Updates extension compatibility + version_satisfies() to include prerelease versions. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+1892
to
+1893
| """Prerelease builds should satisfy compatible lower bounds.""" | ||
| assert version_satisfies("0.8.8.dev0", ">=0.2.0") |
| try: | ||
| specifier = SpecifierSet(required) | ||
| if current not in specifier: | ||
| if not specifier.contains(current, prereleases=True): |
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.
Summary
This PR isolates the prerelease compatibility fix from the docs-rendering work.
What changed
spec-kitbuilds to satisfy compatible version specifiers for extensions and presets.Why
The compatibility checks were rejecting a local prerelease build (
0.8.8.dev0) even when the required version range should have accepted it. That blocked otherwise valid extension and preset workflows.Impact
Validation
pytest -qpython3 -m compileall -q .