Skip to content

Render unified CI-signal metadata in the PR comment (analyzer#141)#142

Merged
veksen merged 1 commit into
mainfrom
veksen/analyzer-141
Jun 5, 2026
Merged

Render unified CI-signal metadata in the PR comment (analyzer#141)#142
veksen merged 1 commit into
mainfrom
veksen/analyzer-141

Conversation

@veksen
Copy link
Copy Markdown
Member

@veksen veksen commented Jun 5, 2026

The GitHub PR comment now consumes the metadata payload that POST /ci/runs returns, so it speaks the same language as the Slack/webhook alert: postToSiteApi returns { id, url, metadata }, and the run link plus per-query links come straight from the API response (url + metadata.queries) instead of the self-derived /ixr/ci/ route. The comment renders the roll-up line and get_ci_run footer verbatim alongside a small docs link, and degrades cleanly for an unlinked repo (no url, empty queries). Golden/snapshot tests cover the linked, unlinked, no-metadata, and null-docsUrl cases. Per-signal icons are wired through (runMetadata.signalKeys) but intentionally not rendered yet — the image assets don't exist, tracked in Site #3070.

🤖 Generated with Claude Code

Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Query Doctor Analysis

3 queries analyzed

2 pre-existing issues
  • SELECT "guests"."id", "guests"."session_id", "guests"."username", "guests"."avatar_path", "guests"."color", "guests"."side", "guests"."audio_recording_path", "guests"."audio_recording_public", "gue...
    index assets(event_id, inserted_at desc)
    cost 31,003,449 → 1,498 (100% reduction)
  • SELECT * FROM guest_ip_addresses WHERE ip_address = '127.0.0.1';
    index guest_ip_addresses(ip_address)
    cost 154,402 → 8 (100% reduction)

Using assumed statistics (10000000 rows/table). For better results, sync production stats.

Consume the metadata now returned by POST /ci/runs so the GitHub PR
comment speaks the same language as the Slack/webhook alert (analyzer#141).

- postToSiteApi returns { id, url, metadata } instead of just the run id
- the run link and per-query links come straight from the API response
  (url + metadata.queries), replacing the self-derived /ixr/ci route
- the comment renders the roll-up line and get_ci_run footer verbatim,
  plus a small docs link, all sourced from the metadata payload
- everything degrades for an unlinked repo (no url, empty queries)
- golden tests cover the linked, unlinked, no-metadata, and null-docsUrl cases

Per-signal icons are wired through (runMetadata.signalKeys) but not
rendered yet — the image assets don't exist. Tracked in Site #3070.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@veksen veksen force-pushed the veksen/analyzer-141 branch from 8579aa4 to 73f6962 Compare June 5, 2026 21:38
@veksen veksen merged commit 2794e05 into main Jun 5, 2026
6 checks passed
@veksen veksen deleted the veksen/analyzer-141 branch June 6, 2026 00:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant