Skip to content

fix: allow prerelease spec-kit versions in compatibility checks#2695

Draft
DyanGalih wants to merge 31 commits into
github:mainfrom
DyanGalih:fix/spec-kit-ci-prerelease-version-gate
Draft

fix: allow prerelease spec-kit versions in compatibility checks#2695
DyanGalih wants to merge 31 commits into
github:mainfrom
DyanGalih:fix/spec-kit-ci-prerelease-version-gate

Conversation

@DyanGalih
Copy link
Copy Markdown
Contributor

Summary

This PR isolates the prerelease compatibility fix from the docs-rendering work.

What changed

  • Allowed prerelease/dev spec-kit builds to satisfy compatible version specifiers for extensions and presets.
  • Added regression coverage for prerelease version compatibility.
  • Kept the fix scoped to the compatibility gate only.

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

  • Dev builds can install compatible extensions and presets again.
  • Extension update/install flows no longer fail on prerelease version numbers.
  • The docs-rendering changes from PR generate integrations reference from catalog #2563 stay in a separate branch/PR.

Validation

  • pytest -q
  • python3 -m compileall -q .

DyanGalih added 30 commits May 24, 2026 15:43
…-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)
- 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
…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
Copilot AI review requested due to automatic review settings May 24, 2026 23:03
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 SpecifierSet checks by using specifier.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 thread tests/test_extensions.py
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):
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.

2 participants