diff options
| author | Paul Buetow <paul@buetow.org> | 2026-06-28 09:47:22 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-06-28 09:47:22 +0300 |
| commit | 493f8aa11ce49572fa23ac06ebde323b470e1623 (patch) | |
| tree | c99276320dffe09f707f96b760c30752f3ddf9bb /src/lib/metadata-cache.source.sh | |
| parent | ea9de473e3d6788ea08ca3697722cf89b9d1d107 (diff) | |
mr0: add CONFIG_SPECS registry; derive defaults, CLI targets, print, validation
Introduce src/lib/config.spec.source.sh: CONFIG_SPECS, a single '|'-delimited
config-field registry (name|default|has_default|cli_overridable|validation|
print_kind), using the same spec idiom as ACTION_SPECS / TEMPLATE_RENDER_FIELD_SPECS.
This replaces the parallel, hand-maintained config-knowledge lists that caused the
TARBALL_INCLUDE default-drift bug (fixed in 7r0).
Derived consumers (behaviour byte-identical):
- apply_config_defaults: loops the registry applying VAR="${VAR:-default}" for
has_default=yes scalars; arrays keep their declare -p guards.
- CLI_CONFIG_OVERRIDE_TARGETS: built from cli_overridable=yes (verified to match
CLI_OPTION_SPEC's config= targets exactly).
- print_config: emits in registry order dispatching on print_kind.
- validate_common_config: required set + per-field rule come from the registry via
config_spec_validation + validate_config_field_required/_kind; two-phase order and
historical reporting order preserved.
log_configured_action and the dry-run plan are not yet converted (bespoke prose /
intermixed computed values). shellcheck: TARBALL_SUFFIX lost its visible literal
assignment, annotated at the archive use site.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Diffstat (limited to 'src/lib/metadata-cache.source.sh')
0 files changed, 0 insertions, 0 deletions
