a reputation protocol for open collaboration
Go to file
William Chargin 25df874db7
Check concurrent modification in graph iterators (#367)
Summary:
A client of `Graph` is able to (e.g.) invoke `nodes()` to get a node
iterator, iterate over some of the nodes, then change the nodes by
adding or removing the nodes on the original graph. The semantics of
what to do here are not clear: ES6 specifies semantics for `Map` and
`Set`, but they have counterintuitive consequences: for instance, you
can get a `Set` iterator to yield the same value twice. Most collection
implementations in the Java standard library prohibit this entirely. In
this commit, we adopt the latter approach.

A caveat of this implementation is that a graph object may not be
mutated more than 2^53 − 1 (`Number.MAX_SAFE_INTEGER`) times. Clients
who need to mutate a graph more than nine quadrillion times are
encouraged to reconsider their data model.

Paired with @decentralion.

Test Plan:
Unit tests added. Run `yarn travis`.

wchargin-branch: comod-check
2018-06-08 13:03:26 -07:00
config Update `src/v1/` paths for CI cron (#337) 2018-06-04 14:16:43 -07:00
flow-typed/npm Add react-router-dom 2018-05-08 12:55:38 -07:00
scripts Unify a command-line entry point module (#344) 2018-06-05 11:11:48 -07:00
src Check concurrent modification in graph iterators (#367) 2018-06-08 13:03:26 -07:00
.eslintrc.js Disable the `no-useless-constructor` lint rule (#308) 2018-05-28 15:01:28 -07:00
.flowconfig Flow: enable `//$ExpectFlowError` (#315) 2018-05-29 13:56:36 -07:00
.gitignore Configure Webpack for backend applications (#84) 2018-03-18 22:43:23 -07:00
.prettierignore Ignore coverage output in Prettier (#364) 2018-06-08 10:50:52 -07:00
.prettierrc.json Move package json to root (#37) 2018-02-26 22:32:23 -08:00
.travis.yml Ensure build failure emails (#339) 2018-06-04 14:52:07 -07:00
LICENSE Add LICENSE 2018-02-03 17:58:49 -08:00
README.md Update README to reference our Discord (#363) 2018-06-08 12:30:44 -07:00
package.json Add a `coverage` package script (#365) 2018-06-08 11:32:27 -07:00
yarn.lock Upgrade flow to 0.73 (#338) 2018-06-04 14:22:10 -07:00

README.md

SourceCred

Build Status Discord

Vision

Open source software is amazing, and so are the creators and contributors who share it. How amazing? It's difficult to tell, since we don't have good tools for recognizing those people. Many amazing open-source contributors labor in the shadows, going unappreciated for the work they do.

As the open economy develops, we need to go beyond commit streaks and follower counts. We need transparent, accurate, and fair tools for recognizing and rewarding open collaboration. SourceCred aims to do that.

SourceCred will enable projects to create and track "cred", which is a quantitative measure of how much value different contributors added to a project. We'll do this by providing a basic data structure—a cred graph—into which projects can add all kinds of information about the contributions that compose it. For example, a software project might include information about GitHub pull requests, function declarations and implementations, design documents, community support, documentation, and so forth. We'll also provide an algorithm (PageRank) which will ingest all of this information and produce a "cred attribution", which assigns a cred value to each contribution, and thus to the people who authored the contributions.

Principles

SourceCred aims to be:

  1. Transparent

    If it's to be a legitimate and accepted way of tracking credit in projects, cred attribution can't be a black-box. SourceCred will provide tools that make it easy to dive into the cred attribution, and see exactly why contributions were valued the way they were.

  2. Community-controlled

    At the end of the day, the community of collaborators in a project will know best which contributions were important and deserve the most cred. No algorithm will do that perfectly on its own. To that end, we'll empower the community to modify the cred attribution, by adding human knowledge into the cred graph.

  3. Forkable

    Disputes about cred attribution are inevitable. Maybe a project you care about has a selfish maintainer who wants all the cred for themself :(. Not to worry—all of the cred data will be stored with the project, so you are empowered to solve cred disputes by forking the project.

Roadmap

SourceCred is currently in a very early stage. We are working full-time to develop a MVP, which will have the following basic features:

  • Create: The GitHub Plugin populates a project's GitHub data into a Contribution Graph. SourceCred uses this seed data to produce an initial, approximate cred attribution.

  • Read: The SourceCred Explorer enables users to examine the cred attribution, and all of the contributions in the graph. This reveals why the algorithm behaved the way that it did.

  • Update: The Artifact Plugin allows users to put their own knowledge into the system by adding new "Artifact Nodes" to the graph. An artifact node allows users to draw attention to contributions (or groups of contributions) that are particularly valuable. They can then merge this new information into the project repository, making it canonical.

Community

Please consider joining our Discord chat or posting on our forum.