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(skills): classify a pushed-to stack as submitted in mq-queue-state (#118288)

Jimmy Zhu204793e50713
diff --git a/.agents/skills/triaging-merge-queue-failures/scripts/mq-queue-state.sh b/.agents/skills/triaging-merge-queue-failures/scripts/mq-queue-state.sh
index 3a5d5d204010..38549b961e2e 100755
--- a/.agents/skills/triaging-merge-queue-failures/scripts/mq-queue-state.sh
+++ b/.agents/skills/triaging-merge-queue-failures/scripts/mq-queue-state.sh
@@ -211,6 +211,9 @@ classify() {
echo passing
elif printf '%s' "$body" | grep -qE 'Submitted to Merge.*added to the merge queue once'; then
echo submitted
+ # A push to a stack layer keeps the stack submitted, unlike a push to a plain PR.
+ elif printf '%s' "$body" | grep -qE 'returned to waiting.*because it was pushed to'; then
+ echo submitted
elif printf '%s' "$body" | grep -qE '(Merged|Stack merged) successfully'; then
echo merged
elif printf '%s' "$body" | grep -qE 'was merged into .* as part of stacked PR'; then
diff --git a/.agents/skills/triaging-merge-queue-failures/scripts/mq-queue-state.test.sh b/.agents/skills/triaging-merge-queue-failures/scripts/mq-queue-state.test.sh
index 92a63ae8cecd..bf8208351f07 100644
--- a/.agents/skills/triaging-merge-queue-failures/scripts/mq-queue-state.test.sh
+++ b/.agents/skills/triaging-merge-queue-failures/scripts/mq-queue-state.test.sh
@@ -32,6 +32,8 @@ classify_case superseded superseded \
'This pull request was removed from the merge queue because it was pushed to.'
classify_case kicked-failed kicked_failed \
'This pull request was removed from the merge queue because it failed tests.'
+classify_case stack-pushed-to submitted \
+ 'Stack returned to waiting because it was pushed to. It will be added to the merge queue once all branch protection rules pass.'
classify_case removed-bare removed \
'This pull request was removed from the merge queue.'
classify_case conflict conflict \