Skip to content

fix(eng-analytics): show current ci health - #70509

Merged
rnegron merged 5 commits into
masterfrom
fix/eng-analytics-current-health
Jul 13, 2026
Merged

fix(eng-analytics): show current ci health#70509
rnegron merged 5 commits into
masterfrom
fix/eng-analytics-current-health

Conversation

@rnegron

@rnegron rnegron commented Jul 13, 2026

Copy link
Copy Markdown
Member

Problem

  • The CI hero could show green from capped, date-scoped data while a low-volume default-branch workflow was failing.

Changes

  • Add a complete 24-hour default-branch health aggregate; the hero reads it instead of the capped workflow leaderboard.
  • Detect main or master in the same window; cap only the returned names.
  • Define the "latest completed run failed" SQL rule once, shared with workflow_health.
  • Prevent stale loader responses and redundant date-filter reloads.

Passing, while the 24h triage feed below keeps history:

pr70509-hero-passing

Failing, with complete count, names preview, and jump link:

pr70509-hero-failing

How did you test this code?

  • Backend engineering analytics tests: 99 passed. The new logic test guards the uncapped complete count, which no leaderboard test covered.
  • Storybook stories for both hero verdicts, rendered and screenshotted locally.
  • Regenerated OpenAPI/MCP types; lint, format, and preflight clean.

Automatic notifications

  • Publish to changelog?
  • Alert Sales and Marketing teams?

Docs update

  • Updated the engineering analytics spec.

🤖 Agent context

Autonomy: Human-driven (agent-assisted)

  • Codex built the initial change with /code-review, /wt, /frontend-design, /writing-kea-logics, /writing-tests, /improving-drf-endpoints, /implementing-mcp-tools, /writing-clickhouse-queries, /running-ci-preflight.
  • Claude reviewed it against the eng-analytics spec and APOSD, extracted the shared latest-run-failed rule, and added the failing-verdict story (/improving-drf-endpoints, /writing-kea-logics, /writing-tests).
  • Review findings led to a lightweight uncapped aggregate instead of reusing the capped workflow leaderboard.

@rnegron rnegron self-assigned this Jul 13, 2026
@github-actions

github-actions Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

🤖 CI report

⚠️ Bundle size — 🔺 +938 B (+0.0%)

Uncompressed size of every built .js bundle, compared against the base branch.

Total: 64.34 MiB · 🔺 +938 B (+0.0%)

No file changed by more than 1000 B.

Posted automatically by build-bundle-size-report · uncompressed bytes from dist-report

Eager graph — within budget

How much code each root ships on the eager path — downloaded and parsed before the surface is interactive. Measured from the esbuild output chunks (post-tree-shake, static imports only); lazy import() / React.lazy chunks are not counted.

Root Eager (shipped) Δ vs base Budget
entry (logged-out pages, app bootstrap)
src/index.tsx
1.21 MiB · 22 files no change ███░░░░░░░ 28.1% of 4.29 MiB
authenticated shell (every logged-in page)
src/scenes/AuthenticatedShell.tsx
8.10 MiB · 2,973 files 🔺 +58 B (+0.0%) █████████░ 87.6% of 9.25 MiB

🟢 node_modules/monaco-editor/ stays out of src/index.tsx
🟢 src/lib/components/ActivityLog/describers stays out of src/index.tsx
🟢 [object Object] stays out of src/index.tsx
🟢 [object Object] stays out of src/index.tsx
🟢 node_modules/monaco-editor/ stays out of src/scenes/AuthenticatedShell.tsx
🟢 src/lib/components/ActivityLog/describers stays out of src/scenes/AuthenticatedShell.tsx
🟢 [object Object] stays out of src/scenes/AuthenticatedShell.tsx
🟢 [object Object] stays out of src/scenes/AuthenticatedShell.tsx

Largest files eagerly shipped from src/index.tsx
Size File
126.8 KiB ../node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom.production.min.js
24.6 KiB ../node_modules/.pnpm/buffer@6.0.3/node_modules/buffer/index.js
6.3 KiB ../node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react.production.min.js
4.5 KiB ../node_modules/.pnpm/@jspm+core@2.1.0/node_modules/@jspm/core/nodelibs/browser/process.js
3.9 KiB ../node_modules/.pnpm/scheduler@0.23.2/node_modules/scheduler/cjs/scheduler.production.min.js
1.4 KiB ../node_modules/.pnpm/base64-js@1.5.1/node_modules/base64-js/index.js
1.3 KiB src/RootErrorBoundary.tsx
912 B ../node_modules/.pnpm/ieee754@1.2.1/node_modules/ieee754/index.js
789 B src/scenes/ChunkLoadErrorBoundary.tsx
668 B src/index.tsx
Largest files eagerly shipped from src/scenes/AuthenticatedShell.tsx
Size File
278.6 KiB ../node_modules/.pnpm/posthog-js@1.399.2/node_modules/posthog-js/dist/rrweb.js
267.7 KiB ../node_modules/.pnpm/@posthog+icons@0.38.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@posthog/icons/dist/posthog-icons.es.js
234.9 KiB src/taxonomy/core-filter-definitions-by-group.json
221.5 KiB ../node_modules/.pnpm/posthog-js@1.399.2/node_modules/posthog-js/dist/module.js
164.0 KiB src/queries/validators.js
154.3 KiB ../node_modules/.pnpm/re2js@0.4.1/node_modules/re2js/build/index.esm.js
126.8 KiB ../node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom.production.min.js
105.9 KiB src/lib/api.ts
93.3 KiB ../node_modules/.pnpm/prosemirror-view@1.40.1/node_modules/prosemirror-view/dist/index.js
90.6 KiB ../node_modules/.pnpm/@tiptap+core@3.20.6_@tiptap+pm@3.20.6/node_modules/@tiptap/core/dist/index.js

Posted automatically by check-eager-graph · sizes are eager output bytes (shipped, post-tree-shake) from the esbuild metafile · part of #32479

⚠️ Dist folder size — 🔺 +59.4 KiB (+0.0%)

Total size of the built frontend/dist folder (all assets), compared against the base branch.

Total: 1278.75 MiB · 🔺 +59.4 KiB (+0.0%)

ℹ️ MCP UI apps size — 31 app(s), 16373.5 KB JS

Built size of each MCP UI app (main.js + styles.css).

App JS CSS
debug 598.2 KB 179.2 KB
action 456.5 KB 179.2 KB
action-list 563.0 KB 179.2 KB
cohort 455.4 KB 179.2 KB
cohort-list 562.0 KB 179.2 KB
email-template 455.3 KB 179.2 KB
error-details 471.1 KB 179.2 KB
error-issue 456.1 KB 179.2 KB
error-issue-list 562.9 KB 179.2 KB
experiment 560.1 KB 179.2 KB
experiment-list 563.8 KB 179.2 KB
experiment-results 561.8 KB 179.2 KB
feature-flag 565.8 KB 179.2 KB
feature-flag-list 569.5 KB 179.2 KB
feature-flag-testing 459.4 KB 179.2 KB
insight-actors 560.8 KB 179.2 KB
invite-email-preview 454.7 KB 179.2 KB
llm-costs 558.1 KB 179.2 KB
session-recording 457.2 KB 179.2 KB
session-summary 462.5 KB 179.2 KB
survey 457.0 KB 179.2 KB
survey-global-stats 560.9 KB 179.2 KB
survey-list 563.7 KB 179.2 KB
survey-stats 560.8 KB 179.2 KB
trace-span 455.8 KB 179.2 KB
trace-span-list 562.9 KB 179.2 KB
workflow 455.8 KB 179.2 KB
workflow-list 562.4 KB 179.2 KB
query-results 743.7 KB 179.2 KB
render-ui 636.0 KB 179.2 KB
visual-review-snapshots 460.3 KB 179.2 KB
⚠️ Playwright — 1 failed

🎭 Playwright report · View test results →

1 failed test:

  • password-protected insight sharing (chromium)

These issues are not necessarily caused by your changes.
Annoyed by this section? Help fix flakies and failures and it will go green!

⚠️ Backend coverage — 97.0% of changed backend lines covered — 2 uncovered

🧪 Backend test coverage

Patch coverage — changed backend lines (products + core): ███████████████████░ 97.0% (66 / 68)

File Patch Uncovered changed lines
products/engineering_analytics/backend/presentation/views.py 75.0% 895–896

🤖 Agents: add a test covering the lines above, or note why under "How did you test this code?". Machine-readable gap list: the patch-coverage artifact on this run (gh run download 29273968487 -n patch-coverage), or the coverage-data block at the end of this comment.

Per-product line coverage (touched products)
Product Coverage Lines
engineering_analytics █████████████████░░░ 87.3% 4,246 / 4,866

Report-only. Patch coverage = changed backend lines covered vs origin/master. Sorted lowest first.
Known gaps: lines covered only by Temporal tests show as uncovered; core line numbers may drift if master changed the same file.

@trunk-io

trunk-io Bot commented Jul 13, 2026

Copy link
Copy Markdown

Static BadgeStatic BadgeStatic BadgeStatic Badge

View Full Report ↗︎Docs

@rnegron
rnegron marked this pull request as ready for review July 13, 2026 16:58
@github-actions

github-actions Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

🦔 Hogbox preview · ❌ build failed

The preview didn't come up for commit 5eeefe6. See the build log for the failing step. It'll retry on the next push.

Comment thread products/engineering_analytics/backend/presentation/views.py
@posthog

posthog Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Visual changes approved by @rnegron — baseline updated in f4e6f9e.

View this run in PostHog

2 changed, 2 new.

@greptile-apps

greptile-apps Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Reviews (1): Last reviewed commit: "Merge remote-tracking branch 'origin/mas..." | Re-trigger Greptile

Comment thread products/engineering_analytics/backend/logic/queries/_workflow_filters.py Outdated
4 updated
Run: 9d3255bc-5083-4a2a-911b-5908c39a954f

Co-authored-by: rnegron <4153103+rnegron@users.noreply.github.com>
@github-actions
github-actions Bot requested a deployment to preview-pr-70509 July 13, 2026 17:55 In progress
@rnegron rnegron added the stamphog Request AI approval (no full review) label Jul 13, 2026

@stamphog stamphog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Adds a new engineering-analytics API endpoint; a real authorization gap (missing scope_object_read_actions entry) and a query correctness issue (timestamp tie-break) were both flagged by agent reviewers on an earlier commit and are confirmed fixed in the current diff, and the author is on the owning team for all changed files.

  • Author wrote 49% of the modified lines and has 29 merged PRs in these paths (familiarity MODERATE).
  • 👍 on the PR from greptile-apps[bot], hex-security-app[bot].
Gate mechanics and policy version
Gate Result
prerequisites all clear
deny-list no deny categories matched
size 334L, 14F substantive, 429L/19F incl. docs/generated/snapshots — within ceiling
tier T1-agent / T1d-complex (429L, 19F, cross-cutting, fix)
stamphog 2.0.0b3 .stamphog/policy.yml @ 0a0a844 · reviewed head 5eeefe6

@rnegron
rnegron merged commit 30eb43c into master Jul 13, 2026
397 of 402 checks passed
@rnegron
rnegron deleted the fix/eng-analytics-current-health branch July 13, 2026 20:47
@deployment-status-posthog

deployment-status-posthog Bot commented Jul 13, 2026

Copy link
Copy Markdown

Deploy status

Environment Status Deployed At Workflow
dev ✅ Deployed 2026-07-13 21:13 UTC Run
prod-us ✅ Deployed 2026-07-13 21:24 UTC Run
prod-eu ✅ Deployed 2026-07-13 21:25 UTC Run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stamphog Request AI approval (no full review)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants