Scenario: MQ-9B Envelope Selection v0.2.0
This scenario describes an RCAF MQ-9B-style remotely piloted aircraft identified by nodeId ca.rpas.mq9b-001, assigned to an Arctic patrol on 2025-01-10. The manifest in schemaVersion 0.2.0 is envelope-only: it does not describe mission content, only which manifest applies to this node at which times.
The three manifests below are all for the same node and illustrate how the envelope fields drive selection over time. Each JSON document is included verbatim and corresponds to a file under examples/.
Initial patrol manifest
File: examples/minimal.node-manifest.0.2.0.json
{
"schemaVersion": "0.2.0",
"kind": "node-manifest",
"manifestId": "urn:example:manifest:ca.rpas.mq9b-001:2025-01-10T12:00:00Z",
"nodeId": "ca.rpas.mq9b-001",
"issuedAt": "2025-01-10T12:00:00Z",
"validity": {
"notBefore": "2025-01-10T12:15:00Z",
"notAfter": "2025-01-10T16:15:00Z",
"graceSeconds": 300
}
}
Mid-sortie update
File: examples/mq9b-update-1.node-manifest.0.2.0.json
{
"schemaVersion": "0.2.0",
"kind": "node-manifest",
"manifestId": "urn:example:manifest:ca.rpas.mq9b-001:2025-01-10T13:30:00Z",
"nodeId": "ca.rpas.mq9b-001",
"issuedAt": "2025-01-10T13:30:00Z",
"validity": {
"notBefore": "2025-01-10T13:35:00Z",
"notAfter": "2025-01-10T17:00:00Z",
"graceSeconds": 300
}
}
Evening orbit manifest
File: examples/mq9b-evening.node-manifest.0.2.0.json
{
"schemaVersion": "0.2.0",
"kind": "node-manifest",
"manifestId": "urn:example:manifest:ca.rpas.mq9b-001:2025-01-10T18:00:00Z",
"nodeId": "ca.rpas.mq9b-001",
"issuedAt": "2025-01-10T18:00:00Z"
}
Selection behavior over time
The outcomes below describe what selectActiveManifestForNode returns for nodeId ca.rpas.mq9b-001 at different times, based on the envelope fields in the manifests above.
At 2025-01-10T12:10Z, the eligible set is empty. The initial patrol manifest has notBefore 12:15Z, the mid-sortie update has not yet been issued, and the evening manifest is not yet issued. The runtime therefore has no active manifest.
At 2025-01-10T12:20Z, only the initial patrol manifest is eligible. Its notBefore is 12:15Z and issuedAt is 12:00Z, so it is in force.
At 2025-01-10T13:34Z, the mid-sortie update exists but is not yet within its notBefore window (13:35Z). The initial patrol manifest remains in force.
At 2025-01-10T13:36Z, both the initial and update manifests are eligible. The update has the later issuedAt value (13:30Z versus 12:00Z), so it is selected and supersedes the initial manifest.
By 2025-01-10T16:20Z, the initial manifest has reached its effective expiry (notAfter 16:15Z plus graceSeconds 300), leaving the mid-sortie update as the only eligible manifest.
Shortly after 2025-01-10T17:05Z, the mid-sortie update has expired (notAfter 17:00Z plus 300 seconds of grace), and the evening manifest has not yet been issued. The node therefore has no active manifest.
At 2025-01-10T18:00Z and beyond, the evening manifest becomes eligible immediately because it has no validity object. It remains in force until a newer manifest for the same node supersedes it.