Skip to content

fix(pr-pipeline): send a parent whose sub-issues all closed to one verify-and-close run - #12710

Draft
kyle-sexton wants to merge 5 commits into
mainfrom
fix/parent-verify-close
Draft

kyle-sexton wants to merge 5 commits into
mainfrom
fix/parent-verify-close

Conversation

@kyle-sexton

Copy link
Copy Markdown
Member

Refs: #12456

Hold: owner decision pending. This lets lanes close parent issues unattended, which they cannot do today. Held with do-not-merge until the owner answers the question in the Decision section.

Summary

Parents whose every sub-issue is closed stay open: only a person closes them (#12456 class A: 7589, 7577, 7558, 6924, 6755, 5948, 5946, 11124). The existing already-done close cannot close them: doneEvidence needs a merged commit that closes the parent's own number, and the children's PRs close only the children. Baseline parent close lag (55 parents since 10-30): p50 1.1 h, p90 46.7 h.

Decision (owner)

May lanes close a parent issue unattended once all its sub-issues are done? This PR builds (a):

  • (a) When every sub-issue is closed completed by a trusted close, the issue lane runs once against the parent's own done-when. It closes the parent only if every item verifies, citing each check; an unmet item parks; any not_planned child keeps the parent out (Q93 unchanged).
  • (b) Close through report-delivered (no completed work); dependents go back to triage.
  • (c) Keep person closes; close this PR.

Fix

  • lib/done-evidence.mjs: subIssueLeftOpen (moved out of splitLeftOpen, which now calls it) requires each child's own state_reason: completed and a trusted close; parentDone applies it. doneEvidence is unchanged.
  • Trigger: closeDoneParent -> reenterFinished (label-unblocked.mjs) re-enters a parent parked on SIZE_SPLIT_DONE when its last child closes; the hourly rescan covers parents already parked.
  • Admission: finishedParent (admit.mjs); decide skips the SIZE_SPLIT_DONE refusal for a finished parent; check-blockers sets split-child=true so Size Large does not block the one verify run (the existing split-child precedent).
  • Run mode: write-issue adds verify_close; the work skill verifies each own done-when item, builds nothing, and stops verified-done: or verify-unmet:.
  • Close: stop rows verified-done (close) and verify-unmet (park) in stop-routes.json; report-outcome closes only when the children, read fresh, are all completed and in VERIFY_CLOSE and the run committed nothing; appDoneClose counts the close for dependents only while parentDone holds with full trust per child.
  • Telemetry: the close comment's stop line carries verified-done (read back by closeStop), so close lag is re-measured after merge.

Behavior to know before merge:

  • Every Size changes, not only Large: a finished Small or Medium parent gets a verify-only run instead of a build run.
  • The lane does not build a parent's unmet item; it parks on verify-unmet until a listed human's decision comment, and a newly added and closed sub-issue does not re-enter it (follow-up candidate).
  • appDoneClose trusts slightly less than admission: a child that is itself an App-closed split parent lets the parent close, but dependents do not count that close.
  • A finished parent skips the merged-Refs done-check park, since its verify run is that check.
  • Not covered by a test: a verified-done run that committed to a branch retries (report-outcome.mjs). The pr-pipeline docs are not yet updated.

Verification

  • Affected suites: 3125/3125; work-resolve-issue 522/522 after the second commit.
  • scripts/check-affected.sh --base origin/main --no-fetch: 13 passed, 2 skipped over 19 changed files.

Related

🤖 Generated with Claude Code

https://claude.ai/code/session_01VcupojVgxFqBnrah9DwFLE

kyle-sexton and others added 3 commits November 2, 2026 23:14
…rify-and-close run

A parent split by hand whose own task list is its done-when stayed open
after every sub-issue closed: admission refused it at Size Large with
SIZE_SPLIT_DONE, and nothing treated the last sub-issue close as news.

- lib/done-evidence.mjs: subIssueLeftOpen, the split parent's child rule
  (each sub-issue closed completed by a trusted close), now shared, and
  parentDone, the evidence for a verified-done close.
- admit.mjs: finishedParent; decide admits a finished parent at any Size
  for one run, and skips the merged-Refs done-check park for it.
- label-unblocked: a parent parked on SIZE_SPLIT_DONE loses status:
  confirmed once every sub-issue counts as done (child close and the
  hourly rescan), so intake admits it.
- The issue lane: check-blockers marks a finished parent split-child (the
  Size Large bypass precedent) and passes its trusted sub-issues as
  verify-close to report-outcome; write-issue adds verify_close; the work
  skill verifies each done-when item, builds nothing, and stops
  verified-done (route close) or verify-unmet (route park).
- report-outcome closes verified-done only when the sub-issues, read
  fresh, are all closed completed among verify-close and the run
  committed nothing; appDoneClose counts the close for dependents only
  when every sub-issue's close still holds.

A sub-issue closed not_planned (class B) keeps the parent out at every
step. The verified-done stop code on the close comment marks these runs
for re-measuring close lag.

Refs: #12456

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VcupojVgxFqBnrah9DwFLE
… verify-unmet park ends

The verified-done close posts the run's summary, not its verification
list, so the work skill now writes each done-when check in summary and
keeps the verified-done reason to one line. The verify-unmet row named new
work as a way back, but only a listed human's decision comment re-enters a
parked issue.

Refs: #12456

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VcupojVgxFqBnrah9DwFLE
@kyle-sexton kyle-sexton added the do-not-merge Hard merge gate: do not merge while applied. label Nov 3, 2026
kyle-sexton and others added 2 commits November 3, 2026 02:04
Refs: #12365

Adds a named report-outcome test built from #12365's real done-when lines:
its one sub-issue (#12772) is closed as completed, so the parent gets its
verify run, but its own UX-3 line (a pending terminal permission prompt the
watcher cannot report yet) stays unmet. The verify-unmet stop parks the
parent naming UX-3, makes no close call, and leaves no close evidence.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VcupojVgxFqBnrah9DwFLE
# Conflicts:
#	.github/scripts/intake-triage/admit.test.mjs
#	plugins/work-items/skills/work/SKILL.md

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do-not-merge Hard merge gate: do not merge while applied.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant