LearnNewsExamplesConnect
Frontmatter
assigneesneo-fable-mnemosyne
createdAtNov 14, 2026, 7:51 PM
updatedAtNov 14, 2026, 10:52 PM
githubUrlhttps://github.com/neomjs/neo/issues/20962
authorneo-fable-mnemosyne
commentsCount2
parentIssue20892
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtNov 14, 2026, 10:32 PM

Contributor workflows cannot comment, and the team reads as outside

Closed v14.0.0/archive-v14-0-0-chunk-2 bugcontributor-experienceaibuild
neo-fable-mnemosyne
neo-fable-mnemosyne commented on Nov 14, 2026, 7:51 PM

Context

Leaf of #20892. Two workflows of the contributor program comment on pull requests: .github/workflows/merge-comment.yml at every merge from outside the team (and on a maintainer's dispatch for one pull request), and .github/workflows/contributor-heads-up.yml once, by hand, for everyone who merged before the badges were live.

On 2026-11-14 the operator started the heads-up's two posting runs. Both ended at their first note. The merge comment's runs of the same day show the same refusal, with a second defect behind it.

The Problem

1. No comment of either workflow reaches a pull request. GitHub refuses the post with 403 Resource not accessible by integration.

  • Heads-up with post: run 43630997576 (limit 5) and run 43631012442 both stopped at account 6301 on POST /repos/neomjs/neo/issues/91/comments. Nobody was told.
  • Merge comment: all 11 pull_request_target runs since the workflow merged (14:49Z) tried to post and got the same 403. Each ended green with the warning No merge comment: Resource not accessible by integration; example: run 43612054461.

Every one of those jobs logs GITHUB_TOKEN Permissions as Issues: write, PullRequests: read.

2. The run at the merge reads every team pull request as an outside one. Ten of those 11 runs were for pull requests of team accounts (#20906, #20929, #20944, #20940, #20909, #20948, #20931, #20954, #20960, #20961). The job-level if did not skip them, and the script went on to post. Only the refusal of (1) kept a contributor's comment off ten team pull requests. A dispatch does the same (run 43628764098, pr: 20954, without post).

The eleventh was a real outside merge, #20942, a first one. It got no comment.

A run without post makes no write, so no rehearsal could show (1); and (2) stayed behind (1) because the job ends green by design.

The Architectural Reality

  • A comment on a pull request goes through the issue's REST route, and the permission it needs is the pull request's: the token's issues: write does not carry it (13 refusals above). Both permission blocks say otherwise in their note ("a pull request's conversation is an issue's").
  • isOutsideHuman (buildScripts/util/claimResponse.mjs) reads author_association. GitHub answers that field for whoever asks, and the organisation's memberships are not public. Measured: the job-level if of merge-comment.yml excludes COLLABORATOR, MEMBER and OWNER, and the job ran for ten team pull requests, so the merge event's payload names none of the three for a team account.
  • GET /repos/{owner}/{repo}/collaborators/{username}/permission answers write for a team seat (role_name: maintain) and read for an outside account. The Pages badge run decides by it since neomjs/pages#78, under its own workflow's token. Under this repository's workflow token it is not yet measured (AC-7).
  • The workflow replays in test/playwright/unit/buildScripts/util/contributorStanding.spec.mjs run both scripts against a stand-in GitHub. A replay cannot see a token's permission; an assertion on the block's text can.

The Fix

  1. Both workflows ask for pull-requests: write (the comment) and issues: read (the labels of the issues a pull request closes). The note beside the line states the rule.
  2. merge-comment.yml: when isOutsideHuman reads the pull request as outside, the script asks this repository's permission for the author before any search, at a merge and on a dispatch alike. admin, maintain or write ends the run with "No comment: … is not from outside the team". A failed request (a 404 too) or an answer that names no permission warns and posts nothing, like every other failed read.
  3. claimResponse.mjs holds the one definition, beside TEAM_ASSOCIATIONS: TEAM_PERMISSIONS and isTeamPermission(permission), which throws on a value that is no permission.
  4. The job-level if stays: it skips bots, unmerged closes and any team account the payload does name, before a runner starts.

(1) and (2) land in one pull request: the permission alone would post a contributor's comment on every team merge.

Acceptance Criteria

  • AC-1 (replay, at a merge): an author whose association reads CONTRIBUTOR and whose permission is write, maintain or admin gets no comment, no summary and no warning, and no search is made.
  • AC-2 (replay, at a merge and on a dispatch): an author with read gets the comment as today, and the permission request comes before the first search.
  • AC-3 (replay): a permission request that fails with 404, and an answer that names no permission, each end with a warning and no comment.
  • AC-4 (replay): a dispatch with post for a team author renders nothing and posts nothing.
  • AC-5 (replay): a bot author causes no permission request.
  • AC-6: the spec reads both workflows' permission blocks: pull-requests: write, and no issues: write.
  • AC-7 (on the branch, before the merge; owner: the author): dispatches of the branch's files under the workflow's own token. merge-comment.yml without post for a team member's merged pull request ends with "No comment: … is not from outside the team"; for #20942 it renders the comment. contributor-heads-up.yml without post logs PullRequests: write and ends with no failed row.
  • AC-8 [L4-deferred — operator handoff needed] (after the merge; owner: the operator's posting run, the author's record here and on #20892): the first posted note is read on GitHub, and the next team merge's run ends with "No comment" and no post attempt.

Out of Scope

  • A separate comment for #20942. The heads-up puts its note on an account's latest merged pull request, and for that account it is this one.
  • The heads-up's own team check. It reads accounts from the badge ledger, which holds no team account since neomjs/pages#78; #20953 removes the run once it is recorded.
  • claim-responder.yml. It reads the same field from an issue_comment payload, and that payload does name the team: its runs for two team comments on the curated #20889 were skipped (43608643697, 43609023254). Only a pull request's association hides the membership.
  • Making the organisation's memberships public; that is the operator's decision, and this fix holds either way.

Avoided Traps

  • Trusting the merge event's payload for the team. The first version of this ticket did, without reading a run ("the event's payload carries MEMBER", "the run at the merge is not affected"). Ten runs say otherwise.
  • The permission first, the team check later. Alone it switches on a wrong comment for every team merge.
  • A list of team accounts in the module. It is a second definition of the team and goes stale at the next seat.
  • issues: write kept beside the new line. Neither workflow writes to an issue.

Related

#20892 (the program), #20893 (the merge comment), #20949 (the heads-up; its AC-9 is the record of the posting run), #20953 (removes the heads-up run), neomjs/pages#77 and neomjs/pages#78 (the same cause in the badge run).

Decision Record impact: none.

Live latest-open + closed sweep: the latest 20 open by creation date and searches over all states (Resource not accessible by integration, heads-up post refused permission, merge comment pull-requests write permission, workflow token comment pull request 403; Out of Scope of #20949 and #20959 read) at 2026-11-14T19:28Z; 52 open (red band), so the finding is folded into this existing leaf instead of a new ticket; no equivalent or prior exclusion found. A2A in-flight claim sweep (all read states, the last hour, 19:32Z): no claim on this scope. MC sweep on the symptom: no prior record. Own-assignment sweep: #20892, #20953, #20527; none covers this. Structure map: N/A.

Ownership: self-assigned. The program's comments are off and the operator's posting run waits on this, so the good first issue and help wanted labels are removed.

Retrieval Hint: "merge comment heads-up 403 Resource not accessible by integration pull-requests write team reads as outside collaborator permission"

Origin Session ID: dbc9def6-bffb-487a-b204-89679440e2bd (filed; rewritten the same evening from the first posting runs)

tobiu referenced in commit 16dc568 - "fix(build): contributor comments can post and skip the team (#20962) (#20967) on Nov 14, 2026, 10:32 PM
tobiu closed this issue on Nov 14, 2026, 10:32 PM