Integration tests verify that data passes correctly across agent boundaries: from the Probation Schedule Agent into the Feedback Chase Agent, and from the Feedback Chase Agent into the Outcome and Documentation Agent. All tests remain in the sandbox environment. IDs continue the T sequence from Phase 1.
ID
Scenario
Input
Expected Output
Pass Criteria
T13
Schedule Agent to Chase Agent handoff: milestone date triggers feedback request correctly
Notion tracker row written by Schedule Agent for TEST003 with 4-week milestone date set to today
Feedback Chase Agent detects the milestone date from the Notion row and sends the Gmail feedback request to the mapped manager without any manual intervention.
Gmail sent to correct manager within 5 minutes of milestone date. No duplicate sends. Manager field sourced from the Notion row written by Schedule Agent, not hardcoded.
T14
Chase Agent to Outcome Agent handoff: outcome logged by HR triggers letter generation
HR Manager sandbox account updates Notion tracker for TEST003 with outcome=pass
Outcome and Documentation Agent detects the Notion field change, reads employee name and outcome from the same row written by the Chase Agent, and generates the correct letter.
Letter populated with data from the Notion row. No prompts or manual field entries required. Agent detects change within 2 minutes.
T15
Full three-agent data chain for an Exit outcome
BambooHR sandbox new hire TEST004 created, milestones calculated, feedback submitted, outcome=exit logged in Notion
Schedule Agent creates row, Chase Agent sends requests and receives feedback, Outcome Agent generates exit letter, DocuSign envelope sent, BambooHR updated with status=exited.
Each agent's output is consumed correctly by the next. BambooHR final status reads 'exited'. No orphaned records in Notion or DocuSign sandbox.
T16
DocuSign completion webhook triggers BambooHR update
DocuSign sandbox envelope for TEST003 marked as completed (all parties signed)
BambooHR sandbox record for TEST003 updated with final_status and signed_letter_url within 3 minutes of DocuSign webhook receipt.
BambooHR field updated. Signed document URL stored in the correct BambooHR custom field. Notion tracker row marked closed.
T17
Two simultaneous new hires: no cross-contamination between records
BambooHR sandbox records TEST005 and TEST006 created within 60 seconds of each other with different managers
Two independent Notion tracker rows created. Feedback requests sent to the correct manager for each hire. No field values from one record appear in the other.
Notion rows contain correct employee-specific data. Gmail recipients match the correct manager per record. DocuSign envelopes, if triggered, go to correct signers.
T18
HR outcome logged before all milestone feedback is collected (out-of-order scenario)
HR Manager logs outcome=pass for TEST005 before the 8-week milestone feedback request has been sent
Outcome Agent proceeds to generate and send the letter based on the logged outcome. Pending milestone sends are cancelled or flagged. No double-send on the remaining milestone.
Letter generated and sent. Remaining milestone send cancelled in the Feedback Chase Agent queue. No second Gmail sent after outcome is logged.
T19
DocuSign signer declines to sign (manager rejects envelope)
DocuSign sandbox manager signer clicks 'Decline' on the envelope for TEST003
Automation detects the declined status via webhook, logs the event, sends a Slack alert to the HR escalation channel with the envelope ID and decliner name. No BambooHR update triggered.
Slack alert posted with correct envelope ID. BambooHR status not changed. Notion row flagged with declined_signature=true for manual follow-up.
T20
Notion API unavailable during milestone write (Schedule Agent)
Notion API returns 503 for TEST007 tracker write attempt
Agent retries up to three times with exponential backoff. If all retries fail, error is logged with employee ID and a Slack alert is sent to the HR escalation channel.
Retry behaviour confirmed in automation platform logs. After three failures, Slack alert posted. No silent data loss. Employee ID preserved in error record.
Edge case tests cover scenarios outside the normal flow: duplicate records, missing data fields, tool unavailability, and human timeout situations. These use the E-series numbering, separate from the T sequence.
ID
Scenario
Input
Expected Output
Pass Criteria
E01
Duplicate BambooHR record for the same employee (re-trigger scenario)
BambooHR sandbox fires two new-hire webhook events for the same employee_id=TEST008 within 5 minutes
Schedule Agent detects duplicate via employee_id check against existing Notion rows, suppresses the second run, and logs a deduplication event.
Only one Notion row exists for TEST008. Deduplication log entry present with both event timestamps.
E02
Manager email address missing from BambooHR employee record
New hire TEST009 created in BambooHR with manager field null or blank
Schedule Agent creates the Notion row but flags manager_email=missing. Chase Agent does not attempt Gmail send. HR escalation Slack alert posted requesting manual manager assignment.
Notion row created with missing manager flag. No Gmail sent for TEST009. Slack alert visible with employee name and record ID.
E03
Outcome letter template contains merge field mismatch (field name changed in Google Doc)
Google Docs template has {{employee_name}} renamed to {{full_name}} in sandbox; Outcome Agent attempts merge
Agent catches the merge error, logs the unresolved field name, does not send a broken letter via DocuSign, and posts a Slack alert to HR escalation with the template file ID.
No DocuSign envelope created. Error log identifies the unresolved field. Slack alert posted. Template file ID included in both log entry and alert.
E04
HR Manager never logs an outcome in Notion (probation end date passes without action)
Notion tracker row for TEST010 reaches probation end date with outcome field still blank
Automation detects the overdue outcome via a scheduled check, posts a Slack alert to the HR escalation channel flagging the lapsed review, and logs the event. No letter is generated.
Slack alert posted on or before end-of-probation date. Alert includes employee name and probation end date. Notion row flagged with outcome_overdue=true.
E05
Slack workspace is unavailable when reminder is due
Slack API returns 503 when Feedback Chase Agent attempts to post the 48-hour reminder for TEST011
Agent logs the Slack failure, falls back to sending a second Gmail reminder to the manager, and retries the Slack message once after a 15-minute delay.
Fallback Gmail sent to manager. Slack retry attempted after 15 minutes. Both events logged. HR is not left without any notification.
E06
DocuSign envelope expires before all parties sign (default expiry reached)
DocuSign sandbox envelope for TEST012 set to expire after 3 days; no signer action taken
DocuSign webhook delivers 'voided' or 'expired' status. Automation logs the event, posts a Slack alert to HR escalation with the envelope ID and expiry date. BambooHR status not updated.
Slack alert posted with correct envelope details. BambooHR not updated. Notion row flagged with envelope_expired=true for manual reissue.