Skip to content

Replace checksum flags with policy option#44

Merged
mtj0928 merged 2 commits into
mainfrom
codex/checksum-policy-cli
Jun 4, 2026
Merged

Replace checksum flags with policy option#44
mtj0928 merged 2 commits into
mainfrom
codex/checksum-policy-cli

Conversation

@mtj0928

@mtj0928 mtj0928 commented May 31, 2026

Copy link
Copy Markdown
Owner

Purpose

This PR replaces checksum-related Boolean CLI flags with a single checksum validation policy option, while preserving the current checksum validation behavior.

User-visible Changes

Checksum behavior is now selected with --checksum-policy skip|warn|require.

For example, allowing a direct artifact bundle URL without providing a checksum changes from a dedicated Boolean flag to an explicit policy value:

# Before
nest install https://example.com/foo.artifactbundle.zip --allow-unverified

# After
nest install https://example.com/foo.artifactbundle.zip --checksum-policy warn

run and bootstrap still accept the released --skip-checksum-validation flag as a hidden compatibility alias. The unreleased --allow-unverified and --require-checksum flags are removed from the public CLI surface.

Core Changes

  • Introduce ChecksumValidationPolicy as the shared policy model for checksum validation.
  • Route CLI parsing through ChecksumValidationPolicyArgument.
  • Replace internal combinations of checksum Booleans with explicit policy values.
  • Keep default behavior warning-based unless NEST_REQUIRE_CHECKSUM requests strict validation.
  • Preserve the direct artifact URL safeguard: installs without a checksum still require an explicit checksum decision.

Details

  • --checksum-policy warn is the explicit allow-with-warning mode for missing checksums.
  • --checksum-policy skip bypasses checksum validation.
  • --checksum-policy require requires checksum validation and reports missing checksums as an error.
  • NEST_REQUIRE_CHECKSUM=1 still maps to require when no CLI policy is provided.
  • --checksum and --checksum-policy skip are mutually exclusive.
  • README examples and checksum guidance are updated to use --checksum-policy.
  • Tests cover policy parsing, hidden compatibility aliases, removed unreleased flags, and direct artifact URL behavior.

Verification

  • swift test
  • git diff --check

@mtj0928 mtj0928 marked this pull request as ready for review May 31, 2026 14:59
@mtj0928 mtj0928 marked this pull request as draft May 31, 2026 15:00
@mtj0928 mtj0928 marked this pull request as ready for review June 1, 2026 11:26
@mtj0928 mtj0928 merged commit c43168a into main Jun 4, 2026
1 check passed
@mtj0928 mtj0928 deleted the codex/checksum-policy-cli branch June 4, 2026 23:37
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