Context
engine#229 added triggerChannelId and triggerCorrelationId to ProvisionContext to enable Claudony's WorkerProvisioner to link a CaseLedgerEntry back to the Qhorus COMMAND that triggered provisioning (completing the W3C PROV-DM causal chain).
However, the engine call site in CaseContextChangedEventHandler.tryProvision() currently passes null for both fields — the engine has no mechanism to receive trigger context from outside, so it genuinely cannot populate them.
Problem
The async chain that leads to provisioning is:
Qhorus COMMAND arrives at Claudony
→ Claudony updates engine CaseFile via API ← trigger context lost here
→ Engine fires CaseContextChangedEvent ← no trigger context carried
→ CaseContextChangedEventHandler.tryProvision() ← creates ProvisionContext with null fields
→ ClaudonyWorkerProvisioner.provision(caps, ctx) ← receives null, cannot correlate
Vert.x context does not survive crossing the engine's internal event bus, so Claudony cannot self-correlate using reactive context propagation alone.
Required changes
- Engine API — the CaseFile-update endpoint (or equivalent entry point used by Claudony) must accept optional
triggerChannelId and triggerCorrelationId fields
- CaseContextChangedEvent — carry the trigger fields through from the API call
- CaseContextChangedEventHandler.tryProvision() — read trigger fields from the event and populate
ProvisionContext instead of passing null
- Claudony (claudony#94) — pass the triggering COMMAND's
channelId + correlationId when calling the engine API
Acceptance criteria
ProvisionContext.triggerChannelId() and triggerCorrelationId() are non-null when provisioning is triggered by a Qhorus COMMAND
- Claudony's
ClaudonyWorkerProvisioner can use them to look up the MessageLedgerEntry and set causedByEntryId on the CaseLedgerEntry
- Engine call sites that are NOT triggered by a Qhorus COMMAND (e.g. direct API provisioning) continue to pass
null — nullable is correct for those paths
References
- engine#229 — added the fields to
ProvisionContext (this issue threads them through)
- engine#230 — normative layer audit (broader context)
- claudony#94 — Claudony provisioner side that consumes
triggerChannelId/triggerCorrelationId
Context
engine#229 added
triggerChannelIdandtriggerCorrelationIdtoProvisionContextto enable Claudony'sWorkerProvisionerto link aCaseLedgerEntryback to the Qhorus COMMAND that triggered provisioning (completing the W3C PROV-DM causal chain).However, the engine call site in
CaseContextChangedEventHandler.tryProvision()currently passesnullfor both fields — the engine has no mechanism to receive trigger context from outside, so it genuinely cannot populate them.Problem
The async chain that leads to provisioning is:
Vert.x context does not survive crossing the engine's internal event bus, so Claudony cannot self-correlate using reactive context propagation alone.
Required changes
triggerChannelIdandtriggerCorrelationIdfieldsProvisionContextinstead of passingnullchannelId+correlationIdwhen calling the engine APIAcceptance criteria
ProvisionContext.triggerChannelId()andtriggerCorrelationId()are non-null when provisioning is triggered by a Qhorus COMMANDClaudonyWorkerProvisionercan use them to look up theMessageLedgerEntryand setcausedByEntryIdon theCaseLedgerEntrynull— nullable is correct for those pathsReferences
ProvisionContext(this issue threads them through)triggerChannelId/triggerCorrelationId