Tags

This directory contains per-module tag catalogs for gonemaster.

Each catalog lists all tags that can be emitted by a module’s testcases, together with the default severity level, which testcase(s) emit the tag, and the i18n coverage status across the supported locale files.

Files

FileModuleTags
address.mdADDRESSaddress01-address03
basic.mdBASICbasic01-basic03
connectivity.mdCONNECTIVITYconnectivity01-connectivity04
consistency.mdCONSISTENCYconsistency01-consistency06
delegation.mdDELEGATIONdelegation01-delegation07
dnssec.mdDNSSECdnssec01-dnssec19
nameserver.mdNAMESERVERnameserver01-nameserver15
syntax.mdSYNTAXsyntax01-syntax08
zone.mdZONEzone01-zone12

Structure Of Each Catalog

Every per-module catalog contains:

  • Module header - module name, metadata source file, profile.json key, and the tool used to generate the file.
  • Tag table - one row per unique tag the module can emit:
    • Tag - tag name as it appears in log entries.
    • Level - default severity from share/profile.json (configurable at runtime).
    • Testcase(s) - which testcase(s) in the module declare the tag in their Metadata().
    • i18n - whether the tag has an entry in the bundled locale files.
  • i18n notes - lists of tags missing from locale files and stale locale entries (present in PO files but absent from current code metadata).

Severity Levels

Levels are ordered from least to most severe:

LevelNumericMeaning
DEBUG3-2Lowest-detail internal tracing
DEBUG2-1Detailed internal tracing
DEBUG0Internal diagnostic
INFO1Informational result
NOTICE2Notable but not an error
WARNING3Potential problem
ERROR4Clear protocol or policy violation
CRITICAL5Fatal condition; testing cannot continue

Levels are set per tag in share/profile.json under test_levels.<MODULE>. Any tag not listed in profile.json has no configured level and will use the engine’s fallback (treat as unknown).

Shared Tags

Several tags appear across multiple modules. Each module that can emit them declares them in its own Metadata() function and has its own profile.json entry (the level may differ between modules):

TagAppears in
TEST_CASE_STARTall modules
TEST_CASE_ENDall modules
IPV4_DISABLEDbasic, connectivity, consistency, delegation, dnssec, nameserver, syntax
IPV4_ENABLEDbasic
IPV6_DISABLEDbasic, connectivity, consistency, delegation, dnssec, nameserver, syntax
IPV6_ENABLEDbasic
LOOP_PROTECTIONbasic
NO_RESPONSEconsistency, delegation, dnssec, nameserver, syntax, zone

How The Catalogs Are Generated

The catalogs are generated by:

go run ./tools/specifications/generate-tag-catalog/

The generator reads:

  • engine/test/<module>/<module>.go - Metadata() functions (via the specdata package).
  • share/profile.json - default severity levels.
  • share/lang/*.po - bundled locale files for i18n coverage.

Regenerate after any change to module Metadata() functions or profile.json.

Drift Detection

The existing spec validator (tools/specifications/validate/) checks that:

  • every implemented testcase has a canonical spec file,
  • every tag declared in metadata appears in the testcase spec, and
  • every tag in the spec is declared in metadata.

Tag catalog drift (tag in code but absent from catalog, or vice versa) is detected by re-running the generator and comparing the output to the committed files:

go run ./tools/specifications/generate-tag-catalog/ --check

The --check flag causes the generator to diff generated content against the on-disk files and exit non-zero if they differ.

i18n Reconciliation

The msgctxt "MODULE:TAG" entry in each .po file identifies which messages are used for which module/tag pair. A tag is considered covered if at least one locale file contains a matching msgctxt.

Legacy #. MODULE:TAG comments are still recognized by the generator, but msgctxt is the canonical source.

Missing entries mean the tag will be rendered as its raw tag string in translated output. Stale entries mean the PO file references a tag that no longer exists in the codebase.

Use docs/specifications/tags/generate-tag-catalog notes sections to track the i18n debt per module.