Integration tests verify that data passes correctly between agents and across tool boundaries. All tests remain in the sandbox environment. Credentials must be refreshed before this phase begins to prevent OAuth expiry mid-run.
ID
Scenario
Input
Expected Output
Pass Criteria
T15
Agent 1 to Agent 2 handoff: register write triggers Distribution Agent
SOP Version and Register Agent successfully writes the register row for a non-compliance-critical SOP.
Distribution and Acknowledgement Agent receives the trigger payload containing SOP ID, version, and affected-roles field.
Distribution Agent execution log shows trigger received within 15 seconds of register write; affected-roles array populated.
T16
Agent 1 to Agent 2 handoff: compliance-critical flag passes correctly
Register row written with compliance_critical field set to TRUE.
Distribution Agent reads flag, sets routing mode to DocuSign, and initiates envelope in parallel with Slack notification.
DocuSign envelope created; Slack message sent; both events logged; compliance flag visible in Distribution Agent execution record.
T17
Slack interactive callback received and routed to Sheets update
User clicks acknowledgement button; Slack sends interactive component callback to the automation platform webhook.
Automation platform parses payload, extracts user ID and SOP reference, and writes acknowledgement to tracker.
Sheets row updated correctly; response time from button click to row write is under 15 seconds; no duplicates.
T18
DocuSign envelope completion webhook received and processed
DocuSign sends envelope-completed event to automation platform webhook endpoint.
Agent reads envelope metadata, matches signatory to tracker row, and updates status to 'Acknowledged' with DocuSign method.
Correct row updated; method field reads 'DocuSign'; completion timestamp within 60 seconds of DocuSign event.
T19
Multiple simultaneous SOP changes: two files modified within 60 seconds
Two separate SOP files modified in the watched folder within a 60-second window.
Two independent workflow runs created; each processes its own register row, role list, and notification cycle without cross-contamination.
Two distinct execution runs visible in platform log; each run references only its own SOP; no field values bleed between runs.
T20
Reminder scheduler: 48-hour check does not re-send to already-acknowledged users
Tracker shows one user acknowledged, one still pending; 48-hour scheduled check fires.
Reminder sent only to pending user; acknowledged user receives no message.
One Slack DM sent; acknowledged user's Slack DM inbox shows no new message from the automation in this cycle.
T21
Completion detection: all users acknowledge before first reminder fires
All three users click acknowledgement within two hours of initial notification.
Reminder scheduler detects 100% completion on its first check; no reminders sent; completion summary posted to operations channel.
No reminder DMs sent; completion summary posted; scheduler log confirms early-exit path taken.
T22
End-to-end audit log integrity: all events for one SOP cycle written to Sheets
Complete sandbox cycle run from Drive trigger to completion summary.
Audit log sheet contains one row per event: trigger, version write, role lookup, each notification, each acknowledgement, each reminder, escalation if applicable, and completion.
Row count matches expected event sequence; all timestamps sequential; no gaps or out-of-order entries.
ID
Scenario
Input
Expected Output
Pass Criteria
E01
Duplicate trigger: same file saved twice within 10 seconds
Drive file-change event fires twice for the same file within a 10-second window (e.g. autosave plus manual save).
Deduplication logic suppresses the second trigger; only one register row written; one notification cycle initiated.
Register contains exactly one new row for the file; execution log shows second trigger detected and discarded.
E02
Missing data: SOP file has no scope or department metadata
SOP modified; custom properties for scope and department are empty.
Agent flags the row in the register with a 'Metadata incomplete' status; sends an alert to the operations Slack channel; halts distribution until metadata is supplied.
No Slack notifications sent to staff; register row shows 'Metadata incomplete'; operations channel alert received.
E03
Unavailable tool: Slack API returns 429 rate-limit error during notification dispatch
Slack API returns HTTP 429 while agent attempts to send notifications to a five-person list.
Agent pauses, respects the retry-after header, and retries each message in sequence; all five messages eventually delivered.
All five Slack DMs delivered; execution log shows retry events; no messages permanently dropped.
E04
Unavailable tool: DocuSign API unavailable at envelope creation time
Compliance-critical SOP processed; DocuSign API returns 503 at envelope creation.
Agent retries three times with backoff; on third failure, alert posted to operations Slack channel with SOP name and instruction to send envelope manually.
Operations channel receives alert with correct SOP reference; DocuSign retry log shows three attempts; no silent failure.
E05
Human timeout: user does not respond after two reminders and escalation is sent
User receives initial notification and two 48-hour reminders; no acknowledgement recorded.
Escalation message sent to line manager; user's tracker row status set to 'Escalated'; completion summary is withheld until escalation is resolved.
Line manager Slack DM received; row status reads 'Escalated'; completion summary not posted; audit log records all three notification and two reminder events.
E06
Role mapping table returns zero matched roles for an SOP
SOP modified; role-to-SOP mapping table has no entries for the SOP's scope value.
Agent logs a warning in the audit sheet, posts an alert to the operations Slack channel identifying the unmapped SOP, and halts distribution.
No staff notifications sent; operations channel alert received with SOP name; audit log entry shows 'No roles matched' warning.