Skip to content

Move the Abandon Discard to the Orchestrator, Align the Abandoned-Branch Delete, and Hold a Grown Agent-Safety Set - #3822

Merged
ptr727 merged 7 commits into
developfrom
burndown/3786-burndown-cleanup
Nov 2, 2026
Merged

ptr727 merged 7 commits into
developfrom
burndown/3786-burndown-cleanup

Conversation

@ptr727

@ptr727 ptr727 commented Nov 2, 2026 •

Copy link
Copy Markdown
Owner

Summary

This changes backlog-burndown's "Cleanup Is the Orchestrator's" section, the re-verify bullet in its "Grouping and File Claims" section, and the abandon-discard exception that git-commit-conventions and GOVERNANCE.md "Git and Commit Rules" both state.

  • Make backlog-burndown's Abandon-Discard Grant Reach a Claude Code Worker as the Maintainer's #3786: the orchestrator does the abandon discard, per the maintainer's answer on that issue.
    • A worker told to abandon its branch reports its worktree path and ends. It discards nothing.
    • The orchestrator waits until the worker has ended, per "Bounding the Wait on a Worker".
    • It then reads a live git worktree list --porcelain for a linked worktree whose branch line names the claimed branch, and runs git -C <path> reset --hard and git -C <path> clean -fd in that entry's own worktree path. Where no such entry exists, the group stops for the maintainer.
    • The matching exception in git-commit-conventions and the one sentence in GOVERNANCE.md now name the orchestrator instead of the worker. Nothing in agent-safety is edited.
  • Align backlog-burndown's Abandoned-Branch Delete with Its Is-Ancestor Check #3785: the local branch delete now matches the is-ancestor check.
    • The orchestrator records the branch tip and runs the is-ancestor check against refs/remotes/origin/develop. Both happen before anything is removed.
    • The local branch is then deleted with git update-ref -d refs/heads/<branch> <tip>. That command refuses only if the branch has moved off the tip the check judged.
    • A git config --remove-section step drops the branch's tracking section, which git branch -d would have removed.
    • git branch -d judged a branch with no upstream against the base clone's HEAD. The fetch does not advance that HEAD, so a branch with no commits of its own could be refused even though deleting it discarded nothing.
  • Apply backlog-burndown's Agent-Safety Hold When a Group's File Set Grows #3772: a file set that grows into host-setup/agent-safety/ gets the agent-safety hold.
    • When a worker reports that its files now reach into host-setup/agent-safety/, the orchestrator applies the "Ranking" hold as though it were ranking the issue now.
    • In an attended run, a group whose issue needing that edit has an approval recorded continues on a brief carrying the no-merge line.
    • Every other such group, and each one in an away-mode run, stops per "Raising a Blocked Question". An away run turns that stop into an ordinary park through the existing "Parking Instead of Asking" rule, so this adds no new parking path.

Closes on promotion: #3786, #3785, #3772

Verification

  • uv run --script scripts/build_dist.py --check: generated skill distributions are current.
  • The prose gate on the diff against origin/develop: no violations.
  • scripts/repo_gate.py --check eol: 0 issues.
  • spec/validate.py: OK.
  • Local strict review: a recorded pass covers this head's content, with no findings open against this change. The pre-existing findings it raised are filed below.

Pre-existing findings, filed

🤖 Generated with Claude Code

ptr727 and others added 5 commits November 2, 2026 10:10
…Branch Delete

The orchestrator, not the worker, discards an abandoned worker's uncommitted
edits once a live worktree listing and the dispatch mechanism confirm the
path and that the worker ended. The abandoned-group local branch delete uses
update-ref against the tip the is-ancestor check judged, and a grown file set
entering host-setup/agent-safety/ gets the Ranking hold and no-merge line.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rop Its Tracking Config

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… Mode Parks

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings November 2, 2026 18:43
@ptr727

ptr727 commented Nov 2, 2026

Copy link
Copy Markdown
Owner Author

A recorded local strict-review pass covers head 11c370bf0d669b304c1e70000b1b4418ba186fbd, the content this pull request carries at that commit against develop, and it recorded 1 finding.

@coderabbitai

coderabbitai Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Approval is blocked by active critical and moderate issues in the backlog-burndown cleanup and away-mode procedures, including stranded standalone clones, incorrectly continued approved growth during away runs, and premature worktree removal before guarded cleanup completes.

3 open issues
What changed in this PR

This pull request moves abandoned-worktree cleanup to the orchestrator, aligns local branch deletion with its ancestry check, and applies agent-safety holds when claimed files expand into host-setup/agent-safety/. It also updates governance guidance and regenerated skill distributions.

Changes:

  • Moves abandoned-worker discard responsibility to the orchestrator after worker termination.
  • Replaces git branch -d with tip-checked git update-ref cleanup and tracking-section removal.
  • Propagates agent-safety hold and cleanup-rule changes across canonical and generated skills.

Open findings:

  • [P1][moderate, 2 votes] Standalone-clone cleanup is not handled; the reported path needs equivalent exact-branch and live-state checks.
  • [P1][critical, 4 votes] Away-mode holds must apply before continuing when approved file-set growth reaches host-setup/agent-safety/.
  • [P2][nit, 1 vote] Correct the missing article in the hold condition.
  • [P2][moderate, 1 vote] Treat the branch name literally when querying branch configuration with --get-regexp.
  • [P1][critical, 1 vote] Complete guarded remote cleanup before removing the local worktree, or provide rollback/retention handling for later refusals.

This pull request requires changes.

File Description
GOVERNANCE.md Updates the destructive-cleanup exception to name the orchestrator.
.github/​skills/​git-commit-conventions/​SKILL.md Generated GitHub skill guidance for orchestrator-owned cleanup.
.github/​skills/​backlog-burndown/​SKILL.md Generated GitHub backlog-burndown guidance for cleanup and agent-safety holds.
.claude-plugin/​fleet-skills/​skills/​git-commit-conventions/​SKILL.md Generated Claude skill distribution for commit guidance.
.claude-plugin/​fleet-skills/​skills/​backlog-burndown/​SKILL.md Generated Claude skill distribution for backlog-burndown guidance.
.claude-plugin/​fleet-skills/​.source-digests/​git-commit-conventions Updated source digest for commit guidance.
.claude-plugin/​fleet-skills/​.source-digests/​backlog-burndown Updated source digest for backlog-burndown guidance.
.agents/​skills/​git-commit-conventions/​SKILL.md Canonical commit guidance for orchestrator-owned discard cleanup.
.agents/​skills/​backlog-burndown/​SKILL.md Canonical cleanup, branch-deletion, and agent-safety hold rules.

Review effort: Lite

@codecov

codecov Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.91%. Comparing base (b38e084) to head (616ccf5).
⚠️ Report is 75 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3822      +/-   ##
===========================================
+ Coverage    81.60%   82.91%   +1.30%     
===========================================
  Files           26       29       +3     
  Lines         9070     9750     +680     
===========================================
+ Hits          7402     8084     +682     
+ Misses        1668     1666       -2     
Flag Coverage Δ
python-3.13 82.91% <ø> (+1.30%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

ptr727 and others added 2 commits November 2, 2026 10:51
…afety

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ptr727

ptr727 commented Nov 2, 2026

Copy link
Copy Markdown
Owner Author

A recorded local strict-review pass covers head 616ccf58b53cd93aadc755000bce617bd1108a77, the content this pull request carries at that commit against develop, and it recorded 0 findings.

@ptr727

ptr727 commented Nov 2, 2026

Copy link
Copy Markdown
Owner Author

Answers to the review round on 11c370b: the 5 findings under its overview's "Open findings:" label, which the reader left unplaced. #3824 is filed so the reader picks up that label.

  • .agents/skills/backlog-burndown/SKILL.md:280, "Away-mode holds must apply before continuing when approved file-set growth reaches host-setup/agent-safety/": Fixed in 0de60ca, tightened in 616ccf5. The same finding as the resolved thread.
  • .agents/skills/backlog-burndown/SKILL.md:411, "Complete guarded remote cleanup before removing the local worktree": Disproven. Removal runs only after the is-ancestor and clean-tree checks hold, so a later refusal loses nothing. The thread reply has the evidence.
  • .agents/skills/backlog-burndown/SKILL.md:399, "Standalone-clone cleanup is not handled": Deferred to Give backlog-burndown a Path to a Dead or Abandoned Worker's Standalone Clone #3771, which predates this change. The thread reply has the details.
  • "Correct the missing article in the hold condition": No change needed. It is a wording preference that no repository rule supports, per fleet-code-review "Review the Change" item 5. That sentence was also rewritten in 0de60ca and 616ccf5.
  • .agents/skills/backlog-burndown/SKILL.md:414, "Treat the branch name literally when querying branch configuration with --get-regexp": No change needed, per GOVERNANCE.md "Trust Boundaries and Hardening Effort".
    • The branch name is the orchestrator's own claimed branch, which is trusted input.
    • A metacharacter mismatch fails loudly rather than silently or destructively. --get-regexp would print another branch's section, and git config --remove-section branch.<exact-branch> would then refuse with "no such section". The procedure's "A refusal stops the group for the maintainer" covers that.
    • The removal only ever names the exact branch's own section, so no other branch's config can be removed.

@ptr727
ptr727 merged commit 87f055e into develop Nov 2, 2026
13 checks passed
@ptr727
ptr727 deleted the burndown/3786-burndown-cleanup branch November 2, 2026 19:08
ptr727 added a commit that referenced this pull request Nov 3, 2026
…rge on a Running Hosted Review, and Gate Skill Description Length (#3843)

Promotes the changes merged into `develop` since promotion #3797 to
`main`, the end of an away-mode backlog burndown.

- [#3803](#3803) exempts
the Roslyn embedded-language marker (`// lang=json`, `language=`) from
the prose gate's comment rules as a tool directive.
- [#3807](#3807) has
`local_review.py record` take `--report`, the file the reviewer wrote,
bind the pass to its sha256, and derive the finding count from it.
`status` gains `reportPath`.
- [#3809](#3809) holds
`pr_review.py merge` while a hosted review is still running on the head,
and routes a declined Qodo finding to a dismiss request.
- [#3811](#3811) dates an
anchored `intentRef` by the section its anchor names, and lets a
`driftNote` acknowledge a verified intent advisory.
- [#3816](#3816) moves the
null GraphQL node check into the shared `gh_graphql` transport as
`NullNodeError`.
- [#3818](#3818) explains
the workspace-edit default in `GOVERNANCE.md` and names the aggregator's
expression form.
- [#3822](#3822) moves the
abandon discard to the `backlog-burndown` orchestrator, aligns the
abandoned-branch delete, and holds a grown agent-safety set.
- [#3823](#3823) scopes
the Husky prose gate to staged paths and adds `--skip-generated` so a
named file inside a generated tree is skipped.
- [#3828](#3828) reads
Copilot's `Open findings:` label, drops the duplicate `null_node`, and
matches `scripts/README.md` to the Merge Gate.
- [#3829](#3829) bumps the
two stale hub caller snippet pins and documents the fallback's
mixed-pair refusal.
- [#3831](#3831) keeps an
inherited `GIT_DIR` from rerooting the prose gate's subdirectory git
reads.
- [#3832](#3832) gives
`backlog-burndown` a disposition for a worker's standalone clone and
keeps the agent-safety hold past a park.
- [#3835](#3835) makes
`carry.py check-sections` refuse what `apply-sections` would, and name
an open fence.
- [#3836](#3836) pins the
reusable-workflow stubs by placeholder and ticks the PlexCleaner gates
item.
- [#3838](#3838) has the
`runtime-secrets` audit dimension detect a bare `secrets/` directory
from the tracked files that name it.
- [#3839](#3839) gates
skill descriptions at the 1024-character limit and trims every one over
it.
- [#3846](#3846) fixes an
adjacent doc, an in-file pre-existing defect, and an edge case on new
code in the open pull request instead of filing an issue for each, and
keeps filing for code that runs elsewhere.
- [#3847](#3847) refuses
skill frontmatter that parses to a list or a scalar, so the description
length gate cannot be bypassed.

Fixes #3770
Fixes #3699
Fixes #3705
Fixes #3789
Fixes #1819
Fixes #727
Fixes #3710
Fixes #3706
Fixes #3623
Fixes #3687
Fixes #3617
Fixes #3757
Fixes #3790
Fixes #3786
Fixes #3785
Fixes #3772
Fixes #1657
Fixes #3443
Fixes #3824
Fixes #3817
Fixes #3805
Fixes #1666
Fixes #3700
Fixes #3821
Fixes #3771
Fixes #3794
Fixes #3825
Fixes #3690
Fixes #1472
Fixes #3813
Fixes #3719
Fixes #1592
Fixes #3845

🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants