{"action":"created","comment":{"url":"https://api.github.com/repos/cabal-club/cabal-core/pulls/comments/231273800","pull_request_review_id":172209967,"id":231273800,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMTI3MzgwMA==","diff_hunk":"@@ -104,8 +111,8 @@ Cabal.prototype.publish = function (message, opts, cb) {\n \n Cabal.prototype.publishNick = function (nick, cb) {\n   // TODO: sanity checks on reasonable names\n-  if (!nick) return cb()\n   if (!cb) cb = noop\n+  if (!nick) return cb()","path":"index.js","position":28,"original_position":28,"commit_id":"f0a5c14fa0cec98f8dad128366bcdd71b8d42e4a","original_commit_id":"f0a5c14fa0cec98f8dad128366bcdd71b8d42e4a","user":{"login":"ralphtheninja","id":308049,"node_id":"MDQ6VXNlcjMwODA0OQ==","avatar_url":"https://avatars2.githubusercontent.com/u/308049?v=4","gravatar_id":"","url":"https://api.github.com/users/ralphtheninja","html_url":"https://github.com/ralphtheninja","followers_url":"https://api.github.com/users/ralphtheninja/followers","following_url":"https://api.github.com/users/ralphtheninja/following{/other_user}","gists_url":"https://api.github.com/users/ralphtheninja/gists{/gist_id}","starred_url":"https://api.github.com/users/ralphtheninja/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ralphtheninja/subscriptions","organizations_url":"https://api.github.com/users/ralphtheninja/orgs","repos_url":"https://api.github.com/users/ralphtheninja/repos","events_url":"https://api.github.com/users/ralphtheninja/events{/privacy}","received_events_url":"https://api.github.com/users/ralphtheninja/received_events","type":"User","site_admin":false},"body":"This is also a synchronous call","created_at":"2018-11-06T20:09:10Z","updated_at":"2018-11-06T20:09:10Z","html_url":"https://github.com/cabal-club/cabal-core/pull/25#discussion_r231273800","pull_request_url":"https://api.github.com/repos/cabal-club/cabal-core/pulls/25","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/cabal-club/cabal-core/pulls/comments/231273800"},"html":{"href":"https://github.com/cabal-club/cabal-core/pull/25#discussion_r231273800"},"pull_request":{"href":"https://api.github.com/repos/cabal-club/cabal-core/pulls/25"}}},"pull_request":{"url":"https://api.github.com/repos/cabal-club/cabal-core/pulls/25","id":227771527,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI3NzcxNTI3","html_url":"https://github.com/cabal-club/cabal-core/pull/25","diff_url":"https://github.com/cabal-club/cabal-core/pull/25.diff","patch_url":"https://github.com/cabal-club/cabal-core/pull/25.patch","issue_url":"https://api.github.com/repos/cabal-club/cabal-core/issues/25","number":25,"state":"open","locked":false,"title":"[RFC] introduce protocol version","user":{"login":"cblgh","id":3862362,"node_id":"MDQ6VXNlcjM4NjIzNjI=","avatar_url":"https://avatars1.githubusercontent.com/u/3862362?v=4","gravatar_id":"","url":"https://api.github.com/users/cblgh","html_url":"https://github.com/cblgh","followers_url":"https://api.github.com/users/cblgh/followers","following_url":"https://api.github.com/users/cblgh/following{/other_user}","gists_url":"https://api.github.com/users/cblgh/gists{/gist_id}","starred_url":"https://api.github.com/users/cblgh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cblgh/subscriptions","organizations_url":"https://api.github.com/users/cblgh/orgs","repos_url":"https://api.github.com/users/cblgh/repos","events_url":"https://api.github.com/users/cblgh/events{/privacy}","received_events_url":"https://api.github.com/users/cblgh/received_events","type":"User","site_admin":false},"body":"## Background\r\nWe've come into a bunch of situations where old clients have seemingly caused a lot of bad shit to happen when making breaking changes in the protocol.\r\n\r\nSometimes the bad behaviour have been bugs that surfaced due to something else, but it has been hard to reason about issues since there was always the explanation that `well maybe it's the old clients fault`. \r\n\r\n## INTRODUCING PROTOCOL VERSIONS\r\n\r\nBasically we introduce a protocol version that allows us to exclude old clients as a cause for bad behaviour, because they simply will not use the same database and thus cannot forward any bad data.\r\n\r\n\r\nIt's exposed in `index.js` as `module.exports.protocolVersion` and on every cabal as `cabal.getProtocolVersion(cb)`\r\n\r\nIn the [terminal client](https://github.com/cabal-club/cabal/blob/multi-cabal-protocol-version/cli.js#L15) we use it to version all of the databases (well, except for the one created with `--db` but that's in the pipeline to be changed). \r\n\r\nThis means all new cabal related files will live in `~/.cabal/<protocolVersion>/` with the `kappa-core` databases in `~/.cabal/<protocolVersion>/archives/<cabalKey>`\r\n\r\n## Discussion\r\nCurrently the protocol version is 1.0.0, just like [`multifeed`](https://github.com/noffle/multifeed/blob/master/index.js#L12), but i don't think it makes sense for cabal. \r\n\r\nMy reasoning behind that opinion is that any change to the protocol version will effectively be a breaking change (since we have a new database location) and so the [semver](https://semver.org/) notation is misleading. \r\n\r\nI would love some input on this part in particular.\r\n\r\n\r\n~cblgh\r\n","created_at":"2018-11-01T21:53:09Z","updated_at":"2018-11-06T20:09:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b8d2f94d61dcdf9d86ad152d759c75c3779d2fc7","assignee":null,"assignees":[],"requested_reviewers":[{"login":"noffle","id":489362,"node_id":"MDQ6VXNlcjQ4OTM2Mg==","avatar_url":"https://avatars2.githubusercontent.com/u/489362?v=4","gravatar_id":"","url":"https://api.github.com/users/noffle","html_url":"https://github.com/noffle","followers_url":"https://api.github.com/users/noffle/followers","following_url":"https://api.github.com/users/noffle/following{/other_user}","gists_url":"https://api.github.com/users/noffle/gists{/gist_id}","starred_url":"https://api.github.com/users/noffle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noffle/subscriptions","organizations_url":"https://api.github.com/users/noffle/orgs","repos_url":"https://api.github.com/users/noffle/repos","events_url":"https://api.github.com/users/noffle/events{/privacy}","received_events_url":"https://api.github.com/users/noffle/received_events","type":"User","site_admin":false},{"login":"karissa","id":633012,"node_id":"MDQ6VXNlcjYzMzAxMg==","avatar_url":"https://avatars3.githubusercontent.com/u/633012?v=4","gravatar_id":"","url":"https://api.github.com/users/karissa","html_url":"https://github.com/karissa","followers_url":"https://api.github.com/users/karissa/followers","following_url":"https://api.github.com/users/karissa/following{/other_user}","gists_url":"https://api.github.com/users/karissa/gists{/gist_id}","starred_url":"https://api.github.com/users/karissa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karissa/subscriptions","organizations_url":"https://api.github.com/users/karissa/orgs","repos_url":"https://api.github.com/users/karissa/repos","events_url":"https://api.github.com/users/karissa/events{/privacy}","received_events_url":"https://api.github.com/users/karissa/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/cabal-club/cabal-core/pulls/25/commits","review_comments_url":"https://api.github.com/repos/cabal-club/cabal-core/pulls/25/comments","review_comment_url":"https://api.github.com/repos/cabal-club/cabal-core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cabal-club/cabal-core/issues/25/comments","statuses_url":"https://api.github.com/repos/cabal-club/cabal-core/statuses/f0a5c14fa0cec98f8dad128366bcdd71b8d42e4a","head":{"label":"cabal-club:protocol-version","ref":"protocol-version","sha":"f0a5c14fa0cec98f8dad128366bcdd71b8d42e4a","user":{"login":"cabal-club","id":39334929,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM5MzM0OTI5","avatar_url":"https://avatars0.githubusercontent.com/u/39334929?v=4","gravatar_id":"","url":"https://api.github.com/users/cabal-club","html_url":"https://github.com/cabal-club","followers_url":"https://api.github.com/users/cabal-club/followers","following_url":"https://api.github.com/users/cabal-club/following{/other_user}","gists_url":"https://api.github.com/users/cabal-club/gists{/gist_id}","starred_url":"https://api.github.com/users/cabal-club/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cabal-club/subscriptions","organizations_url":"https://api.github.com/users/cabal-club/orgs","repos_url":"https://api.github.com/users/cabal-club/repos","events_url":"https://api.github.com/users/cabal-club/events{/privacy}","received_events_url":"https://api.github.com/users/cabal-club/received_events","type":"Organization","site_admin":false},"repo":{"id":133696955,"node_id":"MDEwOlJlcG9zaXRvcnkxMzM2OTY5NTU=","name":"cabal-core","full_name":"cabal-club/cabal-core","private":false,"owner":{"login":"cabal-club","id":39334929,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM5MzM0OTI5","avatar_url":"https://avatars0.githubusercontent.com/u/39334929?v=4","gravatar_id":"","url":"https://api.github.com/users/cabal-club","html_url":"https://github.com/cabal-club","followers_url":"https://api.github.com/users/cabal-club/followers","following_url":"https://api.github.com/users/cabal-club/following{/other_user}","gists_url":"https://api.github.com/users/cabal-club/gists{/gist_id}","starred_url":"https://api.github.com/users/cabal-club/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cabal-club/subscriptions","organizations_url":"https://api.github.com/users/cabal-club/orgs","repos_url":"https://api.github.com/users/cabal-club/repos","events_url":"https://api.github.com/users/cabal-club/events{/privacy}","received_events_url":"https://api.github.com/users/cabal-club/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/cabal-club/cabal-core","description":"Core database and replication for cabal.","fork":false,"url":"https://api.github.com/repos/cabal-club/cabal-core","forks_url":"https://api.github.com/repos/cabal-club/cabal-core/forks","keys_url":"https://api.github.com/repos/cabal-club/cabal-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cabal-club/cabal-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cabal-club/cabal-core/teams","hooks_url":"https://api.github.com/repos/cabal-club/cabal-core/hooks","issue_events_url":"https://api.github.com/repos/cabal-club/cabal-core/issues/events{/number}","events_url":"https://api.github.com/repos/cabal-club/cabal-core/events","assignees_url":"https://api.github.com/repos/cabal-club/cabal-core/assignees{/user}","branches_url":"https://api.github.com/repos/cabal-club/cabal-core/branches{/branch}","tags_url":"https://api.github.com/repos/cabal-club/cabal-core/tags","blobs_url":"https://api.github.com/repos/cabal-club/cabal-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cabal-club/cabal-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cabal-club/cabal-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/cabal-club/cabal-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cabal-club/cabal-core/statuses/{sha}","languages_url":"https://api.github.com/repos/cabal-club/cabal-core/languages","stargazers_url":"https://api.github.com/repos/cabal-club/cabal-core/stargazers","contributors_url":"https://api.github.com/repos/cabal-club/cabal-core/contributors","subscribers_url":"https://api.github.com/repos/cabal-club/cabal-core/subscribers","subscription_url":"https://api.github.com/repos/cabal-club/cabal-core/subscription","commits_url":"https://api.github.com/repos/cabal-club/cabal-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/cabal-club/cabal-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/cabal-club/cabal-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/cabal-club/cabal-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/cabal-club/cabal-core/contents/{+path}","compare_url":"https://api.github.com/repos/cabal-club/cabal-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cabal-club/cabal-core/merges","archive_url":"https://api.github.com/repos/cabal-club/cabal-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cabal-club/cabal-core/downloads","issues_url":"https://api.github.com/repos/cabal-club/cabal-core/issues{/number}","pulls_url":"https://api.github.com/repos/cabal-club/cabal-core/pulls{/number}","milestones_url":"https://api.github.com/repos/cabal-club/cabal-core/milestones{/number}","notifications_url":"https://api.github.com/repos/cabal-club/cabal-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cabal-club/cabal-core/labels{/name}","releases_url":"https://api.github.com/repos/cabal-club/cabal-core/releases{/id}","deployments_url":"https://api.github.com/repos/cabal-club/cabal-core/deployments","created_at":"2018-05-16T16:48:11Z","updated_at":"2018-11-06T15:51:21Z","pushed_at":"2018-11-06T19:56:51Z","git_url":"git://github.com/cabal-club/cabal-core.git","ssh_url":"git@github.com:cabal-club/cabal-core.git","clone_url":"https://github.com/cabal-club/cabal-core.git","svn_url":"https://github.com/cabal-club/cabal-core","homepage":"","size":195,"stargazers_count":69,"watchers_count":69,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":15,"mirror_url":null,"archived":false,"open_issues_count":6,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0","node_id":"MDc6TGljZW5zZTE="},"forks":15,"open_issues":6,"watchers":69,"default_branch":"master"}},"base":{"label":"cabal-club:master","ref":"master","sha":"7a119e7247c3472aba8d818e9520465b83fef708","user":{"login":"cabal-club","id":39334929,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM5MzM0OTI5","avatar_url":"https://avatars0.githubusercontent.com/u/39334929?v=4","gravatar_id":"","url":"https://api.github.com/users/cabal-club","html_url":"https://github.com/cabal-club","followers_url":"https://api.github.com/users/cabal-club/followers","following_url":"https://api.github.com/users/cabal-club/following{/other_user}","gists_url":"https://api.github.com/users/cabal-club/gists{/gist_id}","starred_url":"https://api.github.com/users/cabal-club/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cabal-club/subscriptions","organizations_url":"https://api.github.com/users/cabal-club/orgs","repos_url":"https://api.github.com/users/cabal-club/repos","events_url":"https://api.github.com/users/cabal-club/events{/privacy}","received_events_url":"https://api.github.com/users/cabal-club/received_events","type":"Organization","site_admin":false},"repo":{"id":133696955,"node_id":"MDEwOlJlcG9zaXRvcnkxMzM2OTY5NTU=","name":"cabal-core","full_name":"cabal-club/cabal-core","private":false,"owner":{"login":"cabal-club","id":39334929,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM5MzM0OTI5","avatar_url":"https://avatars0.githubusercontent.com/u/39334929?v=4","gravatar_id":"","url":"https://api.github.com/users/cabal-club","html_url":"https://github.com/cabal-club","followers_url":"https://api.github.com/users/cabal-club/followers","following_url":"https://api.github.com/users/cabal-club/following{/other_user}","gists_url":"https://api.github.com/users/cabal-club/gists{/gist_id}","starred_url":"https://api.github.com/users/cabal-club/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cabal-club/subscriptions","organizations_url":"https://api.github.com/users/cabal-club/orgs","repos_url":"https://api.github.com/users/cabal-club/repos","events_url":"https://api.github.com/users/cabal-club/events{/privacy}","received_events_url":"https://api.github.com/users/cabal-club/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/cabal-club/cabal-core","description":"Core database and replication for cabal.","fork":false,"url":"https://api.github.com/repos/cabal-club/cabal-core","forks_url":"https://api.github.com/repos/cabal-club/cabal-core/forks","keys_url":"https://api.github.com/repos/cabal-club/cabal-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cabal-club/cabal-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cabal-club/cabal-core/teams","hooks_url":"https://api.github.com/repos/cabal-club/cabal-core/hooks","issue_events_url":"https://api.github.com/repos/cabal-club/cabal-core/issues/events{/number}","events_url":"https://api.github.com/repos/cabal-club/cabal-core/events","assignees_url":"https://api.github.com/repos/cabal-club/cabal-core/assignees{/user}","branches_url":"https://api.github.com/repos/cabal-club/cabal-core/branches{/branch}","tags_url":"https://api.github.com/repos/cabal-club/cabal-core/tags","blobs_url":"https://api.github.com/repos/cabal-club/cabal-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cabal-club/cabal-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cabal-club/cabal-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/cabal-club/cabal-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cabal-club/cabal-core/statuses/{sha}","languages_url":"https://api.github.com/repos/cabal-club/cabal-core/languages","stargazers_url":"https://api.github.com/repos/cabal-club/cabal-core/stargazers","contributors_url":"https://api.github.com/repos/cabal-club/cabal-core/contributors","subscribers_url":"https://api.github.com/repos/cabal-club/cabal-core/subscribers","subscription_url":"https://api.github.com/repos/cabal-club/cabal-core/subscription","commits_url":"https://api.github.com/repos/cabal-club/cabal-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/cabal-club/cabal-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/cabal-club/cabal-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/cabal-club/cabal-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/cabal-club/cabal-core/contents/{+path}","compare_url":"https://api.github.com/repos/cabal-club/cabal-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cabal-club/cabal-core/merges","archive_url":"https://api.github.com/repos/cabal-club/cabal-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cabal-club/cabal-core/downloads","issues_url":"https://api.github.com/repos/cabal-club/cabal-core/issues{/number}","pulls_url":"https://api.github.com/repos/cabal-club/cabal-core/pulls{/number}","milestones_url":"https://api.github.com/repos/cabal-club/cabal-core/milestones{/number}","notifications_url":"https://api.github.com/repos/cabal-club/cabal-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cabal-club/cabal-core/labels{/name}","releases_url":"https://api.github.com/repos/cabal-club/cabal-core/releases{/id}","deployments_url":"https://api.github.com/repos/cabal-club/cabal-core/deployments","created_at":"2018-05-16T16:48:11Z","updated_at":"2018-11-06T15:51:21Z","pushed_at":"2018-11-06T19:56:51Z","git_url":"git://github.com/cabal-club/cabal-core.git","ssh_url":"git@github.com:cabal-club/cabal-core.git","clone_url":"https://github.com/cabal-club/cabal-core.git","svn_url":"https://github.com/cabal-club/cabal-core","homepage":"","size":195,"stargazers_count":69,"watchers_count":69,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":15,"mirror_url":null,"archived":false,"open_issues_count":6,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0","node_id":"MDc6TGljZW5zZTE="},"forks":15,"open_issues":6,"watchers":69,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cabal-club/cabal-core/pulls/25"},"html":{"href":"https://github.com/cabal-club/cabal-core/pull/25"},"issue":{"href":"https://api.github.com/repos/cabal-club/cabal-core/issues/25"},"comments":{"href":"https://api.github.com/repos/cabal-club/cabal-core/issues/25/comments"},"review_comments":{"href":"https://api.github.com/repos/cabal-club/cabal-core/pulls/25/comments"},"review_comment":{"href":"https://api.github.com/repos/cabal-club/cabal-core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cabal-club/cabal-core/pulls/25/commits"},"statuses":{"href":"https://api.github.com/repos/cabal-club/cabal-core/statuses/f0a5c14fa0cec98f8dad128366bcdd71b8d42e4a"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"ralphtheninja"}}