Remove technical parameter values from .nhd files (#217)#652
Open
zaucker wants to merge 1 commit into
Open
Conversation
Technical parameter values are now sourced exclusively from technical.cfg. The redundant `value = X` lines in the `*** technical ***` sections of the .nhd model files were stale and are removed (1069 lines across v6.5.2 + v7.0.0). To make the cfg the single source of truth: - Environment now carries one `technical` hash (the cfg values); the old `.nhd` fallback (`technical-override // technical`) is gone. A lookup of a parameter with no value now dies loudly, naming the parameter and module, instead of silently returning an undefined value. Environment gained a `taxonomy` attribute for that message. - Model::Technical's TWEAK only coerces `value` when one is present, so a parameter declaration may legitimately have no value. - The 18 v7.0.0 parameters that were only defined in .nhd are moved into share/Models/version7.0.0/technical.cfg (v6.5.2 had none). Test fixtures that relied on the removed fallback now ship a technical.cfg and load it, mirroring production. Adds t/technical-missing.rakutest covering the die guard. Verified: full unit suite green (547 tests); model outputs are byte-identical to main for Base + Kantonal_LU on both versions. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #217.
Technical parameter values are now sourced exclusively from
technical.cfg. The redundantvalue = Xlines in the*** technical ***sections of the.nhdmodel files were stale and have been removed (1069 lines across v6.5.2 + v7.0.0).Changes
To make the cfg the single source of truth:
Environmentnow carries onetechnicalhash (the cfg values); the old.nhdfallback (technical-override // technical) is gone. A lookup of a parameter with no value now dies loudly, naming the parameter and module, instead of silently returning an undefined value.Environmentgained ataxonomyattribute for that message.Model::TechnicalTWEAK only coercesvaluewhen one is present, so a parameter declaration may legitimately have no value..nhdare moved intoshare/Models/version7.0.0/technical.cfg(v6.5.2 had none).value =lines stripped from the.nhdfiles (declarations — name/units/description — are kept).Test fixtures that relied on the removed fallback now ship a
technical.cfgand load it, mirroring production. Addst/technical-missing.rakutestcovering the die guard.Verification
mainfor Base + Kantonal_LU on both versions (diffed a numeric dump of ~5660 output values from this branch vs a pristinemainworktree).Note for reviewers
Output-equality and die-coverage were verified for Base + Kantonal_LU only. The strip removes values for all variants, so an
.nhd-only parameter live only in some other variant would nowdie. The knownSingle_oldones (er_App_cattle_liquid/er_App_pigs_liquid) are among the 18 moved, but a full all-variant scan was not performed.🤖 Generated with Claude Code