Skip to content

feat(ci): status-needs-fix label clears on the author's push — unaddressed findings become queue-visible (#2815) - #2819

Merged
vybe merged 2 commits into
devfrom
fix/2815-needs-fix-label
Sep 15, 2026
Merged

vybe merged 2 commits into
devfrom
fix/2815-needs-fix-label

Conversation

@dolho

@dolho dolho commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Summary

A /review, /validate-pr or merge-train finding is posted as a comment, and a comment never moves reviewDecision — so a PR with an unaddressed CRITICAL was byte-identical, in every field the queue reads, to one nobody had looked at. Three such PRs sat under ✅ Ready and the next train re-validated each at full lane depth to rediscover what was already written on them.

The issue's "cheapest fix that would have worked", built in two halves:

  • Label status-needs-fix — created on this repo (D93F0B).
  • Skills (trinity-dev#28): the skills that post findings set it; /open-pull-requests sorts it out of Ready; /merge-train Phase 0 shows it as NFIX and Phase 1 drops it without spending Phase 2.
  • This PR — the clearing half: the author's next push removes the label, so "a finding is outstanding" needs no human bookkeeping in either direction (AC#3).

needs-fix-clear-on-push.yml

tests/unit/test_2815_needs_fix_label_workflow.py

10 static guards in the test_2767 shape: the trigger is synchronize only; it removes exactly this label and never adds one; the job is gated on the label; 403 → warning, 404 → info, else → failed; trigger is pull_request and not _target; no checkout; no run:; no pr.title/pr.body; permissions == {pull-requests: write} only. Also confirmed the #2814 trigger-parity guard accepts this workflow (a pull_request-only on: is out of its scope by design).

Not in this PR

The trinity-enterprise repo has no such label or workflow. /open-pull-requests reads both repos, and an absent label is simply never Blocked-by-label there — the train is public-repo-only. Add both there if enterprise PRs start getting /review-ed at volume.

Test Plan

Fixes #2815

🤖 Generated with Claude Code

https://claude.ai/code/session_01VpvcfgWkmQPD7DrDLmATTf

…ed finding becomes queue-visible (#2815)

A /review, /validate-pr or merge-train finding is posted as a COMMENT, and a
comment never moves `reviewDecision`. So a PR carrying an unaddressed
CRITICAL was byte-identical, in every field the queue reads, to one nobody
had looked at: three such PRs sat under Ready and the next train re-validated
each at full lane depth to rediscover what was already written on them.

The finding is now also the `status-needs-fix` label (created on the repo);
the skills that post findings set it, /open-pull-requests sorts it out of
Ready and /merge-train Phase 0 holds it (trinity-dev#28). This workflow is
the other half: the author's next push (`pull_request: synchronize`) removes
the label, so "a finding is outstanding" needs no human bookkeeping in either
direction.

`pull_request`, not `pull_request_target`, twice over: a `_target` workflow
is registered from the default branch and would be inert on dev until the
next release (#2814); and on a same-repo PR — every PR the train handles —
the plain token can already write labels. A fork PR's read-only token gets a
warning, never a red run, and the reviewer clears the label by hand (#2767).
Job-gated on the label, so an unlabelled push spends no runner. No checkout,
no `run:`, no PR text read; pinned by tests/unit/test_2815_needs_fix_label_workflow.py.

Fixes #2815

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VpvcfgWkmQPD7DrDLmATTf
@dolho

dolho commented Sep 15, 2026

Copy link
Copy Markdown
Contributor Author

/review — head 025b6703 vs origin/dev (a7acc3dd) — second pass

Files: 2 (+~300) · Scope: CLEAN — one workflow, one guard; the skill half is trinity-dev#28 and the label was created out-of-band.

Critical

None.

Informational

[I1] Any push clears the label — including a reviewer's "Update branch" and the train's own Phase 4 conflict push (Confidence 7/10)
on: pull_request: types: [synchronize] fires for every head change: the author's fix, a reviewer clicking Update branch (a merge commit on the head), and /merge-train Phase 4 pushing a conflict resolution to a member branch. Only the first addresses a finding. The issue's AC#3 says "a push by the author clears the state", and the synchronize payload carries the pusher as sender — so the job can gate on github.event.sender.login == github.event.pull_request.user.login and leave the label alone when someone else touched the branch. Within a train this cannot bite (a NFIX=YES member is dropped in Phase 1 before Phase 4 runs), but the Update branch click is one anyone can make. One expression, one test; pushing it.

[I2] branches: [dev, main] (Confidence 3/10)
Included so a release PR (dev → main) can carry and clear the label too. Harmless; noting that the merge train and both queue views are --base dev only, so on main the label is set by hand or not at all.

Clean

Verdict: READY after I1.

`synchronize` also fires for a reviewer's "Update branch" click and for the
merge train's Phase 4 conflict push to a member branch. Neither addresses a
finding, and clearing on them hands the PR back to the queue with the
finding still standing — the /review I1 on #2819. The event's `sender` is
the pusher; the job now requires it to be the PR author, which is what
AC#3 says in words ("a push by the author").

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VpvcfgWkmQPD7DrDLmATTf

@vybe vybe left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merge-train 2026-09-15: validated at lane depth; all checks green on the merged head.

@vybe
vybe merged commit 99d2a8b into dev Sep 15, 2026
24 of 25 checks passed
@vybe
vybe deleted the fix/2815-needs-fix-label branch September 15, 2026 17:46
dolho added a commit that referenced this pull request Sep 16, 2026
…ords its mutation (#2829)

Three of five ejections on the 2026-09-15 merge train — the third train
running — were tests that prove the code was written rather than that it
runs: source-text regexes over the module under test (#2811), a bound
check at the one value where both bounds coincide (#2817), a docstring
claim about CI never negative-controlled (#2805). All green.

- docs/testing/STRATEGY.md: a new "Evidence bar for a test" section beside
  the harness bar — the three spellings, the two greps (the live-consumer
  grep is the one that decides), guard-vs-source-only with the train's own
  pair (#2819 kept, #2811 ejected, same shape), mutation as the fix
  standard, bound tests away from the coincidence — each with what
  enforces it.
- .github/pull_request_template.md: a Testing checkbox for "every new test
  executes the changed path" and a `Mutation:` line naming the test(s)
  that go red with the fix reverted ("n/a — not a fix" otherwise). The
  trailing space after the colon matches the existing `Journey Impact:`
  line — a fill-in prompt.
- docs/memory/learnings.md: the class, with the prior occurrences.

The skill half — /review Step 2.5 and /validate-pr §5.4 answered first
and in writing, /implement's two done-criteria — is trinity-dev#29.

Fixes #2829

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VpvcfgWkmQPD7DrDLmATTf
vybe added a commit that referenced this pull request Sep 16, 2026
…ords its mutation (#2829) (#2833)

Three of five ejections on the 2026-09-15 merge train — the third train
running — were tests that prove the code was written rather than that it
runs: source-text regexes over the module under test (#2811), a bound
check at the one value where both bounds coincide (#2817), a docstring
claim about CI never negative-controlled (#2805). All green.

- docs/testing/STRATEGY.md: a new "Evidence bar for a test" section beside
  the harness bar — the three spellings, the two greps (the live-consumer
  grep is the one that decides), guard-vs-source-only with the train's own
  pair (#2819 kept, #2811 ejected, same shape), mutation as the fix
  standard, bound tests away from the coincidence — each with what
  enforces it.
- .github/pull_request_template.md: a Testing checkbox for "every new test
  executes the changed path" and a `Mutation:` line naming the test(s)
  that go red with the fix reverted ("n/a — not a fix" otherwise). The
  trailing space after the colon matches the existing `Journey Impact:`
  line — a fill-in prompt.
- docs/memory/learnings.md: the class, with the prior occurrences.

The skill half — /review Step 2.5 and /validate-pr §5.4 answered first
and in writing, /implement's two done-criteria — is trinity-dev#29.

Fixes #2829


Claude-Session: https://claude.ai/code/session_01VpvcfgWkmQPD7DrDLmATTf

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: Eugene Vyborov <1073874+vybe@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants