Documentation / guides
Errors
Describe compaction validation, rejection, and runtime errors reported by CompactionRejected.
Compaction separates a public durable rejection from infrastructure failures.
Only a completed, durable attempt can produce CompactionRejected or waiter
rejections. Publication and coordination failures remain typed operational
errors so consumers do not mistake missing evidence for a model rejection.
Public rejection reasons
event.CompactRejectReason | Meaning |
|---|---|
CompactRejectControlLaneFull | The bounded compaction waiter/control lane could not admit the request. |
CompactRejectShuttingDown | Shutdown outranked the pending attempt. |
CompactRejectInterrupted | An interrupt outranked the pending attempt. |
CompactRejectCanceled | The compaction context or execution was canceled. |
CompactRejectStaleBasis | Candidate identity no longer matches actor context. |
CompactRejectProgressPublication | Progress publication prevented a valid terminal operation. |
CompactRejectUnavailable | The configured compactor or facility was unavailable. |
CompactRejectExecutionFailed | The compaction Hustle or count operation failed. |
CompactRejectInvalidSummary | Summary wire, identity, shape, or XML validation failed. |
CompactRejectContextCountFailed | Complete request measurement failed. |
CompactRejectSummaryTooLarge | Post-replacement input still exceeds its context limit. |
CompactRejectInternal | A bounded internal execution failure occurred. |
CompactRejectContextLimitUnknown | Context limit could not be resolved safely. |
Proof: reject constants and reject event validation.
Typed domain failures
*loop.CompactionPolicyError names the invalid policy field. *loop.RequestFingerprintError
names missing or invalid request identity. *loop.CompactionInputError names
basis, model, request_fingerprint, transcript, or
max_summary_tokens. *loop.InvalidSummaryError carries one closed reason.
*loop.SummaryTooLargeError carries the post-replacement measurement.
Use errors.As and errors.Is; do not parse error strings or render causes to
model output.
Proof: loop compaction errors, policy errors, and domain tests.
Coordination and finalization failures
Internal CompactionCoordinationError kinds are attempt_id, outcome, and
basis. CompactionFinalizationError reports terminal clone, validation,
append, or waiter publication failures. A start publication failure does not
invoke the executor; an append failure never becomes a false rejected event.
%%{init: {"theme":"dark"}}%%
flowchart TD
A[coordination] -->|valid result| T[durable terminal]
A -->|typed infrastructure failure| F[report operational error]
T --> W[waiter replies]
A -. no fabricated event .-> F
Proof: coordination errors, finalization errors, and failure tests.