Skip to content

id: SubscriptionStore/BoardSubscription derive Debug, printing private follower keys — contradicts the slice-1 privacy invariant #13452

Closed

Description

@dezren39

Slice 1 of #7585 (commit 0dfe789, pkgs/id/src/boards/subscription.rs) stakes a privacy invariant and then derives the surface that breaks it.

Evidence

  • `pkgs/id/src/boards/subscription.rs:14-17": "the only reads are a per-pair lookup and a per-subscriber listing, so there is no surface that enumerates who follows what."
  • `pkgs/id/src/boards/subscription.rs:296-299" (test): "follower identity is visible to no one but the follower" (oracle invariant 4).
  • pkgs/id/src/boards/subscription.rs:44" and :83": BoardSubscription and SubscriptionStore both #[derive(..., Debug, ...)] over subscriber: String (canonical Ed25519 key) keyed maps. One {store:?} in a log line dumps the entire follower graph: every subscriber key with every board each follows.

Verified, not a hunch

Added a temporary in-module probe (reverted afterwards, tree clean):

let mut store = SubscriptionStore::new();
store.follow(&viewer(), &board, 1).unwrap();
assert!(!format!("{store:?}").contains(&viewer()));

Result: FAILED — store Debug leaks subscriber key at src/boards/subscription.rs. The derived Debug prints the subscriber hex.

Why it matters now

Slice 1 has no callers yet, so nothing logs the store today — but slices 2+ (discovery/feed surfaces per #7585) will hold this store next to request logging. A single :?} on an error/log path then leaks who-follows-what. Redacting now is a ~10-line fix before the store grows callers.

Acceptance

  • SubscriptionStore and BoardSubscription no longer emit subscriber keys via Debug (custom redacting impl or removed derive), with a regression test asserting the rendered form contains no subscriber key.
  • Module docs still hold: per-pair lookup + per-subscriber listing remain the only enumeration surfaces.

Related: #7585 (epic), #5862 (design Decision 1). Follow-up to slice-1 commit 0dfe789.

{
  "direct_parent": null,
  "links": [],
  "lineage": {
    "design": null,
    "roadmap_item": null,
    "priority": null
  },
  "pm_meta": 1,
  "provenance": {
    "queue_id": null,
    "scheduled_start": null,
    "picked_up_at": null,
    "work_started_at": null,
    "created_at": "2026-11-23T16:30:35Z",
    "session_id": "ses_e5df6cf88b0ffe1kvhVt3IIqkC",
    "lane": null,
    "host": "amd",
    "worktree": "/home/user/git/code",
    "model": null,
    "lane_start_issues": [],
    "workspace_ref": {
      "kind": "worktree",
      "id": "/home/user/git/code",
      "repo": "developing-today/code",
      "branch": "main",
      "sha": "b25edb16077dd58435c35c2574c899847afa53e7"
    },
    "auth_subject": "agent-next-23-local",
    "stamped_by": "fleet 0.1.0 (native)"
  }
}

Activity

  1. developing-today commented on Nov 23, 2026

    @developing-today
    Contributor
  2. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    Claim — Lane AAF (archer), 2026-11-23. Taking this item: replace the derived Debug on SubscriptionStore and BoardSubscription with redacting impls so no subscriber key renders, plus the regression test the acceptance names. Premise and ownership verified first-hand before this claim: thread count-confirmed at 1 comment (Kaneo bot link only, no lane claim). Work proceeds in a laptop worktree on branch lane-aaf-13452.

  3. added a commit that references this issue on Nov 23, 2026
  4. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    Done — Lane AAF (archer), 2026-11-23. Landed via PR #13486, merged 2d65edd6eda82ddbe7cf760f0b9e19811ad162dc.

    What changed (pkgs/id/src/boards/subscription.rs, +58/−3):

    • BoardSubscription: derived Debug removed; manual impl renders "<redacted>" for subscriber (board, created_at, notify_mode, muted still render).
    • SubscriptionStore: derived Debug removed; manual impl renders only subscription_count — the keyed map never renders.
    • Regression test oracle_debug_output_never_renders_subscriber_keys makes the issue's probe permanent: neither rendered form may contain a subscriber key.
    • Serialization and behavior unchanged; the module had no other callers (slice 1), so nothing downstream is affected. Per-pair lookup + per-subscriber listing remain the only enumeration surfaces, as the module docs stake.

    Verification (laptop, nix develop in pkgs/id, sccache bypassed per the standing defect note):

    • Module suite 10/10 pass, including the new regression test.
    • Full id lib suite (--all-features): 572 passed; the only 4 failures are the pre-existing hosted_export failures tracked in id: 4 hosted_export tests fail on main (BlobCitationMismatch/MissingBlob) #13444, identical on pristine main — no new failures.
    • rustfmt: no new diffs from this change (the file's two flagged hunks pre-date it on main, left untouched); clippy: no findings in the touched file.

    Premise was verified first-hand at main fa4b1d5fbd6 before the fix (both derives present over the subscriber-keyed map). Closing — both acceptance points are met.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions