Skip to content

Fail the runtime boundary PR check on counts main would reject - #15208

Merged
cderv merged 3 commits into
mainfrom
fix/runtime-boundary-pr-mode-gate
Oct 27, 2026
Merged

cderv merged 3 commits into
mainfrom
fix/runtime-boundary-pr-mode-gate

Conversation

@cderv

@cderv cderv commented Oct 27, 2026

Copy link
Copy Markdown
Member

Follow-up to #15153 and #15183.
#15202 added four Deno.* calls in tests/unit/zip.test.ts. Its Runtime Boundary run was green, with warnings saying "a maintainer accepts the new count before merging" (run). It merged without the baseline update, and the push check on main failed from 55a313c (run) until 4bebcb4 raised tests 870 → 874.
In pull request mode only a Deno.* API that src/deno_ral replaces is an error. Every other increase is a warning and the job exits 0, so the maintainer step depends on someone reading the summary of a green check.

Fix

A PR run now fails when a count is above the PR's own tools/runtime-boundary-baseline.json, the comparison the push check on main makes after merge.
A green PR no longer turns main red.

The remedy is unchanged and stays with the maintainer: update the branch with main, run --update-baseline --accept-increase, push the baseline to the PR.
Per-line findings stay warnings, as the code is fine as written. They, one ::error and the job summary tell the contributor there is nothing to change in the PR and that the check stays red until a maintainer accepts the count.

A count the PR did not raise but that fits under its baseline (main below its baseline because nobody lowered it) is now a notice and does not fail, as main will not fail on it either.
#15183 kept it a warning. With a failing check that would leave a PR red that --accept-increase cannot fix, since it writes a value at or under the old baseline.

A label to clear the check was considered and rejected: the merged tree would still carry the old baseline, and main would fail the same way.

Replaying #15202 (55a313c against its parent) with this branch exits 1 with the four zip.test.ts warnings. With the baseline from 4bebcb4 applied it exits 0 and lists tests 870 → 874 under "Accepted in this PR".
The PR-mode test from #15183 now checks the exit status: its unaccepted case exited 0 before the fix.

dev-docs/runtime-migration/README.md records the decision for the PR 02c plan, and _TEMPLATE.md tells plans that raise a count to run --accept-increase in their own PR.

Checklist

I have (if applicable):

  • referenced the GitHub issue this PR closes
  • updated the appropriate changelog in the PR
  • ensured the present test suite passes
  • added new tests
  • created a separate documentation PR in Quarto's website repo and linked it to this PR
AI-assisted PR
  • AI tool used: Claude Code (Opus 5.5)
  • Codebase grounding: local clone
  • Human review: I have reviewed, tested, and verified the AI-generated content before submitting.

Note: autonomous AI agents submitting PRs without human oversight are not permitted — see the Code of Conduct.

cderv added 3 commits October 27, 2026 15:05
…increase

PR mode only failed for a Deno.* API with a src/deno_ral replacement; every
other increase was a warning on a green job, relying on a maintainer to read
the job summary and push the baseline bump before merging. Twice a PR merged
without it and the absolute push check turned main red (#15134, #15202).

An increase the PR's own tools/runtime-boundary-baseline.json does not accept
now fails the run. The per-line findings stay warnings, since the code is fine
as written, and one ::error plus the job summary tell the contributor there is
nothing for them to change: a maintainer updates the branch with main, runs
--update-baseline --accept-increase and pushes the baseline to the PR. Once
accepted, the findings become notices and the run passes, so a green PR no
longer implies a red main.

A PR label clearing the check was rejected: the merged tree would still carry
the old baseline and main would fail anyway.

Replayed #15202 (55a313c against its parent): exit 1 with the four
tests/unit/zip.test.ts calls; with the baseline from 4bebcb4 applied,
exit 0 and "Accepted in this PR: 870 -> 874".
The PR-mode failure used "accepted by this PR", which needs the PR to raise
the baseline above the base revision's value. When main sits below its
baseline (a count fell without --update-baseline), a PR adding a call and
running --accept-increase writes a value at or under the old one, so the
run stayed red although the push check on main would pass.

A finding now fails only when the count exceeds the PR's own baseline, the
same comparison the push check makes after merge. A count within it that
the PR did not raise is reported as a notice ("within the baseline, which
main sits below"); "accepted by this PR" keeps its meaning for counts the
PR raised.
The check counts Deno. occurrences in comments too, so the comment added with the headroom test raised the tests scope from 874 to 875 and failed the push check against the committed baseline.
@posit-snyk-bot

posit-snyk-bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Collaborator

✅ Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
✅ Open Source Security 0 0 0 0 0 issues
✅ Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@cderv
cderv merged commit 5b7009c into main Oct 27, 2026
52 checks passed
@cderv
cderv deleted the fix/runtime-boundary-pr-mode-gate branch October 27, 2026 15:11
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