AI

验签测试写进了 PR,CI 的 pytest -q 只显示 3 passed(中英切换)

This post is currently available in Chinese only. The original text follows.Open the Chinese page →

三人、七台电脑。1 到 3 号机跑编码代理,4、5 号机审查,6 号机做 Windows 验证,7 号机负责合入。工单写得很具体:支付渠道的回调 POST /hooks/payment 现在不验签,给它补上 HMAC 校验,缺签名或坏签名都返回 401;同一 event_id 再来一次,只标记 duplicate,不要再入账。验签用 Python 标准库的 hmac,不需要 Redis 客户端。这次玩具实现里,重放记录也是一张内存表,生产上才会换成 Redis。

2 号机交来的 PR 标题是「fix: verify payment webhook signatures and reject replays」。新增了 app/webhook.py 和 tests/test_webhook.py,一共两个文件、+106 行。CI 按 requirements.txt 安装依赖,然后跑 pytest。日志里是三颗点,退出码 0。4 号机如果先看标题和绿的检查,会觉得验签测试已经写上了,可以往下翻 diff。

这篇要核对的是:这些测试到底有没有跑过;没跑的时候,缺签名的回调会不会被当成有效支付;只数通过数,或只在 pytest_runtest_logreport 里数 skip,会不会把整文件跳过当成干净。它和新的订单导出接口测试 6 通过,未登录也能把全部订单拉走谈的是测试跑过、但断言没覆盖鉴权,和代理在脚本里写了 npx react-codeshift,单元测试 3 通过谈的是测试没见过的依赖名字,都不是同一件事。今天只谈:测试写进了 PR,却在收集阶段被跳过,CI 看起来仍然全绿。

实验是我按常见的代理写法准备的夹具提交,并没有再开一个编码模型来生成这些 diff。玩具仓库的种子是 9f551af,夹具提交是 fa8e2a0。实验在本地 git 2.47.3、Python 3.13.5、pytest 9.1.1 上跑。CI 侧用一个只装了 pytest 的干净虚拟环境;对照侧另装 redis 6.1.0,仍然没有启动 Redis 服务器。没有跑 GitHub Actions,工作流 YAML 核对过关键字(name、jobs、pytest、skip_gate.py),没有用 PyYAML 解析。Windows 没有参与。machine-2-agent 是夹具身份,不是真人。

对审查来说,这比「测试不够严」更难抓。diff 里能看见断言,标题里写了验签,检查是绿的。缺的不是另一条测试,而是一次真正的执行。把 skipped 从默认日志里拿出来,再规定「改了回调文件就必须看到验签用例通过」,是为了把「写过」和「跑过」重新分开。

工单要给支付回调加上验签,CI 的 pytest -q 却只打出 3 passed

夹具提交里的 verify_signature 有一个很常见的缺口:签名头缺失时直接 return True。坏签名还是会返回 401,所以粗看这个函数「已经有验签」。我在这个提交上直接调用处理函数:不带 X-Webhook-Signature 时返回 200,正文是 status=ok, event_id=evt_demo, amount_cents=12800。这不是测试失败里的抽象数字,是一条会被入账的支付事件。

缺口写在 if not signature: return True 这一行。从控制流上看,函数里确实有一段比较签名的代码,坏签名也会被挡住;缺的是「没有头」这个分支。代理在补验签时,很容易先写「有头就校验」,把没有头的请求留给原来的成功路径。测试如果跑过,会把这个分支暴露出来。测试被跳过之后,剩下能被看见的,只有函数里那一段「像验签」的代码,和一组从未执行的断言。

那四条测试其实都写了,包括 test_unsigned_request_is_rejected。文件顶部却有一行 redis = pytest.importorskip("redis")。importorskip 在导入测试模块时就会决定跳过,轮不到 setup 或 call。pytest 在收集阶段把整个 tests/test_webhook.py 记成 1 个 skipped,不是 4 个。仓库的 pytest.ini 写了 addopts = -q --strict-markers。默认输出因此是:

...                                                                      [100%]

三颗点,没有 “1 skipped”,也没有原因。退出码 0。--strict-markers 帮不上忙,因为 importorskip 不是 pytest 标记。pytest --collect-only -q 更干净,只打印 tests/test_orders.py: 3,被跳过的文件连名字都不出现。

4 号机打开的检查日志如果只保存了默认输出,事后也搜不到 skipped。绿勾来自退出码 0。GitHub 不会因为「少跑了测试」就把检查标红,除非另外写了闸门。这和测试失败是两种完全不同的信号:失败会红,跳过保持绿。审查的人若从检查页的绿色和 PR 标题出发,很难想到验签用例一次都没执行。

加上 -rs 或 -v 之后,才能看见 collected 3 items / 1 skipped,以及原因:could not import 'redis': No module named 'redis'。种子提交 9f551af 是 3 passed、0 skipped。夹具提交的通过数没有变,所以一个 MIN_TESTS=3 的会话钩子仍然报告 ok。只数通过数,看不出这次少跑了什么。

pytest 的退出码也在帮倒忙。用例失败是 1,没有收集到任何测试才是 5,跳过只要还有别的测试通过,就是 0。这次种子里本来就有三条订单合计测试,所以整份验签文件被跳过后,退出码仍然是成功。如果仓库里只有这一份新测试,收集结果会变成 0 collected、1 skipped,退出码仍可能是 0,而不是 5。把「至少跑过 N 条」写进钩子,只能挡住测试被删光的情况,挡不住通过数刚好维持在旧水位。

同一份代码,在装了 redis 6.1.0 的虚拟环境里,7 项全部被收集。test_unsigned_request_is_rejected 失败:断言 status == 401,实际是 200。其余验签和重放用例通过——坏签名路径是写对的,缺签名才是缺口。也就是说,这些测试如果跑过,本来就会拦住这次合入。它们没跑,只是因为测试文件顶部为了一个并不需要的 Redis 客户端,把整份文件跳过了。

默认 -q 看起来像 3 通过;装上 redis 之后,缺签名的用例以 200 对 401 失败

我先写了一个只听 pytest_runtest_logreport 的跳过闸门,对照种子基线(空的 skipped 列表)。它对夹具提交给出 SKIP_GATE: OK。收集阶段的跳过不会走进 runtest 钩子,第一版闸门把最危险的那种跳过当成了什么都没发生。补上 pytest_collectreport 和 terminalreporter 的 skipped 统计之后,v2 闸门记下的 nodeid 是 tests/test_webhook.py,对照基线得到新跳过,退出码 1。

把 importorskip 从模块顶部挪到只检查 Redis 后端的那一条里(提交 90d81ac),无 redis 的 CI 里验签用例开始跑,test_unsigned_request_is_rejected 立刻失败。这才是这行 API 的正当用法:可选后端的测试自己跳过,守卫资金路径的测试必须跑。修好缺签名分支(提交 5a60f41)之后,无 redis 的环境是 7 passed、1 skipped,装了 redis 的环境是 8 passed。

跳过基线在修复提交上仍然会失败,因为新出现了 test_webhook.py::test_redis_backend_roundtrip。这是假阳性,也是它该有的礼貌:新的跳过要人看一眼,再写进 skips/allow.json,或更新默认分支上的基线。我把夹具提交的 tests/test_webhook.py 整文件放进允许清单之后,v2 闸门变成了 SKIP_GATE: OK——而缺签名回调此时照样返回 200。允许清单如果能被 1 到 3 号机上写代码的代理改,闸门就等于没有。

所以还要第二道:路径必跑。只要 app/webhook.py 出现在相对种子的 diff 里,test_unsigned_request_is_rejected、test_bad_signature_is_rejected、test_valid_signature_is_accepted 就必须出现在 passed 列表里。夹具提交缺这三条,闸门失败;只把 importorskip 下移、漏洞还在时,失败的那条不在 passed 里,仍然失败;修好之后 7 条通过,这一关通过。刚才那份允许清单骗得过跳过基线,骗不过这一层。

还有一种更安静的逃法:不要写 importorskip,直接把测试文件命名成 webhook_tests.py,或者放进 tests/manual/。pytest 默认不收集它们,skipped 列表是空的,v2 跳过闸门也会放行。路径必跑仍然会失败,因为 passed 列表里没有那三条。这就是为什么两道闸门要一起用。pytest.xfail 也一样:它不是 skip,v2 的 skipped 基线看不见,但必跑名单看的是 passed,xfail 或失败都不会过关。这次实验室没有再单独做一次改名实验,判断来自 pytest 的默认收集规则和必跑闸门已经跑过的逻辑。

跳过基线要记下收集阶段;改了 webhook.py,验签用例必须出现在 passed 里

它也有不适合的时候。真正可选的后端、没有密钥就不能打的沙箱、或明确标成手工的探活,本来就该跳过;这时不要假装有一份空的基线,而要把已经存在的跳过记在默认分支上,只对新增的报警。如果团队把 skips/allow.json 写成任意通过,或者代理的默认命令里带着「把这次新跳过补进允许清单」,两道闸门都会被拆掉。路径必跑名单本身也要人维护:只写在规则文件里、却不在 CI 里执行,等于没有;写错了路径,新文件会漏网,这也是CODEOWNERS 看不到被改了名字的路径那一类问题,不是同一层闸门能全部包下的。

如果支付回调的集成测试必须打到真实渠道,CI 没有密钥,那一条本来就可以跳过;但仓库里还应该有不碰网络的纯函数测试,覆盖缺签名、坏签名和正确签名。后者不该共享前者的 importorskip。跳过基线也不能替代覆盖率或变异测试,它只回答「这次是不是多跳过了什么」,不回答「跑过的断言够不够」。

代理之所以会把 importorskip 写在模块顶部,常见原因并不复杂。本地沙箱或 CI 镜像没有 Redis,文件一导入就出问题,最省事的办法是让整个模块在缺依赖时保持绿。requirements.txt 里本来就没有 redis,README 里或许还写着「重放可以用 Redis」。验签测试并不使用这个客户端,可它和重放测试住在同一个文件里,于是一起消失。这条工单并不要求给 CI 增加 Redis。验签路径按理说也不需要它。问题出在可选依赖和必跑测试被写进了同一个模块,跳过的粒度变成了整个文件。

明天就能抄走的做法

把 CI 里的 pytest 从纯 -q 改成至少带 -rs,让跳过原因出现在日志里。importorskip 只允许出现在真正依赖可选后端的那一条测试里,不要放在还包含验签、鉴权或资金路径的模块顶部。

用 tools/skip_plugin.py 记下本次的 skipped_nodeids,其中必须包括收集阶段的跳过。tools/skip_gate.py 对照默认分支的 skips/main.json,新出现的 nodeid 不在人写的 skips/allow.json 里就失败。再加 tools/required_tests.py:支付回调、退款、导出这类文件一旦出现在 diff 里,对应的验签或鉴权用例必须在 passed 列表中。

4、5 号机审查时,先看 pytest 摘要里的 skipped,不要只看绿勾。允许清单和基线文件的修改不要交给 1 到 3 号机上写代码的那个代理。

脚本、一段 AGENTS.md 和一份示例工作流在 signature-skip-kit.tar.gz。工作流 YAML 只核对过关键字,没有在 GitHub Actions 上跑过。

工作流文件里的步骤顺序也要写对:先跑 pytest 并写出跳过报告,再把报告和默认分支上的基线对比。只在文档里放一份 YAML、却不把它接到必需检查上,合入条件不会变。这次没有在 GitHub Actions 上跑,所以我不能把「接上之后一定能拦住」写成已经验证的结果,只能说到本地闸门的退出码为止。

今天最小的一步:下一张带验签或鉴权测试的 PR,先在 CI 日志里搜 skipped。如果新测试文件出现在 diff 里,却没有出现在 passed 列表,先不要合。

7 号机如果只把「必需检查全绿」当成合入条件,夹具提交可以进 main。6 号机的 Windows 验证这次没有跑;就算跑了,只要用同一份 pytest.ini 和同一份不带 redis 的依赖清单,默认输出看起来也会是三颗点。这件事不依赖某个操作系统,它依赖的是收集规则和退出码。

实际跑过什么

时间 2026-11-24。运行时:git 2.47.3,Python 3.13.5,pytest 9.1.1。对照环境另装 redis 6.1.0,未启动 Redis 服务器。

  • 种子 9f551af:pytest 3 通过,0 跳过。MIN_TESTS=3 通过。
  • 夹具提交 fa8e2a0:2 个文件,+106。无 redis、默认 -q:退出码 0,输出三颗点,收集到 3 项,整份 tests/test_webhook.py 被跳过。pytest -v / -rs:3 passed, 1 skipped,原因是 could not import redis。MIN_TESTS=3 仍通过。
  • 只听 pytest_runtest_logreport 的 v1 闸门:SKIP_GATE: OK。补上收集阶段的 v2 闸门:拒绝,新跳过 tests/test_webhook.py。
  • 同一提交,装上 redis 6.1.0:收集到 7 项,test_unsigned_request_is_rejected 失败(200 == 401),1 failed, 6 passed。直接调用:缺签名返回 200,收下 evt_demo / 12800;坏签名返回 401;正确签名返回 200。
  • 将 importorskip 下移到 Redis 后端那一条(90d81ac):无 redis 时验签用例开始跑,缺签名用例失败;路径必跑闸门仍失败。
  • 修好缺签名分支(5a60f41):无 redis 时 7 passed, 1 skipped;有 redis 时 8 passed。路径必跑闸门通过。跳过基线仍因新的 test_redis_backend_roundtrip 失败,直到人把这一条写入允许清单。把整份 test_webhook.py 放进允许清单后,v2 闸门放行,缺签名回调仍返回 200。

未跑:GitHub Actions(YAML 只核对关键字,未用 PyYAML 解析)、分支保护或 ruleset、真实支付网络、Windows 或 windows-latest。夹具提交不是现场跑编码模型得到的。

Three people, seven computers. Machines 1–3 run coding agents, 4 and 5 review, 6 does Windows validation, and 7 merges. The ticket is specific: the payment-channel callback POST /hooks/payment does not verify a signature today. Add HMAC checks, and return 401 when the signature is missing or wrong. A second request with the same event_id should be marked duplicate and must not be booked again. Verification uses Python’s standard hmac; it does not need a Redis client. In this toy, replay state is an in-memory set. Redis would only appear in production.

The PR from machine 2 is titled “fix: verify payment webhook signatures and reject replays”. It adds app/webhook.py and tests/test_webhook.py, two files, +106 lines. CI installs from requirements.txt and runs pytest. The log is three dots, exit code 0. If machine 4 starts from the title and the green check, it is easy to believe the signature tests are in place and to move on to the diff.

This post asks whether those tests actually ran; whether an unsigned callback is accepted as a real payment when they did not; and whether counting passes, or counting skips only in pytest_runtest_logreport, treats a whole-file skip as a clean run. It is not the same as the new export tests went 6 green, and an anonymous client could pull every order, which is about tests that ran but did not assert authorization, or the agent wrote npx react-codeshift in a script, and three unit tests passed, which is about a dependency name the suite had never seen. Today is only this: the tests were in the PR, they were skipped at collection, and CI still looked all green.

For reviewers this is harder to catch than “the tests are too weak”. The diff shows the assertions, the title mentions signatures, and the check is green. What is missing is not another test, but a real execution. Surfacing skipped in the default log, and requiring the signature cases to have passed whenever the webhook file changes, is how “written” and “run” get separated again.

The fixture commits are written in a style I have seen agents use. I did not start a coding model to produce the diffs. The toy repo seed is 9f551af; the fixture commit is fa8e2a0. The run used git 2.47.3, Python 3.13.5, and pytest 9.1.1. The CI side is a clean virtualenv with pytest only. The comparison env also has redis 6.1.0; no Redis server was started. GitHub Actions was not run. The workflow YAML was checked for keywords (name, jobs, pytest, skip_gate.py) and was not parsed with PyYAML. Windows did not take part. machine-2-agent is a fixture identity, not a person.

The ticket asked for webhook signatures. CI pytest -q still printed 3 passed

The verify_signature in the fixture commit has a common hole: a missing signature header does return True. A bad signature still returns 401, so a quick read of the function looks like “we verify”. I called the handler on that commit directly: without X-Webhook-Signature it returned 200, with body status=ok, event_id=evt_demo, amount_cents=12800. That is not an abstract assertion failure. It is a payment event that would be booked.

The hole is the line if not signature: return True. The function does contain a comparison, and bad signatures are rejected; what is missing is the “no header” branch. When an agent adds verification, it is easy to start with “if a header is present, check it” and leave header-less requests on the old success path. If the tests had run, they would have exposed that branch. Once they are skipped, what remains visible is a function that looks like verification, and a set of assertions that never executed.

All four tests were in the file, including test_unsigned_request_is_rejected. The file still starts with redis = pytest.importorskip("redis"). importorskip decides to skip while the test module is being imported, before setup or call. At collection, pytest records the whole of tests/test_webhook.py as 1 skipped, not 4. The repo pytest.ini has addopts = -q --strict-markers. The default output is therefore:

...                                                                      [100%]

Three dots, no “1 skipped”, and no reason. Exit code 0. --strict-markers does not help, because importorskip is not a pytest marker. pytest --collect-only -q is even cleaner: it prints only tests/test_orders.py: 3. The skipped file does not appear by name.

If the Actions log machine 4 opens only kept that default output, skipped cannot be grepped later either. The green check comes from exit code 0. GitHub will not fail a check because “fewer tests ran”, unless you add another gate. A failure turns the check red; a skip leaves it green. Starting from the green mark and the PR title, it is hard to notice that the signature cases never ran.

With -rs or -v, you finally see collected 3 items / 1 skipped and the reason: could not import 'redis': No module named 'redis'. Seed 9f551af is 3 passed, 0 skipped. The fixture commit’s pass count did not change, so a MIN_TESTS=3 session hook still reports ok. Counting passes does not show what this change stopped running.

Pytest’s exit codes also help hide it. Failures are 1. Collecting no tests at all is 5. Skips, as long as something else passed, are 0. The seed already had three order-total tests, so after the whole signature file was skipped the exit code was still success. If this file had been the only tests in the repo, collection could be 0 collected, 1 skipped, and the exit code might still be 0, not 5. A hook that requires “at least N tests ran” only catches the suite being wiped out. It does not catch a pass count that stays at the old waterline.

The same code, in a virtualenv with redis 6.1.0 installed, collects all 7 items. test_unsigned_request_is_rejected fails: it asserts status == 401 and gets 200. The other signature and replay cases pass — the bad-signature path is correct; the missing-header path is the hole. So if these tests had run, they would have blocked the merge. They did not run because the top of the test file skipped the whole module for a Redis client the signature tests do not use.

Default -q looks like 3 passed. With redis installed, the unsigned case fails 200 vs 401

I first wrote a skip gate that only listened to pytest_runtest_logreport, compared against the seed baseline (an empty skipped list). On the fixture commit it printed SKIP_GATE: OK. Collection-time skips do not enter the runtest hook, so the first gate treated the most dangerous skip as if nothing had happened. After adding pytest_collectreport and the terminalreporter skipped stats, the v2 gate recorded the nodeid tests/test_webhook.py, saw a new skip against the baseline, and exited 1.

Moving importorskip off the module top and into the one Redis-backend test (commit 90d81ac) lets the signature cases run in CI without redis, and test_unsigned_request_is_rejected fails immediately. That is the legitimate use of this API: the optional-backend test skips itself; tests that guard a money path must run. After fixing the missing-header branch (commit 5a60f41), the env without redis is 7 passed, 1 skipped; the env with redis is 8 passed.

The skip baseline still fails on the fix commit, because test_webhook.py::test_redis_backend_roundtrip is new. That is a false positive, and also the politeness it should have: a new skip gets a human look, then goes into skips/allow.json or onto the baseline on the default branch. When I put the fixture’s whole tests/test_webhook.py on the allow-list, the v2 gate became SKIP_GATE: OK — and the unsigned callback still returned 200. If the authoring agents on machines 1–3 can edit the allow-list, the gate is gone.

So there is a second gate: required tests per path. If app/webhook.py appears in the diff against the seed, test_unsigned_request_is_rejected, test_bad_signature_is_rejected, and test_valid_signature_is_accepted must appear in the passed list. The fixture commit is missing all three, and the gate fails. After only moving importorskip, with the bug still present, the failing case is not in passed, and the gate still fails. After the fix, 7 tests passed and this gate passes. The allow-list that fooled the skip baseline does not fool this one.

There is a quieter escape: do not use importorskip at all; name the file webhook_tests.py, or put it under tests/manual/. Pytest will not collect it by default, the skipped list stays empty, and the v2 skip gate will also pass. The required-test gate still fails, because those three names are not in passed. That is why the two gates belong together. pytest.xfail is the same kind of hole: it is not a skip, so the v2 skipped baseline will not see it, but the required list looks at passed, and an xfail or a failure will not get through. I did not run a separate rename experiment; that judgement follows pytest’s default collection rules and the required-test gate already run.

The skip baseline must record collection-time skips. If webhook.py changes, the signature tests must have passed

The approach does not always fit. A genuinely optional backend, a sandbox that cannot run without a secret, or a check explicitly marked manual, should skip. In those cases do not pretend the baseline is empty; record the skips that already exist on the default branch, and only alert on new ones. If the team writes skips/allow.json as a blanket pass, or the agent’s default command includes “add this new skip to the allow-list”, both gates come apart. The required-test map also needs a person: a rule file that CI does not run is nothing; a wrong path lets a new file through. That is the same class of miss as CODEOWNERS not seeing a path after it was renamed, and it is not something one gate can cover alone.

The usual reason importorskip ends up at module top is not mysterious. A slim local sandbox or CI image has no Redis, importing the file blows up, and the cheapest way to keep the local run green is to skip the whole module when the dependency is missing. requirements.txt never included redis; the README may even say replay can use Redis. The signature tests do not use that client, but they live in the same file as the replay tests, so they disappear together. The ticket did not ask to add Redis to CI, and the signature path should not need it. The failure is the grain: an optional dependency and a required test were written in the same module, so the skip became the entire file.

If an integration test for the payment callback must hit a live channel, and CI has no key, that one test may skip. The repo should still have in-process tests, with no network, for a missing signature, a bad signature, and a valid one. Those must not share the integration test’s importorskip. A skip baseline also does not replace coverage or mutation testing. It only answers “did this change skip more than before”, not “were the assertions that ran strong enough”.

What you can copy tomorrow

Change CI pytest from bare -q to at least -rs, so skip reasons show up in the log. Allow importorskip only inside the one test that truly needs an optional backend, never at the top of a module that also holds signature, auth, or money-path tests.

Use tools/skip_plugin.py to record skipped_nodeids for the run, including collection-time skips. tools/skip_gate.py compares that list with skips/main.json on the default branch, and fails if a new nodeid is not on a human-written skips/allow.json. Add tools/required_tests.py: if files such as a payment webhook, a refund path, or an export appear in the diff, the matching signature or auth cases must be in the passed list.

On machines 4 and 5, start from the skipped summary, not from the green check. Do not let the authoring agent on machines 1–3 edit the allow-list or the baseline.

The scripts, an AGENTS.md snippet, and a sample workflow are in signature-skip-kit.tar.gz. The workflow YAML was checked for keywords. It was not run on GitHub Actions. The step order in that file still matters: write the skip report first, then compare it with the baseline on the default branch. Leaving a YAML in the docs without attaching it to a required check does not change the merge rule. Because Actions was not run, I cannot present “it will block on GitHub” as a result I have already verified; I can only go as far as the local gates’ exit codes.

The smallest step today: on the next PR that adds signature or auth tests, search the CI log for skipped. If a new test file is in the diff and those tests are not in the passed list, do not merge yet.

If machine 7 only requires “all required checks green”, the fixture commit can land on main. Machine 6’s Windows validation was not run; even if it had been, the same pytest.ini and the same requirements file without redis would still print three dots. This does not depend on an operating system. It depends on collection rules and exit codes.

What was actually run

Date 2026-11-24. Runtime: git 2.47.3, Python 3.13.5, pytest 9.1.1. The comparison env also had redis 6.1.0; no Redis server was started.

  • Seed 9f551af: pytest 3 passed, 0 skipped. MIN_TESTS=3 passed.
  • Fixture commit fa8e2a0: 2 files, +106. Without redis, default -q: exit 0, three dots, 3 items collected, the whole of tests/test_webhook.py skipped. pytest -v / -rs: 3 passed, 1 skipped, reason could not import redis. MIN_TESTS=3 still passed.
  • The v1 gate that only listened to pytest_runtest_logreport: SKIP_GATE: OK. The v2 gate that also records collection-time skips: fail, new skip tests/test_webhook.py.
  • Same commit, redis 6.1.0 installed: 7 items collected, test_unsigned_request_is_rejected failed (200 == 401), 1 failed, 6 passed. Direct call: missing signature returns 200 and accepts evt_demo / 12800; bad signature returns 401; a valid signature returns 200.
  • After moving importorskip into the Redis-backend test (90d81ac): without redis the signature cases run and the missing-header case fails; the required-test gate still fails.
  • After fixing the missing-header branch (5a60f41): without redis, 7 passed, 1 skipped; with redis, 8 passed. The required-test gate passes. The skip baseline still fails on the new test_redis_backend_roundtrip until a person puts that one test on the allow-list. Putting the whole of test_webhook.py on the allow-list lets the v2 gate through, and the unsigned callback still returns 200.

Not run: GitHub Actions (the YAML was checked for keywords, not parsed with PyYAML), branch protection or a ruleset, a real payments network, Windows or windows-latest. The fixture commit was not produced by a live coding model.