Analytics Agent checks reports at three levels: document → blocks → queries. The idea is simple: a reader never sees a broken report — everything is caught before publishing, and every error comes with an AI fix button next to it.
Document level
MISSING_TITLE— the document has no title;NO_BLOCKS— a document without blocks;MISSING_BLOCK_ID— a block has no ID;DUPLICATE_BLOCK_ID— a duplicate block ID;INVALID_BLOCK_WIDTH— a block width outside the 1–24 range;EMPTY_BLOCK_CONFIG— an empty block configuration;INVALID_ACCESS_LEVEL— an unknown access level;DUPLICATE_QUERY_ID,DUPLICATE_OVERRIDE_ID— duplicate query and override IDs;INVALID_VIEWS,DUPLICATE_VIEW_NAME,UNKNOWN_VIEW_BLOCK,MISSING_FILTER_VARIABLE,INVALID_PARAMETER_TYPE— errors in report settings: tabs, filters and what-if fields.
Content level
- the block type is known to the registry — a typo in
contentTypeis caught immediately; queryIdreferences exist, the query’s source is found (DATA_SOURCE_NOT_FOUND);- the chart configuration is filled in: columns are set (
EMPTY_CONTENT_DATA,INVALID_CONTENT_DATA_TYPE).
Query level
SQL queries are validated before execution: syntax, columns, sources. Details in the Queries section.
Background validation
- all documents are checked automatically, in the background;
- results are stored — repeated checks don’t load the server;
- when document files change — an immediate re-check.
API and display
POST /api/validation/document— document validation;POST /api/validation/content— block content validation;GET /api/validation/data-sources— data source checks;- errors are shown in the interface next to the block — with the “Fix with AI” button (details in the agent in the report).