Problem
The dbt/SQL review feature emits no telemetry. cli/cmd/review.ts and altimate/review/run.ts contain no Telemetry references, and the CLI path creates no session, so it never picks up session_start either.
We can't answer basic questions about it: how often it runs, whether it's run by a person or by an agent, whether it finds anything, or whether results get published.
Also: callers are indistinguishable
Flag.ALTIMATE_CLI_CLIENT is already stamped as source on every event, but only cli/cmd/acp.ts sets it. Every other entry point reports the default cli, so a plugin, a CI job and a human look identical.
Proposal
Two events emitted from a shared helper used by both callers of the review engine — the review command and the dbt_pr_review tool — distinguished by an invocation field:
review_run — one per engine invocation, status: completed | failed, plus verdict, mode, tier, and finding counts by severity and category
review_post_outcome — publication result, CLI path only
Caller attribution needs no code change: if the new events don't declare a source field, the envelope's existing process-level value passes through, so a caller that exports ALTIMATE_CLI_CLIENT is attributed automatically.
Enums, booleans and counts only. Review findings are about customer schema, so no file paths, model or column names, finding text, SQL or diff content.
Problem
The dbt/SQL review feature emits no telemetry.
cli/cmd/review.tsandaltimate/review/run.tscontain noTelemetryreferences, and the CLI path creates no session, so it never picks upsession_starteither.We can't answer basic questions about it: how often it runs, whether it's run by a person or by an agent, whether it finds anything, or whether results get published.
Also: callers are indistinguishable
Flag.ALTIMATE_CLI_CLIENTis already stamped assourceon every event, but onlycli/cmd/acp.tssets it. Every other entry point reports the defaultcli, so a plugin, a CI job and a human look identical.Proposal
Two events emitted from a shared helper used by both callers of the review engine — the
reviewcommand and thedbt_pr_reviewtool — distinguished by aninvocationfield:review_run— one per engine invocation,status: completed | failed, plus verdict, mode, tier, and finding counts by severity and categoryreview_post_outcome— publication result, CLI path onlyCaller attribution needs no code change: if the new events don't declare a
sourcefield, the envelope's existing process-level value passes through, so a caller that exportsALTIMATE_CLI_CLIENTis attributed automatically.Enums, booleans and counts only. Review findings are about customer schema, so no file paths, model or column names, finding text, SQL or diff content.