Phase 2 validates that agents hand off data correctly to each other and that the full workflow branches as designed when conditional logic is exercised. Integration test IDs continue the T sequence from Phase 1. Edge case tests use the separate E sequence.
ID
Scenario
Input
Expected output
Pass criteria
T16
Cycle Launch Agent to Tracker Agent handoff
Cycle Launch Agent completes full kick-off send for 10 test employees; Tracker Agent initialises
Tracker Agent creates 10 rows in Google Sheets, one per employee, all set to OUTSTANDING with correct employee IDs and manager mappings
Sheets contains exactly 10 rows; employee IDs match BambooHR sandbox list; manager mapping column populated correctly for all 10 rows; Tracker Agent polling schedule active
T17
Tracker Agent to Summary Drafting Agent handoff on matched pair
Tracker detects both employee and manager submissions complete for EMP_001
Tracker updates EMP_001 to BOTH_SUBMITTED and triggers Summary Drafting Agent with employee ID and form response references
Summary Drafting Agent receives correct payload including both form response IDs; Google Doc generation begins within one polling cycle; no duplicate triggers fired
T18
Summary Drafting Agent to Gmail notification handoff
Summary Doc successfully generated for EMP_004
Gmail notification dispatched to EMP_004 manager with direct Google Doc link
Gmail send confirmed with HTTP 200; link in email resolves to correct Google Doc in test folder; manager email address matches BambooHR sandbox record for EMP_004
T19
End-of-cycle: all submissions received, no reminders queued
All 10 test employees and managers submit before deadline
No reminder emails generated; all Sheets rows show BOTH_SUBMITTED; all 10 summary docs created
Zero reminder emails in send log post-submission; all 10 Google Docs present in test folder; Slack ops channel shows cycle completion event
T20
Overdue path: reminder fires then submission received
EMP_003 is overdue; reminder sent; EMP_003 then submits
Reminder sent once; after submission tracker updated; no second reminder; Summary Drafting Agent triggered when manager also submits
Exactly one reminder email in log for EMP_003; tracker updated to EMPLOYEE_SUBMITTED after form response received; Summary Agent triggered once manager form arrives
T21
BambooHR write-back triggered after HR approval
HR approval signal sent to automation platform for EMP_001 through EMP_010 with final rating values
All 10 employee records updated in BambooHR sandbox with correct rating values
BambooHR API PUT/POST calls confirm 200 for all 10 records; rating values in sandbox match the approved values passed in payload; write-back completion event logged
T22
Partial BambooHR write-back: one record fails
HR approval for 10 employees; BambooHR sandbox returns 422 for EMP_007 due to missing field
9 records written successfully; EMP_007 write fails with error logged; ops alert raised; other records not affected
9 successful write confirmations; EMP_007 shows BAMBOO_WRITE_FAIL in run log with error detail; Slack ops alert posted; run does not halt for other employees
T23
Cycle Launch Agent fires twice for same cycle ID
BambooHR sandbox emits two cycle_opened events with identical cycle ID within 5 minutes (duplicate webhook scenario)
Second trigger detected as duplicate; kick-off emails sent only once; idempotency key prevents double dispatch
Exactly 10 Gmail kick-off sends in log (not 20); duplicate trigger event logged with DUPLICATE_CYCLE_EVENT code; no Slack double-post
ID
Scenario
Input
Expected output
Pass criteria
E01
Duplicate form submission from same employee
EMP_009 submits self-assessment form twice; second response arrives 8 minutes after first
First response recorded and used; second response flagged as duplicate and discarded; tracker shows EMPLOYEE_SUBMITTED once
Tracker row for EMP_009 has single EMPLOYEE_SUBMITTED entry; duplicate response ID stored in discard log; no double summary generation triggered
E02
Form submission with missing required fields
Employee submits form with blank responses for 3 of 8 required questions
Submission recorded; Google Doc summary generated with clearly marked MISSING_RESPONSE placeholders in affected sections; manager notified of incomplete submission
Google Doc contains MISSING_RESPONSE markers in correct sections; Gmail notification to manager flags incomplete submission; summary not blocked
E03
BambooHR API unavailable for 30 minutes mid-cycle
BambooHR sandbox returns 503 for all requests over a 30-minute window
Automation platform queues dependent operations; retry schedule activates; no data lost; operations resume automatically when API recovers
Queue depth increases during outage window; retry events logged at correct intervals; all queued operations complete within 10 minutes of API recovery; no duplicate sends result from retry
E04
Google Docs API unavailable when summary generation triggered
Docs API returns 503 when Summary Drafting Agent attempts to create document
Summary creation retried up to 3 times; if unresolved, DOCS_CREATE_FAIL logged; HR ops alert raised; Tracker row flagged as SUMMARY_PENDING
Retry attempts in log (max 3); if unresolved, DOCS_CREATE_FAIL in run log; Slack ops alert sent; Tracker row status SUMMARY_PENDING not cleared until successful retry or manual intervention
E05
Employee-manager mapping missing for a given employee
EMP_010 has no manager assigned in BambooHR sandbox
Kick-off email sent to EMP_010; manager briefing email skipped; tracker row created with MANAGER_UNKNOWN flag; ops alert raised for HR to assign manager
EMP_010 receives kick-off email; no manager briefing sent; Sheets row shows MANAGER_UNKNOWN; Slack ops alert prompts HR to update BambooHR record; agent does not crash
E06
Slack workspace token revoked mid-cycle
Slack API returns 401 for all requests after token revocation
Gmail reminder and notification paths continue unaffected; all Slack operations fail gracefully with SLACK_AUTH_FAIL logged; ops alert sent via Gmail fallback to HR inbox
Zero Slack messages sent after revocation; SLACK_AUTH_FAIL logged for each failed attempt; Gmail fallback alert delivered to HR ops address; Gmail-based reminders and notifications not blocked
E07
Manager does not submit assessment within maximum chase window
Manager for EMP_002 receives 3 reminders over 7 days and still has not submitted; maximum chase threshold reached
Escalation alert sent to HR Director via Gmail and Slack; tracker row flagged ESCALATED; no further automated reminders sent to manager
Exactly 3 reminder sends in log before escalation; HR Director escalation email sent; Slack escalation message posted; tracker row status ESCALATED; reminder queue cleared for this manager
E08
AI drafting step times out
AI drafting call exceeds 60-second timeout threshold
Timeout event logged; draft marked DRAFT_TIMEOUT; retry attempted once after 30 seconds; if second attempt also times out, document created with placeholder content and ops alert raised
Single retry attempt logged; if both attempts timeout, Google Doc created with placeholder sections; DRAFT_TIMEOUT event in run log; manager Gmail notification includes warning; run does not halt for other employees