-
Notifications
You must be signed in to change notification settings - Fork 2
Closed
Description
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
- Related to Duplicate paths for files with dots in filename (e.g. version numbers) #266 (duplicate paths for files with dots in filename)
Environment
- dacli version: 0.4.26
- OS: Linux (WSL2)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels