Visitar URL original
Read a Handoff Round by Its Whole Shape, Confirm a Default Pick, and Write a Final Round Before close by ptr727 · Pull Request #4034 · ptr727/ProjectTemplate · GitHub
Skip to content

Read a Handoff Round by Its Whole Shape, Confirm a Default Pick, and Write a Final Round Before close - #4034

Merged
ptr727 merged 4 commits into
developfrom
burndown/4013-session-handoff-fixes
Nov 10, 2026
Merged

ptr727 merged 4 commits into
developfrom
burndown/4013-session-handoff-fixes

Conversation

@ptr727

@ptr727 ptr727 commented Nov 10, 2026 •

Copy link
Copy Markdown
Owner

Summary

Fixes three session-handoff defects and decisions, in the skill and in scripts/handoff.py.

  • A quoted round mark is no longer read as an archived round (Keep a Maintainer Comment That Quotes a Round Marker, and Keep blocked While a New Decision Waits #4013 item 1). rounds_of now goes through a new round_mark(). A comment counts as a round only when it carries exactly one mark and its first line is the ## Round <n>, closed <date>: heading archive writes, naming the same round and date. The heading is parsed once, in a new ROUND_HEADING, which archived_text shares. A round a writer edited below its mark still reads. The "Resuming" comment filter checks the same shape. It uses capture rather than backreferences, since gh --jq runs gojq on Go's RE2. A writer's answer that quotes an example mark now reaches the resuming session. A quote naming the outgoing round no longer makes new refuse.
  • blocked stays on while a new decision waits (Keep a Maintainer Comment That Quotes a Round Marker, and Keep blocked While a New Decision Waits #4013 item 2). "The Attended Session" step 6 leaves the label on where a decision issue the session filed on the link's work is still unanswered. The session names that issue in a comment on the handoff. GOVERNANCE.md "Durable Knowledge and Self-Improvement" is aligned, and the agent-conduct include is regenerated.
  • scripts/README.md's handoff.py section now states the same whole archived-round shape.
  • A default handoff pick is always confirmed (Guard the Attended Handoff Pick Against a Link a Live Session Holds #3679, decided 2026-11-02). Step 1 puts a link it picked with none named to the maintainer as a prompt before any work, whatever its updatedAt. There is no time window.
  • A track's last session writes a final round before close (Decide: Whether a Session Ending a Handoff Track Writes a Final Round Before close #4018, decided 2026-11-10, option 1). "Closing a Session" step 2 writes it with new where the session has anything for "What not to repeat" or "New learnings". That keeps those findable by chain --grep. The "Running the Chain" close bullet, which an away-mode lane close follows, and the platform-lane close both point at that step.

Verification

  • tests/test_handoff.py passes (176 tests). The new test test_a_writer_s_comment_quoting_a_round_mark_is_no_round uses constructed comments and fails on develop's handoff.py.
  • The filter was run under jq 1.8 against constructed comments: a quote mid-comment, first, and last, a heading naming another round, two marks, and an archived round in LF and CRLF. It was also run through gh --jq against a live handoff issue, where it hid the archived rounds and kept the ordinary comment.
  • build_dist.py --check is current. The pre-commit gates (ruff, mypy, prose lint, eol) pass.

Closes on promotion: #4013, #3679, #4018

🤖 Generated with Claude Code

ptr727 and others added 2 commits November 10, 2026 08:13
…Write a Final Round Before close

A comment counts as an archived round only where its first line is the
round heading and its last line is its one round mark, naming the same
round and date. A writer's comment quoting a mark now stays an ordinary
comment, in handoff.py rounds_of and in the Resuming comment filter.

The attended pick puts a link it chose itself to the maintainer before
any work. blocked stays on while a decision the session filed waits.
A session ending a track writes a final round first when it learned
something, so chain --grep still finds it.

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

Parse the archive heading once, in ROUND_HEADING, and stop requiring the
mark on a round's last line, so a round edited below its mark still
reads. The close bullet and the platform-lane close now point at the
final-round rule, and step 1 names which link the default prompt offers.

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

ptr727 commented Nov 10, 2026

Copy link
Copy Markdown
Owner Author

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

@coderabbitai

coderabbitai Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 13 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 128e6e9 and bb40ae5.

Files ignored due to path filters: 6

  • .claude-plugin/fleet-skills/.source-digests/agent-conduct is excluded by !.claude-plugin/fleet-skills/**
  • .claude-plugin/fleet-skills/.source-digests/session-handoff is excluded by !.claude-plugin/fleet-skills/**
  • .claude-plugin/fleet-skills/skills/agent-conduct/SKILL.md is excluded by !.claude-plugin/fleet-skills/**
  • .claude-plugin/fleet-skills/skills/session-handoff/SKILL.md is excluded by !.claude-plugin/fleet-skills/**
  • .github/skills/agent-conduct/SKILL.md is excluded by !.github/skills/**
  • .github/skills/session-handoff/SKILL.md is excluded by !.github/skills/**
Files selected for processing: 6

  • .agents/skills/agent-conduct/SKILL.md
  • .agents/skills/session-handoff/SKILL.md
  • GOVERNANCE.md
  • scripts/README.md
  • scripts/handoff.py
  • tests/test_handoff.py
  • 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

An active finding remains because the resume filter mishandles corrected rounds with trailing content, causing archived responses to appear as ordinary answers.

1 open issue
What changed in this PR

This pull request hardens session-handoff round detection and updates handoff procedures for decision blocking, default link selection, and track closure.

Changes:

  • Adds strict round-shape parsing and regression tests for quoted markers, edited rounds, and alternate line endings.
  • Keeps handoffs blocked while session-created decisions remain unanswered and confirms automatically selected links with maintainers.
  • Records final learned content before closing tracks and regenerates distributed Skills and source digests.
File Description
tests/​test_handoff.py Adds regression coverage for quoted markers, edited archived rounds, and round recognition.
scripts/​handoff.py Adds shared round-heading parsing and stricter archived-round detection.
GOVERNANCE.md Aligns handoff blocking guidance with unanswered session-created decisions.
.github/​skills/​session-handoff/​SKILL.md Updates the distributed session-handoff procedures for selection, resuming, blocking, and closure.
.github/​skills/​agent-conduct/​SKILL.md Regenerates the distributed agent-conduct governance guidance.
.claude-plugin/​fleet-skills/​skills/​session-handoff/​SKILL.md Updates the Claude plugin session-handoff Skill distribution.
.claude-plugin/​fleet-skills/​skills/​agent-conduct/​SKILL.md Updates the Claude plugin agent-conduct Skill distribution.
.claude-plugin/​fleet-skills/​.source-digests/​session-handoff Refreshes the session-handoff source digest.
.claude-plugin/​fleet-skills/​.source-digests/​agent-conduct Refreshes the agent-conduct source digest.
.agents/​skills/​session-handoff/​SKILL.md Updates the canonical session-handoff procedures for round reading, selection, blocking, and closure.
.agents/​skills/​agent-conduct/​SKILL.md Updates the canonical agent-conduct governance guidance.

Review effort: Lite

Comment thread .agents/skills/session-handoff/SKILL.md Resolved
ptr727 and others added 2 commits November 10, 2026 09:49
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ptr727

ptr727 commented Nov 10, 2026

Copy link
Copy Markdown
Owner Author

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

@codecov

codecov Bot commented Nov 10, 2026

Copy link
Copy Markdown

Codecov Report

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

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #4034      +/-   ##
===========================================
- Coverage    81.60%   78.94%   -2.67%     
===========================================
  Files           26       37      +11     
  Lines         9070    12669    +3599     
===========================================
+ Hits          7402    10002    +2600     
- Misses        1668     2667     +999     
Flag Coverage Δ
python-3.13 78.94% <100.00%> (-2.67%) ⬇️

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

ptr727 commented Nov 10, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@ptr727

ptr727 commented Nov 10, 2026

Copy link
Copy Markdown
Owner Author

/review

@coderabbitai

coderabbitai Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@ptr727
ptr727 merged commit becdb8c into develop Nov 10, 2026
13 checks passed
@ptr727
ptr727 deleted the burndown/4013-session-handoff-fixes branch November 10, 2026 18:25
ptr727 added a commit that referenced this pull request Nov 10, 2026
…tall on Release, Cleanup and Handoff Fixes (#4039)

## Summary

Promotes burndown round 1 of the attended run of 2026-11-10 from
`develop` to `main`.

- #4035: the prose gate builds its HTML span without slicing
markdown-it-py's pattern, and the gate, `backlog_metrics.py`, and the
test requirements pin `markdown-it-py` exactly. That ends the import
crash 4.3.0 caused on every pull request.
- #4032: the agent-safety installer probes each hook launcher before
choosing one and installs nothing when none runs. The write guard reads
every short-option cluster through one table-driven helper. Merged on
the maintainer's go-ahead after reading the diff.
- #4029: `merge-and-release` installs the updated host-safety kit in its
release step, guarded against rolling a kit back. Where a promotion is
already merged under a release scope, it reads the publisher's runs
before asking.
- #4030: `pr_cleanup.py` names every git-ignored entry a worktree
removal deletes before it removes the tree.
- #4034: a handoff comment that only quotes a round mark is no longer
read as an archived round. `blocked` stays on while a new decision
waits, a default handoff pick is confirmed, and a track's final round is
written before `close`.

## Closes

Fixes #4033
Fixes #3935
Fixes #1172
Fixes #3783
Fixes #3897
Fixes #4019
Fixes #4009
Fixes #4013
Fixes #3679
Fixes #4018
Fixes #3914
Fixes #3841
Fixes #4017
Fixes #4010
Fixes #3791
Fixes #3795

🤖 Generated with [Claude Code](https://claude.com/claude-code)
ptr727 added a commit that referenced this pull request Nov 13, 2026
… and backlog-burndown (#4166)

Closes review gaps in four fleet skills, and gives the carried-table
bound its reason in `GOVERNANCE.md` and the Copilot instructions.

## Changes

- **`repo-worktree` "Preparing Git Hooks" (#3620 item 5).** The
pre-commit check is now one complete command: `test -x` and a `grep` for
the framework's own header, on the shared hook path. A non-framework
executable there no longer counts as the gate. It falls to the unchanged
next bullet: "A missing or wrong shared hook is reported to the
maintainer, not repaired from the worktree."
- **`drive-pr` (#3697).** A feature PR a peer merged mid-drive still
owes an outcome for each open finding. That covers unresolved threads
and every finding step 4 names, whether or not `merge` would refuse on
it, since `merge` never runs there. Step 3's `state=MERGED` path and
step 4's `next=cleanup` route both give those outcomes before `cleanup`
runs. A fix lands as a fresh feature -> develop pass.
- **`GOVERNANCE.md` "PR Review Etiquette", `pr-review-conduct` Merge
Gate item 2, and `.github/copilot-instructions.md` (#3620 item 3).**
Each gets two sentences on why the carried-table bound is the file set
rather than file recency, per the maintainer's answer on #3746.
- **`backlog-burndown` "The Promotion Boundary" step 5 (#3620 item 4).**
The displaced pull request waits until the next round dispatches, and
that round dispatches its fresh worker. That matches step 6 in an
attended run, and the away-mode promotion path, which has no freeze.
- Generated copies under `.github/skills/` and
`.claude-plugin/fleet-skills/` were regenerated with
`scripts/build_dist.py`.

## Item Dispositions

- **#3620 item 1** (`session-handoff` resume filter): already fixed. It
was consolidated into #4013 item 1 and landed in #4034. A comment now
counts as a round only by its whole archived shape.
- **#3620 item 2** (`unattended-handoff` picker): stale. That skill was
retired in #3735 and no longer exists.
- **#3620 item 3**: declined, as the maintainer decided on #3746. The
reason sentences it asked for are added above.
- **#3620 item 4**: it still stood on develop, since step 5's "then
dispatches" read as a dispatch during the freeze. Fixed above.
- **#3620 item 5**: it still stood on develop, since `test -x` accepted
any executable. Fixed above.
- **#3766**: already resolved on develop. `repo-worktree` "The Base
Branch" names "Creating a Worktree"'s return of the base clone to its
own working branch as the second exception. It applies where a
continuation finds the task branch checked out there. That landed in
#1685, so no edit was needed.
- **#3869**: parked behind decision #4167 and left out of this pull
request's closing line. A draft of #3869's own proposal was taken back
out of this branch. In it, the agent installs the hook in the base clone
on the maintainer's yes. Each local review round found a new cost in
that draft: chaining a foreign hook, a Husky.Net setting breaking other
worktrees, a hook failing on branches without the config, and a
dispatched worker either stalling its round or never reaching the
maintainer. The decision issue lays out the options.

## Verification

- `scripts/build_dist.py --check` reports the generated distributions
current. `spec/validate.py` passes.
- The prose gate and `repo_gate.py --check eol` are clean on every
commit.
- The hook check was run against a constructed repository. With no hook
it exits 1, with a foreign executable 1, and with a framework-header
hook 0. The header line was read from the pre-commit framework's own
hook template on this host.

Closes on promotion: #3620, #3697, #3766

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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