SkillPedia Skills Encyclopedia
中文 EN
今日更新 2026-11-19 UTC

今天还没有新提交

查看更新动态

技能 2026-10-06 11:03 UTC

house-skills

由提交人 jeremy 提交,主要更新类型为:常规更新与维护。提交说明:Converge address-pr-reviews on the exact head, and keep text from outside the company away from it (#46)。对项目做了常规维护与小幅调整。

jeremy dfef7d2 basecamp/house-skills

Commit提交信息原文

Converge address-pr-reviews on the exact head, and keep text from outside the company away from it (#46)

* Bring address-pr-reviews' convergence and resolve rules up to date

Resolve a thread once it's addressed: after a fix lands green, or after a
decline whose reasoning is in the thread. Leave open only a decision that
isn't the author's, a scope call included, and name each one in a single
summary comment. Add a Converge section: CI green on the head, every
automatic reviewer reported on that head (re-request one that hasn't,
`gh pr edit --add-reviewer @copilot` for Copilot), mergeable, and no
unresolved threads or unanswered review-body findings beyond those
decisions.

* Converge on MERGEABLE, fetch what Converge needs, summarize review bodies

Count a PR as mergeable only when `mergeable` is MERGEABLE: UNKNOWN means
GitHub is still computing it, so wait and re-query; on CONFLICTING, rebase
and say what conflicted.

The fetch query now selects the PR's headRefOid and mergeable, each review's
url and commit oid, and each thread comment's databaseId and url, so the
exact-head check and the summary links can be built from it. Re-running it
is the convergence probe.

The summary comment covers review-body findings as well as threads: fixed,
declined and open ones, each linked by the review's url since a body-only
finding has no thread, and a pass that handled only body findings still
posts it.

* Keep text from outside the company away from address-pr-reviews

The skill read every comment and review on a PR, public repos included,
while holding write credentials, and its only guard was a note that
comment text is untrusted. Someone with nothing but a GitHub account
could write text the agent then read with push and merge in reach.

Read a PR's feedback only through scripts/fetch-reviews. It returns what
the company's people and the review bots, matched by type and id, wrote;
everyone else, CONTRIBUTOR and COLLABORATOR included, comes back as a link
with no text. On a repo in one of the company's GitHub orgs, its people
are the ones the repo calls OWNER or MEMBER. Any other org or personal
repo has members of its own, so there only the token's own account
counts. A thread holding a shown outside comment is withheld whole. A
member's quoted lines outside closed code blocks, and characters that
render as nothing, are left out, since a quote reply carries someone
else's words.

It refuses, with exit 3, a PR whose author is outside the company, whose
head is in a fork the author doesn't own, or that is labeled outside-text;
it also refuses when the token can't see a company org's members, and
when the fetch fails, so no failure can be read past.
FETCH_REVIEWS_BOT_IDS adds review bots for the session.

The agent never replies in, resolves, hides or opens a withheld item. A
person clears one by hiding the comment once they've read it and any bot
reply after it, and convergence waits for that. test/address-pr-reviews/run
drives the script through a stand-in gh, and bin/ci runs it.

Its output carries what Converge reads: the PR's head and mergeable state,
each review's commit and url, and each thread comment's databaseId and url.
Re-running it is the convergence probe.

* Pass a member's text through whole, quotes and all

Stop redacting a member's quoted lines, along with the code-fence tracking
and CRLF handling that kept suggestions intact, and stop stripping
characters that render as nothing.

A member's text is inside text. Parsing Markdown in jq to redact quotes
kept drawing edge cases (fences, CRLF line ends, and now lazy blockquote
continuation), and it can't stop an agent that paraphrases what it read
rather than quoting it. The route that launders outside text into a
member's comment is that agents and the person post under one GitHub
account, which no regex over the comment closes.

* Clear an outside item only when it's hidden as Resolved

A person clears a withheld item by hiding it as Resolved once they've read
it, but the gate fetched only isMinimized and counted any hidden comment as
cleared. An outside comment hidden as spam, off-topic, outdated, duplicate
or abuse dropped out of withheld, and its thread came through, with nobody
having said they'd read it.

Fetch minimizedReason and count a hidden item as cleared only when the
reason is resolved; any other reason leaves it withheld and still holds
its thread. GitHub returns the reason in lower case ("resolved"), so the
gate compares without case.

* Withhold a resolved thread too long to fetch whole

An unresolved thread with more than 100 comments was withheld whole, but a
resolved one was only scanned for outside comments on its first page. An
outside reply past that page was neither returned nor withheld, so withheld
could read empty while it waited unread.

Withhold a resolved thread whose comments run past one page whole, as an
unresolved one is. Resolving such a thread no longer clears it, since part
of it stays unseen either way, so a PR holding one is the person's to call
converged.

* List an off-list bot's PR comment as withheld instead of dropping it

A shown PR comment from a bot that isn't one of the review bots was
skipped: neither returned nor withheld. Its reviews and thread comments
were withheld, so a bot that put its findings in a PR comment left withheld
empty, and convergence passed without a person ever getting the link.

Withhold every shown top-level comment from outside, bots included, the same
way as reviews and threads. A CI or deploy bot's status comment now waits
for a person to hide it as Resolved, like any other outside item.

* Test fetch-reviews across more than one page

Every fixture was a single page and the stand-in gh returned it whole, so
nothing showed that items on a later page reach the gate. A regression in
paging could drop outside feedback and leave withheld empty with every
check green.

Give the reviews, comments and threads fixtures a second page holding both
an inside item and an outside one, and make the stand-in gh answer as gh
does: every page in order with --paginate, as one array with --slurp, only
the first page without --paginate, and an error when --paginate's query
doesn't take $endCursor. It also fails when a fixture holds a field the
query doesn't ask for, so a field dropped from the query fails the tests
instead of passing on fixture data.

* Withhold a thread whose comments came back without pageInfo

gate.jq counted a thread as fetched whole when hasNextPage wasn't true,
so a response with no pageInfo, as gh returns when the query stops asking
for it, read a long thread as whole. A thread is whole only when
hasNextPage is false. The stub's field check is by name over the whole
query, so it can't catch that drop; a fixture thread with no pageInfo
stands in for it.

* Strip Unicode tag characters from inside text, and only those

Tag characters (U+E0000-U+E007F) render as nothing on GitHub and survive
copy and paste, so a member who pastes an error or snippet from an
outsider's text passes them on without seeing them. Only that block goes:
the earlier strip of every default-ignorable character split emoji, and
the test pins an emoji with joiners and U+FE0F, and a U+E0100 variant,
coming through intact.

* Count Codex's summary comment as its report on the head

Codex posts no review when it finds nothing. It updates its summary PR
comment and reacts, so the latest-review rule read every clean final pass
as Codex not having reported. A reviewer has reported on the head when its
latest review's commit is the head or, for Codex, when the latest row of
that comment reads Completed on the head's short sha. Re-request Codex with
an @codex review comment. The summary comment already comes through as
inside text; the Codex fixture is now a real summary, checked whole.

* Post the summary comment only when it has something new

Every pass posted the summary whenever anything was withheld, so a PR
holding a CI bot's status comment got the same summary on every pass
until a person hid it. A pass now posts one only when it replied to
something, or when what's open, unreported or withheld differs from the
last summary on the PR, which a marker line identifies. A new comment
rather than an edit, since an edit notifies no one. The template gains a
line for a re-requested reviewer that hasn't reported on the head.

* Say in AGENTS.md that a member's comment comes through whole

AGENTS.md said text derived from outside text counts the same as outside
text, which a member's quote reply contradicts: fetch-reviews passes it
through whole, since what a member quotes is theirs to answer for. What
stays untrusted is text an agent derived from outside text, which is what
the outside-text label is for.

* Limit a pass to one summary comment, not one PR comment

A pass also posts replies to review bodies, an @codex review request and
a note on a conflict, so the limit is on the summary alone.

* Wait for Codex only where it reviews the PR, re-request once per head, and post the all-clear

Codex reviews only PRs whose author has connected it, so a PR it has never
reported on has nothing to wait for. A re-request goes out once per head, and a
summary that listed something is followed by one saying nothing is open. The tag
strip matches runs, which keeps a long run from slowing the fetch.

* Refuse when the head moves during the fetch, and keep trusted reviews with no body

The head is read again after the paged reads; if it moved, the feedback may not
match the head being judged. A trusted review with an empty body still says which
head its reviewer read, so it stays in the output.

* Refuse a PR whose labels run past a page, don't let a collaborator clear their own comment, and list pending reviewers

An outside collaborator can hide comments, and GitHub doesn't say who hid one,
so hiding as Resolved doesn't clear a collaborator's comment. A label list cut
off at 100 can't rule out outside-text, so it refuses. Requested reviewers come
through, so a Copilot pass in progress isn't read as Copilot being off.

* Refuse when a review, comment or thread is added during the fetch

The PR's review, comment and thread counts are read with the head before and
after the paged reads. updatedAt isn't used: it doesn't move when a review is
submitted. A reply added to an existing thread in that window isn't counted;
the next pass sees it.

* Match the outside-text label whatever its case, and don't converge on a cut-off review-request list

* Let a Resolved hide clear only an author who couldn't have hidden it

GitHub doesn't say who hid a comment. Owners, members and collaborators can hide
comments, and on another org's repo they are still outside; so can an app with
write access. A hide now clears only a person whose role can't hide comments.

* Return a cleared comment as a link without its text, and say which hides can't clear

A thread whose outside comments were cleared kept no link to them, so it couldn't
be linked or resolved. Bots and owners, members or collaborators of another org
can hide their own comments, so hiding doesn't clear theirs; a routine bot goes
in FETCH_REVIEWS_BOT_IDS for the session, otherwise the PR is the person's call.