From a79e7d77cc6717f6c5bfaaefa5361f396c322de3 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Wed, 24 Jun 2026 21:36:34 +0300 Subject: Fix TARBALL_INCLUDE config default drift (7r0, scoped down) apply_config_defaults fell back to TARBALL_INCLUDE=no while the user-facing src/shuriken.default.conf documents (and --init writes) TARBALL_INCLUDE=yes. The two disagreed, so an album generated from a config that omitted the key silently dropped the tarball despite the documented default saying otherwise. 'yes' is the authoritative default: the original definition was `declare -r TARBALL_INCLUDE=yes` (tarball inclusion was on from the start); the ':-no' fallback was introduced later during a refactor and drifted from the documented intent. Align apply_config_defaults to ':-yes' and add a comment explaining the invariant and the history. Tests: add test_tarball_include_default_matches_init_config asserting the effective default agrees between a fresh --init config and apply_config_defaults (and is 'yes'); update the omitted-runtime-defaults --print-config expectation to the corrected 'yes'. bin/shuriken regenerated via just build. This is the scoped-down drift fix only. The full CONFIG_SPECS registry plus cfg_get/SHURIKEN_CFG access-layer rewrite proposed in 7r0 remains DEFERRED. just test, just shellcheck, just check-generated and git diff --check all pass. Co-Authored-By: Claude Opus 4.8 --- bin/shuriken | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'bin') diff --git a/bin/shuriken b/bin/shuriken index 30cfa56..280d8b6 100755 --- a/bin/shuriken +++ b/bin/shuriken @@ -4977,7 +4977,11 @@ apply_config_defaults() { THUMB_SUBDIVIDE_PERCENT="${THUMB_SUBDIVIDE_PERCENT:-30}" THUMB_FEATURE_PERCENT="${THUMB_FEATURE_PERCENT:-10}" SYNC_DELETE="${SYNC_DELETE:-yes}" - TARBALL_INCLUDE="${TARBALL_INCLUDE:-no}" + # Default 'yes': a tarball of the incoming dir is included in the dist unless + # disabled. This must match the documented default in shuriken.default.conf + # (TARBALL_INCLUDE=yes) -- it previously drifted to 'no' here. 'yes' is the + # original, authoritative default (tarball inclusion was on from the start). + TARBALL_INCLUDE="${TARBALL_INCLUDE:-yes}" TARBALL_SUFFIX="${TARBALL_SUFFIX:-.tar}" TAR_TIMEOUT="${TAR_TIMEOUT:-120}" if ! declare -p TAR_OPTS >/dev/null 2>&1; then -- cgit v1.2.3