Skip to content

Teach land-stack when babysit jobs may resolve automated review threads. - #1216

Merged
mergify[bot] merged 1 commit into
mainfrom
stack/EdbertChan/reflect/land-stack-babysit-bot-thread-20260929/teach-land-stack-babysit-jobs-may-resolve--3fb2c9ca
Sep 29, 2026
Merged

mergify[bot] merged 1 commit into
mainfrom
stack/EdbertChan/reflect/land-stack-babysit-bot-thread-20260929/teach-land-stack-babysit-jobs-may-resolve--3fb2c9ca

Conversation

@EdbertChan

@EdbertChan EdbertChan commented Sep 29, 2026 •

Copy link
Copy Markdown
Owner

Summary

The skill that lands pull-request stacks tells agents when they may close review threads.

Without a decision tree, a babysit-until-merged job treats every open thread the same. Only a human deferral note can clear it.

Finished automated review feedback still bounces to the user. Agents should close that feedback themselves when the head already fixed it.

This update adds that tree for babysit-until-merged jobs. Automated threads clear after the head addresses them, or when outdated.

Human threads still need a recorded deferral. A colocated test locks those rules in place.

Review Claim

Under a babysit-until-merged job, agents may resolve automated review threads only after the head commit addresses them (or they are outdated), and must still record a deferral before resolving any human thread.

Review Lane

behavior

Review Unit

product-skill

Safety Invariant

Resolving a bot thread is allowed only after the head commit addresses that thread, or the thread is outdated; a human thread is never resolved from this rule alone.

Slice Rationale

One accepted reflect finding, one skill rule change, one review unit. No other skills or landing scripts in this slice.

Non-goals

  • Does not change merge-queue scripts or labels
  • Does not auto-resolve human review threads
  • Does not merge any PR from this change

Test Plan

Test Plan
  • python3 -m unittest discover -s product/skills/land-stack/tests -p 'test_review_thread_decision_tree.py' -v
  • python3 scripts/ci/check_skill_test_coverage.py --base origin/main --head HEAD
  • python3 scripts/ci/check_skills_three_harnesses.py
  • python3 scripts/ci/check_ecosystem_boundaries.py
  • python3 engine/skills/make-pr/scripts/preflight.py --base origin/main --body-file /tmp/land-stack-bot-thread-pr.md

Preflight unit: product-skill (2 files). Rule-scope, skill coverage, four-harness, and ecosystem boundary gates passed.

Revert Plan

Revert Plan
  • Safe to revert? Yes
  • Revert command: git revert <sha>
  • Post-revert steps: None
  • Data migration? No

Note

Low Risk
Documentation and contract tests only; no runtime merge or GitHub automation behavior changes in application code.

Overview
Replaces the single land-stack rule about deferring human review findings with a decision tree for when agents may resolve threads to unblock merges.

Under an explicit babysit-until-merged job, automated review threads (e.g. CodeRabbit) should be resolved via the GitHub review-thread API once the current head addresses them or the thread is outdated—without escalating to the user. Human threads still require a recorded deferral on the PR; the babysit rule does not authorize resolving human threads. In all other cases, threads stay open.

Adds test_review_thread_decision_tree.py to assert the decision-tree wording stays present in SKILL.md.

Reviewed by Cursor Bugbot for commit a830d6f. Bugbot is set up for automated code reviews on this repo. Configure here.

Under babysit-until-merged, resolve automated threads after head addresses them; human threads still need a recorded deferral.

Co-authored-by: Cursor <cursoragent@cursor.com>
Change-Id: I3fb2c9ca1fbf590468da5ae0dfce6d417be1432e
@cursor

cursor Bot commented Sep 29, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_9da74b75-5d9a-42d8-b510-8e78a3d5d47b)

@mergify

mergify Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Queued — the merge queue status continues in this comment ↓.

@EdbertChan

Copy link
Copy Markdown
Owner Author

@Mergifyio queue

@mergify

mergify Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

This pull request spent 44 minutes 38 seconds in the queue, including 44 minutes 16 seconds running CI.

Required conditions to merge
  • check-success = lint
  • check-success = test
  • check-success = validate

@mergify mergify Bot added the queued label Sep 29, 2026
@mergify
mergify Bot merged commit b0d44d5 into main Sep 29, 2026
8 checks passed
@mergify mergify Bot removed the queued label Sep 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant