Repository navigation
Conversation
Related #3393 Two report-only workflows beside the existing ones, and the scripts they run: - silent-revert.yml: on pull_request, runs the base commit's copy of .github/scripts/silent-revert.mjs against the pull request's own files (base..HEAD), and reports lines that revert lines main added. On the one pull request that adds the script there is no base copy, so that single run uses its copy under the same read-only token. - audit-merges.yml: on a daily schedule and by hand, lists merged pull requests since the previous successful run and reports any whose merge commit did not carry the passing gate run the merge-gate rules require. - Neither workflow writes to the repository, and neither is named, nor replaces, FlyBot required checks. tests.yml is untouched.
|
Correcting one line of the description, on head The description says no real run exists for either workflow. That is now false for one of them, because a Real run, What that run exercised is the documented exception, not the normal path: Still no real run, |
Related #3393 `continue-on-error: true` on the audit step turned a run that reported a finding green. The watermark is the last *green* run of this workflow, so the next run took that run's head_sha as `--since` and signed yesterday's bypasses off as `earlier`: each bypassed merge showed up once, in a green run nobody opens. The comment above the watermark and the script's `exit 1` both promise the opposite. Report-only means it blocks no pull request and writes nothing, not that it can never be red. The first run is `--baseline` (every finding is earlier, exit 0), so removing the line does not start red. tests.yml is untouched.
New head:
|
| workflow | job / check name | triggers | required | can it turn red? |
|---|---|---|---|---|
audit-merges.yml |
audit-merges |
schedule (41 3 * * *) + workflow_dispatch |
no | yes — a finding after the watermark makes the run red; --baseline is green |
silent-revert.yml |
silent-revert |
pull_request (opened/synchronize/reopened) + workflow_dispatch |
no | no, by design — the script reports and exits 0, and the step keeps continue-on-error on pull_request. It is a warning-level check; do not use it as a required gate as-is (that would need dropping the exit-0 design or reading the step summary) |
Both are non-required, neither is named nor replaces FlyBot required checks.
Still open, not changed here (you narrowed the scope to one thing)
silent-revert.yml:14 has workflow_dispatch.inputs.pr: required: false, while the checkout ref is refs/pull/${{ … || inputs.pr }}/head: dispatching by hand with the input empty checks out refs/pull//head and fails before the step's friendly ::error::workflow_dispatch needs the pr input can run. One-word fix (required: true), say the word and it goes in with the next slice rather than this one.
Evidence, on the new head's own bytes (codeload tarball of 7add1600)
$ sha256sum .github/workflows/{audit-merges,silent-revert,tests}.yml
db1903a9a8d888b0a0955cfa8be48dfe37e306a7b9e0e5a05e9c1ca53be140a4 audit-merges.yml
7812c3f9eece3ef60de9f51cfa5bd17ec353838a7d8e73407d1056b7baa6b74b silent-revert.yml
6f60af36d734e48933f585e05857c2878f6673430065742568603fdea57fe2a9 tests.yml ← same as main
$ grep -n continue-on-error .github/workflows/audit-merges.yml
(none)
$ node --test '.github/scripts/*.test.mjs'
ℹ tests 31 / pass 31 / fail 0 / skipped 0
逐文件: silent-revert.test.mjs 10, silent-revert-collect.test.mjs 3, audit-merges.test.mjs 18
The 31 is the correct number for this slice (my earlier 55/55 was the two branches' tests together; risk-gate* files are not in this PR).
Dry runs re-checked against the new bytes, unchanged behaviour: PR=886 … silent-revert.mjs --repo-dir replay-886 → 90 line(s) on plugins/social/src/social.js, 270 line(s) on plugins/social/test/social.test.js, silent-revert: 2 finding(s) on 2 file(s) — source 1, test 1, exit 0. audit-merges.mjs with the gh shadow + mixed fixture → 4 commits on main, 2 bypassed the queue, 1 direct, exit 1; with --baseline → same three as earlier …, exit 0.
CI on this head
/commits/7add1600/check-runs → 16 checks, silent-revert completed success in run 45776064097 (job 139759889852) — that is the pull_request path again, i.e. wiring only. audit-merges has no run and, being schedule + workflow_dispatch, cannot have one before this file is on the default branch. At the sample I took the rest of FlyBot CI (45776064126) was still in progress, so I am not claiming that run's result here.
Local green and CI green are separate: 31/31 is local, on the downloaded head bytes, and tests.yml does not run .github/scripts/*.test.mjs at all, so no CI run of this PR exercises these 31 tests.
…umber Related #3393 Two changes in the gate's glue: - drop `continue-on-error: ${{ github.event_name == 'pull_request' }}`: a finding already leaves the run green, because the script exits 0. The only thing that line bought was painting a run that could not do its job green as well — no `origin/main`, a shallow history, no git. Finding green: yes. Broken green: no. That is the same line, for the same reason, just removed from audit-merges.yml. - `workflow_dispatch.inputs.pr: required: true`. With the input empty the checkout ref was `refs/pull//head`, so the run failed in checkout and the step's own `::error::workflow_dispatch needs the pr input` was unreachable. A new small test file pins the wiring: no `continue-on-error` in either gate's workflow, audit-merges keeps both its watermark run and its `--baseline` first run, and a silent-revert run against a directory that is not there exits 1.
Related #3393 The test named "it cannot turn the run red" matched the `continue-on-error` line that is now gone, so it pinned the wrong contract. It now asserts the opposite: the step has no `continue-on-error`, so a run that cannot do its job (no `origin/main`, shallow history, no git) is red, while a finding still leaves the job green because the script exits 0. Name and comment say that.
Related #3393 The watermark is looked up by workflow file name, and a workflow of that name exists in a deleted state (id 392609103, 36 runs, last success head bab1fe9 on 2026-11-24). If the lookup returns that one, the first run here is not a baseline: its log opens with `audit-merges: watermark ... (from ...)` and it judges what came after bab1fe9, not the whole history. Comment only. The filter is left alone, because it is not known yet which workflow id the name resolves to once this file is on the default branch; the first scheduled run's first line settles it.
Related #3393 The restore dropped the newline at the end of the file, so it was not yet byte for byte the original. One byte, same content.
|
Final head: The three review items from the thread, plus one comment-only record fix and the wiring test:
A bad commit in this history, named on purpose. Local tests, on this head's own bytes (
CI on this head ( What this does not prove. |
The workflow deleted that line; the file header still described it as part of the design, so the same delivery said two different things. A finding exits 0 and stays green, a script that cannot run exits 1 — the header now says that. Related #3393
Final head:
|
Related #3393
Two report-only gates beside the existing workflows, and the scripts they run. All 15 files are new; nothing existing is edited, and
tests.ymlis byte-identical tomain(sha256 6f60af36d734e48933f585e05857c2878f6673430065742568603fdea57fe2a9).compare/34a80ca5a1...1a356fa21breports 0 entries for.github/workflows/tests.yml.What it adds
.github/scripts/silent-revert.mjsmainadded after the merge base.github/scripts/audit-merges.mjsmainthat skipped the merge queue.github/workflows/silent-revert.ymlpull_request.github/workflows/audit-merges.ymlEvidence level of this slice
Only local dry runs so far. No real run exists for either workflow, and none can exist before this merges into the default branch:
audit-merges.ymlruns onschedule(a schedule only fires from the default branch) and onworkflow_dispatch;silent-revert.ymlruns onpull_request, so it will first run on the pull requests that follow this one, not on this one. Do not read the local runs below as CI state.What was actually run, on the head bytes pulled back from the API (not the working copy):
node --test '.github/scripts/*.test.mjs'→ tests 55 / pass 55 / fail 0, skipped 0.silent-revert.mjsagainst a real git replay of recorded sample#886 @ cf907be7(base/main/head rebuilt from the fixture's A and D line sets): prints#886 @fac476e: plugins/social/src/social.js: 90 line(s) …and… /social.test.js: 270 line(s) …,2 finding(s) on 2 file(s) — source 1, test 1, exit 0. The counts are the fixture's own A ∩ D.audit-merges.mjsthrough its real CLI (ghdoubled by a fixture-answering stub): a mixed walk printsbypassed queue: #680 … (merge_group: failure),bypassed queue: #622 … (merge_group: absent),direct commit: 0d1e2f3a…, exit 1; a queue-only walk prints0 bypassed the queue, 0 direct, exit 0;--since <sha>and--baselineprintearlier …lines and exit 0.Gate identity is an env value, not a constant
.github/scripts/audit-merges.mjskeepsmerge-gate.yml/Merge gateas its defaults so the recorded fixtures stay the real old-line merges they are. The workflow passes the current gate instead:That is the whole change to the old script: two lines reading
process.env.GATE_PATH/process.env.GATE_NAME, used byisGateRun. Proof of both directions on the same data: with the env set, a merge carrying a greenFlyBot required checksrun ontests.ymlis recognised as queued while#680(gate runfailure) is still reported; without the env, both merges read as(merge_group: absent).Fixtures are real samples, referenced by their historical blob sha
No fixture text was re-uploaded: each is the blob that already exists in this repository's object store, referenced by sha, so the bytes are exactly the recorded ones.
#886and#907are the two pull requests that deleted merged work and stayed green;#910is the negative control whoseAwas empty at its base and which must keep reporting nothing.Why
silent-reverthas no scheduleThe check is head-vs-base for one pull request. On
mainitsAis empty by construction, so a scheduled run there could only print a clean line — a false signal. It runs onpull_request(opened, synchronize, reopened) andworkflow_dispatch(with an optionalprinput).The script comes from the base commit (
git show origin/main:.github/scripts/silent-revert.mjs > base.mjs), so a pull request cannot weaken the check that judges it. The one exception is this repository's own condition: the pull request that adds the script has no base copy, so that single run falls back to its own copy under the same read-only token. That exception is asserted insilent-revert-collect.test.mjs, together withfetch-depth: 0, the explicitgit fetch origin main, the read-only permissions,if: github.event_name == 'pull_request', andcontinue-on-error— a report-only gate that can turn a pull request red is a required check nobody agreed to.Check names
silent-revertandaudit-merges. Neither is, nor replaces,FlyBot required checks; neither introducestests-okorenqueue-guard. Both workflows arecontents: read(plusactions: read,pull-requests: readfor the audit), and neither comments, labels, approves or merges.Known limits
audit-mergesreadsmain's last N commits (default 50) and needs the gate's identity from env; a repository that renames its gate again must update the workflow'senv, or every merge starts reading asabsent.audit-mergesrun; a day with no successful run widens the next scan rather than skipping it.silent-revertcompares line text, not blame: a re-indented or re-worded line is not a hit, and a legitimate revert is reported too — a Reviewer reads it, nothing blocks on it.