Repository navigation
fix(pr-kit): keep outdated review threads, check the whole tree for conflict markers, and pin skill contracts - #94
Merged
Conversation
…onflict markers, and pin skill contracts get-pr-comments skipped every outdated thread, but outdated means only that a later push changed the code the comment was left on. Outdated but unresolved threads now go under "Possibly stale — verify", located by originalLine (line is null on them, measured on vitejs/vite and cli/cli PRs). The thread query declares $endCursor, so gh api --paginate --slurp pages the thread list; a node(id) follow-up re-reads a thread with more than 50 comments. fix-merge-conflicts replaces git diff --cached --check, which missed an unstaged conflicted file and failed on trailing whitespace. It now lists unmerged paths and greps for markers over the whole repository in both the working tree and the index, treating exit 128 as a failed search. It states that a rebase swaps ours and theirs, and has the agent decide conflicts that leave no markers (binaries, symlinks, deleted or rename/rename paths) explicitly; submodule conflicts are out of scope. plugins/pr-kit/tests/skill-contracts.spec.ts adds 16 vitest prose anchors for these fixes and the earlier audit's contracts; each of 42 literal mutations fails its own test. Closes cpl-0ye Closes cpl-r73 Closes cpl-k3s
Contributor
|
These packages will release:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes two pr-kit skill defects from the 2026-09-17 audit and adds pr-kit's first tests. Every command claim below was measured in scratch repos or against live PRs.
Changes
get-pr-commentskeeps open threads (cpl-0ye). It skipped every outdated thread, but outdated means only that a later push changed the code the comment was left on. Outdated but unresolved threads now appear under Possibly stale — verify, located byoriginalLine(lineis null on them — measured on fix(css): @import with .css in node_modules importing a different package failed to resolve vitejs/vite#15000, #11228, #2432 and Add a skill for chaptered CLI recordings cli/cli#14475).get-pr-commentspages for real (cpl-0ye). The thread query declares$endCursor, whichgh api --paginaterequires;--slurpreturns every page. Anode(id)follow-up re-reads a thread with more than 50 comments. Measured withfirst:2: 5 pages, 9 threads;--paginatefollows the thread cursor even when a nested comments page has more.fix-merge-conflictschecks the whole tree (cpl-r73).git diff --cached --checkmissed a conflicted file left unstaged and failed on trailing whitespace. It is replaced bygit diff --name-only --diff-filter=Uplus twogit grepmarker searches with-- ':/': one over the working tree, one over the index (--cached). The pattern covers diff3|||||||and markers longer than 7; exit 128 is a failed search.fix-merge-conflictsstates that a rebase swaps sides (cpl-r73). A table and sentence: duringgit rebase,oursis the upstream andtheirsis your commit; checkgit statusforrebase in progressfirst.fix-merge-conflictshandles conflicts that leave no markers. Binaries, symlinks, and paths one side deleted or both sides renamed pass every marker check once staged, withgit addsilently keeping the working-tree copy (the upstream, during a rebase). The skill now has the agent keep a side orgit rmthe path explicitly and report it. Submodule conflicts are out of scope:git checkout --ours/--theirsexits 0 on them and changes nothing.plugins/pr-kit/tests/skill-contracts.spec.ts, 16 vitest tests, pinning the fixes above plus the earlier audit's contracts: themake-pr-easy-to-reviewtree guard, thefix-ciround cap, no skill invoking a model-disabled skill, every gh field a skill fills in being fetched, and the README'sghrequirement matching the skills that callgh. Each of 42 literal mutations fails its own test..changeset/pr-kit-audit-findings.md(pr-kit patch).cpl-121 (README
ghclaim) was already fixed on main by #54 and is closed with no code change.Review
/review-cycle:reviewconverged in 5 iterations (Codex, code-reviewer, pr-test-analyzer, silent-failure-hunter; then spec conformance and a maintainability audit). Spec conformance found no missing or wrong requirements.Follow-ups
=======, slashless skill references,Truein frontmatter, a submodule cue, nine test-tightening suggestions).Test plan
pnpm test— 727 passedpnpm lint,pnpm format:check, markdownlint — cleanclaude plugin validate ./plugins/pr-kit --strict— passedpnpm exec oakum check --strict— exit 0