Record source-attribution provenance instead of inferring it from the name shape (Maestro 966066e3) (#202)
CI / ci (push) Successful in 9m39s

Co-authored-by: orchestrator-agent <20+orchestrator-agent@code.cubecraftcreations.com>
This commit was merged in pull request #202.
This commit is contained in:
2026-10-11 13:05:44 -04:00
committed by approver_agent
parent d182349646
commit e5aa009fc5
18 changed files with 371 additions and 141 deletions
+4 -2
View File
@@ -54,7 +54,9 @@ export type RecipeFix = { candidate_id: string } | { recipe_url: string } | { ma
export type RecipeCandidate = {
candidate_id: string
title: string
site_name: string
// site_name is null when the server cannot name the page's site without
// leaking its link (dinners.SourceOf).
site_name: string | null
photo_id: string | undefined
minutes: number | null
}
@@ -130,7 +132,7 @@ function parseCandidate(where: string, body: unknown): RecipeCandidate {
!isRecord(body) ||
typeof body.candidate_id !== 'string' ||
typeof body.title !== 'string' ||
typeof body.site_name !== 'string'
(body.site_name !== null && typeof body.site_name !== 'string')
) {
throw new Error(`${where}: response is not a recipe candidate`)
}