@@ -250,6 +250,11 @@ func runTriageDispatchSmokeTest(t *testing.T, env *e2eEnv) {
250250 t .Helper ()
251251 ctx := context .Background ()
252252
253+ // Capture a lower-bound timestamp *before* creating the issue.
254+ // The shim/dispatch workflows can start very quickly, and we only want to
255+ // filter out runs from earlier test phases.
256+ issueCreatedAt := time .Now ()
257+
253258 // File a test issue to trigger the shim workflow.
254259 issueTitle := fmt .Sprintf ("e2e-triage-test-%s" , env .runID )
255260 issueBody := `## Bug Report
@@ -291,15 +296,14 @@ Files over 64KB save fine if they contain only ASCII characters.`
291296 }
292297 })
293298
294- // Wait for dispatch.yml to run in .fullsend (shim → dispatch → reusable-triage).
295- // The shim fires on issues:opened and runs the triage stage synchronously.
296- // Filter by CreatedAt to avoid false positives from previous runs.
297- issueCreatedAt := time .Now ()
298- t .Log ("Waiting for dispatch workflow to run..." )
299- var dispatchRun * forge.WorkflowRun
299+ // Wait for the enrolled-repo shim (fullsend.yaml). Cross-repo workflow_call
300+ // runs appear on the caller repo, not as separate dispatch.yml runs in .fullsend.
301+ // Chain: fullsend.yaml → .fullsend/dispatch.yml → reusable-triage (sync).
302+ t .Log ("Waiting for fullsend shim workflow to run..." )
303+ var shimRun * forge.WorkflowRun
300304 for attempt := 0 ; attempt < 12 ; attempt ++ {
301305 time .Sleep (5 * time .Second )
302- runs , listErr := env .client .ListWorkflowRuns (ctx , env .org , forge . ConfigRepoName , "dispatch.yml " )
306+ runs , listErr := env .client .ListWorkflowRuns (ctx , env .org , testRepo , "fullsend.yaml " )
303307 if listErr != nil {
304308 t .Logf ("Attempt %d: error listing workflow runs: %v" , attempt + 1 , listErr )
305309 continue
@@ -316,24 +320,24 @@ Files over 64KB save fine if they contain only ASCII characters.`
316320 }
317321 t .Logf ("Attempt %d: found run %d (status: %s, conclusion: %s, created: %s)" , attempt + 1 , run .ID , run .Status , run .Conclusion , run .CreatedAt )
318322 r := run // avoid loop variable capture
319- dispatchRun = & r
323+ shimRun = & r
320324 break
321325 }
322- if dispatchRun != nil {
326+ if shimRun != nil {
323327 break
324328 }
325- t .Logf ("Attempt %d: no dispatch workflow runs found yet" , attempt + 1 )
329+ t .Logf ("Attempt %d: no fullsend shim workflow runs found yet" , attempt + 1 )
326330 }
327- require .NotNil (t , dispatchRun , "dispatch workflow should have run in .fullsend repo" )
331+ require .NotNil (t , shimRun , "fullsend shim workflow should have run in enrolled repo" )
328332
329333 // Wait for the workflow run to complete (up to 12 minutes: 10-minute agent
330334 // timeout + sandbox setup overhead).
331- t .Logf ("Waiting for dispatch workflow run %d to complete..." , dispatchRun .ID )
335+ t .Logf ("Waiting for fullsend shim workflow run %d to complete..." , shimRun .ID )
332336 var finalRun * forge.WorkflowRun
333337 deadline := time .Now ().Add (12 * time .Minute )
334338 for time .Now ().Before (deadline ) {
335339 time .Sleep (15 * time .Second )
336- run , getErr := env .client .GetWorkflowRun (ctx , env .org , forge . ConfigRepoName , dispatchRun .ID )
340+ run , getErr := env .client .GetWorkflowRun (ctx , env .org , testRepo , shimRun .ID )
337341 if getErr != nil {
338342 t .Logf ("Error polling workflow run: %v" , getErr )
339343 continue
@@ -344,34 +348,34 @@ Files over 64KB save fine if they contain only ASCII characters.`
344348 break
345349 }
346350 }
347- require .NotNil (t , finalRun , "dispatch workflow run should have completed within deadline" )
351+ require .NotNil (t , finalRun , "fullsend shim workflow run should have completed within deadline" )
348352
349353 // If the run failed, save logs and artifacts for debugging.
350354 if finalRun .Conclusion != "success" {
351- runURL := fmt .Sprintf ("https://github.com/%s/%s/actions/runs/%d" , env .org , forge . ConfigRepoName , finalRun .ID )
352- fmt .Fprintf (os .Stderr , "::notice::Dispatch workflow run %d failed (conclusion: %s). Downloading debug artifacts. Run URL: %s\n " , finalRun .ID , finalRun .Conclusion , runURL )
355+ runURL := fmt .Sprintf ("https://github.com/%s/%s/actions/runs/%d" , env .org , testRepo , finalRun .ID )
356+ fmt .Fprintf (os .Stderr , "::notice::Fullsend shim run %d failed (conclusion: %s). Downloading debug artifacts. Run URL: %s\n " , finalRun .ID , finalRun .Conclusion , runURL )
353357
354- debugDir := filepath .Join (env .screenshotDir , fmt .Sprintf ("dispatch -run-%d" , finalRun .ID ))
358+ debugDir := filepath .Join (env .screenshotDir , fmt .Sprintf ("fullsend -run-%d" , finalRun .ID ))
355359 _ = os .MkdirAll (debugDir , 0o755 )
356360
357361 // Save workflow logs.
358- logs , logErr := env .client .GetWorkflowRunLogs (ctx , env .org , forge . ConfigRepoName , finalRun .ID )
362+ logs , logErr := env .client .GetWorkflowRunLogs (ctx , env .org , testRepo , finalRun .ID )
359363 if logErr != nil {
360364 t .Logf ("Could not fetch run logs: %v" , logErr )
361365 } else {
362366 logPath := filepath .Join (debugDir , "workflow-logs.txt" )
363367 if writeErr := os .WriteFile (logPath , []byte (logs ), 0o644 ); writeErr != nil {
364368 t .Logf ("Could not write logs to %s: %v" , logPath , writeErr )
365369 } else {
366- fmt .Fprintf (os .Stderr , "::notice file=%s::Dispatch run %d workflow logs saved\n " , logPath , finalRun .ID )
370+ fmt .Fprintf (os .Stderr , "::notice file=%s::Fullsend shim run %d workflow logs saved\n " , logPath , finalRun .ID )
367371 }
368372 t .Logf ("Workflow run logs:\n %s" , logs )
369373 }
370374
371375 // Download run artifacts (transcripts, etc).
372- downloadRunArtifacts (ctx , env .token , env .org , forge . ConfigRepoName , finalRun .ID , debugDir , t )
376+ downloadRunArtifacts (ctx , env .token , env .org , testRepo , finalRun .ID , debugDir , t )
373377
374- t .Fatalf ("Dispatch workflow run %d concluded with %q, expected success. Debug artifacts saved to %s" , finalRun .ID , finalRun .Conclusion , debugDir )
378+ t .Fatalf ("Fullsend shim workflow run %d concluded with %q, expected success. Debug artifacts saved to %s" , finalRun .ID , finalRun .Conclusion , debugDir )
375379 }
376380
377381 // Verify the triage agent posted a comment on the issue.
0 commit comments