Syntax03 (syntax03)

Status: Final

Purpose

  • Validate that domain labels do not contain a double hyphen in positions 3 and 4, except ACE labels (xn--...).

Preconditions And Inputs

  • Preconditions:
    • A zone.Zone object is available.
  • Required inputs:
    • Child zone name (z.Name).
  • Profile/config knobs that affect behavior:
    • None inside this testcase.

Algorithm And Decision Flow

  1. Emit TEST_CASE_START.
  2. For each label in the tested domain, evaluate labelNotACEHasDoubleHyphen.
  3. Emit DISCOURAGED_DOUBLE_DASH for each label that matches.
  4. If at least one label exists and no issues were emitted, emit NO_DOUBLE_DASH.
  5. Emit TEST_CASE_END.

Emitted Tags (Possible Set)

TagEmitted when
DISCOURAGED_DOUBLE_DASHA non-ACE label has -- in positions 3 and 4.
NO_DOUBLE_DASHDomain labels exist and no discouraged double dash is found.
TEST_CASE_ENDTestcase completion marker is emitted.
TEST_CASE_STARTTestcase start marker is emitted.

Tag Arguments

TagArgument keyTypeMeaning
DISCOURAGED_DOUBLE_DASHlabelstringLabel with discouraged double dash pattern.
DISCOURAGED_DOUBLE_DASHdomainstringTested domain name.
NO_DOUBLE_DASHdomainstringTested domain name.
TEST_CASE_ENDtestcasestringTestcase display name (Syntax03).
TEST_CASE_STARTtestcasestringTestcase display name (Syntax03).

Severity Levels Per Tag

TagLevelNotes
DISCOURAGED_DOUBLE_DASHWARNINGDefault from share/profile.json (test_levels.SYNTAX).
NO_DOUBLE_DASHINFODefault from share/profile.json (test_levels.SYNTAX).
TEST_CASE_ENDDEBUGDefault from share/profile.json (test_levels.SYNTAX).
TEST_CASE_STARTDEBUGDefault from share/profile.json (test_levels.SYNTAX).

Differences From Upstream

  • Upstream reference: syntax03.md
  • Differences (Upstream vs Gonemaster):
    • Upstream file has a textual typo in “Test case identifier” (SYNTAX02 instead of SYNTAX03).
    • Upstream: does not explicitly define this detail. Gonemaster: Runtime behavior matches SYNTAX03 semantics.
  • Potential upstream report:
    • yes
  • If yes, include:
    • Upstream expected behavior: Identifier should match testcase ID SYNTAX03.
    • Gonemaster observed behavior: Testcase executes as syntax03 and emits Syntax03 markers.
    • evidence: docs/specifications/upstream/tests/Syntax-TP/syntax03.md, engine/test/syntax/syntax.go.
    • report status: not filed

Edge Cases And Limitations

  • ACE labels beginning with xn are excluded from this warning, including xn--... labels.
  • If the tested name has zero labels, NO_DOUBLE_DASH is not emitted.