P10.5: fix 4 pre-existing test failures (output + validation)
outputUtils.formatMsg: fall back to \`<softwareType>_<id>\` when config.general.name is unset — restores the convention the original test expected; safer for nodes whose name isn't required at registration. collectionValidators.validateArray + validateSet: replace \`|| 1\` with \`?? 1\` so explicit minLength: 0 lets through empty arrays. Was swallowing the 0 as falsy and clamping minimum to 1. validationUtils: add public validateCurve wrapper around the helper so callers can validate raw curves without going through validateSchema. Test suite: 170 total / 170 pass (was 4 fail). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -37,7 +37,10 @@ class OutputUtils {
|
||||
const changedFields = this.checkForChanges(output,format);
|
||||
|
||||
if (Object.keys(changedFields).length > 0) {
|
||||
const measurement = config.general.name;
|
||||
// Fall back to `<softwareType>_<id>` when `general.name` is unset —
|
||||
// the original convention before name became a registered config field.
|
||||
const measurement = config.general.name
|
||||
|| `${config.functionality?.softwareType}_${config.general.id}`;
|
||||
const flatTags = this.flattenTags(this.extractRelevantConfig(config));
|
||||
const formatterName = this.resolveFormatterName(config, format);
|
||||
const formatter = getFormatter(formatterName);
|
||||
|
||||
Reference in New Issue
Block a user