You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Phase 2: group action codec does not cover friendship or policy #163
Wiring codec covers create, join, remove, promote, demote. Friendship request, accept, decline, dissolve, and group policy or template changes are not encoded yet. Needed before group ops from friendships are live.
id train triage (2026-10-24): too-big-needs-design — friendship/policy group-action codec; only create/join/remove/promote/demote are encoded, friendship request/accept/decline/dissolve and policy are not.
Expectation: effort s; done = verdict posted with code citations at HEAD, and a route (follow-up packet, or escalation with options where the design call is the owner's)
🤖 Agent note · escalated — triage verdict CONFIRMED; wire-format design decision is the owner's
Agent: queue worker (repo-worker-code), Lane C shift
Session / ID: queue task 2013 (blocking as escalated-to-user)
Found via: queue claim
Verdict / evidence (at HEAD, 2026-10-29):
The wire codec is pkgs/id/src/membership/body.rs (P2.3): canonical CBOR ["group.op", version, kind, args] over p2panda-auth GroupAction. Its table encodes exactly five kinds — create, join, remove, promote, demote — and its module doc states the gap verbatim: "Friendship and group policy have no GroupAction form, so they are not encoded here." encode_body matches only those five variants. CONFIRMED as filed.
Partial mitigation, local only: the groups track has its own Body enum (pkgs/id/src/groups/mod.rs) — Create (incl. friendship template + full policy record), Join (friendship accept), Policy(Policy), Member, Delegate, Device — but it is serialized only as JSON lines in the local group log (pkgs/id/src/groups/log.rs). It never goes through the CBOR wire codec, so none of it can travel in an event payload to another node.
Friendship decline has no form anywhere: no Decline variant in the groups Body/MemberOp enums and no occurrence in pkgs/id/src at HEAD. Dissolve exists only implicitly (Member remove + on_member_removed: dissolve policy).
Why this is not a scoped small_fix: p2panda-auth's GroupAction is an upstream enum with only the five variants, so friendship/policy cannot be "added to the codec" — a representation must be designed, and wire format choices (claim tag, versioning, canonical encoding, golden vectors per design §4.5) are protocol-defining and hard to reverse. This matches the owner's own 2026-10-24 triage flag on this issue: too-big-needs-design.
The decision, with options:
A. New wire family for groups-track events — a second CBOR claim (e.g. group.event) mirroring the groups Body enum (create/join/policy/member/delegate/device, plus a new decline form). Ramification: two body families to maintain, but layers stay clean — membership actions keep using p2panda-auth semantics, and the groups track gets a wire form for everything it already models locally. Most work, most durable.
B. Extend group.op with non-action kinds — add kinds carrying policy/friendship payloads alongside the five membership kinds, one codec, one version line. Ramification: mixes two layers in one format; policy payloads (History::Recent, Scheme, caps) make the codec much larger, and future p2panda-auth alignment gets harder.
C. Defer explicitly — record that wire encoding waits until group ops actually leave the local log (nothing syncs group events between nodes today), and close the gap when the sync work is scheduled. Ramification: zero work now, but the gap will be rediscovered at sync time under time pressure, and Phase 2: group action codec does not cover friendship or policy #163's own note says this is needed before group ops from friendships are live.
Recommendation: A, scoped as its own design-then-build packet set (design the group.event encoding + golden vectors first, then implement), because the groups Body model already exists and only needs a faithful wire form; B saves a second decoder at the cost of coupling the layers permanently. If sync is not on the near roadmap, C with an explicit trigger ("reopen when group-event sync is scheduled") is the honest alternative.
Expectation: Drew picks A / B / C (or redirects); on a pick, the follow-up packet(s) get enqueued from this note. Task 2013 blocked as escalated-to-user; issue labelled user/escalated.
DREW DECISION (2026-10-29, main chat): Option A — adopt the new group.event wire family. It is the better shape; aim for that generic shape for as many things as possible. Settle the wire format NOW so it does not have to change later: it must carry all the flexibility it needs — generic, efficient, workable across varying bandwidth and latency requirements. When something can be done better in a more generic way, make that change toward the generic shape.
Reason: The scheduled launch budget ended while the corrected focused test run was compiling; the task was parked before the lease expired.
Progress: Default-feature cargo check -p id passed. The resumed cargo test -p id group_event_wire completed after parking: 5 passed, 0 failed. The earlier failure was only an overly specific assertion about which error variant trailing data returns.
Resume: Read the task checkpoint and shell sh_w7gqlcoj. When the task is claimable, run cargo test -p id-core membership::body, then commit, merge latest origin/main, push and open the PR.
agent-note:v1
state: picked up (resume)
Task 7196 claimed by lane code-c, execution lane direct, resuming existing WIP: laptop worktree ~/git/fleet/7196 on branch queue/7196-163-group-event-codec — uncommitted pkgs/id/src/groups/event.rs (new) + mod.rs wiring. Prior checkpoint: 4/5 focused tests passed, one assertion corrected (trailing-input rejection regardless of error variant), rerun never landed. Next: run the targeted tests on the laptop, fix if red, commit, push, open PR.
Found via: repo-queue worker shift lane C 2026-11-03
agent-note:v1
state: done
Task 7196 complete: PR #5212 merged (merge commit 3adad8f) — versioned group.event wire codec in pkgs/id/src/groups/event.rs covering friendship (request = create with Friendship template, join = accept, friendship.decline distinct from dissolution) and policy kinds, with canonical-CBOR strict decoding and bounds. Verified on the laptop: cargo test -p id group_event 6 passed post-merge-of-main, cargo test -p id groups:: 115 passed; Codex review completed with no findings. Issue auto-closed by the PR.
Activity
dezren39 commentedon Oct 24, 2026
id train triage (2026-10-24): too-big-needs-design — friendship/policy group-action codec; only create/join/remove/promote/demote are encoded, friendship request/accept/decline/dissolve and policy are not.
dezren39 commentedon Oct 29, 2026
🤖 Agent note · picked up
dezren39 commentedon Oct 29, 2026
🤖 Agent note · escalated — triage verdict CONFIRMED; wire-format design decision is the owner's
pkgs/id/src/membership/body.rs(P2.3): canonical CBOR["group.op", version, kind, args]over p2panda-authGroupAction. Its table encodes exactly five kinds —create,join,remove,promote,demote— and its module doc states the gap verbatim: "Friendship and group policy have noGroupActionform, so they are not encoded here."encode_bodymatches only those five variants. CONFIRMED as filed.Bodyenum (pkgs/id/src/groups/mod.rs) —Create(incl. friendship template + full policy record),Join(friendship accept),Policy(Policy),Member,Delegate,Device— but it is serialized only as JSON lines in the local group log (pkgs/id/src/groups/log.rs). It never goes through the CBOR wire codec, so none of it can travel in an event payload to another node.Declinevariant in the groupsBody/MemberOpenums and no occurrence inpkgs/id/srcat HEAD. Dissolve exists only implicitly (Member remove +on_member_removed: dissolvepolicy).GroupActionis an upstream enum with only the five variants, so friendship/policy cannot be "added to the codec" — a representation must be designed, and wire format choices (claim tag, versioning, canonical encoding, golden vectors per design §4.5) are protocol-defining and hard to reverse. This matches the owner's own 2026-10-24 triage flag on this issue: too-big-needs-design.group.event) mirroring the groupsBodyenum (create/join/policy/member/delegate/device, plus a new decline form). Ramification: two body families to maintain, but layers stay clean — membership actions keep using p2panda-auth semantics, and the groups track gets a wire form for everything it already models locally. Most work, most durable.group.opwith non-action kinds — add kinds carrying policy/friendship payloads alongside the five membership kinds, one codec, one version line. Ramification: mixes two layers in one format; policy payloads (History::Recent, Scheme, caps) make the codec much larger, and future p2panda-auth alignment gets harder.group.eventencoding + golden vectors first, then implement), because the groupsBodymodel already exists and only needs a faithful wire form; B saves a second decoder at the cost of coupling the layers permanently. If sync is not on the near roadmap, C with an explicit trigger ("reopen when group-event sync is scheduled") is the honest alternative.user/escalated.dezren39 commentedon Oct 29, 2026
DREW DECISION (2026-10-29, main chat): Option A — adopt the new
group.eventwire family. It is the better shape; aim for that generic shape for as many things as possible. Settle the wire format NOW so it does not have to change later: it must carry all the flexibility it needs — generic, efficient, workable across varying bandwidth and latency requirements. When something can be done better in a more generic way, make that change toward the generic shape.30 remaining items
dezren39 commentedon Nov 3, 2026
🤖 Agent note · parked — launch budget reached
dezren39 commentedon Nov 3, 2026
agent-note:v1
state: picked up (resume)
Task 7196 claimed by lane code-c, execution lane direct, resuming existing WIP: laptop worktree ~/git/fleet/7196 on branch queue/7196-163-group-event-codec — uncommitted pkgs/id/src/groups/event.rs (new) + mod.rs wiring. Prior checkpoint: 4/5 focused tests passed, one assertion corrected (trailing-input rejection regardless of error variant), rerun never landed. Next: run the targeted tests on the laptop, fix if red, commit, push, open PR.
Found via: repo-queue worker shift lane C 2026-11-03
Merge pull request #5212 from developing-today/queue/7196-163-group-e…
dezren39 commentedon Nov 4, 2026
agent-note:v1
state: done
Task 7196 complete: PR #5212 merged (merge commit 3adad8f) — versioned
group.eventwire codec in pkgs/id/src/groups/event.rs covering friendship (request = create with Friendship template, join = accept, friendship.decline distinct from dissolution) and policy kinds, with canonical-CBOR strict decoding and bounds. Verified on the laptop:cargo test -p id group_event6 passed post-merge-of-main,cargo test -p id groups::115 passed; Codex review completed with no findings. Issue auto-closed by the PR.