posthog icon indicating copy to clipboard operation
posthog copied to clipboard

chore(alerts): update product alerting scheduling skill

Open MattPua opened this issue 4 months ago • 5 comments

Problem

The product alerting skill described calendar scheduling as product-owned, but scheduling is now shared alerts infrastructure.

Changes

  • Document shared cadence, calendar, restriction, and grid scheduling APIs
  • Clarify product ownership and extension boundaries

How did you test this code?

  • Skill lint passed
  • Targeted frontmatter, link, and diff checks passed
  • Full skill bundle build was blocked by unavailable local Postgres

Automatic notifications

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

Docs update

Updated the product alerting skill and its reference docs.

🤖 Agent context

Autonomy: Human-driven (agent-assisted)

Codex updated the skill after comparing it with the shared scheduling implementation in #71593. Skills invoked: /writing-skills and /adding-product-alerting.


Created with PostHog Code

MattPua avatar Jul 16 '26 22:07 MattPua

Hey @MattPua! 👋

It looks like your git author email on this PR isn't your @posthog.com address ([email protected]). Since you're on the PostHog team, it's worth pointing your local git author email at your @posthog.com address. Why it matters:

  • Consistent work identity in git history — internal tooling that attributes commits to team members keys off your @posthog.com address.
  • Keeps team contributions easy to tell apart from external community ones when scanning history.

You can fix it for this repo with:

git config user.email "[email protected]"

Or set it globally with git config --global user.email "[email protected]". No need to redo this PR — just a nudge for next time. 🙂

github-actions[bot] avatar Jul 16 '26 22:07 github-actions[bot]

[!NOTE] 🤖 stamphog reviewed a404d4b9548e6762e805716421c211b71a2f20a4 — verdict: ESCALATE

The updated skill instructs future implementers to import CalendarInterval, to_calendar_interval, next_calendar_check_time, scan_next_unblocked_utc, is_weekend, validate_and_normalize_schedule_restriction, and parse_blocked_windows_tuples from products/alerts/backend/scheduling.py — but that module doesn't exist in the codebase, and none of those calendar/restriction helpers live there (the restriction ones are in posthog/tasks/alerts/schedule_restriction.py, and common/alerting/scheduling.py only has the two fixed-cadence functions). This confirms Greptile's inline concern, which the diff does not address despite being marked resolved — following this skill as written would produce an ImportError in any code an agent generates from it.

  • 👍 on the PR from greptile-apps[bot], hex-security-app[bot].
  • Skill documents importing CalendarInterval, to_calendar_interval, next_calendar_check_time, scan_next_unblocked_utc, is_weekend, validate_and_normalize_schedule_restriction, and parse_blocked_windows_tuples from products/alerts/backend/scheduling.py, but that module does not exist anywhere in the repo (verified via grep across the whole tree).
  • The schedule-restriction helpers actually live in posthog/tasks/alerts/schedule_restriction.py, not products/alerts/backend/scheduling.py as documented — the import path in the new example is wrong even for the functions that do exist somewhere.
  • Greptile's inline review comment ('Shared Import Contract May Be Missing') raised exactly this concern; it is marked [resolved] but the diff's import block is unchanged, so the concern is not actually addressed.
Gate mechanics and policy version
Gate Result
prerequisites ✓ all clear
deny-list ✓ no deny categories matched
size ✓ 0L, 0F substantive, 64L/4F incl. docs/generated/snapshots — within ceiling
tier ✓ T0 auto-approve: T0-deterministic (64L, 4F, single-area, chore)
stamphog 2.0.0b3 .stamphog/policy.yml @ 5a97a5c · reviewed head a404d4b

Updated in place — this replaces 1 earlier stamphog review(s) on this PR.

stamphog[bot] avatar Jul 16 '26 22:07 stamphog[bot]

Reviews (1): Last reviewed commit: "chore(alerts): update product alerting s..." | Re-trigger Greptile

greptile-apps avatar Jul 16 '26 22:07 greptile-apps

[!NOTE] 🤖 stamphog review failed before producing a verdict

Check the workflow run and re-apply the label to retry.

stamphog[bot] avatar Jul 16 '26 22:07 stamphog[bot]

[!NOTE] 🤖 stamphog review failed before producing a verdict

Check the workflow run and re-apply the label to retry.

stamphog[bot] avatar Jul 16 '26 22:07 stamphog[bot]

Static Badge   Static Badge   Static Badge   Static Badge

View Full Report ↗︎ ⋅ Docs

trunk-io[bot] avatar Jul 17 '26 13:07 trunk-io[bot]

Deploy status

Environment Status Deployed At Workflow
dev :white_check_mark: Deployed 2026-07-17 14:23 UTC Run
prod-us :white_check_mark: Deployed 2026-07-17 14:45 UTC Run
prod-eu :white_check_mark: Deployed 2026-07-17 14:45 UTC Run