Skip to content

feat(cli): add version + self-update commands and parameterized installer tests#11

Merged
sunerpy merged 1 commit into
mainfrom
feat/cli-tests-version-selfupdate
Jun 22, 2026
Merged

feat(cli): add version + self-update commands and parameterized installer tests#11
sunerpy merged 1 commit into
mainfrom
feat/cli-tests-version-selfupdate

Conversation

@sunerpy

@sunerpy sunerpy commented Jun 22, 2026

Copy link
Copy Markdown
Owner

Summary

  • codegraph version subcommand (mirrors --version).
  • codegraph self-update — upgrade the binary in place from the latest GitHub release (mise-style: platform detection, asset download, atomic replace) via the self_update crate. Flags: --check, --force, --tag <vX.Y.Z>.
  • Test stack (dev-only): rstest + assert_fs + assert_cmd + predicates. New parameterized installer regression tests lock the JSONC comment/key-order preservation + no-clobber contract across targets — the gap that let the earlier config-overwrite bug ship.
  • Docs: version + self-update documented in the English and Chinese READMEs (subcommand tables bumped to 19, dedicated sections added).

Verification

  • make ci components green: fmt clean, clippy -D warnings clean, full workspace tests pass (serial), guardrail PASS.
  • 11 new parameterized tests pass (comment preservation, key-order, idempotent no-op, unparseable-not-clobbered, version==--version, self-update --help).
  • Manual QA: version, --version, self-update --check (real GitHub query) all verified.
  • No forbidden crates (guardrail); self_update uses rustls + tar + flate2 only.

…ller tests

Add a `version` subcommand (mirrors `--version`) and a `self-update` command
that upgrades the binary in place from the latest GitHub release (mise-style:
platform detection, asset download, atomic replace) via the self_update crate,
with --check / --force / --tag.

Add a dev-only test stack (rstest + assert_fs + assert_cmd + predicates) and
parameterized installer regression tests covering the JSONC comment/key-order
preservation and no-clobber contract across targets — the gap that let the
earlier config-overwrite bug ship.

Document version and self-update in the English and Chinese READMEs.
@sunerpy sunerpy merged commit 62bb65d into main Jun 22, 2026
3 checks passed
@sunerpy sunerpy deleted the feat/cli-tests-version-selfupdate branch June 22, 2026 03:15
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.

1 participant