Skip to content

Phase 2: group action codec does not cover friendship or policy #163

Closed

Description

@dezren39

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.

Activity

  1. dezren39 commented on Oct 24, 2026

    @dezren39
    MemberAuthor

    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.

  2. dezren39 commented on Oct 29, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · picked up

    • Agent: queue worker (repo-worker-code), Lane C shift
    • Session / ID: queue task 2013
    • Found via: queue claim
    • Task: Triage issue Phase 2: group action codec does not cover friendship or policy #163 — verify on current main whether the group action (wire) codec covers friendship and policy actions, then route or close with evidence
    • 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)
    • Links: task 2013 (repo-health-code-pilot)
  3. dezren39 commented on Oct 29, 2026

    @dezren39
    MemberAuthor

    🤖 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.
  4. added
    queue/blockedQueue or user escalation state
    status/blockedQueue or user escalation state
    user/escalatedQueue or user escalation state
    and removed
    queue/claimedQueue worker lifecycle state
    on Oct 29, 2026
  5. dezren39 commented on Oct 29, 2026

    @dezren39
    MemberAuthor

    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.

  6. 30 remaining items

  7. added
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    status/parkedDeliberately paused with a recorded resume condition
    and removed
    queue/claimedQueue worker lifecycle state
    on Nov 3, 2026
  8. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · parked — launch budget reached

    • Agent: OpenChamber scheduled lane (repo-worker-code)
    • Lane: aea12c82-c5af-4e5a-9b66-f8e360f87177 · queue task 7196
    • 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.
    • Worktree: /home/user/git/fleet/7196, branch queue/7196-163-group-event-codec
  9. added
    queue/claimedQueue worker lifecycle state
    and removed
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    on Nov 3, 2026
  10. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    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

  11. added a commit that references this issue on Nov 4, 2026
  12. dezren39 commented on Nov 4, 2026

    @dezren39
    MemberAuthor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

source/creatorFiled by the new-issue-creator jobtask/small-fixQueue packet kind: bounded fix with reproduction and targeted tests

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions