Integration tests validate that data flows correctly across agent boundaries and that each tool write produces the expected downstream state. IDs continue from T16.
ID
Scenario
Agents / Tools Involved
Expected Output
Pass Criteria
T16
Full monitoring-to-escalation handoff: item not acknowledged
Compliance Monitoring Agent → Google Sheets → Escalation Agent
Monitoring agent writes reminder_sent_timestamp to register row; escalation agent reads that timestamp, calculates 5-business-day offset, and triggers escalation correctly at expiry
Timestamp written by monitoring agent is readable by escalation agent without format conversion errors; escalation fires within 1 minute of the 5-day threshold being crossed in sandbox time simulation
T17
Full monitoring-to-renewal handoff: item acknowledged and completed
Compliance Monitoring Agent → Google Sheets → Renewal Processing Agent
Monitoring agent sends reminder; owner updates status to Complete; renewal agent triggers on status change and completes register update, Notion filing, and Xero routing
Each agent reads its triggering condition from the shared register row without manual intervention; all three tool writes (Sheets, Notion, Xero) confirmed in sandbox logs within one run cycle
T18
Gmail to Slack coordination: reminder email and channel alert sent in same run
Compliance Monitoring Agent → Gmail → Slack
Both Gmail send and Slack post complete in the same scheduled run; neither blocks the other; Slack message references the same item name and expiry date as the email
Gmail sandbox log and Slack test channel both show entries with matching item name and expiry date; timestamp difference between email send and Slack post is under 30 seconds
T19
Notion filing to Google Sheets link-back: register row updated with Notion page URL
Renewal Processing Agent → Notion → Google Sheets
Renewal agent creates Notion page, captures the returned page URL, and writes it to the doc_link column in the register row
Google Sheets sandbox row doc_link cell contains a valid Notion page URL that resolves to the correct page in Notion sandbox
T20
Xero invoice routing: draft bill appears in correct Xero account
Renewal Processing Agent → Xero
Agent creates a draft Accounts Payable bill in Xero sandbox with the correct supplier name, amount (from invoice attachment metadata), and due date
Xero sandbox AP bill matches supplier name and amount extracted from the test invoice; bill status = Draft; no duplicate bill created on re-run
T21
Weekly compliance report generation and distribution
Renewal Processing Agent (reporting function) → Google Sheets → Gmail
Report compiled from current register state and sent via Gmail to the operations manager sandbox address on the scheduled weekly trigger
Gmail sandbox inbox for test ops manager address receives report email; report lists all sandbox register items with correct status values; generation-to-send time under 2 minutes
T22
Concurrent items: multiple items across different urgency tiers processed in one run
Compliance Monitoring Agent → Gmail → Slack (multiple rows)
Agent processes all flagged rows in a single run; each owner receives the correct tier email; Slack channel receives one consolidated alert listing all items rather than separate messages
Gmail sandbox log shows one outbound email per unique owner-tier combination; Slack test channel shows a single consolidated message listing all items; no rows skipped due to processing order
Edge-case tests cover scenarios involving bad data, missing inputs, unavailable tools, and human timeout conditions. These use the E-series ID sequence.
ID
Scenario
Condition
Expected Behaviour
Pass Criteria
E01
Duplicate register rows: same item name, same expiry date, two rows
Two rows in the sandbox register share identical item_name and expiry_date values
Agent detects duplicate via composite key check (item_name + owner + expiry_date); processes only the first matching row; logs a warning for the duplicate; does not send two sets of emails
Gmail sandbox log shows one outbound email for the item; run log contains 'Duplicate detected: [item name], row [N] skipped'
E02
Missing expiry date column entirely for a row
Register row exists with item_name and owner populated but expiry_date cell is empty
Row skipped by monitoring agent; error written to run log; no email or Slack message triggered for this item
Run log entry = 'Missing expiry date: [item name], row [N]'; no outbound messages for this item
E03
Owner name present but email address not resolvable
Owner column contains a display name with no corresponding email record in the register or lookup table
Email step skipped for this item; Slack alert still sent to compliance channel flagging the unresolvable owner by name; error logged
Gmail sandbox log shows no send attempt for this item; Slack test channel shows alert with owner name flagged as 'email not found'; run log error entry present
E04
Gmail API rate limit hit during bulk reminder batch
Sandbox Gmail API configured to return 429 after 20 sends; register contains 25 items due in the current window
Agent pauses on 429 response, waits the retry-after interval (60 seconds), resumes sending; all 25 emails eventually sent within the same run or flagged for retry in next scheduled run
Gmail sandbox log confirms 25 total sends across the run; no items permanently skipped due to rate limit; run log documents the pause and retry
E05
Slack workspace unavailable: webhook returns 500
Slack webhook endpoint returns HTTP 500 during a monitoring agent run
Agent logs Slack failure; Gmail reminder still sent successfully; error written to run log; no retry storm (max two retries with backoff)
Gmail sandbox log confirms email sent; Slack test channel shows no message; run log shows two Slack retry attempts then 'Slack alert failed: [item name]'
E06
Notion API token expired during document filing
Notion API returns 401 Unauthorized during renewal processing
Agent halts Notion filing step; does not mark register row as Complete; logs credential error to run log; sends alert to FullSpec monitoring Slack channel
Notion sandbox shows no new page; register row status unchanged; FullSpec monitoring channel alert present with error code 401 and item reference
E07
Human timeout: owner never responds to escalation within further 5 business days
Escalation email sent and logged; 5 additional business days pass with no status update
No second automated escalation fires (duplicate guard prevents re-escalation); item remains on the pending escalation report; weekly compliance report flags item as 'Escalation sent, no response'
Gmail sandbox log shows no third outbound message for this item; weekly report email contains this item with status label 'Escalation sent, no response'; run log confirms duplicate guard triggered
E08
Xero invoice amount not parseable from attachment
Invoice PDF attached at renewal completion has no machine-readable amount field (scanned image, no text layer)
Renewal Processing Agent creates a Xero draft bill with amount = $0.00 and a flag note 'Amount requires manual entry'; does not block register update or Notion filing
Xero sandbox bill amount = $0.00 with flag note present; Google Sheets register and Notion filing both complete normally; run log entry = 'Xero amount parse failed: manual entry required, [item name]'