Six bugs, one shape: code that is present, tested, green, and never runs
Every bug below is the same bug. The operation succeeds. Nothing raises. The return code is fine and the log line is fine. Only the effect is missing. Code that is present, tested, green, and that never actually runs.
Six instances surfaced across 12 and 13 August 2026. Two of them were introduced while fixing the other four.
The six
1. An Instagram carousel that was never reachable
The carousel adapter has been fully implemented since 8 April 2026: child containers, media_type=CAROUSEL, up to ten images. It was dead code. Nothing in production ever set carousel_urls, and the key appeared only in unit tests, so every slide deck would have published as slide one alone. PR #10222 wired the mapper. Issue #10240 then recorded that the path is still unreachable, for two reasons that PR missed: nothing in production produces the slide URLs, and both call sites are gated on a cover image existing.
2. mark_published dropped every platform id
It wrote platform_id in place on a JSONB column with no MutableDict tracking, so SQLAlchemy never marked the column dirty and the write vanished on commit. The consequence was not one lost field. The metrics scraper counts those items as skipped forever, so content metrics were never collected at all. Fixed in PR #10230.
3. The repair path had the same bug
The content_sync platform_id backfill, whose entire job is to fix instance 2, used the identical in-place mutation. It failed on exactly the rows it exists to repair. Fixed in PR #10230.
4. Radar cover images uploaded, then discarded
The upload succeeded. The code then asked a private R2 bucket for a public URL, and that function is hardwired to return None (issue #9210), so the URL was thrown away and the cover silently never attached. Fixed in PR #10230.
5. Avatars, same shape, plus two tests that hid it
Upload succeeded, public_url returned None, the function fell through and returned None, and the bytes sat unreachable in R2. Two unit tests actively mocked the bug away, stubbing public_url to return a URL the real service never emits, so they stayed green for as long as the bug existed. Fixed in PR #10236, which is still open.
6. The fix for instance 1 was dead on arrival
The new slide-upload module written in #10222 called that same private bucket. public_url returned None for slide zero, the loop broke immediately, and no carousel URL was ever produced. The module written to fix a present-but-unreachable bug was itself present and unreachable. Fixed in PR #10230, hours after #10222 merged.
Why this class hides
Two reasons, and the second is the nastier one.
- The operation succeeds. There is no exception, no error return and no warning in the log. Only the effect is absent, and nothing checks for the effect.
- The JSONB instances fail selectively. A NULL to empty-dict transition is a real attribute change, so SQLAlchemy sees it. Fresh rows work. Most fixtures work. Production rows that already carry data silently do not. That is how three simultaneous instances survived for months.
What actually caught it
Not the type checker. Not ruff. Not the 10,653 passing unit tests reported on #10222. Not any green CI gate. Two things worked.
- Reverting the wiring and proving the test fails. On #10222, reverting only the _thread_cover wiring makes the carousel test fail, and it passes again on restore. Presence was never in question. Reach was.
- Pointing 21 agents at the codebase with instructions to refute claims rather than confirm them. That pass produced 15 candidates: 11 confirmed after adversarial verification, 4 refuted. PR #10230 fixed the five that needed no product decision.
The gates, and what they do not catch
PR #10236 proposes two CI ratchets for these classes. It is honest about its limits, and the limits are the most useful part of it. A refute-first pass planted 12 genuine bug instances against the gates.
- The JSONB gate missed 7 of 12: augmented assignment, nested subscript, del, mutation via a helper, walrus alias, tuple unpack, and a getattr round-trip.
- The dead-public-url gate missed 5 of 6: aliased import, module-qualified call, attribute receiver, local rebind, and a second service carrying the identical defect that the check cannot see because it matches one hardcoded name. That last one is latent rather than live, since the service is currently unreferenced.
So the gates catch the shapes that shipped, not the whole class. Worth stating plainly: a gate believed to cover a class that it does not cover is a worse position than no gate at all.
Still open
- Issue #10240. The Instagram carousel is still unreachable. Closing it needs a decision about how slide generation gets triggered, which is a cost and volume call rather than a patch.
- PR #10236 is open, so both ratchets are proposed and not landed. Its dead-public-url baseline sits at 3, admitted debt rather than a target, after that same PR fixed avatar_service and brought the floor from 4 down to 3.
- Counting the two fixed in #10230 and the one in #10236, the private-bucket root cause has six known instances.
Receipts
PR #10222 (merged 12 August 2026). PR #10230 (merged 13 August 2026). PR #10236 (open). Issue #10240 (open). Issue #9210 (closed).
Want a system like this built for your product?
A free 15-minute intro call. No pitch deck, no pressure. Just whether I can help.