Repository navigation
fix(cron): align malformed-owner test with the deserialization type-guard - #10323
helenastafford wants to merge 1 commit into
Conversation
Opus 4.8 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
GPT 5.6 Review — ✅ no blocking findingsGPT 5.6 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
Design Review (Fable 5) — ✅ PASSDesign-level review of Design-Verdict: PASS Correct resolution direction: the documented deserialization guard ( [DESIGN-REVIEWED] e692c20 |
…uard Second same-night collision of two individually-green PRs: #9888 (merged 21:11:15 PT) type-guards every cron string field at deserialization, degrading a non-string session_key to "" by documented policy; #9109 (merged 21:12:14 PT, one minute later) added test_malformed_persisted_owner_does_not_poison_unrelated_removal, whose final assertion expects the malformed list to survive the save/load round trip verbatim. Each was green against a main lacking the other; combined, the test fails on main (all platforms — it surfaced on a Windows shard first, but pristine main fails on Linux too). The type-guard is the deliberate change (its comment names the failure it prevents: a serializer calling string methods on a list would 500 the listing). The verbatim assertion is incidental to this test's actual point — that a malformed row does not poison an UNRELATED job's removal — so the test is what moves: the survivor row must still exist, and its owner field now reads "", the documented unset value. Verified: the full test file passes (134/134) with this change; the assertion fails on pristine main without it.
e692c20 to
cdaf6f4
Compare
|
Superseded by #10301 (bf09e50), which landed the functionally identical fix on main: the test now asserts the type-guard contract ( |
Summary
Main is red again on Backend Tests —
test_malformed_persisted_owner_does_not_poison_unrelated_removalfails on all platforms (it first surfaced on a Windows shard, but pristine main fails on Linux too). Second same-night instance of the two-individually-green-PRs collision:session_keydegrades to"", by documented policy — the guard's comment names the failure it prevents (the redacting serializer would 500 the listing calling string methods on a list).["not", "a", "string"]owner to survive the save/load round trip verbatim.Each PR was green against a main that lacked the other; their union fails.
Fix
The type-guard is the deliberate, documented behavior; the verbatim assertion is incidental to the test's actual point — that a malformed row does not poison an unrelated job's removal. So the test moves, not the guard: the survivor row must still exist after the unrelated removal, and its owner field now reads
"", the guard's documented unset value. A comment in the test records why, citing #9888.Testing
test/test_remove_slot_for_history_key.py: 134/134 pass with this change; the original assertion fails on pristine main (reproduced on Linux locally).Pattern harvest
Rule candidate: process — same class as this evening's #10248 (two green PRs whose union breaks an invariant; these two merged 59 seconds apart). A merge queue that retests each PR against post-merge main catches the whole class; no code-level rule can, since each tree was correct in isolation. Two instances in one night on the same repo is a measurable signal for enabling one.
First observed on PR #9969's CI; reproduced on pristine main.