@@ -237,13 +237,22 @@ func signAndPost(t *testing.T, ts *httptest.Server, id, key, nonce string, body
237237}
238238
239239func batchBody (batchID string ) []byte {
240+ // Consensus intentionally considers only a trailing window. Keep this fixture
241+ // inside that window instead of pinning it to the date the test was written.
242+ bucket := time .Now ().UTC ().Truncate (time .Hour )
243+ generatedAt := bucket .Add (15 * time .Minute )
240244 return []byte (fmt .Sprintf (`{
241- "schema_version":1,"batch_id":%q,"generated_at":"2026-07-03T14:15:02Z" ,
242- "window_start":"2026-07-03T14:00:00Z" ,"window_end":"2026-07-03T15:00:00Z" ,"signals":[
243- {"signal_id":"s1","kind":"known_bad_domain_hit","time_bucket":"2026-07-03T14:00:00Z" ,
245+ "schema_version":1,"batch_id":%q,"generated_at":%q ,
246+ "window_start":%q ,"window_end":%q ,"signals":[
247+ {"signal_id":"s1","kind":"known_bad_domain_hit","time_bucket":%q ,
244248 "domain":"c2.badzone.example","etld_plus_one":"badzone.example","local_confidence":0.99,
245249 "local_reasons":["known_bad"],"observation_count":4,"distinct_asset_count":2,"blocked_count":4}
246- ]}` , batchID ))
250+ ]}` ,
251+ batchID ,
252+ generatedAt .Format (time .RFC3339 ),
253+ bucket .Format (time .RFC3339 ),
254+ bucket .Add (time .Hour ).Format (time .RFC3339 ),
255+ bucket .Format (time .RFC3339 )))
247256}
248257
249258func TestEndToEndRegisterIngestConsensusFeed (t * testing.T ) {
0 commit comments