Phase 2 verifies that data passes correctly between all three agents and that the supporting tool connections behave as expected across the full chain. These tests run in the sandbox environment with all three agents active simultaneously. Integration test IDs continue the T sequence from T16.
ID
Scenario
Input
Expected Output
Pass Criteria
T16
Ticket Trend Analyst output triggers Article Draft Writer correctly
Sandbox Zendesk returns a valid cluster; Ticket Trend Analyst completes successfully
Article Draft Writer receives the full scored article record including article_id, staleness_score, ticket_count, and topic_label within 30 seconds
Article Draft Writer input payload matches Ticket Trend Analyst output schema exactly; no fields missing
T17
Article Draft Writer output triggers Publish and Audit Agent listener correctly
Google Doc created by Article Draft Writer; sandbox approval comment added
Publish and Audit Agent detects the approval comment on the correct document within 2 minutes of it being posted
Agent poll log shows the correct doc_id matched; approval detection latency under 120 seconds
T18
Full three-agent handoff chain completes without manual intervention
Sandbox end-to-end: Zendesk cluster threshold met, Article Draft Writer runs, approval added to Google Doc
All three agents complete in sequence; Intercom sandbox article updated; Notion row marked complete; Slack message posted
All output records present and correct; total pipeline runtime under 10 minutes in sandbox
T19
Slack notification contains correct article metadata
Publish and Audit Agent triggers Slack post after publish
Slack message includes article title, Google Doc link, ticket count that triggered the review, and the name of the assigned reviewer
All four fields present in the Slack message body; link resolves to the correct sandbox Google Doc
T20
Notion tracker reflects correct status at each pipeline stage
Full pipeline run in sandbox
Notion row status transitions: 'pending' on creation, 'in_review' after Slack alert, 'approved_pending_publish' after approval, 'complete' after publish
Each status value is logged at the correct pipeline stage; no status is skipped
T21
Two simultaneous clusters processed independently
Sandbox Zendesk returns two separate clusters triggering at the same time
Two independent pipeline runs execute concurrently; each produces its own Google Doc, Notion row, and Slack alert without data cross-contamination
Two distinct doc_ids, two distinct Notion row_ids, and two Slack messages posted; no field values mixed between runs
T22
Ticket Trend Analyst output schema is malformed
Ticket Trend Analyst emits a payload missing the article_id field due to a simulated parsing error
Article Draft Writer detects the missing required field, halts, and emits a schema validation error to the orchestration layer
Article Draft Writer does not proceed; error event contains field_missing: article_id
T23
Slack API unavailable during notification step
Sandbox Slack stub returns HTTP 503 at the point of posting the review alert
Agent retries the Slack post up to 3 times; if all retries fail, the pipeline continues and logs a non-fatal Slack error; Notion row and Google Doc are unaffected
Notion row and Google Doc created successfully; Slack error logged as non-fatal; retry count equals 3
T24
Manager approval comment uses a non-standard approval string
Manager types 'LGTM' instead of 'Approved' in the Google Doc comment
Publish and Audit Agent does not detect this as an approval; article is not published; Notion row status unchanged
No Intercom publish call made; Notion status unchanged; no Slack completion message sent
Edge case tests cover scenarios outside the normal flow that the system must handle safely without data loss or unintended publishing.
ID
Scenario
Input
Expected Output
Pass Criteria
E01
Duplicate cluster: same article flagged twice in the same polling window
Ticket Trend Analyst detects the same article_id in two separate cluster results within one daily poll
Agent deduplicates and produces only one flagged article record; only one Google Doc and one Notion row created
Exactly one doc_id and one Notion row_id for the article; deduplication log entry present
E02
Notion row already exists for the same article from a previous run
Article Draft Writer attempts to create a Notion row for an article_id that already has an open row with status 'in_review'
Agent skips row creation, links the existing Notion row to the new Google Doc, and logs a 'row already exists' event
No duplicate Notion row created; existing row updated with new doc_id; log entry confirms skip
E03
Missing article body in source: Intercom returns null body for flagged article
Article Draft Writer fetches article content from sandbox Intercom and receives a null body field
Agent creates a Google Doc with a placeholder template and a warning note; Notion row created with priority set to 'manual review required'
Google Doc created with warning header; Notion priority field equals 'manual_review_required'
E04
All three external tools unavailable simultaneously
Sandbox stubs for Zendesk, Google Docs, and Intercom all return 503 at pipeline start
Orchestration layer logs a system-wide unavailability error; no partial pipeline execution; no data written to Notion or Slack
Error event emitted with affected_services listing all three; no Notion rows or Google Docs created; Slack not called
E05
Manager does not approve or reject within 7 days
Google Doc created and Slack alert sent; no manager comment added within the timeout window
Orchestration layer sends a reminder Slack message at day 3 and day 7; after day 7 with no response, Notion row status set to 'stalled' and FullSpec error log records the timeout
Reminder messages sent at correct intervals; Notion row status equals 'stalled' after 7-day timeout
E06
Ticket cluster topic matches an article that was already updated within the last 24 hours
Article_id in the Ticket Trend Analyst output has a last_published timestamp within the previous 24-hour window
Agent suppresses the draft and does not trigger Article Draft Writer; logs a 'recently updated, skipping' event
Article Draft Writer not triggered; log entry contains reason: recently_updated and article_id
E07
Intercom article publish partially fails: body updated but metadata not saved
Sandbox Intercom stub returns 200 on PUT body but 500 on the metadata update call
Agent logs a partial publish error, marks Notion row as 'publish_partial_failure', and emits an alert; does not mark Notion as 'complete'
Notion row status equals 'publish_partial_failure'; error event includes failed_step: metadata_update
E08
Large cluster: 50 or more tickets in one topic within 7 days
Sandbox Zendesk returns 52 tickets on a single topic
Ticket Trend Analyst processes all 52 tickets, assigns maximum staleness score of 1.0, and sets priority to 'critical' in the output
Output staleness_score equals 1.0; priority field equals 'critical'; downstream agents proceed normally