Skip to content

fix(cron): align malformed-owner test with the deserialization type-guard - #10323

Closed
helenastafford wants to merge 1 commit into
mainfrom
fix/malformed-owner-test-vs-typeguard
Closed

helenastafford wants to merge 1 commit into
mainfrom
fix/malformed-owner-test-vs-typeguard

Conversation

@helenastafford

Copy link
Copy Markdown
Contributor

Summary

Main is red again on Backend Tests — test_malformed_persisted_owner_does_not_poison_unrelated_removal fails 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:

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).
  • No product code changed.

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.

@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Sep 12, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Opus 4.8 Review — ✅ no blocking findings

Reviewed e692c2065eb520809342031a43fec41582b22213 — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] e692c20

Verdict parsed from the review's SHA-scoped output markers for commit e692c2065eb520809342031a43fec41582b22213.

False positive or not applicable? A repository writer can comment:
/ai-review override fable e692c2065eb520809342031a43fec41582b22213: <one-sentence reason>

@github-actions

Copy link
Copy Markdown
Contributor

GPT 5.6 Review — ✅ no blocking findings

GPT 5.6 completed its review of e692c2065eb520809342031a43fec41582b22213 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] e692c20

False positive or not applicable? A repository writer can comment:
/ai-review override gpt e692c2065eb520809342031a43fec41582b22213: <one-sentence reason>

@github-actions

Copy link
Copy Markdown
Contributor

Design Review (Fable 5) — ✅ PASS

Design-level review of e692c2065eb520809342031a43fec41582b22213 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

Design-Verdict: PASS

Correct resolution direction: the documented deserialization guard (_guard_str, with its named 500-failure rationale) is the decision; the verbatim-survival assertion was incidental, and the test's real invariant — the unrelated row survives — is preserved.

[DESIGN-REVIEWED] e692c20

@github-actions github-actions Bot added the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Sep 12, 2026
…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.
@helenastafford
helenastafford force-pushed the fix/malformed-owner-test-vs-typeguard branch from e692c20 to cdaf6f4 Compare September 12, 2026 07:44
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Sep 12, 2026
@helenastafford

Copy link
Copy Markdown
Contributor Author

Superseded by #10301 (bf09e50), which landed the functionally identical fix on main: the test now asserts the type-guard contract (session_key == "", the documented unset value) instead of verbatim survival. Verified 134/134 tests in the file pass on current main. Closing unmerged — nothing left for this PR to fix.

@github-actions github-actions Bot removed the readiness: checking Automated validation is still running label Sep 12, 2026
@bolichen97
bolichen97 deleted the fix/malformed-owner-test-vs-typeguard branch September 20, 2026 08:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge conflict Branch has merge conflicts with its base — author must resolve before merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant