Skip to content

chore(cmd): minor CLI help-text hardening#71

Merged
deveshctl merged 7 commits into
mainfrom
chore/minor-hardening
Jul 7, 2026
Merged

chore(cmd): minor CLI help-text hardening#71
deveshctl merged 7 commits into
mainfrom
chore/minor-hardening

Conversation

@deveshctl

Copy link
Copy Markdown
Owner

Summary

  • MEDIUM-3 completion: fix Use line from [bash|zsh|fish|powershell] (implies optional) to <shell> (required); expand Short to name all four shells
  • MEDIUM-4 cache prune: improve --dry-run flag usage text; replace the two-line terse hint with a three-row command table that surfaces --dry-run explicitly
  • LOW-3 compare: add (exit 1 on regression) to Short; add grep '^verdict:' example to --help Examples
  • LOW-4 build: add flag-ordering note to Long explaining why --engine/--no-cache/--json must appear before build
  • LOW-1 init: add hidden --flavor alias for --flavour so American-spelling users aren't blocked

All changes are help-text or additive-alias only — no behaviour changes.

Test Plan

  • go build ./... passes
  • go vet ./... passes
  • layerx completion --help shows completion <shell> in usage line
  • layerx cache prune (bare) shows the new three-row hint when entries exist
  • layerx compare --help shows (exit 1 on regression) in short description and grep example
  • layerx build --help shows flag-ordering note in Long description
  • layerx init --flavor node works identically to --flavour node

deveshctl added 7 commits July 7, 2026 17:58
AppVeyor sets CI=True; some Kubernetes pipelines use CI=1. The strict
equality check silently opened the TUI instead of running CI checks on
those platforms. Accept any non-empty, non-"0", non-"false" value via
strings.EqualFold, matching npm/yarn and other CI-aware tools.
-math.MinInt64 wraps back to MinInt64 in two's-complement. Compute the
magnitude via uint64 arithmetic (which is overflow-safe) and route it
through a matching uint64 formatter instead of casting back to int64.
If offset ever exceeds len(files) the slice panics. All current
mutation paths reset the offset, but the clamp in the renderer itself
was incomplete — it protected the end index but not the start. One
guard line closes the gap before any future refactor can reopen it.
…n resolver

DOCKER_HOST was checked ahead of CONTAINER_CONNECTION and the active
Podman connection, so a legacy DOCKER_HOST in the environment would
silently shadow an explicit CONTAINER_CONNECTION=staging override. Move
DOCKER_HOST to a last-resort fallback, consulted only when no
Podman-specific env var or config file names a connection.
- completion: fix Use line from [bash|...] to <shell> (MEDIUM-3)
- completion: expand Short to name the four supported shells
- cache prune: improve --dry-run usage text (MEDIUM-4)
- cache prune: replace terse hint with three-row command table
- compare: add (exit 1 on regression) to Short (LOW-3)
- compare: add grep verdict example to --help Examples
- build: document layerx-flag-before-build ordering rule in Long (LOW-4)
- init: add hidden --flavor alias for --flavour (LOW-1)
…DOCKER_HOST order

b4dbcf6 moved DOCKER_HOST below the connections file in resolution order.
Update the test fixture to use an empty Default so DOCKER_HOST is actually
reached as a fallback, which is the scenario the test is documenting.
@deveshctl deveshctl merged commit d3e0b49 into main Jul 7, 2026
13 checks passed
@deveshctl deveshctl deleted the chore/minor-hardening branch July 7, 2026 13:04
@deveshctl deveshctl mentioned this pull request Jul 8, 2026
3 tasks
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