Skip to content

TextValidator/SdkAnalyzer: name offending label ids and summarise missing labels#79

Open
rousso wants to merge 2 commits into
developfrom
feature/text-validator-name-label-ids
Open

TextValidator/SdkAnalyzer: name offending label ids and summarise missing labels#79
rousso wants to merge 2 commits into
developfrom
feature/text-validator-name-label-ids

Conversation

@rousso
Copy link
Copy Markdown
Contributor

@rousso rousso commented Jun 5, 2026

What

Two related changes that make missing-label problems actionable from the analyzer output.

1. Name the offending identifier in the message. TextValidator now reports which label identifier it found inside a label's text, e.g. Label in RO contains label identifier(s): expression|name|906.

2. End-of-run missing-labels summary. Missing-label identifiers are carried structurally on ValidationResult and aggregated into a deduplicated report at the end of a run, split into two sections:

  • Labels found missing from the export — referenced by the SDK but not present (the drools Referenced label … does not exist rules).
  • Labels assumed missing during export — identifier left in label text by the exporter when it could not resolve the label (TextValidator).

Each identifier is listed once with its reference count.

3. --verbose flag. Without it, the thousands of individual missing-label errors are suppressed in favour of the summary, and a hint points to --verbose for the per-occurrence detail. The error count and exit code are unchanged either way.

Notes

  • The two checks are disjoint in practice (expression ids via the text fallback; business-entity/rule-text ids via structural references), so the found/assumed split is clean.
  • Tests: existing tedefo-3301 scenarios and the full suite (177) pass; TextValidatorTest extended to assert the named ids and the ASSUMED kind.

The check now names the identifier(s) found in a label's text (e.g. expression|name|906) instead of only stating that one is present, so the missing label can be identified directly.
@rousso rousso self-assigned this Jun 6, 2026
Missing-label identifiers are carried structurally on ValidationResult and reported at the end of a run in two sections: found missing (referenced by the SDK but absent) and assumed missing (identifier left in label text by the exporter), deduplicated with reference counts. Without --verbose the individual missing-label errors are suppressed in favour of the summary; the error count and exit code are unchanged.
@rousso rousso changed the title TextValidator: name the offending label identifier(s) in the error message TextValidator/SdkAnalyzer: name offending label ids and summarise missing labels Jun 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant