: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.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
chore(devex): streamline codex commands (#71699)
Raúl Negrón-Otero57eda7753242
diff --git a/.codex/config.toml b/.codex/config.tomlindex 56caeeb903a8..f2c895fb63bb 100644--- a/.codex/config.toml+++ b/.codex/config.toml@@ -1,12 +1,12 @@developer_instructions = """-Run commands that depend on PostHog's development environment through-`bash "$(git rev-parse --show-toplevel)/.codex/with-flox" <command> [args...]`.+Run commands that depend on PostHog's development environment from the repository+root through `.codex/with-flox <command> [args...]`.This includes hogli, Python and uv, Node.js and pnpm, Rust and Go, and local-stackcommands. Basic filesystem, Git, and GitHub commands can run directly. Never use-a dependency executable inherited from another checkout. If the wrapper reports-that setup or a dependency change needs elevated execution, rerun that same-wrapper command with elevated permissions. Dependency changes also apply the-existing dev sandbox.+a dependency executable inherited from another checkout. Request elevated+execution on the first attempt for environment preparation, dependency changes,+and local-stack lifecycle commands. Dependency changes also apply the existing+dev sandbox."""[sandbox_workspace_write]diff --git a/.codex/environments/environment.toml b/.codex/environments/environment.tomlindex 7f26237e56f9..bb1e6339ed2d 100644--- a/.codex/environments/environment.toml+++ b/.codex/environments/environment.toml@@ -2,4 +2,4 @@ version = 1name = "posthog"[setup]-script = "bash .codex/with-flox --prepare true"+script = ".codex/with-flox --prepare true"diff --git a/.codex/with-flox b/.codex/with-floxold mode 100644new mode 100755index 56d4432fc29f..6f0593af44f9--- a/.codex/with-flox+++ b/.codex/with-flox@@ -9,7 +9,7 @@ if [[ "${1:-}" == "--prepare" ]]; thenfiif (($# == 0)); then- echo "usage: bash .codex/with-flox [--prepare] <command> [args...]" >&2+ echo "usage: .codex/with-flox [--prepare] <command> [args...]" >&2exit 2fi@@ -187,7 +187,7 @@ fiif [[ "$prepare" -eq 0 ]]; thenif [[ ! -f "$env_file" ]]; then- echo "error: Codex environment is not prepared; run 'bash $repo_root/.codex/with-flox --prepare true'" >&2+ echo "error: Codex environment is not prepared; run '$repo_root/.codex/with-flox --prepare true'" >&2exit 1fi@@ -221,7 +221,7 @@ if [[ "$prepare" -eq 0 ]]; thencached_variables=$((cached_variables + 1))done < "$env_file"if [[ "$cached_variables" -eq 0 || "$cached_fingerprint" != "$(environment_fingerprint)" ]]; then- echo "error: Codex environment is stale; run 'bash $repo_root/.codex/with-flox --prepare true'" >&2+ echo "error: Codex environment is stale; run '$repo_root/.codex/with-flox --prepare true'" >&2exit 1fi