Commit 21ffa31
feat: cf precheck --list-checks, client-side version check, User-Agent header (2.4.0) (#16)
* feat: cf precheck --list-checks, client-side version check, User-Agent header (2.4.0)
New user-facing features
------------------------
* cf precheck --list-checks (and an expanded --help) prints the canonical
list of precheck references, sourced from the new chipfoundry_cli.check_refs
module so CLI help, validation, and future tooling share one definition.
* Client-side version check: every invocation polls GET /api/v1/cli/version
(6h on-disk cache at ~/.chipfoundry-cli/version_check.json) and prints a
dim yellow tip when a newer cf is available. A second, louder tier prints
a red warning when the installed version is below the server's advertised
minimum_supported. All failures are swallowed -- a flaky network must never
block a real command. Gate-offable via CF_SKIP_VERSION_CHECK=1.
* User-Agent on every outbound API call is now
"chipfoundry-cli/<version> python/<py-ver> <platform>" so the backend can
attribute traffic and (post-May 13) apply hard-floor rejection to
pre-2.4.0 installs without affecting browser/portal/curl clients.
Bumps cf-cli to 2.4.0.
Notes
-----
The backend (chipignite-backend-services 1.18.1) already serves the version
endpoint and has the nudge middleware live. The hard-floor middleware is
parked there until after the May 13 shuttle deadline, at which point flipping
MINIMUM_SUPPORTED_CLI_VERSION to 2.4.0 will start rejecting older installs.
This release is the first one customers can upgrade to in order to get ahead
of that flip.
Not yet published to PyPI; ship when ready.
Made-with: Cursor
* test: update stale help/error assertions to match current CLI output
Four tests were asserting on help/error strings that have drifted over time
(unrelated to this branch). Refresh them to match the current copy so CI can
verify the version-check / list-checks work in this PR without riding on
pre-existing red.
- test_config_help: SSH private key path wording
- test_init_help: "Initialize or refresh..." wording
- test_status_help: "Show project status" wording
- test_push_missing_required_files: accept the newer unlinked-project abort
path alongside the legacy missing-file keywords
Made-with: Cursor
* test(remote-precheck-git): inject author env so commits succeed on clean CI
CI runners have no global git identity, so `git commit -m init` was exiting
128 ("please tell me who you are") and failing four remote-precheck-git tests
on every matrix run. Pass GIT_AUTHOR_* / GIT_COMMITTER_* via env rather than
mutating `git config --global` so local runs on developer machines remain
untouched.
Made-with: Cursor
---------
Co-authored-by: jdicorpo <jdicorpo@gmail.com>1 parent 59de8d0 commit 21ffa31
12 files changed
Lines changed: 660 additions & 35 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
| 6 | + | |
5 | 7 | | |
6 | 8 | | |
7 | 9 | | |
| |||
174 | 176 | | |
175 | 177 | | |
176 | 178 | | |
177 | | - | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
178 | 189 | | |
179 | 190 | | |
180 | 191 | | |
| |||
3553 | 3564 | | |
3554 | 3565 | | |
3555 | 3566 | | |
3556 | | - | |
| 3567 | + | |
| 3568 | + | |
| 3569 | + | |
| 3570 | + | |
| 3571 | + | |
| 3572 | + | |
| 3573 | + | |
| 3574 | + | |
| 3575 | + | |
| 3576 | + | |
| 3577 | + | |
| 3578 | + | |
| 3579 | + | |
| 3580 | + | |
| 3581 | + | |
| 3582 | + | |
| 3583 | + | |
| 3584 | + | |
| 3585 | + | |
| 3586 | + | |
| 3587 | + | |
| 3588 | + | |
| 3589 | + | |
| 3590 | + | |
| 3591 | + | |
| 3592 | + | |
| 3593 | + | |
| 3594 | + | |
| 3595 | + | |
| 3596 | + | |
| 3597 | + | |
| 3598 | + | |
| 3599 | + | |
| 3600 | + | |
| 3601 | + | |
| 3602 | + | |
| 3603 | + | |
| 3604 | + | |
| 3605 | + | |
| 3606 | + | |
| 3607 | + | |
| 3608 | + | |
| 3609 | + | |
| 3610 | + | |
| 3611 | + | |
| 3612 | + | |
| 3613 | + | |
| 3614 | + | |
| 3615 | + | |
| 3616 | + | |
| 3617 | + | |
3557 | 3618 | | |
3558 | | - | |
| 3619 | + | |
3559 | 3620 | | |
3560 | | - | |
| 3621 | + | |
| 3622 | + | |
3561 | 3623 | | |
3562 | 3624 | | |
3563 | 3625 | | |
| |||
3573 | 3635 | | |
3574 | 3636 | | |
3575 | 3637 | | |
3576 | | - | |
3577 | | - | |
3578 | | - | |
3579 | | - | |
3580 | | - | |
3581 | | - | |
3582 | | - | |
3583 | | - | |
3584 | | - | |
3585 | | - | |
3586 | | - | |
3587 | | - | |
3588 | | - | |
3589 | | - | |
3590 | | - | |
3591 | | - | |
3592 | | - | |
3593 | | - | |
3594 | | - | |
| 3638 | + | |
| 3639 | + | |
| 3640 | + | |
| 3641 | + | |
3595 | 3642 | | |
3596 | 3643 | | |
3597 | 3644 | | |
| |||
3659 | 3706 | | |
3660 | 3707 | | |
3661 | 3708 | | |
3662 | | - | |
| 3709 | + | |
| 3710 | + | |
| 3711 | + | |
| 3712 | + | |
3663 | 3713 | | |
3664 | 3714 | | |
3665 | 3715 | | |
| |||
4174 | 4224 | | |
4175 | 4225 | | |
4176 | 4226 | | |
| 4227 | + | |
| 4228 | + | |
| 4229 | + | |
| 4230 | + | |
| 4231 | + | |
| 4232 | + | |
| 4233 | + | |
| 4234 | + | |
| 4235 | + | |
| 4236 | + | |
| 4237 | + | |
| 4238 | + | |
| 4239 | + | |
| 4240 | + | |
| 4241 | + | |
| 4242 | + | |
| 4243 | + | |
| 4244 | + | |
4177 | 4245 | | |
4178 | 4246 | | |
4179 | 4247 | | |
| |||
4199 | 4267 | | |
4200 | 4268 | | |
4201 | 4269 | | |
4202 | | - | |
| 4270 | + | |
| 4271 | + | |
| 4272 | + | |
| 4273 | + | |
4203 | 4274 | | |
4204 | 4275 | | |
4205 | 4276 | | |
| |||
4435 | 4506 | | |
4436 | 4507 | | |
4437 | 4508 | | |
4438 | | - | |
| 4509 | + | |
| 4510 | + | |
| 4511 | + | |
| 4512 | + | |
| 4513 | + | |
4439 | 4514 | | |
4440 | 4515 | | |
4441 | 4516 | | |
| |||
4457 | 4532 | | |
4458 | 4533 | | |
4459 | 4534 | | |
4460 | | - | |
| 4535 | + | |
| 4536 | + | |
| 4537 | + | |
| 4538 | + | |
| 4539 | + | |
4461 | 4540 | | |
4462 | 4541 | | |
4463 | 4542 | | |
| |||
4528 | 4607 | | |
4529 | 4608 | | |
4530 | 4609 | | |
4531 | | - | |
| 4610 | + | |
| 4611 | + | |
| 4612 | + | |
| 4613 | + | |
4532 | 4614 | | |
4533 | 4615 | | |
4534 | 4616 | | |
| |||
0 commit comments