Investigation domain model
The Investigation domain owns ION’s record of how an incident was investigated: the commands issued against an investigation and the events they produce. It authenticates signed commands, records each command, maps it directly to one event, records that event, and republishes committed events in investigation order.
The owning system is Cogs.
Ubiquitous language
| Term | Meaning in this domain |
|---|---|
| Investigation | The investigation-scoped stream of commands and events, identified by ion_investigation_id and linked to a workspace and security incident |
| Run | A unit of investigation work targeting one contributing system |
| Execution | A unit of work belonging to a run and investigation |
| Step | A unit of work belonging to an execution |
| Action | A typed or generic operation performed within a step |
| Enrichment | Entity detail attached to a step |
| Step finding | A titled, summarized finding attached to a step, with bounded confidence |
| Key finding | A run-level finding with producer, correlation, Markdown narrative, and typed evidence references |
| Evidence reference | A typed pointer from an enrichment or step finding used by a key finding |
| Verdict | The classification recorded when an investigation is concluded |
| Contributing system | An autonomous investigator, deterministic automation, threat-intelligence enrichment, or analyst that performs a run |
| Review artifacts | Immutable analysis payloads such as proposed verdict, initial facts, assessment, root-cause analysis, next steps, hypotheses, and preliminary AI analysis |
Authority and boundaries
| Concern | Current authority |
|---|---|
| Accepted command and event history | Investigation Cosmos containers |
| Stream and ordering key | ion_investigation_id |
| Incident lifecycle | Incident domain, not Investigation |
| Operational investigation projection | Not implemented |
| Durable workflow orchestration | Not implemented in this bounded context |
Domain status
The current implementation is an investigation-scoped command and event journal: it records commands and the one event each maps to, but it does not reconstruct a stateful aggregate before handling a command. Plans, response orchestration, evaluation rules, and merge behavior are target/reference scope rather than implemented behavior. See Implementation for the full current-vs-target breakdown.
Static domain model
This page describes the static structure of the Investigation domain: its execution model, review and analysis artifacts, the commands it accepts, the events they produce, and the invariants it enforces. It is intended to be technology-agnostic — see Implementation for how it is realized on Cosmos DB, Service Bus, Azure SQL, and the supporting code.
The current implementation is a command and event journal, not a reconstructed stateful aggregate, as described in Domain status.
Execution model
| Model | Identity and relationship | Implemented state or content |
|---|---|---|
| Investigation | Investigation ID; workspace and incident link on creation | Created; concluded with verdict and reason |
| Run | Belongs to investigation; targets one contributing system | in_progress, completed |
| Execution | Belongs to run and investigation | in_progress, success, failed; optional reason |
| Step | Belongs to execution | in_progress, success, failed, timed_out; description and metadata |
| Action | Belongs to step | Sentinel query, hunting query, image upload, threat intelligence, or generic payload |
| Enrichment | Belongs to step | Entity type/value, enriched attribute, optional schema, data, and metadata |
| Step finding | Belongs to step | Title, summary, confidence constrained to 0..1, and metadata |
| Key finding | Belongs to run | Producer, correlation ID, Markdown title/explanation, and typed evidence references |
Contributing systems are autonomous investigator, deterministic automation, threat-intelligence enrichment, and analyst.
Review and analysis artifacts
Artifacts are immutable event payloads with their own IDs. Updates append new facts rather than mutating a current document.
| Artifact | Implemented content | Review behavior |
|---|---|---|
| Proposed verdict | Classification, likelihood, Markdown description | Proposal only; conclusion is separate |
| Initial facts | Markdown content | Updated or approved |
| Assessment | Markdown content | Any historical assessment can be approved |
| Root-cause analysis | Markdown content | Updated or approved |
| Next steps | List of Markdown steps | Updated or approved |
| Hypotheses | Complete replacement set of ID, likelihood, statement, justification | No execution or plan semantics |
| Preliminary AI analysis | Summary and entity strings | Replaceable analysis artifact |
Approved artifacts require an approver and timezone-aware approval timestamp. Unapproved artifacts cannot carry approval details. Markdown is bounded to 100,000 characters and strips control characters, but renderer-side sanitization remains a consumer responsibility.
Commands and resulting events
Each accepted command maps directly to the event in the same row.
| Command | Event |
|---|---|
investigation.create | investigation.created |
investigation.conclude | investigation.concluded |
run.start / run.complete | run.started / run.completed |
execution.start / execution.complete | execution.started / execution.completed |
step.start / step.complete | step.started / step.completed |
action.add | action.added |
enrichment.add | enrichment.added |
step-finding.add | step-finding.added |
key-finding.create | key-finding.created |
proposed-verdict.update | proposed-verdict.updated |
initial-facts.update / initial-facts.approve | initial-facts.updated / initial-facts.approved |
assessment.update / assessment.approve | assessment.updated / assessment.approved |
hypotheses.update | hypotheses.updated |
root-cause-analysis.update / .approve | root-cause-analysis.updated / .approved |
next-steps.update / next-steps.approve | next-steps.updated / next-steps.approved |
preliminary-ai-analysis.update | preliminary-ai-analysis.updated |
The wire names have the ion.command. and ion.event. prefixes. See
Implementation for the command and event
union definitions, and the V3 event model
for the common envelope.
Enforced and unenforced invariants
| Enforced now | Not enforced now |
|---|---|
| Known command/event schema | Investigation exists before child commands |
| Trusted command source and valid signature | One investigation per workspace/incident |
| Immutable payload models | Run/execution/step referential existence |
| Typed action payload for typed action kinds | Start-before-complete ordering |
Finding confidence in 0..1 | Single completion or terminal-state protection |
| Valid approval shape and aware timestamp | Evidence references resolve |
| Cosmos item-size failure handling | Approver domain authorization |
| Per-investigation outbound sessions | Expected stream version or command concurrency |
The non-atomic nature of the command and event writes and the limits of Service Bus session ordering are described in Implementation.