[x] 20908 Docs initial source can miss highlighting and line numbers
blocking
[ ] 20895 The guide explains standing and the badge; the template asks the model, [ ] 20894 From five merged pull requests a contributor holds two curated claims
closedAt
Nov 14, 2026, 3:49 PM
A merged outside pull request gets one comment: standing and next issues
Leaf of #20892. At the merge of an outside pull request one comment tells the author where they stand, hands over a badge line at a rung, and names two issues they could take next. The numbers behind it and the reasons for each choice are in the epic.
Restated on 2026-11-13. The badge is per contributor (#20892, neomjs/pages#73): its address names the account, so the line below carries the author's login and numeric id. The badge paragraph is rendered only once BADGES_SINCE is set, which happens after neomjs/pages#73 is live. The comment ships before that, with standing and the next issues.
The Problem
A merge is the one moment at which an outside contributor certainly hears from us, and today it carries nothing. 39 of 47 contributors since July merged exactly once.
The Architectural Reality
buildScripts/util/claimResponse.mjs is the pattern and the source of the shared definitions: CURATED_LABELS (:27), TEAM_ASSOCIATIONS (:33), isOutsideHuman (:108), replyMarker (:128), pickAlternatives (:142). isOutsideHuman reads user.type and author_association, and a pull request payload carries both under the same names. Its spec is test/playwright/unit/buildScripts/util/claimResponse.spec.mjs.
.github/workflows/claim-responder.yml is the workflow template: a sparse checkout of the module from the default branch with persist-credentials: false, the payload read in actions/github-script and never interpolated into a shell step, and the candidates query repo:<owner>/<repo> is:issue is:open label:"<label>" no:assignee -linked:pr.
A pull_request_target run on closed runs in the base repository's context for a fork's pull request and needs no run approval. It anchors its check runs on the pull request's head; .github/workflows/review-admission-mergeability.yml:9–12 records what a red one leaves behind (#20061).
The badge files are neomjs/pages#73.
The Fix
1. buildScripts/util/contributorStanding.mjs, pure, beside claimResponse.mjs, importing its outside test and its labels:
RUNGS: the frozen list below, each {slug, merges, name}.
standing(count) → {rung, next, remaining}; rung is null below one merge, next is null at the top rung.
BADGES_SINCE: the launch time of the badges as an ISO string, or null. It is null until neomjs/pages#73 is live, and that repository reads it from this module.
badgeFolder(login, id) → <login>-<id> with the login in lowercase, and badgeLine(login, id, form = 'card') → the HTML line of "The words".
nextIssues({closedLabels, candidates, seed}) → up to two {number, reason}. A candidate that shares a label with the closed issue is preferred, the curated labels, the type labels (bug, enhancement, documentation) and ai excepted; the reason is that label, and a candidate without one carries none.
invitation(paths) → one of the two constants of "The words".
mergeMarker(number) and decideMergeComment({pullRequest, mergedBefore, mergedSinceLaunchBefore, comments, candidates, closedLabels, paths, repoUrl, badgesSince, optOut}) → {body} or null (not merged, a bot, a team author, or a bot-authored marker already there).
contributor — 1 merged pull request, Contributor
returning — 5, Returning Contributor
bronze — 10, Bronze Contributor
silver — 25, Silver Contributor
gold — 50, Gold Contributor
diamond — 100, Diamond Contributor
core — 250, Core Contributor
2. .github/workflows/merge-comment.yml on pull_request_targetclosed. The job runs when the pull request is merged and its author is outside the team and human. It checks out the two modules alone, then in script: one search for the merges before this one (org:neomjs is:pr is:merged author:<login> merged:< the event's merged_at), the labels of the issue the pull request closes, the candidates query, the first page of changed files, and the pull request's comments for the marker. It posts once. A workflow_dispatch with pr and post (default false) renders the comment for a given pull request into the job summary.
3. The words, verbatim, with {…} filled in.
At the first merge and at each new rung:
Merged. Thank you: this is your first merged pull request in Neo.mjs.
Standing: {name} ({n} merged). {remaining} more reach {next name}.
Your badge, if you would like to show it, exists within the hour at https://neomjs.com/badges/{login}-{id}/ with three forms to choose from. The card's line:
<a href="https://neomjs.com/badges/{login}-{id}/"><img src="https://neomjs.com/badges/{login}-{id}/card.svg" alt="Neo.mjs contributor"></a>
Next, if you want one: #{A} (also {label}) and #{B} are open and unclaimed; a comment on either claims it. [The full list]({curated list}) has more if both are taken by then.
{invitation}
A star helps others find the project.
At a later rung the first line reads "Merged. Thank you: that makes {n} merged pull requests of yours in Neo.mjs." At the top rung the "more reach" sentence is left out.
Between rungs:
Merged. Standing: {name} ({n} merged). {remaining} more reach {next name}.
Next, if you want one: (the same sentence)
The "Next" paragraph is left out when no open, unassigned curated issue exists. The badge paragraph is rendered when the account has no earlier outside merge since BADGES_SINCE, so every contributor is offered the badge once, including those who merged before the launch; that costs one more search (merged:>= the launch time and merged:< the event). At a later rung it is replaced by one sentence: "Your badge shows it within the hour." While BADGES_SINCE is null, neither is rendered. The two invitations:
Changed files under src/, apps/, examples/ or resources/scss/: "See it run: the engine you changed runs live in the browser: https://neomjs.com/examples"
Anything else: "Take it with you: the working rules this repository's agents load are public and install into any repository: https://github.com/neomjs/neo-agent-skills"
a soft error warns and ends green; the merge gets no comment
the file's header comment
three rendered samples in the pull request
The comment's words
this ticket
the three forms above
the "Next" paragraph is omitted without candidates
—
the spec's rendered strings
The exports neomjs/pages#73 reads: RUNGS, standing, BADGES_SINCE, badgeFolder, badgeLine, and isOutsideHuman of claimResponse.mjs
this ticket, neomjs/pages#73
names and shapes are a contract across repositories; that repository checks out exactly these two files, so the module imports ./claimResponse.mjs and nothing else
none: a change here is a change there
the module's JSDoc names the reader
a spec arm for the folder name's shape, <lowercase login>-<digits>
badges/optout.json of neomjs/pages, read by merge-comment.yml after the launch through the new export parseOptOut(text)
neomjs/pages#73, this ticket
a JSON array of numeric account ids; a listed account is offered no badge. optOut defaults to null, so a caller that reads no list promises no folder
unreadable, malformed or missing: no badge paragraph for anyone, and a warning
the workflow's header and the README beside the file in neomjs/pages
spec arms for an empty, a listed, a missing and a malformed list
Acceptance Criteria
AC-1: the module and a spec beside claimResponse.spec.mjs. The spec covers each rung boundary (0, 1, 4, 5, 9, 10, 24, 25, 49, 50, 99, 100, 249, 250, 251), the three forms, the top rung, both invitations, no candidates, the marker, a bot author and a team author.
AC-2: the count is the merges before the event plus one, from one search query. Nothing is stored.
AC-3: the badge line uses the account's folder (<login>-<id>: the lowercase login and the numeric id of the payload), the card form, the record as its link and the alt text Neo.mjs contributor. With BADGES_SINCE null the comment renders no badge paragraph and no badge sentence; a spec arm covers each state.
AC-4: the workflow never checks out the pull request's head, reads the payload in script only, and posts once: a re-run finds the bot-authored marker and stops.
AC-5: a failed query or post ends the run green with a warning. No check run of this workflow can leave a red mark on a merged pull request.
AC-6: the pull request body shows three samples rendered by the module: a first merge on engine paths, a merge between rungs, a first merge on documentation paths. The dispatch dry run is checked after the merge (AC-9), because a dispatch runs the default branch's copy of the workflow.
AC-7: no sentence in any form tells an agent to act on someone's behalf. The reviewer reads the three forms against that.
AC-8: every export has JSDoc with @summary; the workflow's header comment says what it reads and what it never does.
AC-9 (after the merge): a workflow_dispatch with post false renders a comment into the job summary without posting. The URL of the first real comment is recorded here; it is the start of the read. When neomjs/pages#73 is live, BADGES_SINCE is set in a one-line change.
Out of Scope
The claim rule and the guide (the epic's other leaves), including a link from the badge paragraph to the guide. The standing line's sentence about two curated claims at returning ships with #20894, which adds the rule it states.
The other public repositories.
A stored standing.
Avoided Traps
A second definition of "outside". Import isOutsideHuman. A count made with gh search prs --json author reads is_bot: false on bot authors, and a dependency bot's association is CONTRIBUTOR; counted that way, 49 outside merges read 112.
Checking out the head, or interpolating a title or a login into a shell step. The event comes from a fork.
A run that can fail red. See AC-5.
Waiting for search to index the merge. The merged:< term and the plus one make the count exact at once.
Related
#20892 (the epic), neomjs/pages#73 (the folders and their workflow; a prerequisite of the badge paragraph, not of the comment), #20889 (the guide's doors), #20805 (the three-day claim).
Decision Record: NOT_NEEDED. Decision Record impact: none.
Live latest-open + closed sweep, A2A, Memory Core and own-assignment sweeps: as attested on #20892 at 2026-11-13T19:2xZ; no ticket on a merge comment exists. Structure map: N/A. Structural pre-flight: the module sits beside its sibling buildScripts/util/claimResponse.mjs, the spec beside that module's spec.
unowned-rationale: the operator asked for this without delay, so it is a maintainer lane and carries no curated label. Any maintainer seat may claim it.
Retrieval Hint: "merge comment workflow, contributor standing module, rungs, next issues with a reason, pull_request_target closed"
tobiu referenced in commit 50dc0e3 - "feat(build): a merged outside pull request gets one comment (#20893) (#20906) on Nov 14, 2026, 3:49 PM
Context
Leaf of #20892. At the merge of an outside pull request one comment tells the author where they stand, hands over a badge line at a rung, and names two issues they could take next. The numbers behind it and the reasons for each choice are in the epic.
The Problem
A merge is the one moment at which an outside contributor certainly hears from us, and today it carries nothing. 39 of 47 contributors since July merged exactly once.
The Architectural Reality
buildScripts/util/claimResponse.mjsis the pattern and the source of the shared definitions:CURATED_LABELS(:27),TEAM_ASSOCIATIONS(:33),isOutsideHuman(:108),replyMarker(:128),pickAlternatives(:142).isOutsideHumanreadsuser.typeandauthor_association, and a pull request payload carries both under the same names. Its spec istest/playwright/unit/buildScripts/util/claimResponse.spec.mjs..github/workflows/claim-responder.ymlis the workflow template: a sparse checkout of the module from the default branch withpersist-credentials: false, the payload read inactions/github-scriptand never interpolated into a shell step, and the candidates queryrepo:<owner>/<repo> is:issue is:open label:"<label>" no:assignee -linked:pr.pull_request_targetrun onclosedruns in the base repository's context for a fork's pull request and needs no run approval. It anchors its check runs on the pull request's head;.github/workflows/review-admission-mergeability.yml:9–12records what a red one leaves behind (#20061).The Fix
1.
buildScripts/util/contributorStanding.mjs, pure, besideclaimResponse.mjs, importing its outside test and its labels:RUNGS: the frozen list below, each{slug, merges, name}.standing(count)→{rung, next, remaining};rungis null below one merge,nextis null at the top rung.BADGES_SINCE: the launch time of the badges as an ISO string, or null. It is null until neomjs/pages#73 is live, and that repository reads it from this module.badgeFolder(login, id)→<login>-<id>with the login in lowercase, andbadgeLine(login, id, form = 'card')→ the HTML line of "The words".nextIssues({closedLabels, candidates, seed})→ up to two{number, reason}. A candidate that shares a label with the closed issue is preferred, the curated labels, the type labels (bug,enhancement,documentation) andaiexcepted; the reason is that label, and a candidate without one carries none.invitation(paths)→ one of the two constants of "The words".mergeMarker(number)anddecideMergeComment({pullRequest, mergedBefore, mergedSinceLaunchBefore, comments, candidates, closedLabels, paths, repoUrl, badgesSince, optOut})→{body}or null (not merged, a bot, a team author, or a bot-authored marker already there).contributor— 1 merged pull request, Contributorreturning— 5, Returning Contributorbronze— 10, Bronze Contributorsilver— 25, Silver Contributorgold— 50, Gold Contributordiamond— 100, Diamond Contributorcore— 250, Core Contributor2.
.github/workflows/merge-comment.ymlonpull_request_targetclosed. The job runs when the pull request is merged and its author is outside the team and human. It checks out the two modules alone, then in script: one search for the merges before this one (org:neomjs is:pr is:merged author:<login> merged:<the event'smerged_at), the labels of the issue the pull request closes, the candidates query, the first page of changed files, and the pull request's comments for the marker. It posts once. Aworkflow_dispatchwithprandpost(default false) renders the comment for a given pull request into the job summary.3. The words, verbatim, with
{…}filled in.At the first merge and at each new rung:
At a later rung the first line reads "Merged. Thank you: that makes {n} merged pull requests of yours in Neo.mjs." At the top rung the "more reach" sentence is left out.
Between rungs:
The "Next" paragraph is left out when no open, unassigned curated issue exists. The badge paragraph is rendered when the account has no earlier outside merge since
BADGES_SINCE, so every contributor is offered the badge once, including those who merged before the launch; that costs one more search (merged:>=the launch time andmerged:<the event). At a later rung it is replaced by one sentence: "Your badge shows it within the hour." WhileBADGES_SINCEis null, neither is rendered. The two invitations:src/,apps/,examples/orresources/scss/: "See it run: the engine you changed runs live in the browser: https://neomjs.com/examples"Contract Ledger
contributorStanding.mjsexports@summaryon each exportmerge-comment.ymlRUNGS,standing,BADGES_SINCE,badgeFolder,badgeLine, andisOutsideHumanofclaimResponse.mjs./claimResponse.mjsand nothing else<lowercase login>-<digits>badges/optout.jsonof neomjs/pages, read bymerge-comment.ymlafter the launch through the new exportparseOptOut(text)optOutdefaults to null, so a caller that reads no list promises no folderAcceptance Criteria
claimResponse.spec.mjs. The spec covers each rung boundary (0, 1, 4, 5, 9, 10, 24, 25, 49, 50, 99, 100, 249, 250, 251), the three forms, the top rung, both invitations, no candidates, the marker, a bot author and a team author.<login>-<id>: the lowercase login and the numeric id of the payload), the card form, the record as its link and the alt textNeo.mjs contributor. WithBADGES_SINCEnull the comment renders no badge paragraph and no badge sentence; a spec arm covers each state.@summary; the workflow's header comment says what it reads and what it never does.workflow_dispatchwithpostfalse renders a comment into the job summary without posting. The URL of the first real comment is recorded here; it is the start of the read. When neomjs/pages#73 is live,BADGES_SINCEis set in a one-line change.Out of Scope
returningships with #20894, which adds the rule it states.Avoided Traps
isOutsideHuman. A count made withgh search prs --json authorreadsis_bot: falseon bot authors, and a dependency bot's association isCONTRIBUTOR; counted that way, 49 outside merges read 112.merged:<term and the plus one make the count exact at once.Related
#20892 (the epic), neomjs/pages#73 (the folders and their workflow; a prerequisite of the badge paragraph, not of the comment), #20889 (the guide's doors), #20805 (the three-day claim).
Decision Record: NOT_NEEDED. Decision Record impact: none.
Live latest-open + closed sweep, A2A, Memory Core and own-assignment sweeps: as attested on #20892 at 2026-11-13T19:2xZ; no ticket on a merge comment exists. Structure map: N/A. Structural pre-flight: the module sits beside its sibling
buildScripts/util/claimResponse.mjs, the spec beside that module's spec.unowned-rationale: the operator asked for this without delay, so it is a maintainer lane and carries no curated label. Any maintainer seat may claim it.
Retrieval Hint: "merge comment workflow, contributor standing module, rungs, next issues with a reason, pull_request_target closed"