Worked Examples
Validate scientifically support case handoff — Contact and Engagement Platform
Validate support case handoffs with controlled tests of canonical inquiry ownership, authorized context transfer, privacy boundaries, duplicate prevention, and auditable receipts. This scientific validation guide provides reproducible synthetic experiments, read-only reconciliation, and quantitative acceptance criteria for evaluating cross-product support reliability without disclosing private case information.
Application: Contact and Engagement Platform
Component: Support Operations, Product Intelligence, and Integrated Engagement Handoffs
Article type: Scientific Validation / Validation Procedure
Source-reviewed release: 2.0.2; support schema 1.0.1; unified-platform schema 2.0.0
Last verified deployed version: Not established
Estimated reading time: 19 minutes
Evaluate support case handoffs using reproducible tests of inquiry ownership, authorized transfer, minimal-data contracts, duplicate prevention, audit events, and sender-facing confidentiality. This guide separates observed behavior from assumptions, defines adversarial controls and numerical acceptance criteria, and describes the evidence required before claiming that support handoffs are reliable.
1. Goal
Determine whether a support handoff preserves a single canonical private case, transmits only approved product context, records authorized actions and receipt evidence, and prevents information belonging to another inquiry from being disclosed or attached to the wrong case. The target claim is narrower than a general assertion that the Contact and Engagement Platform is secure: for a specified release, role, inquiry, environment, and observation period, handoff authorization, linkage, replay, and privacy invariants hold for the tested conditions.
A successful HTTP response does not establish that a case was correctly linked, that all audit writes completed, that there were no privacy leaks, or that a downstream system received the information. Those propositions need independent observations.
2. Requirements
- An isolated WordPress staging instance matching a pinned source commit, database migration state, and configured plugin version; do not use real client records.
- At least two unrelated synthetic inquiries, two role profiles (authorized and unauthorized), and an anonymous caller; use different sender sessions and distinct source-system identities.
- Explicit scope, consent or other lawful processing basis where applicable, retention plan, authorization to access test evidence, and a secure private evidence store.
- Read-only access to relevant event, relationship, support-case, signal, and platform-handoff metadata; separate approval before changing staging records.
- Python 3.9+ for the included offline validator and unit tests; WP-CLI/PHP for the optional read-only reconciliation helper.
- A test manifest containing commit, fixture IDs, expected results, time window, version of protocol, reviewer, exclusions, run timestamps, and artifact hashes.
3. Study design and definitions
Unit of analysis: One authorized or intentionally rejected attempt to attach a handoff context packet to a canonical inquiry, plus its observed support-case and receipt state. Report product-support attempts separately from integrated-platform handoff attempts. Independent experimental units should not be confused with repeated calls to the same test fixture.
Population: A declared deployment release and the intended combinations of source system, product, actor capabilities, private inquiry, context fields, and downstream projections. The synthetic test suite represents selected scenarios and is not a random sample of all production traffic.
Primary outcomes: authorized attachment, correct inquiry-to-case linkage, no duplicate material effects on retry, complete receipt/event trail, no cross-inquiry association, and no sensitive data in the transferred product-intelligence payload or sender-facing projection. Define a failure when actual behavior violates an expected invariant; classify unobserved or inconclusive results as unknown, never as success.
Null/counter-hypotheses: unauthorized actors can cause state changes; repeated handoff identifiers can create inconsistent links; private identifiers or values may bypass filtering; and a successful transfer may lack a complete auditable trace. These are falsifiable counterexamples, not assumptions that a vulnerability exists.
4. Two distinct source-reviewed contracts
| Boundary | Product-support context | Integrated-platform context |
|---|---|---|
| Schema | sc-product-support-handoff/1.0 |
sc-engagement-platform-handoff/2.0 |
| Entry point | POST /wp-json/sc-engagement-intake/v1/support/handoffs |
POST /wp-json/sc-engagement-intake/v2/handoffs |
| Permission | sc_intake_ingest_support_handoffs |
sc_intake_manage_platform |
| Identity | handoff_id; canonical inquiry_id; registered source_system; strict product |
handoff_key; source, target module, and optional existing inquiry_id |
| Persistence | Support case, typed case links, support events, product-intelligence signal, internal receipt link | Typed platform_handoffs receipt; may refresh canonical dossier |
| Replay | Existing receipt link is checked on the case associated with the inquiry | Unique handoff_key returns an existing receipt on replay |
| Governance | Does not create a private identity or inquiry merely from public product context | Does not make an advisory decision or automatically merge cases |
Do not interchange these schemas, permissions, receipt rules, or API paths. The regular public support form and shortcode Private Contact and Engagement Intake Provide the affected product, version, component, environment, exact error, and reproduction steps. Private files enter protected quarantine. are a separate intake path, not an unauthenticated version of either handoff API.Report a Product or Platform Issue
5. Canonical inquiry and case identity
The support-case database schema declares a unique inquiry_id on support_cases. The product-support handoff requires an existing canonical inquiry and attaches product context through SC_EI_Support_Repository::ingest_handoff(). Its case creation logic calls create_for_inquiry(), which returns or updates an existing case rather than knowingly creating a second case for the same inquiry.
Positive test: Attach a valid product handoff to synthetic inquiry A, then confirm that the case’s inquiry_id equals A and that the case’s source reference, product, version, and component correspond to the approved input. Negative test: use an absent inquiry; request must fail without creating an orphan. Repeat using inquiry B and check that A’s case, links, events, and Sender Portal snapshot remain isolated. Support links and event rows each contain their own inquiry_id, enabling a relational reconciliation.
6. Authorization and actor identity
The source-reviewed REST callbacks use WordPress capability checks: sc_intake_ingest_support_handoffs for the product-support POST and sc_intake_manage_platform for the v2 handoff POST. The read-only support-case endpoints require sc_intake_view_support. Capability possession is not by itself proof that an authorized actor is entitled to attach context to every individual inquiry.
Exercise anonymous, authenticated-without-capability, approved integrator, and revoked/expired-role scenarios. Attempt both GET and POST where applicable. A denied request must yield no new case/link/receipt/signal and no unauthorized private response; log a correlation identifier internally without exporting sensitive request bodies. Test whether a privileged actor attempting to reference another client’s inquiry is constrained by the approved operating procedure and any additional project-level authorization required by policy.
7. Minimal-data contract and value-level privacy
SC_EI_Support_Schema::signal_payload() rejects recursively nested keys containing personal-data indicators such as email, message, attachment, file, token, password, phone, and organization. It then extracts bounded fields such as product, product version, component, issue type, search query, article IDs, known issue, resolution-attempt flag, source URL, feature suggestion, and product release.
Important limitation: a field-name check does not necessarily reject personal information embedded in an otherwise allowed field’s value, for example a name or email address inside search_query or an identifying query string in source_url. The offline package therefore implements additional illustrative value-pattern screening. This is a proposed stronger acceptance check, not proof of an already deployed control. Even stronger pattern matching will miss some sensitive data and produce false positives.
For the v2 unified contract, handoff_payload_is_safe() applies a different forbidden-key list and bounds on JSON length, nesting, and value sizes; the implementation also rejects some recognizable email, IPv4, and telephone-number patterns. Test each contract independently. Do not submit real secrets or confidential messages to discover a boundary.
8. Handoff replay and partial-failure integrity
A repeated product-support handoff_id checks for the internal handoff_receipt link on the associated case. The method may write the case, multiple typed relationships, an aggregated product-intelligence signal, and the final receipt link. Therefore, the presence of an idempotency branch does not, alone, establish transactional atomicity for every crash point.
In synthetic or controlled staging fault injection, interrupt after (a) case creation, (b) the first link, (c) signal recording, and (d) receipt-link recording. Retry with the same identifier, compare all row counts and event trails, and confirm that partial work is reconciled or clearly escalated. Also test reusing the same identifier with a different inquiry or changed context, where policy should prohibit ambiguous reuse. A v2 handoff_key has a unique database constraint, but a reused key associated with different content must be treated as a conflict for policy evaluation rather than quietly assumed equivalent.
9. Audit provenance and trustworthy evidence
Support records include separate support_case_events and support_case_links. Events retain case ID, inquiry ID, event type, stage change, actor user ID where applicable, and occurrence time. Internal handoff receipts are represented as links of type external_reference with relation handoff_receipt; sender visibility is disabled on the created receipt. The v2 integrated platform stores received-by and received-at fields with a content hash on its typed handoff record.
For each accepted attempt, collect the request’s synthetic correlation ID, endpoint/schema, capability outcome, inquiry ID, case number, receipt existence, link count, signal aggregation result, event trace, and relevant errors. Record hashes over private test artifacts, but do not interpret an unkeyed SHA-256 digest as tamper-proof storage or independent nonrepudiation. Compare source rows and independent logs when available.
10. Sender Portal confidentiality
The product-support sender_snapshot() deliberately limits the sender view to case number, product/version/component, public status, approved summary/next step, known-issue reference, and explicitly sender-visible links. Detailed error messages, reproduction steps, private assignments, internal events, and unapproved product-intelligence context are not part of that projection. Tests must inspect rendered HTML, API responses, generated exports, caches, and error responses—not merely the structure of the PHP array.
Use two unrelated synthetic portal sessions. The session for inquiry A must not access B’s case or learn its existence via differing response detail. Verify that a link accidentally marked sender-visible cannot contain protected case text, tokens, or private URLs. Internal receipt links must not be rendered publicly. Test inactive, expired, and unauthorized sessions separately.
11. Method and evidence
- Pin the baseline. Record plugin source commit, supported schema constants, WordPress/PHP versions, activated plugins, database migration journal, and approved capability map. Do not substitute a GitHub version string for deployed-release evidence.
- Construct paired fixtures. Use synthetic inquiries A and B, distinct products, unique handoff identifiers, separate actor capabilities, and a controlled Sender Portal session per inquiry.
- Collect pre-state. Count cases, links, events, signals, platform handoffs, and dossier relationships. Retain only pseudonymous IDs in the public study report.
- Execute positive cases. Transfer approved nonpersonal product context to the correct inquiry; verify case/link/receipt/event consistency without exposing private fields.
- Execute adversarial controls. Deny anonymous or insufficiently privileged callers, reject unregistered products/sources and forbidden keys, attempt cross-inquiry references, and test stale and repeated identifiers.
- Inject bounded persistence failures. On isolated staging only, simulate each relevant database write failing and then repeat the request. Compare expected versus observed effects and review the internal failure counter.
- Verify sender-safe outputs. Inspect the real rendered portal, response bodies, server logs, search indexes, and exports against an approved field allowlist.
- Report unresolved outcomes. Distinguish PASS, FAIL, NOT RUN, and INCONCLUSIVE; calculate category-specific failure denominators and confidence intervals.
12. Reproducible synthetic validator
The accompanying developer package includes support_handoff_audit.py, two synthetic JSON fixtures, and a Python standard-library unit test suite. The checker deliberately models both reviewed implementation expectations and explicitly stronger proposed controls. It does not contact WordPress or external services.
python3 support_handoff_audit.py --input fixtures/valid.json --format text
python3 support_handoff_audit.py --input fixtures/invalid.json --format json
python3 -m unittest discover -s tests -v
Expected exit codes: 0 when the selected synthetic packet contains no findings; 2 when the checker detects inconsistencies. The invalid fixture is deliberately unsafe and must not be submitted to a public API. It exists to prove that the independent validator can recognize violations in a controlled fixture.
13. Example: paired authorization and cross-case trials
import json
from pathlib import Path
from support_handoff_audit import analyze
packet = json.loads(Path("fixtures/valid.json").read_text())
for trial in packet["trials"]:
print(trial["category"], trial["expected"], trial["observed"])
print("findings:", analyze(packet)["finding_count"])
This example represents expected versus observed labels in a synthetic study record. In a live staging run, obtain observed from actual authorization responses and read-only post-state checks rather than filling it in from expectations. The statistical tests cannot independently establish whether the platform denied the request correctly unless actual response evidence is captured.
14. Example: privacy contract regression
from support_handoff_audit import analyze
packet = {
"inquiries": [{"id": 1}], "cases": [], "links": [], "events": [],
"support_handoffs": [{"schema": "sc-product-support-handoff/1.0",
"handoff_id": "kb-synthetic-001", "source_system": "support_knowledge_base",
"inquiry_id": 1, "case_id": 1, "authorized": True,
"context": {"product": "workbench", "search_query": "person@example.com",
"contact_email": "synthetic@example.com"}}],
"platform_handoffs": [], "trials": []
}
print(sorted(set(x["code"] for x in analyze(packet)["findings"])))
These negative examples illustrate two distinct risk classes: a disallowed key and a sensitive value stored under an allowed key. Do not conclude that rejection of an email key proves that arbitrary email addresses in free text are rejected. Propose private-value screening, review, and safe redaction before product-intelligence aggregation, and test that no value is copied to public analytics.
15. Example: cross-inquiry relational reconciliation
The following read-only SQL demonstrates one structural question. Replace the table prefix only after confirming the installed WordPress mapping; use the packaged WP-CLI helper to resolve names dynamically.
-- Only run on a reviewed installation; adapt table prefixes.
SELECT COUNT(*) AS cross_inquiry_support_links
FROM wp_sc_ei_support_case_links AS l
JOIN wp_sc_ei_support_cases AS c ON c.id = l.support_case_id
WHERE l.inquiry_id <> c.inquiry_id;
SELECT COUNT(*) AS sender_visible_receipts
FROM wp_sc_ei_support_case_links
WHERE related_type = 'external_reference'
AND relation_type = 'handoff_receipt' AND sender_visible = 1;
A zero mismatch count is helpful, but it does not establish that all expected records exist, that the caller was authorized, or that the data in free-text fields is private-data-free. Query results may also reflect prior migrations or retention redactions; inspect temporal context before attributing an anomaly to a new handoff.
16. Statistical analysis and uncertainty
For category c, let n be the number of attempts with both an expected and a resolved observed outcome, and let f be the number of mismatches. Estimate observed failure rate as p̂ = f / n. Count unknown responses separately; do not include them in n or treat them as successful. Report results by category—authorization, inquiry association, confidentiality, idempotency, persistence recovery, and sender projection—rather than averaging unlike outcomes into one misleading score.
For small binary samples, use a Wilson binomial interval instead of interpreting an observed zero as absolute certainty. For a confidence coefficient of approximately 95%, use z = 1.96, denom = 1 + z²/n, center = (p̂ + z²/(2n))/denom, and halfwidth = z·sqrt(p̂(1-p̂)/n + z²/(4n²))/denom. At zero failures in 30 independent attempts, the interval’s upper bound is about 11.35%; that is not evidence that the true population failure rate is zero.
from support_handoff_audit import wilson_interval
print(wilson_interval(0, 30)) # [0, 0.113513]
print(wilson_interval(5, 50)) # demonstration only
Tests must be sufficiently independent and representative for interval interpretation. Repeating one deterministic fixture 30 times does not provide 30 representative real-world clients. Where groups are clustered by plugin version, source system, or inquiry, report clusters separately or use an appropriate design-aware analysis.
17. Controlled negative-test matrix
| Test class | Positive expectation | Counterexample / expected denial | Independent evidence |
|---|---|---|---|
| REST capability | Authorized integrator may attach approved context | Anonymous/revoked actor cannot modify a case | HTTP result plus before/after DB aggregate |
| Canonical identity | Handoff links to its existing inquiry | Missing or cross-inquiry ID rejected or flagged | Case, inquiry, link and event joins |
| Schema | Declared schema and registered product/source pass | Unknown schema, source or product rejected | Error code, no inserted receipt |
| Privacy | Nonpersonal product metadata accepted | Private keys and disguised private values denied or quarantined | Input/output comparison and private scan |
| Replay | Repeated identical key has no extra material effects | Changed inquiry or payload under same key does not silently succeed | Receipt fingerprint, row counts, trace |
| Partial failure | All steps committed or explicitly reconciled | Interrupted link/signal/receipt writes are visible and recoverable | Fault-injection artifacts, recovery journal |
| Sender isolation | Approved summary and links only | Private error, internal event, foreign inquiry omitted | HTML/API/export diff across two sessions |
| Retention | Authorized export and redaction follow policy | Erased or restricted content not resurrected by a handoff | Retention case study and downstream inspection |
18. Symptoms
Indicators include support cases unexpectedly sharing a canonical inquiry, receipts on the wrong case, an allegedly idempotent replay increasing signal counts, accepted HTTP responses without expected links, duplicate case events, an unauthorized caller able to attach product context, sender-visible internal link metadata, or privacy redaction followed by reappearance of private fields. These are diagnostic symptoms—not a finding that they have occurred on the deployed service.
19. Cause
Possible causes include mismatched source and canonical inquiry IDs, insufficient per-inquiry authorization beyond a broad WordPress capability, invalid schema or source identifiers, stale retry keys, partial persistence, event or receipt write errors, free-text privacy screening gaps, incorrect sender-visibility flags, or differences between the reviewed repository and the installed release. An inference about cause requires matched logs and a reproducible test, not solely an aggregate anomaly count.
20. Troubleshooting
- Record the specific endpoint and schema first. The v1 support handoff and v2 platform handoff have distinct permissions and receipts.
- Check caller capability and the approved inquiry authorization. Do not expose private case content while testing a denial path.
- Verify existing inquiry, support case, unique inquiry relationship, link and event foreign keys, and internal receipt state.
- Compare the submitted
handoff_idorhandoff_keywith any previously accepted packet. Investigate reuse across different inquiries. - Review field keys and value content separately; inspect
search_query,source_url, and other free-text fields under private authorization. - Correlate signal counts and handoff failures with the exact attempt and possible interruption point.
- Inspect sender projection and export allowlists; confirm internal receipts and private errors are not published.
- Capture the observed error code, run hash, timestamps, and read-only aggregate evidence; escalate unresolved or contradictory observations.
21. Resolution and safe recovery
If a test suggests cross-client exposure or unauthorized mutation, pause the affected integration’s writes under the approved incident procedure, preserve limited evidence, rotate compromised credentials if necessary, and involve the service owner before any repair. Avoid publicly reporting identifiers, copying raw case logs, or editing private records merely to make counts pass.
Where a partial handoff lacks a receipt, do not manually fabricate its receipt, overwrite a canonical inquiry, or reassign a case to conceal conflicting ownership. Reconcile the original request, case, typed links, aggregated signal changes, and audit history as a single reviewed repair. For a duplicated key, establish whether the replay was identical, changed, or associated with another inquiry before retrying. Changes to production data require a scoped backup, authorization, rollback plan, and separate post-repair verification.
22. Validation
For the declared staging scope, require zero confirmed cross-inquiry disclosures, zero unauthorized successful writes, zero published private fields, zero unexplained duplicate material effects, and zero unresolved partial-write cases. Also require that every accepted handoff has the expected authoritative inquiry association and corresponding receipt/audit evidence, subject to the precise contract’s semantics. Report failures and unknowns even when a planned fix is available.
Each of these is a release-specific acceptance target, not a promise of universal absence. A test that cannot observe the downstream state should be recorded as inconclusive, not counted toward a perfect pass rate. A clean synthetic validator establishes that its rules function on those fixtures; it does not satisfy this staging requirement.
23. Verification
Archive a version-pinned evidence packet containing: study protocol, synthetic fixture hashes, test execution command, original expected/observed trial file, raw machine-readable findings, independent reviewer decision or documented solo-review rationale, private incident references where applicable, and a signed or attributable acceptance record. Run the packaged read-only WordPress helper separately to reconcile aggregate relational observations; its passing syntax check is not evidence that the helper was executed against WordPress.
Evidence levels must remain explicit: source inspected, offline fixture tested, staging scenario executed, production observation verified, and independently reviewed. Do not collapse these categories into one verification status.
24. Reporting boundary
Publish only synthetic records and aggregated findings. Retain protected originals, identifiable contact histories, internal messages, incident details, and confidential product evidence in the approved private evidence store. Explain sample selection, observation window, protocol changes, exclusions, unresolved outcomes, implementation limitations, and reviewer conflicts of interest. A privacy scan can be reproduced while still failing to identify unanticipated personal information, and a statistically clean sample cannot establish causal superiority over other handoff systems.
25. Version and implementation notes
The inspected repository declares plugin version 2.0.2, support schema 1.0.1, and unified-platform schema 2.0.0. Relevant classes are SC_EI_Support_Schema, SC_EI_Support_Repository, SC_EI_REST, SC_EI_Unified_Platform_Schema, and SC_EI_Unified_Platform_Repository. The public-facing support intake and the protected support handoff endpoint are separate entry points. A current deployment may differ from this pinned source; inspect installed files and migrations before using exact behaviors as an operational assertion.
26. Technical references
- Product Support and Feature Suggestions Integration — intended private/public boundary and v1 typed handoff.
- Support schema and signal payload — allowed sources, strict product, handoff ID and privacy-key validation.
- Support repository — ingestion, links, events, sender projection, receipts and reliability counters.
- REST controller — role-gated support endpoints.
- Integrated engagement architecture — v2 dossier and platform handoff contract.
- Unified platform schema and repository — typed context, privacy checks and handoff receipts.
- Source reliability contract tests and integrated-platform contract tests — repository-side test definitions, not proof of their execution in this environment.
