feat(delegation): add cancel-ack + force-abort frames and cancel lifecycle states#51
Merged
Merged
Conversation
…cycle states
Wire surface for reliable delegation cancel/teardown:
- MsgDelegationCancelAck + DelegationCancelAckPayload: receipt confirmation for a
delegation_cancel (ack to terminal split, modeled on GitSyncCancelResponse).
- MsgDelegationForceAbort + DelegationForceAbortPayload: escalation of a stalled
cancel.
- Intermediate states DelegationStateCancelling / CancelStalled / ForceKilled on
DelegationStatusPayload.State. The canonical terminal frame stays
delegation_result{status:"cancelled"} so old clients self-heal.
- Optional request_id idempotency key on DelegationCancelPayload.
All new fields omitempty / byte-additive. Round-trip, omitempty, lifecycle-state,
and no-content-on-wire security tests included.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Wire protocol surface for reliable delegation cancel/teardown (producer of a 3-repo feature).
MsgDelegationCancelAck+DelegationCancelAckPayload— receipt confirmation for adelegation_cancel(ack→terminal split, modeled on the in-repoGitSyncCancelResponseprecedent):Accepted=truemeans teardown started (terminaldelegation_resultfollows),Accepted=false+ redactedErrormeans it could not start.MsgDelegationForceAbort+DelegationForceAbortPayload— escalation of a stalled cancel.DelegationStateCancelling/CancelStalled/ForceKilledcarried inDelegationStatusPayload.Statefor transient UI. The canonical terminal frame staysdelegation_result{status:"cancelled"}so an old PWA self-heals on the result frame.request_ididempotency key onDelegationCancelPayload.Safety
All new fields
omitempty/ byte-additive (a pre-feature producer marshals byte-identical JSON). The ack/force-abort frames are pure control-plane signals: ano-content-on-wiretest pins their key set to session IDs + request_id + accepted + redacted error only — never delegate output, inherited context, or diffs.Tests
Round-trip + omitempty + lifecycle-state-constant + message-type-constant + no-content-on-wire tests.
go vet,go build,go test -race -count=1 -p 4(coverage 88.6% ≥ 83%),golangci-lint0 issues — all green.Producer-first
This is the producer in a cross-repo feature; it merges + tags FIRST, then
agentdre-pins itsgo.modandagentd+agentd-webfollow.