: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(ci): give the master-red bot a first step it can run (#97970)
Raúl Negrón-Oteroee3cc64fc94d
diff --git a/.agents/skills/debugging-ci-failures/references/master-red-incident.md b/.agents/skills/debugging-ci-failures/references/master-red-incident.mdindex 138bc68b9548..f5dacbed9733 100644--- a/.agents/skills/debugging-ci-failures/references/master-red-incident.md+++ b/.agents/skills/debugging-ci-failures/references/master-red-incident.md@@ -3,11 +3,31 @@You are answering one open master-red incident, started by the "Master-red diagnosis" workflow when the DevEx alerter posted its incident message in #alerts-devex.One run is one answer: work out what broke, post a single reply in that Slack thread, and stop.-The parent `SKILL.md` owns the method: the `hogli ci:insights` digest, the classification table, and the base-rate check.-This file only adds what is different about running unattended.+The parent `SKILL.md` owns the method: the classification table and the base-rate check.+This file only adds what is different about running unattended, starting with the fact that its first step does not exist here.Setting the workflow up is `master-red-workflow-setup.md` in this directory.+## You have no digest, so start from the MCP tools++The parent skill says to start with `hogli ci:insights`. That command cannot run here.+This sandbox is a shallow clone with no hogli installed, and the digest needs a credential that only a browser sign-in writes, which you cannot complete.+Do not try it, and do not report its absence as the reason you could not answer.++Get the cross-run history from the PostHog MCP instead. The run's token already carries `engineering_analytics:read`, and the MCP is bound to the project that holds this data.++| Tool | Use it for |+| ---------------------------------------- | -------------------------------------------------------------------- |+| `engineering-analytics-run-failure-logs` | one run id, every failed job's error region, already thinned |+| `engineering-analytics-broken-tests` | which tests are failing on master now |+| `engineering-analytics-flaky-tests` | whether this test has a flake history, which decides a flaky verdict |+| `engineering-analytics-ci-failure-logs` | one PR number, across every run it has pushed |++These are bounded by GitHub's log retention, so fall back to `gh` for anything older than about 90 days.+If one of them is not in your tool list, say which one in the reply's last line and work from `gh` for that part, rather than dropping the cross-run question.++The digest's grouped master-failures view has no MCP tool yet. Rebuild the part you need with `gh run list --branch master --workflow <name> --json conclusion,headSha,createdAt`, which is also how you get the denominator for a rate.+## Non-negotiable rules- The parent skill's safety rules are gated on explicit approval in the conversation. There is no conversation here, so every one of them is simply forbidden. A rerun in particular destroys the evidence you were sent to read.@@ -38,10 +58,14 @@ Four short lines, in this order. No preamble, no restating the alert.1. The verdict, in one sentence, with the failing job named.2. The evidence, in one line. Link the run.3. What a person should do next, or that nothing needs doing because no code change fixes it.-4. What you could not check, when something material was out of reach.+4. What you could not settle, and the one probe that would settle it.Keep it under about 80 words. Somebody is reading it while master is broken.Do not recommend a rerun for a failure you classified as a real regression, and do not recommend a code change for one you classified as infrastructure.-A person can reply in the thread to ask for more. Those replies reach you, so treat the first answer as the opening of a conversation rather than a report you defend.+Line 4 is one clause for the gap and one for the probe, and it replaces the bare "could not check" rather than adding to it. "Unconfirmed: whether the shard rebalance landed first" is the whole line.+Name the probe as a fact, never as an offer. "Let me know if you need more" is filler, and so is any sentence about what you would be happy to do.++A reply in the thread reaches you and buys another full run, which is why the probe is worth naming at all.+Treat the first answer as the opening of a conversation rather than a report you defend.