Skip to content

feat(ci): report a Follow-ups bullet without the advisory marker - #16008

Merged
kyle-sexton merged 3 commits into
mainfrom
feat/15937-follow-ups-marker-check
Nov 13, 2026
Merged

kyle-sexton merged 3 commits into
mainfrom
feat/15937-follow-ups-marker-check

Conversation

@kyle-sexton

Copy link
Copy Markdown
Member

Closes #15937

Summary

A pull request body whose ## Follow-ups section has a bullet without the
Pre-existing (advisory): marker now gets a ci-status warning for each such bullet, naming
the fix, plus a step-summary table of them. The sweep that files those entries as issues once
the filing pause lifts finds them only by that marker, so an unmarked bullet is never filed. The
check reports only, by the owner's decision; one switch in the step makes it blocking later.

Fix

  • AGENTS.md, "Review advisories while issue filing is paused", gains the rule: ## Follow-ups
    holds only marked review advisories, ci-status reports a bullet there without the marker,
    and a follow-up that is not a review advisory goes under a heading of its own or into a filed
    issue. The owner confirmed this rule in session. What supports it:
    • The repository's text defines the heading only as the advisory list, with every entry
      marked: AGENTS.md ("list each under ## Follow-ups ... each entry starting with
      Pre-existing (advisory):") and the source-control plugin's
      reference/review-discipline.md D4.6 ("list it instead under a ## Follow-ups heading in
      the PR body. Each entry starts with the fixed marker"). The only code that writes the
      heading, .github/scripts/pr-unblock/publish-feedback.mjs (followUpBullet), writes only
      marked bullets. No file defines the heading for anything else.
    • The issue's outcome counts every unmarked bullet as the failure: "A pull request whose
      ## Follow-ups section has a bullet without the Pre-existing (advisory): marker is told
      so". If other follow-ups were allowed there unmarked, no check could tell them from an
      advisory that lost its marker.
    • Practice does not match the text: 34 of the 77 merged bodies with the heading (the 100
      newest merged pull requests that Follow-ups in:body finds) have unmarked bullets. They mix
      review findings without the marker (Advisory:, **Pre-existing (advisory)**,
      **To verify**) with deferred work and owner decisions. 33 of the 34 came from host
      sessions and 1 from the issue lane.
  • New ci-status step "Require the advisory marker on each Follow-ups bullet" in
    .github/workflows/pr-require-checks.yml, next to "Fail a body line that would break the
    squash signature". It reads each top-level list item (-, *, +, 1., 1)) between
    ## Follow-ups and the next # or ## heading. Each must start with the marker. Prose,
    continuation lines, nested items and fenced blocks are skipped. CRLF bodies are read as LF.
    It runs on pull_request events only. A merge group carries no body, so the step skips it, as
    the linkage check does. A body edit re-runs ci-status as a contract-only event, so a fixed
    body clears the warnings without re-running the lanes.
  • Each unmarked bullet gets one ::warning annotation that starts with the fix: "For a review
    advisory, start it with 'Pre-existing (advisory): '; for any other follow-up, move it out of
    '## Follow-ups' to a heading of its own, or file it as an issue." The annotation then gives the
    body line and quotes the bullet. A step-summary block lists every such bullet by body line
    under the same fix. Other advisory checks in this workflow also surface as a ::warning and
    exit 0 (the stale-base overlap check, perf(ci): stop failing PRs that are only behind a fast-moving main #7871). No token, permission or comment path is added.

Where the check lives

In this repository, as an inline step. The shared check-contract action
(melodic-software/ci-workflows .github/actions/pr-require-checks/check-contract, pinned at
2476d5d) checks the title, the do-not-merge label and issue linkage. It has no input for
body sections. The rule comes from this repository's AGENTS.md pause, not from
components/pr-convention-policy/policy.json in melodic-software/standards, so a shared
change would put one repository's rule on every caller. The step follows the pattern of the two
repo-local body checks already in this job, and each is pinned by a scripts/*.test.sh that runs
the step body. No other repository changes.

Strength: report-only

/corrections:codify put the check on the tier 2 Tests rung (a check plus the test that pins
it). The owner chose report-only to start, for two reasons:

  • The pull-request body contract here is already advisory: the linkage check posts a comment
    and a label and never fails ci-status.
  • 34 of the 77 recent bodies with the heading would fail a blocking check.

The switch is the step's FAIL_ON_UNMARKED_FOLLOW_UPS env value, 'false' by default. Setting
it to 'true' turns each warning into an error and fails ci-status. Flip it when the share of
newly merged bodies with an unmarked bullet under ## Follow-ups has fallen well below today's
34 of 77, measured the same way: the step body run over the newest merged pull requests that
Follow-ups in:body finds.

Codify's guardrail criterion, for the record:

  • It is decided without reasoning: a line match.
  • It recurs: 34 occurrences against a threshold of 2 (recurrence.min_occurrences, default
    layer).
  • Under the AGENTS.md rule, every bullet it reports is a real violation.
  • The message names the fix first.
  • It is proven on failing and passing bodies (Verification below).
  • The same step body runs in CI and locally through its test, and reads only the open pull
    request's body.
  • No stronger rung covers it: hand-written bodies cannot be made impossible to get wrong, and
    the lane's own writer already marks its bullets.
  • The FAIL_ON_UNMARKED_FOLLOW_UPS switch is the kill switch for blocking mode, and removing the
    step turns the check off. No exceptions are needed, because a heading of its own always
    satisfies it.

Dogfooding

This repository's own pull requests are checked by it: the step runs in this repository's
ci-status, starting with this pull request's body, which has no ## Follow-ups section.

Verification

  • bash scripts/ci-follow-ups-marker.test.sh: PASS=44 FAIL=0. Before the step existed it
    failed ("no 'Require the advisory marker on each Follow-ups bullet' step"). It pins the step's
    if:, its PR_BODY env, the default FAIL_ON_UNMARKED_FOLLOW_UPS: 'false', the missing
    continue-on-error, and the step's place in ci-status before "Aggregate lane results". It
    also runs the body on:
    • reported bodies, each exiting 0 with a warning naming the line: unmarked -, *, +,
      1. and 2) bullets, Advisory:, a bolded marker, a bullet under a ### inside the
      section, a heading with trailing blanks, CRLF, one warning per bullet, the marker and the
      move named first, % escaped. The summary lists each bullet with its fix and escapes |;
    • the switch set to 'true': an unmarked bullet exits 1 with ::error::, and a marked body
      exits 0;
    • passing bodies, with no warning and no summary: marked bullets, the publish-feedback.mjs
      bullet shape, continuation lines and nested items, prose, the section ending at ## and
      #, fenced - lines, a heading inside a ``` or ~~~ block, an indented heading,
      ## Follow-ups left open, bullets in other sections, no heading, an empty body.
  • The step body ran over the 100 newest merged pull requests that Follow-ups in:body finds:
    77 have the heading, 34 draw warnings and 43 draw none. For example, refactor(autonomy): simplify resolve-prerequisites probe results #15017 ("Left for the
    second chunk of Simplify the setup autonomy plugin code (2 of 2) #14419") draws three and docs(harness-ops): point re-audit findings at live upstream sections #15211 (one marked bullet) none.
  • actionlint .github/workflows/pr-require-checks.yml: clean. shellcheck -x on the new test:
    clean.
  • Other suites that read the workflow passed locally on the first version: scripts/ci-*.test.sh,
    check-comment-hygiene (re-run on this version), check-cant-fail-scan,
    workflow-self-paths, check-lane-coverage, check-docs-only and affected-tests. Some could
    not run on this host because tools are missing, and they fail the same way on main:
    ci-review-plugin-source (node module yaml), ci-test-node-stop-commands (PyYAML), and two
    check-html-assets cases in check-script-contract (htmlhint, no npm ci). CI runs them.

Related

🤖 Generated with Claude Code

https://claude.ai/code/session_01VcupojPZLwoMUhW1ApGhJc

kyle-sexton and others added 2 commits November 13, 2026 13:25
AGENTS.md now says `## Follow-ups` holds only review advisories, each
starting with `Pre-existing (advisory):`, and that any other follow-up
goes under a heading of its own or into a filed issue. A new ci-status
step beside the squash-signature check fails a pull request body whose
top-level bullet under that heading lacks the marker, and names both
fixes. scripts/ci-follow-ups-marker.test.sh runs the step body against
failing and passing bodies.

Refs: #15937

Co-Authored-By: Claude Opus 5.5 <[email protected]>
By owner decision the check reports only, to start. Each unmarked
bullet under `## Follow-ups` is a ::warning that names the fix first,
plus a step-summary table, and the step exits 0. The step's
FAIL_ON_UNMARKED_FOLLOW_UPS env value ('false') is the one switch that
makes it fail ci-status later. AGENTS.md says the check reports such a
bullet. The test asserts exit 0 with the findings printed, and exit 1
with the switch on.

Refs: #15937

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-13T19:08:07.752382Z 5b99e7d PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5b99e7d4e2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/pr-require-checks.yml Resolved
@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 04b34e1033a6f27ba10d4eac7454bb97d08c0cab: read 2 of 2 changed file(s); 0 finding(s), 0 as inline comments.

Security review (incremental, blocking only): no security issues found

This review covers only what changed since 5b99e7d4, in the 2 listed files, and I read every hunk of both: .github/workflows/pr-require-checks.yml (a trusted path) and scripts/ci-follow-ups-marker.test.sh. This lane has already reviewed an earlier head (blocking only: yes), so only CRITICAL and IMPORTANT findings would be reported. There are none.

What changed: the "Require the advisory marker on each Follow-ups bullet" step now counts a list item indented by up to three spaces as top level. It tracks the content column of the item above (col), so a nested item is still skipped. A blank line followed by a less-indented line that is not an item ends the list (pr-require-checks.yml#L5356-L5396).

What I checked

  • Untrusted input handling. The pull request body still arrives only through the PR_BODY env variable, which this push left alone. The new code uses it only in quoted [[ =~ ]] matches and in ${#BASH_REMATCH[n]} lengths. Those lengths feed integer comparisons and $(( )) arithmetic, so no body text gets evaluated. col and gap are always numbers the script computed itself, and gap is clamped to 1 when it is over 4.
  • Workflow-command injection. entry is now BASH_REMATCH[4], which is still part of one line with \r removed. It is still cut to 100 characters and gets the same %→%25 escaping before it goes into the ::warning:: / ::error:: line. As at the earlier head, a body cannot start a second workflow command.
  • Merge holds and ci-status. The step's if:, its env, the default FAIL_ON_UNMARKED_FOLLOW_UPS: 'false' and its place before the aggregate step are all unchanged. The step stays advisory and exits 0. Reporting more bullets as top level only adds warnings, so no hold is weakened and no earlier failure can turn into a pass.
  • Test script. It only adds test cases that run the step body locally or in CI. It uses no credentials and crosses no trust boundary.
  • No token, permissions: block, trusted-actor list, kill switch, token broker, plugin manifest or instruction surface is touched by this push.

Prior findings: the one earlier post is the clean summary for the previous head. It has no inline findings to carry over.

Usage: this adds a few extra bash comparisons per body line in a step that already runs. It needs no paid resource.

critical-findings: 0

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

claude-review reviewed 04b34e1033a6f27ba10d4eac7454bb97d08c0cab: read 2 of 2 changed file(s); 0 finding(s), 0 as inline comments.

Code review (incremental, blocking only): PR #16008 at 04b34e10

No blocking findings. I reviewed only what changed since 5b99e7d4, and read every hunk of both files in the incremental diff: .github/workflows/pr-require-checks.yml (a trusted path) and scripts/ci-follow-ups-marker.test.sh. This lane had already reviewed an earlier head of this PR, so only blocking findings count this round.

What I checked in the new top-level-item logic (pr-require-checks.yml L5356–L5396)

  • What counts as an item. item_re now accepts up to three leading spaces. An item counts as top level only when col is empty or the item's indent is less than col. CommonMark puts an item at or past the content column of the item above it in that item, which matches this rule.

  • Content column. col is the indent, plus the marker width, plus the gap after the marker. A gap over 4 counts as 1, which is CommonMark's rule for a line whose content would start as indented code.

    • 10. x gives a column of 4, so - y (3 spaces) is read as top level. That is correct.
    • - x gives a column of 4, so - y (2 spaces) is read as a sibling. That is also correct.
  • BASH_REMATCH. The [ … ] test inside { … } does not reset it, so the col calculation still reads the item match.

  • Blank lines. In was_blank=$blank blank=0, the assignments run left to right, so was_blank holds the previous line's value. The list resets (col='') only for a non-blank, non-item line that has less indent than col and follows a blank line. Without the blank line, such a line is a lazy continuation and the list goes on.

  • bash -e. Every new test is either the condition of an if/elif or a [ … ] || … list, so none can end the step early. A heading line resets col and blank.

  • Tests. The eight new cases cover:

    • 2- and 3-space top-level bullets
    • a bullet after an item with a narrower content column
    • prose ending the list
    • a lazy continuation
    • a nested bullet under a marked item and under a numbered item
    • a 4-space line with no item above it

    I did not run the test. The 52 of 52 pass is the author's claim and is unverified.

Settled thread

The owner's reply on the thread about the indented top-level bullet says it was fixed in this head. The new code and the line 3 regression case (L66–L68 of the test) match that fix. I am not raising it again.

Spend

  • No new spend: this is a few more shell comparisons in the existing ci-status step on the same runner.

The review was blocking only, because this lane already reviewed an earlier head. I dropped two non-blocking edge cases:

  • A heading (###), fence or thematic break with no blank line before it, directly after a top-level item, does not end the list. A less-indented bullet after it is then skipped.
  • One comment line at L5338 is longer than the rest of the wrapped comment.

Verifier dropped 0 of 0 candidates.

The step took only a column-0 list item as top level, so a bullet
indented one to three spaces, valid CommonMark for a top-level item,
drew no warning. An item now counts as nested only when it is indented
to the content column of the item above it; a blank line then a
less-indented line ends the list. Regression cases cover the reported
input, a genuinely nested item, a lazy continuation and an item after
prose.

Refs: #15937

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 13, 2026
Merged via the queue into main with commit f2ef078 Nov 13, 2026
72 checks passed
@kyle-sexton
kyle-sexton deleted the feat/15937-follow-ups-marker-check branch November 13, 2026 19:52
@github-actions github-actions Bot added the merge-path: owner-agent Post-merge accounting record (README.md, Merge paths) label Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-path: owner-agent Post-merge accounting record (README.md, Merge paths)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Check the advisory marker on bullets under a pull request's Follow-ups

1 participant