3.0 KiB
3.0 KiB
Configuration Hardening Audit
This audit records the current repository-configuration authority model for
sow-toolkit.
Authority Rules
- Human-authored root repository configuration is YAML:
nwn-tool.yaml, thennwn-tool.yml. nwn-tool.jsonis legacy compatibility only. It remains readable during the migration window and is reported as deprecated provenance.- Generated and machine-readable artifacts remain JSON. This includes HAK manifests, canonical GFF JSON, topdata datasets, autogen manifests, caches, wiki state, deploy manifests, and credits inventories.
- Toolkit defaults are centralized in
internal/project/effective.goand are visible throughsow-toolkit config effective. - Environment variables are treated as runtime overrides and are listed by
sow-toolkit config sourcesandconfig effective. Sensitive values are masked.
Implemented Schema Expansion
paths.cache,paths.toolsoutputs.module_archive,outputs.hak_manifest,outputs.hak_archivebuild.keep_existing_haksinventory.source_extensions,inventory.asset_extensions,inventory.source_json_patternvalidation.profile,validation.builtin_script_prefixes, andvalidation.required_fieldsscripts.source_dir,scripts.cache,scripts.compilerextract.layout,extract.hak_discovery,extract.cleanup_staletopdata.compiled_2da_dir,topdata.compiled_tlk, package names, and wiki output/deploy defaultsautogen.cache.root,autogen.cache.max_age,autogen.cache.refresh_env, and release-source env names
Remaining Engine Invariants
These are intentionally still implemented as toolkit behavior rather than repository-specific YAML:
- Canonical GFF JSON shape.
- ERF/MOD/HAK binary serialization.
- Supported autogen algorithms:
parts_rows,head_visualeffects,trailing_numeric_suffix,model_stem, andfirst_path_segment. - Native topdata dataset internals and generated JSON dataset formats.
- NWN validator resource-reference checks. These are candidates for future validation profiles, but are not repository-specific defaults.
Migration Checklist
For each consumer repository:
- Confirm root config is
nwn-tool.yamlornwn-tool.yml. - Remove root
nwn-tool.jsonunless it is a deliberate test fixture. - Run
sow-toolkit config effective --jsonand record generated output, cache paths, HAK manifest paths, topdata package names, script compiler resolution policy, and active overrides. - Move wrapper-provided environment behavior into YAML where it is stable repository policy.
- Keep credentials and one-off CI values as runtime overrides.
- Run build/validate workflows and compare generated JSON artifacts.
Follow-Up Tickets
- Remove legacy root JSON loading after all active repositories migrate.
- Add validation-profile schema if repositories need to vary validator rules.
- Complete the separate music dataset refactor described in
MUSIC_REFACTOR_CONTRACT.md. - Add static linting for new repository-specific literals in command and pipeline code.