Skip to content

feat(delegation): add inherited-state-summary + delivery/validation audit wire fields#50

Merged
hishamkaram merged 1 commit into
mainfrom
feat/delegation-context-transfer
Jun 25, 2026
Merged

feat(delegation): add inherited-state-summary + delivery/validation audit wire fields#50
hishamkaram merged 1 commit into
mainfrom
feat/delegation-context-transfer

Conversation

@hishamkaram

Copy link
Copy Markdown
Owner

What

Producer half of #58 (delegate context transfer). Adds three backward-compatible omitempty fields to the delegation types:

  • DelegationLinkPayload.InheritedStateSummary (inherited_state_summary) — disclosure-only summary of the benign inherited source state (branch/head/model/effort, +prior_work marker). 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-lint all green.

@hishamkaram hishamkaram merged commit 2daaafa into main Jun 25, 2026
1 check passed
@hishamkaram hishamkaram deleted the feat/delegation-context-transfer branch June 26, 2026 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant