LearnNewsExamplesConnect
Frontmatter
assigneesneo-fable-mnemosyne
createdAtNov 14, 2026, 4:11 PM
updatedAtNov 14, 2026, 6:53 PM
githubUrlhttps://github.com/neomjs/neo/issues/20949
authorneo-fable-mnemosyne
commentsCount1
parentIssue20892
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[ ] 20953 Remove the contributor heads-up run once its result is recorded
closedAtNov 14, 2026, 6:53 PM

Every outside contributor gets a badge; earlier ones hear of it once

Closed v14.0.0/archive-v14-0-0-chunk-2 enhancementcontributor-experienceaibuild
neo-fable-mnemosyne
neo-fable-mnemosyne commented on Nov 14, 2026, 4:11 PM

Context

Leaf of #20892. The merge comment (#20893) is on dev and the badge generator (neomjs/pages#73) is on main of neomjs/pages since 2026-11-14. Both are switched off by one constant, BADGES_SINCE, which is null.

As designed, an account gets a badge folder after an outside merge since the launch, and is offered the badge at its first merge since then. An account that merged before the launch hears of its standing only if it merges again. The operator on 2026-11-14: contributions pushed directly, in the years before pull requests, cannot be counted; for everyone who used pull requests, "as soon as our program is ready to use, we can indeed write a comment on their latest merged PR as a heads-up."

The Problem

A rehearsal of the generator over every merge since 2019 counts the accounts concerned. Producer: node badges/generate.mjs --dry --since 2019-11-01T00:00:00Z, neomjs/pages at 4cadb010, against the module at neomjs/neo 050889df, on 2026-11-14. Scope: merged pull requests in the organisation's public repositories whose author is outside the team and human (isOutsideHuman). The newest merge it read is #20933 (12:56:53Z). Aggregates only:

Read Value
Outside accounts with a merged pull request, and their merges 120 accounts, 309 merges
Exactly one merge / two to four / five or more 75 / 33 / 12
By rung 108 Contributor, 7 Returning, 3 Bronze, 2 Silver
First merge in 2019 to 2024 / in 2025 / in 2026 33 / 23 / 64
Of 119 accounts read: with an outside pull request in this repository, by the age of the latest (up to 30 days / 31 to 180 days / older) 36 / 19 / 56
Of 119: with merges in other public repositories only 8

One more outside account cannot be listed by search and gets no folder. The last two rows come from one more read over the rehearsal's ledger (repo:neomjs/neo is:pr is:merged author:<login> per account, outside by author_association; one account's search failed). The same read compared each account's count in the ledger with the total that search lists for it across the organisation: they agree for all 119, so the note and the badge show the same number.

Under the launch-time rule none of them holds a badge or hears of one until it merges again, and 75 of the 120 have merged exactly once.

The comment is the program's way to bring a contributor back, and it only fires at a merge. So it reaches the people who already came back, and none of the others.

The Architectural Reality

  • buildScripts/util/contributorStanding.mjs: BADGES_SINCE is null. In decideMergeComment, hasFolder needs merged_at >= badgesSince, and badgeOffer needs mergedSinceLaunchBefore === 0.
  • .github/workflows/merge-comment.yml gets mergedSinceLaunchBefore from a second search (merged:<launch>..<merge - 1 s>), reads badges/optout.json of neomjs/pages on main, and on a dispatch renders one pull request's comment (pr, post).
  • neomjs/pages, badges/generate.mjs: reads the merges since BADGES_SINCE, keeps badges/ledger.json (accounts[] with id, logins, count, firstMerge, sorted by id) and writes one folder per account in it. Its --dry --since <time> rehearses another launch time without writing. Its workflow allows a run 20 minutes; the rehearsal above took about eight.
  • The organisation's first pull request is neomjs/neo#4, created on 2019-11-11.
  • The workflow replay in test/playwright/unit/buildScripts/util/contributorStanding.spec.mjs (.github/workflows/merge-comment.yml block) runs a workflow's script against stubs and counts posts.

The Fix

1. The badges count from the first pull request. BADGES_SINCE = '2019-11-01T00:00:00Z'. Every outside merge is then "since": the generator writes a folder for every outside account on its next run, with no change in neomjs/pages, and the merge comment offers the badge at an account's first merge. The JSDoc says what the constant now is: the time from which a merge earns a badge, set before the organisation's first pull request; null switches the badges off.

2. The since-launch count goes. With that value mergedSinceLaunchBefore always equals mergedBefore. The second search of merge-comment.yml, the parameter of decideMergeComment, its JSDoc and its spec arms are removed; badgeOffer reads mergedBefore === 0.

3. The heads-up, in two forms. decideHeadsUp({pullRequest, count, comments, candidates, closedLabels, paths, repoUrl, optOut}) → {body} or null, beside decideMergeComment and built from the same parts (standing, badgeLine, nextIssues, invitation). It carries a marker of its own, headsUpMarker(number). It returns null for a pull request that is not merged or not from outside the team, for one that carries a bot-authored heads-up marker, for one whose merge comment already names the account's badge, for an account on the opt-out list and while that list is unread. A count below one throws.

The merge comment is live since 2026-11-14T14:49:53Z and names no badge until the constant is set. A pull request merged in between carries that comment, and its author's next merge is no first merge, so without the second form that account would never be offered a badge.

The pull request carries no merge comment:

This pull request was merged before Neo.mjs kept a standing for its contributors. It does now, counted in merged pull requests, so here is yours.

**Standing:** Returning Contributor (6 merged). 4 more reach Bronze Contributor.

**Your badge**, if you would like to show it, is 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 `grid`) and #B are open and unclaimed; a comment on either claims it. [The full list](...) has more if both are taken by then.

**See it run:** the engine you changed runs live in the browser: https://neomjs.com/examples

This note comes once. From here on a comment arrives with each merge. To be left out of the records, open an issue in neomjs/pages.

The standing line, the "Next" paragraph (left out without a candidate) and the invitation are the merge comment's own.

The pull request carries a merge comment that names no badge:

The badges were not live when this pull request was merged. They are now.

**Your badge**, if you would like to show it, is 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>`

To be left out of the records, open an issue in neomjs/pages.

Both forms end with the heads-up marker. decideMergeComment returns null for a pull request that carries a bot-authored marker of either kind, so a later dispatch never thanks for a merge underneath a heads-up.

4. The run. .github/workflows/contributor-heads-up.yml, workflow_dispatch only, with the inputs post (default false), limit (accounts to post to, 0 for all) and skip (account ids, comma-separated). Permissions as in merge-comment.yml. It checks out the two modules alone and, in script:

  • reads badges/ledger.json and badges/optout.json of neomjs/pages on main; if either cannot be read, it warns and posts nothing;
  • fetches the open, unassigned curated issues once;
  • for each account of the ledger in ascending id, leaving out skip and the opt-out list: the account's current login (GET /user/{id}), then its merged pull requests in this repository, newest first, and of those the latest by merged_at that came from outside the team; an account with none is listed as "no outside pull request in this repository";
  • for that pull request: its comments, the labels of the issues it closed and its files, then decideHeadsUp with the ledger's count, which is the number the badge shows;
  • spaces searches 2.1 s apart (30 a minute are allowed) and handles one account at a time;
  • writes a summary: one row per account (id, pull request, standing, form, outcome) and every body. The outcomes are: posted, would post, already told, no outside pull request in this repository, skipped, unreadable;
  • posts only with post, and to at most limit accounts;
  • warns on an account that fails and goes on.

5. Retirement. The run has one job. When its result is recorded on #20892, the workflow file, decideHeadsUp, headsUpMarker and their spec arms are removed by a leaf of that epic.

Contract Ledger

Target Surface Source of Authority Proposed Behavior Fallback Docs Evidence
BADGES_SINCE, read by decideMergeComment and by badges/generate.mjs of neomjs/pages this ticket, replacing "the launch time" of #20893 '2019-11-01T00:00:00Z': every outside merge earns a badge null: no folder is written, no comment names a badge the module's JSDoc; badges/README.md of neomjs/pages ("Who gets a folder") spec arms; the rehearsal under "The Problem"
decideMergeComment, without mergedSinceLaunchBefore this ticket the badge is offered at the account's first merge an unread opt-out list offers nothing, as today JSDoc spec arms
decideHeadsUp and headsUpMarker this ticket one of the two bodies, once per pull request null and the throw, as listed JSDoc spec arms; four rendered samples in the pull request
badges/ledger.json of neomjs/pages on main: accounts[].id and .count neomjs/pages#73 the run reads which accounts hold a badge and the count each badge shows unreadable: a warning and no post badges/README.md, "The parts" workflow replay

Acceptance Criteria

  • AC-1: BADGES_SINCE is '2019-11-01T00:00:00Z' and its JSDoc says what it is. With it set, a first merge is offered the badge, a later merge between rungs names no badge, and a later new rung says the badge shows it; a spec arm covers each.
  • AC-2: mergedSinceLaunchBefore occurs nowhere in the workflow, the module or the spec at the pull request's head (git grep, with mergedBefore as the control that the search sees those files).
  • AC-3: spec arms for decideHeadsUp: each null case; the first form at a count of 1, between rungs and at the top rung, with one candidate and with none; the second form for a pull request whose merge comment names no badge; nothing for one whose merge comment names it; the marker; the throw. One arm for decideMergeComment: a bot-authored heads-up marker silences it, a pasted one does not.
  • AC-4: the pull request body shows four bodies rendered by the module: the first form at a count of 1 on engine paths, at a count of 6 on documentation paths and without a candidate, and the second form.
  • AC-5: a workflow replay covers: a run without post posts nothing and renders every body; limit: 2 posts to two accounts; an account whose pull request carries the heads-up marker is not posted to again; an unreadable ledger or opt-out list posts nothing; an account in skip or on the opt-out list is left out; an account without an outside pull request in this repository is listed.
  • AC-6: contributor-heads-up.yml has no trigger but workflow_dispatch, checks out nothing but the two modules and reads its inputs in script only.
  • AC-7 (before the merge): a workflow_dispatch of the Pages workflow with the launch time unset ended green and committed nothing (neomjs/pages#73, Post-Merge Validation). Done on 2026-11-14: run 43610664078 on neomjs/pages main @ 398878f9.
  • AC-8 (after the merge, owner: @neo-fable-mnemosyne): the next Pages run writes the folders; their number is recorded on #20892.
  • AC-9 (after the merge, owner: @tobiu for the go, @neo-fable-mnemosyne for the record): a run without post; the operator reads its summary and names accounts for skip, if any; a run with post and limit: 5; the five comments are read on GitHub; a run with post and no limit. #20892 records the run URLs, the count per outcome and what happens to each account without a pull request in this repository.

Out of Scope

  • Work pushed directly, without a pull request. Standing counts merged pull requests, and the note says so.
  • The merge comment in the other public repositories.
  • The read's record. Its plan gains the accounts told once as a group of its own (neomjs/business#75).
  • The wording of badges/README.md in neomjs/pages ("at or after the launch time"); it follows in that repository.

Avoided Traps

  • A list of offered accounts in neomjs/pages. It would be a second rule for who holds a badge, and a second file to keep true.
  • Keeping the launch time and adding the note on top. An earlier account would get a note with no badge in it.
  • Keeping the second search "to be safe". It can no longer answer anything but the count.
  • Posting from a maintainer's account. Well over a hundred comments in a few minutes from a person's account; and a marker counts only when a bot wrote it.
  • One marker for both comments. A merge comment posted before the badges were live would silence the heads-up on that pull request, and that account would never be offered a badge.
  • A star sentence in the note. The note is unasked for, so it asks for nothing.
  • One dispatch of merge-comment.yml per pull request. Its count is the merges before that pull request plus one, which is short for an account that merged elsewhere since, and it offers the badge only at a first merge.

Related

#20892 (the epic), #20893 and its pull request #20906 (the module and the comment), neomjs/pages#73 and its pull request neomjs/pages#74 (the generator and the ledger), #20895 (the guide).

Decision Record impact: none.

Live latest-open + closed sweep: the latest 20 open by creation date (51 open, red band; this is a leaf of its owning epic #20892) and closed searches (heads-up contributors, earlier contributors badge, latest merged pull request comment, BADGES_SINCE, badge launch; Out of Scope and Avoided Traps of #20893 read) at 2026-11-14T15:2xZ; no equivalent or prior exclusion found. A2A in-flight claim sweep (the last 30 messages): no claim on this scope. MC sweep: outside contributors merge once and never come back, contributor badges program; the epic's own records of 2026-11-12 and 2026-11-13 are the prior art, and none decides a note to earlier contributors. Own-assignment sweep: 2 open (#20892, #20527); the first is this leaf's parent. Structure map: N/A, no Agent OS file is placed; the new workflow sits beside merge-comment.yml.

unowned-rationale: ready for a maintainer to build. It is not curated for outside contributors: it is the launch step and it posts to other people's pull requests. Both prerequisites are merged, so nothing blocks it.

Retrieval Hint: "heads-up to earlier contributors, latest merged pull request, BADGES_SINCE all time, badge offered once, contributor-heads-up workflow"

Origin Session ID: 83085dad-a3ea-410c-bded-744122b9e566

tobiu referenced in commit 412a9c2 - "feat(build): every outside contributor gets a badge, earlier ones are told once (#20949) (#20954) on Nov 14, 2026, 6:53 PM
tobiu closed this issue on Nov 14, 2026, 6:53 PM