Skip to content

chore: align CI Python matrix with devguide lifecycle + fix bash 3.2 portability#3244

Merged
mnriem merged 3 commits into
github:mainfrom
mnriem:mnriem-chore-align-python-version-support
Jun 30, 2026
Merged

chore: align CI Python matrix with devguide lifecycle + fix bash 3.2 portability#3244
mnriem merged 3 commits into
github:mainfrom
mnriem:mnriem-chore-align-python-version-support

Conversation

@mnriem

@mnriem mnriem commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

Aligns Spec Kit's CI Python matrix with the Python release lifecycle, and fixes the bash 3.2 (macOS) portability issues this surfaced.

Policy:

  • Floor stays at requires-python = ">=3.11" — the oldest non-EOL security release. Security-only versions (3.11, 3.12) are supported by claim and fixed reactively, not gated on a wide per-commit matrix. (No change to pyproject.toml — upstream already requires 3.11.)
  • Test matrix runs only the bugfix (maintenance) releases3.13 and 3.14 — which are the versions most likely to surface real differences.
  • ruff lint job points at the latest interpreter (3.14) so packaging/lint is exercised on the newest release.
  • Added macos-latest to the OS matrix (now ubuntu/windows/macos × 3.13/3.14) so macOS regressions are caught.

bash 3.2 portability fixes

Adding macos-latest surfaced two pre-existing incompatibilities with bash 3.2, which macOS still ships as the system /bin/bash:

  1. update-agent-context.sh embeds Python heredocs inside $(...) command substitution. bash 3.2 mis-parses an apostrophe in a heredoc body nested in $(...), failing with an unexpected EOF quote-matching error. Removed the apostrophes from the affected $()-nested heredoc body and documented the constraint inline to prevent regressions.
  2. create-new-feature-branch.sh and create-new-feature.sh used the bash 4+ ${word^^} uppercase expansion, which errors as a bad substitution on bash 3.2 and caused short uppercase acronyms (e.g. GO) to be dropped from derived branch names. Replaced with a portable tr '[:lower:]' '[:upper:]' pipeline.

Validation

  • Full test suite passes under bash 3.2.57 (verified locally on macOS by forcing bash/bin/bash).
  • shellcheck --severity=error clean on all changed scripts.
  • All .sh files parse under bash 3.2 (bash -n).

Notes

  • 3.13 enters security-only status in Oct 2026, at which point the matrix rolls to 3.14/3.15.

This PR was prepared by GitHub Copilot (model: Claude Opus 4.8) on behalf of @mnriem.

Copilot AI review requested due to automatic review settings June 29, 2026 20:46

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Aligns Spec Kit’s declared Python support policy and documentation with the Python release lifecycle by lowering the minimum supported version to 3.10 and tightening CI coverage to current bugfix (maintenance) releases.

Changes:

  • Lowered requires-python to >=3.10 (pyproject + PEP 723 script header).
  • Updated CI test matrix to run on Python 3.13/3.14 across ubuntu/windows/macos.
  • Updated user and contributor docs to state “Python 3.10+”.
Show a summary per file
File Description
src/specify_cli/__init__.py Updates the embedded PEP 723 requires-python header to 3.10+.
pyproject.toml Lowers package requires-python floor to >=3.10.
.github/workflows/test.yml Moves pytest matrix to Python 3.13/3.14 and adds macOS to the OS matrix.
README.md Updates prerequisites to “Python 3.10+”.
docs/installation.md Updates install prerequisites to “Python 3.10+”.
docs/install/air-gapped.md Updates offline install note to “Python 3.10+”.
CONTRIBUTING.md Updates contributor prerequisites to “Python 3.10+”.

Review details

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 7/7 changed files
  • Comments generated: 1
  • Review effort level: Low

Comment thread pyproject.toml
mnriem and others added 2 commits June 29, 2026 16:27
Run the pytest matrix only on the bugfix (maintenance) releases — 3.13
and 3.14 — instead of 3.11/3.12/3.13, and point the ruff lint job at the
latest interpreter (3.14). The supported floor stays at requires-python
>= 3.11 (oldest non-EOL security release): older security versions are
supported by claim and fixed reactively rather than gated on a wide
per-commit matrix. Also add macos-latest to the OS matrix so macOS
regressions are caught.

Assisted-by: GitHub Copilot (model: Claude Opus 4.8, autonomous)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Adding macos-latest to the CI matrix surfaced two pre-existing bash 3.2
incompatibilities (macOS ships bash 3.2 as /bin/bash):

1. update-agent-context.sh embedded Python heredocs inside $(...) command
   substitution. bash 3.2 mis-parses an apostrophe in a heredoc body
   nested in $(...), failing with "unexpected EOF while looking for
   matching `''". Removed the apostrophes from the affected $()-nested
   heredoc body and documented the constraint to prevent regressions.

2. create-new-feature-branch.sh and create-new-feature.sh used the
   bash 4+ ${word^^} uppercase parameter expansion, which errors as a
   "bad substitution" on bash 3.2 and caused short uppercase acronyms
   (e.g. "GO") to be dropped from derived branch names. Replaced with a
   portable `tr '[:lower:]' '[:upper:]'` pipeline.

Verified the full test suite passes under bash 3.2.57 and shellcheck
(--severity=error) is clean.

Assisted-by: GitHub Copilot (model: Claude Opus 4.8, autonomous)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@mnriem mnriem force-pushed the mnriem-chore-align-python-version-support branch from 55d749e to fdaaa98 Compare June 29, 2026 21:27
@mnriem mnriem changed the title chore: align Python version support with devguide lifecycle chore: align CI Python matrix with devguide lifecycle + fix bash 3.2 portability Jun 29, 2026
@mnriem mnriem requested a review from Copilot June 29, 2026 21:36

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Review details

  • Files reviewed: 4/4 changed files
  • Comments generated: 2
  • Review effort level: Low

Comment thread scripts/bash/create-new-feature.sh Outdated
Comment thread extensions/agent-context/scripts/bash/update-agent-context.sh Outdated
- create-new-feature.sh: replace the non-portable `\b...\b` grep
  word-boundary (BSD grep treats `\b` as a backspace, so the acronym
  branch could silently fail) with `grep -qw`, matching its twin
  create-new-feature-branch.sh, and pipe the description via
  `printf '%s'` instead of `echo`.
- create-new-feature-branch.sh: switch the acronym check to
  `printf '%s'` as well so both twins are identical and avoid `echo`
  on user-provided text.
- update-agent-context.sh: reword the apostrophe-free self-seeding
  comment to be clearer and less easy to misread.

Verified under bash 3.2.57 (full bash-script suite green) and
shellcheck --severity=error.

Assisted-by: GitHub Copilot (model: Claude Opus 4.8, autonomous)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@mnriem

mnriem commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator Author

Addressed both review comments in b247298:

  • create-new-feature.sh (non-portable \b): replaced the \b...\b grep word-boundary with grep -qw (BSD grep treats \b as a backspace, so the acronym-preservation branch could silently miss). It now matches its twin create-new-feature-branch.sh, and the description is piped via printf '%s' instead of echo. I also switched the twin's acronym check to printf '%s' so both scripts are byte-for-byte identical in that branch.
  • update-agent-context.sh (awkward comment): reworded the self-seeding comment to be clearer while staying apostrophe-free (the bash 3.2 $()-nested-heredoc constraint).

Verified under bash 3.2.57 (full bash-script suite green) and shellcheck --severity=error.

Posted on behalf of @mnriem by GitHub Copilot (model: Claude Opus 4.8).

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Review details

  • Files reviewed: 4/4 changed files
  • Comments generated: 0 new
  • Review effort level: Low

@mnriem mnriem merged commit 4038d37 into github:main Jun 30, 2026
12 checks passed
@mnriem mnriem deleted the mnriem-chore-align-python-version-support branch June 30, 2026 11:43
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