Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

fix(owners): rebuild posthog_owners and hogli when their sources change (#93572)

posthog[bot]fcf8548a91cf
diff --git a/tools/hogli/pyproject.toml b/tools/hogli/pyproject.toml
index 5008a4a4989a..96c83ead5a21 100644
--- a/tools/hogli/pyproject.toml
+++ b/tools/hogli/pyproject.toml
@@ -50,6 +50,15 @@ Repository = "https://github.com/PostHog/posthog"
[tool.hatch.build.targets.wheel]
packages = ["src/hogli"]
+[tool.uv]
+exclude-newer = "7 days"
+# uv keys the built wheel on pyproject.toml alone by default, so a source-only change leaves
+# the stale wheel in the cache and uv installs it again. List the sources to key on them too.
+cache-keys = [
+ { file = "pyproject.toml" },
+ { file = "src/hogli/**/*.py" },
+]
+
[tool.pytest.ini_options]
testpaths = ["tests"]
pythonpath = ["src", "scripts"]
diff --git a/tools/owners/pyproject.toml b/tools/owners/pyproject.toml
index 739cf6ce41ae..329ce936fe34 100644
--- a/tools/owners/pyproject.toml
+++ b/tools/owners/pyproject.toml
@@ -48,6 +48,15 @@ Repository = "https://github.com/PostHog/posthog"
[tool.hatch.build.targets.wheel]
packages = ["posthog_owners"]
+[tool.uv]
+exclude-newer = "7 days"
+# uv keys the built wheel on pyproject.toml alone by default, so a source-only change leaves
+# the stale wheel in the cache and uv installs it again. List the sources to key on them too.
+cache-keys = [
+ { file = "pyproject.toml" },
+ { file = "posthog_owners/**/*.py" },
+]
+
[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = "-p no:warnings -p no:django"