From cc9dfb476e4e23d5651cc0cd358eea3be782ba7c Mon Sep 17 00:00:00 2001 From: thossullivan Date: Mon, 21 Sep 2026 09:59:55 -0500 Subject: [PATCH] Assert generated advances exactly for the publishers a mixed distributor write changes The regenerate step of feed-refresh runs the refresh tests against the freshly regenerated feeds. The mixed-distributor test wrote Bedrock and Vertex fixture data over the committed feeds and asserted a fixed list of publishers (amazon, google, mistral, openai) kept their generated timestamp. That list only holds while the committed distributor rows agree with the fixtures. The 2026-09-21 dispatch (run 35615312366) failed because live Vertex dates for gemini-2.5-flash-image and gemini-3.1-flash-lite-image had drifted from the fixture, so the fixture write changed the google feed and generated advanced, as designed. The test now checks the property the writer guarantees: for every publisher, generated equals the requested timestamp when the feed changed semantically and the committed value when it did not, plus at least one publisher stays unchanged so the preservation branch is exercised. The anthropic assertion that generated advances stays as the changed branch. The Cohere special case folds into the same loop. Verified on the committed feeds and on locally regenerated feeds with the drifted Vertex rows. --- refresh/test/run.mjs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/refresh/test/run.mjs b/refresh/test/run.mjs index a437c3d..a662254 100644 --- a/refresh/test/run.mjs +++ b/refresh/test/run.mjs @@ -2635,9 +2635,9 @@ const mixedCommitted = Object.fromEntries(['amazon', 'anthropic', 'cohere', 'goo JSON.parse(fs.readFileSync(path.join(root, 'feeds', `${publisher}.json`), 'utf8')), ])) assert(mixedOutputs.anthropic.generated === mixedGenerated && mixedOutputs.anthropic.generated !== mixedCommitted.anthropic.generated, 'mixed distributor write advances generated for the publisher with material distribution changes') -const mixedCohereChanged = JSON.stringify({ ...mixedOutputs.cohere, generated: null }) !== JSON.stringify({ ...mixedCommitted.cohere, generated: null }) -assert(mixedCohereChanged ? mixedOutputs.cohere.generated === mixedGenerated : mixedOutputs.cohere.generated === mixedCommitted.cohere.generated, 'mixed distributor write advances generated for Cohere only when its distributions change') -assert(['amazon', 'google', 'mistral', 'openai'].every(publisher => mixedOutputs[publisher].generated === mixedCommitted[publisher].generated), 'mixed distributor write preserves generated for every semantically unchanged publisher') +const mixedChanged = publisher => JSON.stringify({ ...mixedOutputs[publisher], generated: null }) !== JSON.stringify({ ...mixedCommitted[publisher], generated: null }) +assert(Object.keys(mixedOutputs).every(publisher => mixedOutputs[publisher].generated === (mixedChanged(publisher) ? mixedGenerated : mixedCommitted[publisher].generated)), 'mixed distributor write advances generated exactly for the publishers whose feed changed') +assert(Object.keys(mixedOutputs).some(publisher => !mixedChanged(publisher)), 'mixed distributor write leaves at least one publisher feed semantically unchanged') const refreshWorkflow = fs.readFileSync(path.join(root, '.github/workflows/feed-refresh.yml'), 'utf8') for (const [output, file] of [['providers', 'provider-diff.md'], ['distributors', 'distributor-diff.md']]) {