Skip to content

docs(contributing): add self-collision preflight draft for intra-lane duplicate PRs - #1201

Merged
castrojo merged 1 commit into
projectbluefin:mainfrom
sramkrishna:docs/self-collision-preflight
Sep 25, 2026
Merged

castrojo merged 1 commit into
projectbluefin:mainfrom
sramkrishna:docs/self-collision-preflight

Conversation

@sramkrishna

Copy link
Copy Markdown
Contributor

bluefin-common PR

What does this change?

Adds docs/contributing/self-collision-preflight.md — a planning draft for a
preflight step that intersects a lane's own open PRs before it files again — and
links it from CONTRIBUTING.md, docs/factory/agentic-model.md, and
docs/skills/pr-review/references/duplicate-cluster.md.

Why?

Closes #1060

The hold-gated protocol lists open PRs at kick time precisely so a lane can prove
its new filing is disjoint from work already in flight. Within one lane that
check failed: the quality lane opened two duplicate pairs covering identical file
clusters within three days (finpilot#285/#303, finpilot#296/#299), costing
four review slots for two pieces of work.

All four named PRs are already resolved — #285 merged 2026-09-04, #296
merged 2026-09-05, #299 merged 2026-09-06, #303 closed 2026-09-06 without
merge. The queue adjudicated them rather than any rule preventing the second
filing, so the actionable remainder is the rule.

Why this is a draft and not a direct edit to the hard rules

The issue proposes "a lane may not open a PR whose file cluster intersects its own
open hold-gated PRs." I re-audited the 31 open app-authored PRs across the ten
repositories tracked in #1058 on 2026-09-23 and found no confirmed intra-lane
duplicate cluster
. Every file-cluster intersection that exists is legitimate
work the prohibition would have blocked:

Intersecting pair Same lane? Why it is not a duplicate
bluefin#1227 / #1310 app/mergeraptor Distinct dependency digest bumps (projectbluefin/common:latest vs ublue-os/brew:latest) sharing image-versions.yml
server#238 / #239 app/mergeraptor Distinct dependency digest bumps (projectbluefin/actions vs taiki-e/install-action) sharing .github/workflows/build.yml
dakota-iso#142 / #146 app/hivecommons-hive A cosign-verification security fix and a host-side config SSOT refactor, both touching justfile
common#1186 / #1187 human (repires) Two human PRs closing different issues (#1161, #1160) sharing Justfile and .github/workflows/unit-tests.yml

A shared file is not proof of duplication — that is already the factory's rule at
review time (common-rationalizations.md,
duplicate-cluster.md).
The real finpilot duplicates shared an intent and closing issue, not merely a
path. So the draft proposes the evidenced alternative: intersect, compare hunks
and closing-issue sets, then either comment on the existing PR or disclose the
overlap in the new body
— a disclosure rule rather than a prohibition, which
keeps the judgment where the evidence is and makes it visible to the reviewer.

It is drafted rather than applied because it binds filing behavior org-wide. That
matches the precedent set for the sibling strategist findings: #1043 →
hold-gate-rubric.md (#1188) and #1052 → agent-lane-throttle.md (#1197), both
merged as drafts pending a maintainer decision. Nothing in the draft changes agent
runtime behavior, adds a label, or adds a CI gate.

PR pipeline

opened ──▶ 4-review ──▶ approved ──▶ merged

A maintainer reviews and approves; merge goes through the merge queue.
Select blocked or hold to pause the work.

Checklist

  • PR title follows Conventional Commits (fix:, feat:, docs:, ci:, refactor:, etc.)
  • just check passes
  • pre-commit run --all-files passes (all 15 hooks green, including skill front-matter, docs/SKILL.md index, internal markdown links, and the generated docs/skills/index.json catalog)
  • Skill doc updated if the change affects agent-facing conventions or behavior — docs/skills/pr-review/references/duplicate-cluster.md gained a prevention pointer to the draft; docs/factory/agentic-model.md gained a pointer from the existing duplicate-PR rule
  • AGENTS.md / docs/SKILL.md / docs/skills/ links remain valid (scripts/check-doc-links.sh passes)
  • CI is green after push — pending

AI attribution

This change was not authored via GitHub Copilot, so the Copilot-specific
Co-authored-by trailer is deliberately omitted rather than asserted. The
attribution trailer names the actual model:

Assisted-by: deepseek/deepseek-v4.1-flash via Hive

— hive: backend=litellm model=deepseek/deepseek-v4.1-flash

🐝 Hive Agent: contributor | SHA: a8fcea8

… duplicate PRs

The hold-gated preflight lists open PRs so a lane can prove its new filing is
disjoint, yet the quality lane opened two duplicate pairs covering identical
file clusters within three days (finpilot#285/projectbluefin#303, finpilot#296/projectbluefin#299). All four
are resolved as of 2026-09-23 -- three merged, one closed -- so the queue
absorbed the collision; no rule prevented the second filing.

Re-auditing the 31 open app-authored PRs across the ten repositories tracked in
common#1058 on 2026-09-23 found no confirmed intra-lane duplicate cluster. Every
file-cluster intersection that exists is legitimate work: distinct Renovate
digest bumps sharing image-versions.yml (bluefin#1227/projectbluefin#1310) and build.yml
(server#238/projectbluefin#239), a cosign fix and an SSOT refactor both touching justfile
(dakota-iso#142/projectbluefin#146), and two human PRs closing different issues that share
Justfile (common#1186/projectbluefin#1187). The prohibition as filed -- no PR whose file
cluster intersects the lane's own open PRs -- would therefore have blocked four
legitimate filings while catching neither real duplicate.

This draft proposes the evidenced alternative: intersect the lane's own open PRs
before filing, compare hunks and closing-issue sets rather than shared paths,
and either comment on the existing PR or disclose the overlap in the new body.
Drafted rather than applied because it binds filing behavior org-wide, matching
the precedent set for common#1043 (hold-gate-rubric.md) and common#1052
(agent-lane-throttle.md).

Closes projectbluefin#1060

Hive-Run: projectbluefin#1060
Hive-Plan: docs/contributing/self-collision-preflight.md
Hive-Spec: common#1060#proposed-next-step
Assisted-by: deepseek/deepseek-v4.1-flash via Hive
Signed-off-by: sramkrishna <sramkrishna@users.noreply.github.com>

@castrojo castrojo 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.

LGTM. Clear, evidenced planning draft for intra-lane duplicate PR preflight checks without adding CI overhead.

@castrojo
castrojo enabled auto-merge September 24, 2026 18:23

@Danathar Danathar 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.

This PR adds a draft proposal, docs/contributing/self-collision-preflight.md, and links to it from CONTRIBUTING.md, agentic-model.md and duplicate-cluster.md. I read the whole diff at a8fcea8. I checked the finpilot PR dates, outcomes and file clusters, the four intersecting pairs, the linked issues, and the internal links and anchors, and they all hold up. The gh pr list … --json number,title,files command also works as written. Locally, just check, tests/test_skill_docs.py, generate_skill_index.py --check and check-doc-links.sh all passed. Validate PR run 35929017936 is green, and Build is path-ignored for docs.

One sentence is wrong. The line added to agentic-model.md says "The topic search does not cover the lane's own open PRs". But gh pr list --state open --search "<topic>" has no author filter, so it does return the lane's own PRs. The real gap is that it matches on text, not on changed files.
Evidence: finpilot#296 and #299 both have "tag-images" in the title, so a topic search for it would have returned both.
Maybe something like: "The topic search matches on text, not on changed files, so it can miss the lane's own open PRs that touch the same files under a different title."

@hanthor hanthor left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is a planning doc only, so it's fine to land as a draft proposal. Heads up: it will conflict trivially with #1189 in CONTRIBUTING.md, whichever one lands second.

@castrojo
castrojo merged commit 343bdc5 into projectbluefin:main Sep 25, 2026
1 check passed
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.

[strategist] Agent lanes self-colliding: duplicate hold-gated PRs for identical clusters (finpilot #285/#303, #296/#299)

4 participants