ssbc / ssb-meta-feeds

10 stars 0 forks source link

encrypted metafeed API (AGAIN) #89

Closed mixmix closed 1 year ago

mixmix commented 1 year ago

Cases this has to cover:

  1. :x: recp = sbot.id

    • this is technically an "own_secret" case, but we will hit bumps because ssb-box2 doesn't know about meta-feeds, and "own" now being many keys
      • on encrption, I think box2 will see this as own-encrypt?
      • on decrypt, box2 will almost certainly NOT try own keys
  2. :heavy_check_mark: recps = groupId

    • this case should be fine... as we try group keys on all our messages
  3. :x: recp = someFeedId

    • this is the DM case, so the shared key should be derived from shardFeedId (author) + someFeedId
    • this should "just work"
  4. :x: recp = POBoxId

:x: = this PR doesn't handle, and has test cases showing they explicitly callback with an error

mixmix commented 1 year ago

@staltz have made changes I'm going to, and highlighted the ones I'm not (along with reasons) From here, can you review and merge.

You'll see I've pushed back on your requests to put some things in other PRs. I'd like you to consider this as an example of a place for you to concede some flexibility. I've done a lot of flexing my working approach to meet you, and it would feel good if we could both practice that.

mixmix commented 1 year ago

Oh, NOTE I'm not working on supporting encryption to FeedId at all here. That's for a future PR (maybe, if we need it). This change gives any user putting a FeedId in a clear error

staltz commented 1 year ago

I'd like you to consider this as an example of a place for you to concede some flexibility. I've done a lot of flexing my working approach to meet you, and it would feel good if we could both practice that.

@mixmix Okay, I'll concede. But I think the requests I've made are due to deviations from the work approach that we agreed on having. So it's more like a reminder to stick with the work mode of one-goal-per-PR. Feels like you're asking for exceptions to those rules, again.

mixmix commented 1 year ago

@staltz we agreed to work together towards a shared pattern - that I would push hard for micro-PRs (which I think I've been doing fairly well on), and that you would try flexing if there was something that was a minor step off that (I'm measuring by whether it changes the PR much logically, conceptually, thematically).

Anyway that's for concession, it feels good for momentum.

Also thanks for the close review - you caught some good potential bugs :heart:

mixmix commented 1 year ago

oops I clicked the "Refresh" icon next to your name which was actually "request another review" (I must have some compulsion to click refresh)

:recycle: