Skip to content

chore(ci): group product duration keys in one pass - #131353

Merged
trunk-io[bot] merged 1 commit into
masterfrom
posthog/ci-group-product-duration-keys
Nov 7, 2026
Merged

trunk-io[bot] merged 1 commit into
masterfrom
posthog/ci-group-product-duration-keys

Conversation

@posthog

@posthog posthog Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Problem

The hourly timing collector repeats a full duration-map scan for each product.

Why: Remove repeated processing work while keeping sharding weights stable.

Origin

  • Scout: a custom scout
  • First signal: 2026-11-07
  • Inbox report: open
  • Task started by: a person, from the inbox

Changes

  • Group product keys once with the existing module parser, preserving key order and summation order.
  • Expected effect: less product-scaling CPU work. Complete-job savings remain unverified.

How did you test this code?

  • Ran the optimizer unit suite, Ruff, and CI preflight.
  • Paired local probes preserved ordered output; raw-artifact benchmarking needs Depot access.

Test rationale: Existing scaling, scoping, marker, missing-JUnit, and drift tests cover this internal optimization.

Post-merge check: compare five matched hourly jobs, all attempts, memory, and downstream maps.

Release status

  • No feature flag controls this change

Docs update

  • None. Internal performance only.

🤖 Agent context

Autonomy: Fully autonomous

Agent: Codex, gpt-6.1-sol

More context for AI agents
  • Session: Scout report; GitHub CLI and PostHog tools.
  • Decisions: No matching open optimizer PR found. No timing data or logs added to the repository.
  • Follow-ups: Run complete raw-artifact cold/warm comparisons when Depot read access is available. No fleet or cash savings claim.
  • Read closely: Product grouping preserves exact directory boundaries and per-module insertion order.

Skills: /verifying-changes, /writing-tests, /splitting-oversized-modules, /running-ci-preflight, /writing-pr-descriptions, /reducing-ci-costs, /pr-shepherd.


Created with PostHog Desktop

Generated-By: PostHog Desktop
Task-Id: d8a10cfd-75b8-4bde-9346-bddffe866a2e
@posthog posthog Bot added the self-driving label Nov 7, 2026
@trunk-io

trunk-io Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

😎 Merged successfully - details.

@posthog
posthog Bot requested a review from pauldambra November 7, 2026 10:30
@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

🤖 CI report

⚠️ Trunk lane — backend Python lane

This PR is assigned to the backend Python lane. It runs backend Python tests and may merge in parallel with PRs in other lanes.

✅ Duplication (Python) — clean

New Python code duplication introduced by this branch. Fails at 70+ tokens in app code, or 150+ tokens when both copies live in test files. Advisory while the gate proves itself: extract a shared helper instead of copying.

✅ Duplication (TypeScript) — clean

New TypeScript code duplication introduced by this branch. Fails at 70+ tokens in app code, or 150+ tokens when both copies live in test files. Advisory while the gate proves itself: extract a shared helper instead of copying.

@posthog posthog Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

PostHog Review · Standard · reviewed 643f3c6: no findings.

@posthog

posthog Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor Author

Robot: QA Swarm review complete.

Note

🤖 Automated comment by QA Swarm. This is not a human review.

Verdict: ✅ APPROVE (round 1 @ 643f3c6)

No actionable findings. Grouping preserves key order and scaling order.

Key findings

None.

Convergence

No findings to compare.

Reviewer summaries

Reviewer Assessment
Router (gpt-6.1-sol) Low risk, high confidence. No specialist review needed.

Automated by QA Swarm. This is not a human review.

@posthog
posthog Bot marked this pull request as ready for review November 7, 2026 10:33
@parameterai

parameterai Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

Risk: No findings

The PR replaces a per-module startswith("products/<module>/") scan of the duration map in scale_products_to_junit with a single pass that groups keys by product_module(key). It is a behavior-preserving internal CI optimization with no security-relevant surface, and I verified the new grouping is exactly equivalent to the old prefix filter for all edge cases I could construct.

Sentinel reviewed 643f3c6 · Review settings

@posthog posthog Bot added the stamphog Request AI approval (no full review) label Nov 7, 2026
@posthog
posthog Bot requested a review from a team November 7, 2026 10:52
@stamphog

stamphog Bot commented Nov 7, 2026

Copy link
Copy Markdown

stamphog does not review bot-authored pull requests, so the trigger label has been removed. This change needs a human reviewer.

@stamphog stamphog Bot removed the stamphog Request AI approval (no full review) label Nov 7, 2026
@trunk-io
trunk-io Bot merged commit 724d0cc into master Nov 7, 2026
354 of 355 checks passed
@trunk-io
trunk-io Bot deleted the posthog/ci-group-product-duration-keys branch November 7, 2026 20:24
@deployment-status-posthog

deployment-status-posthog Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

Deploy status

Environment Status Deployed At Workflow
dev ✅ Deployed 2026-11-07 20:43 UTC Run
prod-us ✅ Deployed 2026-11-07 20:59 UTC Run
prod-eu ✅ Deployed 2026-11-07 20:58 UTC Run

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant