Skip to content

Duplicate-path warnings missing from JSON validate output #268

@raifdmueller

Description

@raifdmueller

Description

dacli --verbose --format json validate outputs duplicate-path warnings only to stderr, but they are not included in the JSON output. Since dacli is designed for LLM integration (where consumers typically read only stdout/JSON), these warnings are invisible to automated consumers.

Reproduction

# Warnings visible on stderr:
dacli --verbose --format json validate 2>&1 | grep -i duplicate
# WARNING: Index: Duplicate section path: 'DACLI_TEST_RESULTS_v0.4' (first at .../v0.4.28.md:1, duplicate at .../v0.4.27.md:1)

# But NOT included in JSON output:
dacli --verbose --format json validate 2>/dev/null | python3 -c "
import json,sys
data = json.load(sys.stdin)
print('Warnings in JSON:', len(data['warnings']))
for w in data['warnings']:
    print(f\"  {w['type']}: {w['message']}\")
"
# Output:
# Warnings in JSON: 2
#   unclosed_block: Code block starting at line 6 is not properly closed
#   unclosed_table: Table starting at line 16 is not properly closed
# (no duplicate_path warnings)

Expected Behavior

Duplicate-path warnings should be included in the JSON warnings array, e.g.:

{
  "type": "duplicate_path",
  "path": "DACLI_TEST_RESULTS_v0.4",
  "message": "Duplicate section path (first at .../v0.4.28.md:1, duplicate at .../v0.4.27.md:1)"
}

Impact

LLM integrations that consume only the JSON output will not be aware of duplicate path issues in their documentation.

Related

Environment

  • dacli version: 0.4.26
  • OS: Linux (WSL2)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions