Skip to content

check_pr_ont_delta.sh grades an event-SNAPSHOT body against a LIVE file list, so the documented fix can never be applied without a push #3298

Closed as not planned

Description

@noahgift

Found while unblocking PR #3093 (PVL-1, PMAT-1099).

The two sources disagree by construction

.github/workflows/ci.yml (lines 1245-1255) hands the guard:

env:
  PR_BODY: ${{ github.event.pull_request.body }}   # EVENT SNAPSHOT
run: |
  printf "%s" "$PR_BODY" > "$RUNNER_TEMP/ont-body.txt"
  gh api "repos/${GITHUB_REPOSITORY}/pulls/${PR_NUMBER}/files" --paginate \
    --jq ".[].filename" > "$RUNNER_TEMP/ont-files.txt"   # LIVE

The body is frozen at the moment the event was minted; the changed-file list is fetched live at job
time. The guard then decides "is this a sweep PR" from the live list and "did it close with a delta"
from the stale body.

Why that matters, measured

The guard failed PR #3093 with FAIL no ont-delta: line. The documented remedy is to put the line
in the PR body, so:

  1. gh pr edit 3093 --body-file … — line present, read back from the API: 1 occurrence.
  2. gh run rerun 34936163911 --failed — guard FAILED again, and the job log printed the old
    body verbatim, ending in the paragraph I had just deleted.
  3. Only git push (an empty commit was enough) minted an event whose payload carried the new body.

A rerun replays the original payload, so a body edit can never be re-graded by a rerun. The one
action the guard tells you to take is the one action that does not work. Cost here: one full CI
cycle (~13 min) plus a commit that exists only to move an event payload.

The same pattern is at line 1214 (check_pr_closes_issue.sh), so this is a class, not one step.

Not a security trade-off here

For pull_request_target the snapshot is the safe choice. These two steps run under
pull_request, where the body is equally untrusted either way and is only ever written to a file
and grepped. Reading it with gh api repos/$GITHUB_REPOSITORY/pulls/$PR_NUMBER --jq .body, exactly
as the file list is already read, makes both inputs come from the same place at the same time.

Suggested shape

Read both from the API in the same step, and keep PR_BODY only as the fallback when
github.event_name is merge_group (no PR to ask about) — where the guard already REPORTs rather
than judges.

Not fixed in #3093: touching ci.yml again would widen that PR and lapse its 3/3 quorum.

ont-delta: none — this issue adds no entity type, shape, resolves rule or reason id; it reports a wiring defect in a guard.

Activity

  1. added this to the 0.68.0 milestone on Sep 15, 2026
  2. modified the milestones: 0.68.0, 0.70.0, 0.73.0 on Sep 16, 2026
  3. noahgift commented on Sep 23, 2026

    @noahgift
    MemberAuthor

    triage 2026-09-23 (aprender-dd, standing triage owner): milestoned to 0.70.0, theme Fast Train (CI, gates, pv, release tooling, hygiene); it moved out of backlog (the 2026-09-17 overflow bucket, not a release).

  4. added
    ont-0.70Ontology spec work that must finish in 0.70 (operator 2026-09-23)
    on Sep 23, 2026
  5. noahgift commented on Sep 23, 2026

    @noahgift
    MemberAuthor

    triage 2026-09-23 (aprender-dd): kept in 0.70.0 and labelled ont-0.70. Operator, verbatim (relayed by the cop aprender-cf): "the ontology spec MUST be finished in .7". Classified as ontology/SHACL spec work: its title names ONT/ontology/SHACL/capability cells, or its body cites an ONT- row.

  6. 3 remaining items

  7. modified the milestones: 0.70.0, 0.71.0 on Oct 4, 2026
  8. added
    P1High priority
    and removed
    P0Critical priority
    on Oct 14, 2026
  9. noahgift commented on Oct 14, 2026

    @noahgift
    MemberAuthor

    P0 to P1 (2026-10-14 P0 triage): P0 now means it blocks the next release or carries the operator's own words on it; this issue does neither, so it stays on the 0.71.0 milestone at P1. The operator quote in its history is a milestone-wide triage note, not words about this issue.

  10. noahgift commented on Oct 14, 2026

    @noahgift
    MemberAuthor

    Re-parent: former parent #3569 is closed. Moved under open epic #3269 (same 0.71 train).

  11. noahgift commented on Oct 14, 2026

    @noahgift
    MemberAuthor

    Folded into #5308 as a checklist row (TRIAGE-100, 2026-10-14): the open-ticket cap is 100, so this ticket is now tracked on that master and closed as not planned. Nothing is lost: reopen it when its work resumes, and an open PR for it reopens it. Pushed branch: fix/3298-pr-body-live.

    Agent: aprender-clerk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High prioritybugSomething isn't workingont-0.70Ontology spec work that must finish in 0.70 (operator 2026-09-23)owner:aprender-a7owner sessionsize:MK̂ 3-4 h

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions