Skip to content

feat(status): report quests another open PR also adds - #762

Merged
kixelated merged 4 commits into
mainfrom
quest/m0/follow-up-duplicates
Nov 17, 2026
Merged

kixelated merged 4 commits into
mainfrom
quest/m0/follow-up-duplicates

Conversation

@kixelated

@kixelated kixelated commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

Agents kept adding a follow-up quest that main or another open PR already had (rind's /quest-run added the FIPS fork-test hang five times and the dart-ios hang three times). Each one cost the maintainer a pick round and a manual quest rm. This PR finishes quest/m0/follow-up-duplicates.md and deletes it.

Changes

  • quest status <pr> now prints a duplicate <path> <other-pr-url> <other-path> line for each quest an open PR adds that another open PR also adds. A match is either the same path or the same title, ignoring the [size] tag, case, and spacing. --json gets a matching duplicates array. It's a warning in the status output, not an error, because two PRs can legitimately touch one quest. New code is in src/github/duplicates.ts. It reads every open PR's added files in one paged GraphQL query (50 PRs per page), falls back to REST for any PR with more than 100 files, and reads the added quests' titles at each PR's head in batched blob queries. The title query only runs when the PR itself adds a quest. A closed or merged PR reads nothing extra.
  • Guide (assets/AGENTS.md, Creation):
    • Before making a quest, agents now also search the quest files each open PR adds or changes (gh pr list --json number,url,files). Before, they only searched the tree and git history. The guide notes that searching PR titles and bodies alone misses PRs that never name the subject.
    • The search command passes --limit 1000, since gh pr list stops at 30 PRs otherwise. It also says how to page past gh's 100-file cap per PR. src/github/duplicates.ts already pages through every open PR and switches to REST past 100 files, so it needed no change.
    • When another open PR's quest already owns the work, the agent adds nothing and names that PR in the body.
    • Each duplicate line has to be resolved before the PR is marked ready or picked.
  • /quest-review resolves duplicate lines after its push and before it marks the PR ready.
  • The README's status table and quest status --help describe the new line.

Choices made without asking (listed for review):

  • I put the warning in quest status and not in quest check. quest check runs offline (nix flake check, the merge driver, quest merge's pre-queue check) and would need a token and network access. quest status is already online, and /quest-review, /quest-merge, and /quest-run read it at every step where a duplicate can still be dropped.
  • Only quests a PR adds count, as the Plan said. A rename (quest mv) or an edit to an existing quest isn't a new follow-up.
  • Duplicates already on main are left to the guide's search step plus the merge conflict two identical paths would cause. The Plan asked for the automated warning only against open PRs.

Merging main's #753, which moved the status types into quest/core behind a strict forge wire parser: Duplicate and Status.duplicates now live in src/core/forge.ts, with a parser entry, so a Kixel Quest answer must carry duplicates. Kixel Quest doesn't serve /forge yet and builds its answers with quest/github's reader, so it gets the field when it updates. The README's --json field list names duplicates.

Public API

New duplicate line in quest status and a new duplicates field in its JSON output. No breaking changes. Each status read of an open PR now costs at least one more GraphQL query. If the PR adds quests, it costs one more per 100 added quest files across the open PRs.

Validation

Follow-ups

None.

Models

Size: S
Implementer: Claude Code, claude-opus-5-5, medium effort (arm A)
Implementer: Claude Code, claude-opus-5-5, low effort (iterate, XS, arm A)

Review

Rewritten by quest review after each round. Round 3's record was written by hand: quest review couldn't write it because GitHub's REST quota was spent.

  • Head: 71ae435

  • Base: origin/main at ae12957

  • Risk: high, The required Status.duplicates field and new status output can break Kixel Code and scripts that consume status, while shipped agent rules change follow-up handling across repositories; reverting restores the code but cannot undo actions agents already took.

  • Classified: high by Codex, gpt-6.1-sol, low effort, session 01a1e8c1-35ee-7af0-a0c8-520bcc48ff39

  • Reviewer: Codex, gpt-6.1-sol, medium effort

  • Session: 01a1e899-8ccb-7561-b4dc-f490bd983ed2, round 3

  • Score: 9/10, The merge correctly carries duplicate status records into the shared types, strict parser, and test fixtures; no actionable defects were found, with builds and tests not run as instructed.

  • Rounds: 3; first round 0; findings 0: fixed 0, refuted 0, open 0

  • Findings: none

  • Reviewer: Codex, gpt-6.1-sol, low effort, shadow

  • Session: 01a1e899-8cb6-7232-ab57-7aebe056e8d4

  • Rounds: 1; first round 0; findings 0: fixed 0, refuted 0, open 0

kixelated and others added 2 commits November 17, 2026 00:14
quest status prints a duplicate line for each quest an open PR adds that
another open PR adds at the same path or under the same title, and the
guide's Creation section has agents search open PRs' quest files before
adding a follow-up.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kixelated kixelated changed the title Agents stop adding follow-ups an open PR already owns feat(status): report quests another open PR also adds Nov 17, 2026
@kixelated
kixelated marked this pull request as ready for review November 17, 2026 08:23
@coderabbitai

coderabbitai Bot commented Nov 17, 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 15 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

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d25f8ac8-f37b-4b2c-bea9-b90aeada457b
Commits

Reviewing files that changed from the base of the PR and between ae12957 and 71ae435.

Files selected for processing: 12

  • README.md
  • assets/AGENTS.md
  • assets/skills/review.md
  • quest/m0/follow-up-duplicates.md
  • src/cli/main.ts
  • src/cli/status.ts
  • src/core/forge.ts
  • src/core/index.ts
  • src/github/duplicates.ts
  • src/github/status.ts
  • test/status-fakes.ts
  • test/status.test.ts
  • 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

@kixelated kixelated left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Automated review by review (OpenAI) · 6b3a245cd4379c2580086b6fddf22e5719a846ce

  1. The pre-creation check misses older open PRs. The guide's gh pr list --json number,url,files example defaults to 30 PRs. The validation used a repo with 45 open PRs, so following the example drops 15 from the very search meant to find their quests before creation. Document a paginated command or an explicit limit checked against the open count. The later quest status warning is useful, but doesn't prevent the wasted creation work.
  2. Keep duplicate findings tied to the reported head. pullRequestStatus checks the signals' head against its initial read, then duplicateQuests independently fetches the current head for the same PR. A push between those calls can return a status for one revision with duplicate paths from another, which the review skill asks the agent to resolve. Pass the expected head into that scan and retry on mismatch, with a head-changing fixture.

Static review only; I did not run the tests.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

ℹ️ No critical issues. One gap in the guide's search command is noted inline.

Reviewed changes

I reviewed the whole PR: the new duplicate detection behind quest status, plus the guide, skill, README, and help text that point agents to it.

  • duplicateQuests in src/github/duplicates.ts: It pages every open PR's added quest/** files over GraphQL and falls back to REST for any PR with more than 100 files. It reads titles at each head in batched object(expression:) queries, and only when the PR itself adds a quest. It matches quests by path or by titleKey.
  • Status.duplicates and the duplicate line: These are computed only for an open PR, after the signal head check. The only caller is quest status.
  • Guide and /quest-review: Creation now also searches open PRs' quest files and adds nothing when another PR owns the work. Each duplicate line has to be resolved before the PR is marked ready or picked.
  • Tests: They cover a path match, a title match across size, case, and spacing, the REST fallback, ignoring MODIFIED files and AGENTS.md, skipping the title read when the PR adds no quests, and a closed PR.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using claude-opus-5-5 | 𝕏

Comment thread assets/AGENTS.md Resolved
gh pr list stops at 30 PRs without --limit and gh's files field at 100 per PR.

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

@kixelated kixelated left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Automated review by review (OpenAI) · e93233166c73c7864be4e9bd882fc649fdca0fed

The guide now covers the observed 45-PR case and calls out the per-PR file cap. My other finding still stands: the duplicate scan can use a newer head than the status record it is attached to. I’d still pass the expected head and reject a mismatch before using the paths to resolve a duplicate. Static re-review only.

Main's #753 moved the status types to quest/core behind a strict forge
wire parser, so `Duplicate` and `Status.duplicates` move there with a
parser entry, and the duplicate fakes move into test/status-fakes.ts.

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

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ No new issues found.

Reviewed changes

Changes since the prior Pullfrog review at 6b3a245.

  • Guide search fixed: assets/AGENTS.md now passes --limit 1000 to gh pr list and documents gh api --paginate for PRs over 100 files, which addresses the earlier thread.
  • Merged main: Duplicate and Status.duplicates now live in src/core/forge.ts with a strict parser entry. src/github/status.ts and the tests were adapted to match.

Pullfrog  | View workflow run | Using claude-sonnet-5-5 | 𝕏

@kixelated kixelated left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Automated review by review (OpenAI) · 71ae435c99529d113cd2ef82e38989b034e00799

P2: This makes the status field a breaking forge wire change. The merge moved duplicates into src/core/forge.ts as a required field in an exact shape. A new CLI rejects an existing Kixel Quest response without it (value.duplicates); an old CLI rejects the extra field once the server starts sending it. Since indexed reads fail rather than silently fall back, a normal staggered upgrade can break quest status. Version or negotiate the response shape, or retain the old wire shape and attach duplicate detection on a compatible path. Test the new CLI against an old status reply and protect old clients from the additive field. The prior mixed-head duplicate scan issue is still open separately. Static re-review only.

@kixelated
kixelated added this pull request to the merge queue Nov 17, 2026
Merged via the queue into main with commit 4249857 Nov 17, 2026
19 checks passed
@kixelated
kixelated deleted the quest/m0/follow-up-duplicates branch November 17, 2026 09:22
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.

1 participant