-
Notifications
You must be signed in to change notification settings - Fork 0
cnb: dispatcher keep lead working, not nudge dev idle (#223) #244
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
89dc821
346a51c
020aaf5
dc2f81d
94b0c6d
573edcf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| 0.5.76-dev | ||
| 0.5.79-dev | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,6 +5,7 @@ Uses a declarative command registry with lazy module imports instead of | |
| if/elif chains and ad-hoc lambda dicts. | ||
| """ | ||
|
|
||
| import os | ||
| import sys | ||
| from dataclasses import dataclass, field | ||
| from importlib import import_module | ||
|
|
@@ -318,6 +319,14 @@ COMMANDS: list[Command] = [ | |
| needs_identity=False, | ||
| aliases=["m"], | ||
| ), | ||
| Command( | ||
| "update-check", | ||
| "lib.update_check", | ||
| "cmd_update_check", | ||
| "check for stale cnb install", | ||
| "update-check [--force]", | ||
| needs_identity=False, | ||
| ), | ||
| # ── maintenance ── | ||
| Command( | ||
| "prune", | ||
|
|
@@ -400,6 +409,24 @@ def print_help() -> None: | |
| # --------------------------------------------------------------------------- | ||
|
|
||
|
|
||
| def _maybe_check_update(env: ClaudesEnv, cmd_name: str) -> None: | ||
| """Silent best-effort version check. Never blocks the dispatch. | ||
|
|
||
| Skipped for `update-check` itself (the command does its own check) and when | ||
| the explicit opt-out env is set. | ||
| """ | ||
| if os.environ.get("CNB_SKIP_UPDATE_CHECK") == "1": | ||
| return | ||
| if cmd_name == "update-check": | ||
| return | ||
| try: | ||
| from lib.update_check import _read_local_version, check_update | ||
|
|
||
| check_update(env, _read_local_version(env.install_home)) | ||
| except Exception: | ||
| pass | ||
|
|
||
|
|
||
| def main() -> None: | ||
| env = ClaudesEnv.load() | ||
| db = BoardDB(env) | ||
|
|
@@ -426,6 +453,7 @@ def main() -> None: | |
| if identity: | ||
| validate_identity(db, identity) | ||
|
|
||
| _maybe_check_update(env, cmd.name) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When a stale cache exists and no Useful? React with 👍 / 👎. |
||
| _dispatch(cmd, db, identity, rest) | ||
|
|
||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
VERSIONis the canonical input forbin/sync-version --check, which expectspackage.jsonto match it andpyproject.tomlto contain the PEP 440 form. This change setsVERSIONto0.5.79-devwhile the other two files are0.5.78, so the documented PR/release check fails and the installed runtime version can diverge from the package metadata.Useful? React with 👍 / 👎.