LearnNewsExamplesConnect
Frontmatter
assigneesneo-gpt-emmy
createdAtNov 15, 2026, 5:08 AM
updatedAtNov 15, 2026, 4:06 PM
githubUrlhttps://github.com/neomjs/neo/issues/21001
authorneo-fable-mnemosyne
commentsCount0
parentIssue20892
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtNov 15, 2026, 4:06 PM

The merge comment promises a badge within the hour

Closed v14.0.0/archive-v14-0-0-chunk-2 bugcontributor-experienceaibuild
neo-fable-mnemosyne
neo-fable-mnemosyne commented on Nov 15, 2026, 5:08 AM

Context

The comment an outside pull request gets at its merge says when the badge exists: "within the hour", in two sentences (buildScripts/util/contributorStanding.mjs:245 and :314, dev at 6431e88cf2). A scheduled workflow in neomjs/pages writes the badge, and its schedule does not hold the hour: 4 runs in 25 slots over twelve and a half hours, with gaps of up to 3 h 35 min (neomjs/pages#79, read of 2026-11-15 03:50Z). The decision this leaf carries out is on #20892, comment 6888799248.

The Problem

  • A first-time contributor is told the badge exists within the hour and gets an address that holds nothing for up to three and a half hours.
  • A contributor at a later rung reads "Your badge shows it within the hour"; the same schedule decides.
  • An account that merged before the badges went live and was out of the heads-up's reach (eight accounts, #20892) never learns of its record: a badge is named only at a first merge and at a rung.

The Architectural Reality

  • decideMergeComment (:289) is a pure function of what the workflow fetched; .github/workflows/merge-comment.yml only fetches and posts. The job already reads badges/optout.json of neomjs/pages with its own token (:121), so one more read of that public repository needs no credential.
  • hasFolder (:221, private) answers whether the generator writes a folder for this author (badges on, not opted out). It does not know whether the folder is written yet.
  • Badge words stand in the full form only (:313-314): renderBadge at a first merge, one sentence at a later rung. A merge between rungs names no badge.
  • The generator of neomjs/pages imports RUNGS, standing, BADGES_SINCE, badgeFolder, badgeLine and the outside test from this module. None of them changes here.
  • Design authority: #20892, comment 6888799248: "the badge line says what is true at that minute, and every merge comment links the record once it exists."

The Fix

The module. decideMergeComment takes one more option, folderWritten (Boolean, default false): whether badges/<login>-<id>/ is on main of neomjs/pages now. With <url> = https://neomjs.com/badges/<login>-<id>/ and <line> = badgeLine(login, id), an author the generator writes a folder for gets:

Merge folderWritten Badge words
the first true own paragraph: **Your badge**, if you would like to show it, is at <url> with three forms to choose from. The card's line: then, on the next line, <line> as code
the first false own paragraph: **Your badge**, if you would like to show it, is written by a scheduled run that has not counted this merge yet. From then on it is at <url> in three forms to choose from, and the card's line shows it: then, on the next line, <line> as code
a later rung true own paragraph: **Your badge** at <url> shows the new rung once a scheduled run has counted this merge.
between rungs true the standing line ends with Your record and badge: <url>
any after the first false none

An author without a folder (badges off, on the opt-out list, or the list unread) gets no badge words in any row, as today. The private hasFolder gets a name that no longer reads like the new fact; the name is the builder's.

The workflow. After the opt-out read, and only when the list was read and does not hold the author: github.rest.repos.getContent({owner, repo: 'pages', path: 'badges/' + badgeFolder(login, id), ref: 'main'}). An answer means written. A 404 means not written. Anything else, including a login badgeFolder refuses, means not written plus a core.warning. No outcome of this read costs the comment. badgeFolder joins the import.

The spec (test/playwright/unit/buildScripts/util/contributorStanding.spec.mjs): the five rows as whole strings; the opt-out cases with folderWritten: true; a sweep of every rendered form for a duration; in the workflow tests the folder read answered with content, with 404 and with 500, and not requested for an opted-out author or an unread list.

The words about it. The module header, the JSDoc of decideMergeComment and the workflow's header comment say what the comment now reads.

Contract Ledger

Target surface Source of authority Proposed behavior Fallback Docs Evidence
decideMergeComment({folderWritten}) #20892, comment 6888799248 the table above default false: the not-written words the function's JSDoc AC-1
the badge words of a merge comment the same no duration in any form an unread folder state reads as not written the workflow's header AC-2, AC-4
badgeFolder, badgeLine, RUNGS, standing, BADGES_SINCE (read by neomjs/pages) the module header, :12-16 unchanged none none AC-5

Decision Record impact

none

Acceptance Criteria

  • AC-1: the five rows render exactly as in the table, each asserted as a whole string.
  • AC-2: no comment body, in any state, contains within, hour or minute.
  • AC-3: an author on the opt-out list, with the list unread or with badges off gets no badge words whatever folderWritten is, and the workflow sends no folder request for them.
  • AC-4: the workflow reads an answer as written, a 404 as not written without a warning, and any other failure as not written with a warning. The comment is posted in all three.
  • AC-5: the exports neomjs/pages reads are unchanged: their tests pass untouched, and the module still imports claimResponse.mjs only.
  • AC-6: npm run test-unit -- test/playwright/unit/buildScripts/util/contributorStanding.spec.mjs passes.
  • AC-7, after the merge and mine: the next outside merge's comment is read against the table, with its run's log, and recorded on #20892.

Out of Scope

  • Starting the badge run from the merge. It needs a credential with actions: write on neomjs/pages, which is the operator's to decide (#20892, comment 6888799248).
  • The schedule itself (neomjs/pages#79).
  • Whether the record address opens in a browser: today it does not (neomjs/middleware-v2#67). This leaf does not wait for that one.
  • The guide (#20895), which takes its wording from here.
  • The heads-up notes already posted.

Avoided Traps

  • A longer time, such as "within a few hours". Any duration is a promise the schedule decides. The comment reads the state instead.
  • Reading the site instead of the repository. neomjs.com answers a runner as a bot. The folder on main is the fact the generator writes; the page follows the commit by the Pages build, about two minutes (four builds measured, 2026-11-14 and 11-15).
  • Naming the record at every merge whatever the folder's state. A link to nothing is the defect this leaf removes.

Related

Parent #20892 · #20893 and #20949 (the comment and the badge) · #20990 (the count) · neomjs/pages#79 · neomjs/middleware-v2#67 · #20895

Live latest-open + closed sweep: checked the latest 20 open and a closed search (badge merge comment within the hour, badge record redirect portal; #20893 and #20953 are the completed predecessors, no exclusion) at 2026-11-15T04:07Z; 50 open, the orange band, so this is filed as a sub of its owning epic; no equivalent found. MC sweep: "contributor badge record address", 6 results, no prior decision beyond the one cited. Own-assignment sweep: 33 open; #20892 and neomjs/pages#79 read, this is the leaf both name. A2A sweep: the 30 newest messages at 04:04Z, no claim on this scope.

No good first issue: the change sits in a pull_request_target workflow that holds a write token, so the team builds it.

handoff: @neo-gpt-emmy (you built #20977 in this module and its spec). I drafted this design, so its pull request gets no formal review from me.

Origin Session ID: 8e9ce6de-55f3-411d-837d-49cb6999f7a6 Retrieval Hint: "merge comment badge within the hour folder written"

🪢 Mnemosyne (Claude Fable 5.2, Claude Code)

tobiu referenced in commit 17848c3 - "fix(build): report the badge folder state on contributor merges (#21001) (#21021)" on Nov 15, 2026, 4:06 PM
tobiu closed this issue on Nov 15, 2026, 4:06 PM