Skip to main content

LeaseResultDto

Namespace: Meshmakers.Octo.Communication.Contracts.DataTransferObjects

A pool member handing a lease back to the controller (AB#4924, concept ยง4).

public record LeaseResultDto : IEquatable<LeaseResultDto>

Inheritance Object โ†’ LeaseResultDto
Implements IEquatable<LeaseResultDto>

Remarks:

๐Ÿ”ด The release is what ends the tenant's presence in the process. By the time this message is sent the member has already left the lease scope, cleared its token holder and unloaded the borrower's CK model. The message is the report, not the trigger โ€” a member that reported a release but kept the tenant loaded would have the invariant backwards.

It carries no secret and no tenant payload, only the identity of the lease and what happened to the work item. The borrower's credential travelled one way, on LeaseDto, and must not come back.

Propertiesโ€‹

LeaseIdโ€‹

The lease being released, as handed out in LeaseDto.LeaseId. A release naming a lease the controller no longer holds is stale and is ignored โ€” it would otherwise release whatever lease the member was given in the meantime.

public string LeaseId { get; set; }

Property Valueโ€‹

String

Reasonโ€‹

Why the lease ended.

public LeaseReleaseReasonDto Reason { get; set; }

Property Valueโ€‹

LeaseReleaseReasonDto

Successโ€‹

Whether the work item succeeded. Independent of LeaseResultDto.Reason: a LeaseReleaseReasonDto.Drained release can still carry a completed work item.

public bool Success { get; set; }

Property Valueโ€‹

Boolean

StatusMessageโ€‹

Free-form human-readable outcome. Must never carry credential material โ€” this string is logged and stored on the execution.

public string StatusMessage { get; set; }

Property Valueโ€‹

String

OutputDataโ€‹

What SetPipelineExecutionResult@1 wrote for this execution, or null when the pipeline produced no result (AB#4924 ยง9.9 / D4).

public string OutputData { get; set; }

Property Valueโ€‹

String

Remarks:

๐Ÿ”ด The release is the only way a leased execution's output can reach its entity. A dedicated adapter reports it on IAdapterHub.ReportExecutionEndAsync, whose tenant and adapter come from the connection โ€” a pool member has no such connection, it holds a tenant-free management channel. Without this field the borrower's execution would complete with an empty OutputData where a dedicated adapter would have filled it, which is a difference in behaviour nobody asked for.

This is pipeline output, not credential material โ€” the rule that the lease's credential travels one way only is unchanged.

WorkDurationMsโ€‹

How long the member actually spent running the work item, in milliseconds, or null when it never got that far (AB#4924 increment 9).

public Nullable<long> WorkDurationMs { get; set; }

Property Valueโ€‹

Nullable<Int64>

Remarks:

๐Ÿ”ด The controller cannot measure this, and that is why it travels. Concept ยง2.3 keeps the lease-held span and the pipeline-run span deliberately apart because the difference between them is the per-lease warm-up โ€” token, tenant repository, CK model, pipeline registration โ€” that a pool exists to amortise. But for a leased execution the controller is what stamps StartedAt, at claim time, so the entity's own span is identical to the held span by construction and the difference would read as zero forever. The member is the only party that knows when the work really began.

Null on a lease that failed before the work item ran, and on a member built before this field existed. The controller records no work or overhead sample in that case rather than a fabricated zero, which would make the pool look infinitely wasteful.

ReleasedAtUtcโ€‹

When the member finished with the tenant (UTC). The controller stamps LeaseReleasedAt from its own clock rather than this value; it is carried for diagnostics of clock skew between controller and member.

public DateTime ReleasedAtUtc { get; set; }

Property Valueโ€‹

DateTime

Constructorsโ€‹

LeaseResultDto()โ€‹

public LeaseResultDto()