feat(delegation): add inherited-state-summary + delivery/validation audit wire fields#50
Merged
Merged
Conversation
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
Producer half of #58 (delegate context transfer). Adds three backward-compatible
omitemptyfields to the delegation types:DelegationLinkPayload.InheritedStateSummary(inherited_state_summary) — disclosure-only summary of the benign inherited source state (branch/head/model/effort,+prior_workmarker). Carries no inherited content, only a glanceable description for the human + link history.PersistedDelegationLink.DeliveryState(delivery_state) — scalar handoff first-message delivery lifecycle:pending | delivered | failed.PersistedDelegationLink.ValidationState(validation_state) — scalar output-validation lifecycle marker.Plus the
DelegationDeliveryState*/DelegationValidationState*string-enum constants.Why
Consumers (agentd daemon + PWA) read these. Per the workspace producer-first rule this module merges + tags first, then agentd re-pins.
Safety
All fields
omitempty→ byte-identical wire for a pre-feature producer (round-trip + omitempty subtests prove zero-value drops the keys). Scalar-only audit fields; inherited content never travels the wire. Zero external deps (stdlib only).Tests
Round-trip + byte-identity + constant-pin tests.
go vet,go test -race -count=1 -p 4,golangci-lintall green.