fix(podcast): reject explicit cross-subject image collisions - #413
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
vercel
Bot
temporarily deployed
to
Preview – zap-engine-control-center
September 7, 2026 07:23
Inactive
vercel
Bot
temporarily deployed
to
Preview – zap-engine-control-center
September 7, 2026 07:24
Inactive
vercel
Bot
temporarily deployed
to
Preview – zap-engine-control-center
September 8, 2026 01:55
Inactive
vercel
Bot
temporarily deployed
to
Preview – zap-engine-control-center
September 8, 2026 02:10
Inactive
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Intent
Turn the current scene-image review feedback into a narrow planner guard without bringing back the old identity hard gate that starved episodes.
The concrete production failure is the Tether episode where a scene anchored to
Tethercould select a Brave result whose metadata/source explicitly identified a different known episode subject (Yamandú Orsi).Context
Recent main already fixed the earlier feedback layers:
person > named entity > objectTether stablecoin issuer, not bareTether)Blonskr -> BlonskyincidentThe remaining hole is selection-time contradiction. The pool intentionally stopped requiring every candidate to mention the requested entity after an earlier hard gate discarded 423/423 viable images. That decision is still correct: editorial image metadata is often weak. But the planner currently treats even a result that explicitly names a different catalog subject as merely low-ranked rather than contradictory.
Scope
Tether/Yamandú Orsicase.Out of scope
candidate must mention current entityfiltering.Product contract / invariants
Affected invariant:
apps/podcast-pipeline/AGENTS.md— entity mention remains a ranking bonus rather than a required identity match, and cross-subject fallback remains available.Why this is aligned rather than a hard-gate reversal:
A candidate that names no catalog subject remains eligible. Only positive evidence that the image is about a different known episode subject is excluded for the current named scene.
Acceptance criteria
Tethersubject keeps a generic result such as “Bitcoin mining facility in Uruguay”.Yamandú Orsiwhen Orsi is another subject in the episode.Implementation
episode-image-pool.tsderives the current subject's normalized entities from the existing pool key. Before serving subject entries or fallback entries, it checks candidate metadata against the other named subject keys in the same episode. It only filters when another subject matches and the current subject does not.This deliberately uses the same
mentionsAnyEntityboundary-aware matcher as existing ranking, so short names do not regress to substring matching.Contract alignment
AGENTS.mdremains accurate: current-entity mention is still not required and cross-subject fallback still exists.Validation
episode-image-pool.test.tsfor the production-shaped Tether → Orsi collision.Validation gaps
No live Brave call is required for this regression: provider responses are deterministic fixtures matching the stored production evidence. CI status should be checked before merge.
Known unrelated failures
None known.
Reviewer notes
The important line is the distinction between absence of identity evidence (still allowed) and positive evidence for another known subject (now excluded). Broadening this into a general current-entity hard gate would recreate the 423/423 starvation failure this pool architecture was designed to avoid.