Skip to content

feat: add self-check tip to check output#2574

Open
PascalThuet wants to merge 2 commits into
github:mainfrom
PascalThuet:feature/check-latest
Open

feat: add self-check tip to check output#2574
PascalThuet wants to merge 2 commits into
github:mainfrom
PascalThuet:feature/check-latest

Conversation

@PascalThuet
Copy link
Copy Markdown
Contributor

@PascalThuet PascalThuet commented May 15, 2026

Summary

Closes #2573.

Keeps specify check as an offline environment scan and adds a discoverability tip for the existing specify self check version lookup.

Changes

  • Add a specify self check tip to specify check output.
  • Keep specify check network-free; no --latest option is added.
  • Document the offline/version-check split in the core command reference and upgrade troubleshooting.
  • Add tests that assert the tip is shown and that specify check does not call the latest-release lookup.

Validation

Local:

  • uv run pytest tests/test_check_tool.py tests/test_upgrade.py -q
  • uvx ruff check src/ tests/test_check_tool.py tests/test_upgrade.py
  • git diff --check origin/main
  • uv run specify check --help

CI:

  • GitHub Actions will run the full PR validation suite.

AI Disclosure

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

Used AI assistance to inspect the existing check/self-check flow, adjust the PR based on review feedback, add tests/docs, and run local validation. The changes were reviewed before submission.

@PascalThuet PascalThuet marked this pull request as ready for review May 15, 2026 06:42
@PascalThuet PascalThuet requested a review from mnriem as a code owner May 15, 2026 06:42
@PascalThuet PascalThuet force-pushed the feature/check-latest branch from c6b4bf2 to 5c373b9 Compare May 15, 2026 06:46
@mnriem
Copy link
Copy Markdown
Collaborator

mnriem commented May 15, 2026

Thanks for the work here! We left a suggestion on #2573specify check is an offline environment scan and specify self check already owns the version-lookup logic. Rather than adding --latest with network code, we think a simpler tip line in specify check output would solve the discoverability problem without blurring the two commands' responsibilities:

Tip: Run 'specify self check' to verify you have the latest CLI version.

Would you be open to adjusting the PR in that direction?

@PascalThuet PascalThuet force-pushed the feature/check-latest branch from 5c373b9 to e886a15 Compare May 15, 2026 21:39
@PascalThuet PascalThuet changed the title feat: add check latest option feat: add self-check tip to check output May 15, 2026
@PascalThuet
Copy link
Copy Markdown
Contributor Author

Updated in e886a15 based on the suggestion: removed the --latest approach, kept specify check network-free, added the specify self check tip, and updated docs/tests. Local validation passes: targeted pytest, ruff, and diff whitespace check.

@mnriem mnriem requested a review from Copilot May 18, 2026 14:55
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

Adds a discoverability tip to the specify check command output pointing users to specify self check for CLI version verification, while keeping specify check strictly offline. This also updates docs to clarify the offline vs. version-lookup split and introduces regression tests ensuring no latest-release lookup is triggered by specify check.

Changes:

  • Print a specify self check tip at the end of specify check output.
  • Document the intended separation: specify check (offline environment scan) vs. specify self check (version lookup).
  • Add CLI-level tests that assert the tip appears and that latest-release lookup is not invoked.
Show a summary per file
File Description
src/specify_cli/__init__.py Adds the new self-check tip to the check() command output.
tests/test_check_tool.py Adds CLI invocation tests validating tip presence and enforcing no latest-release lookup.
docs/reference/core.md Clarifies specify check is offline and directs version checks to specify self check.
docs/upgrade.md Adds troubleshooting guidance to run specify self check when behavior suggests an older CLI.

Copilot's findings

Tip

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

  • Files reviewed: 4/4 changed files
  • Comments generated: 1

Comment thread src/specify_cli/__init__.py Outdated
Aligns the new tip with the other `Tip:` lines in `specify check`,
which don't end in a period. Per Copilot review feedback on github#2574.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

Add self-check tip to specify check

3 participants