# Do votes get things built? Design, round 1

Committed before any outcome field (state, close reason, closing event, linked change) is read for a selected request.
Project selection read only vote counts and opening dates. The frozen parameters are in `protocol-r1.json`; where the
two differ, the JSON wins. Any later change is a labelled "Change N to the protocol", committed before it is used, and
a change made after results are seen says so.

## Question

Across open-source data tools, does the number of user votes on a feature request predict whether it ships, and how
fast?

## Why a data team has this problem

A product team at a software company ranks its backlog partly by how many customers asked: upvotes on a feedback
board, counts of tickets tagged with a request. The analyst asked "do the most-requested features get built?" faces
exactly this data: a vote count that keeps growing while the request is open, a close status that does not always mean
"built", and an automation that closes old requests for inactivity. Open-source trackers are the one place where that
record is public for many teams at once.

## Overlap test (one question, one study)

No published card asks about feature requests, votes or shipping. The nearest pages measure experiments that decide
whether to ship a change (`driver-incentives-test-to-decision`, `experiment-readout`): they test one change's effect,
not whether demand signals predict what gets built. Different question, different data (public issue trackers). New
study.

## Data (Day 0 in the scratch `day0.txt`)

- Source: the GitHub API through the machine's existing login, metadata only. No title, body, comment or person's
  login is stored or published. For a closing actor only its kind (automation or not) is kept.
- Votes: thumbs-up reactions on the request itself, the convention these trackers use for voting.
- Candidates: repositories under 28 data topics with at least 3,000 stars, not forks or archived, issues on, created
  before 2020, not a list, course or tutorial (`tools/candidates.py`): 460.
- Feature requests: issues carrying a feature-request label (`tools/requests_lib.py`, a declared label pattern),
  opened 2019-01-01 to 2023-06-30, so every request has had more than three years to ship by the collection date.
- Day 0 density finding: on 30 candidates spread over the star ranking, the 20th most-voted request had 3 or more
  votes in only 4. Votes are too sparse to rank 20 requests outside the most popular projects. The study is narrowed as
  the scope allows: a project enters only when its 20th most-voted request has at least 3 thumbs-up. Walking all 460
  by stars, 79 qualify (not the 100 the scope named; the page says so). 3 candidates owned by a company on the private
  exclusion list were skipped before any request was read; they appear in no public file.
- Unit: the 20 most-voted feature requests of each of the 79 projects, 1,580 requests.

## Definitions fixed before counting

Each request gets exactly one outcome class, from its final state, applied in this order:

1. **shipped**: closed, and the final closing event was made by a merged pull request or a commit (the tracker
   records the closer), or closed as completed with a merged pull request from the same repository that references
   the request and was merged after the request opened and no later than 7 days after it closed (the stated
   equivalent: a maintainer merges the change, then closes the request by hand). Ship date: the final close date.
   - Example in: closed by pull request 123, which merged. Example in: closed as completed by a maintainer two days
     after a merged pull request that references it. Example out: closed as completed, the only referencing pull
     request was closed without merging.
2. **closed by automation**: closed by a bot account, not shipped. Not a decision; never counted as declined.
3. **declined**: closed by a person as not planned.
4. **duplicate**: closed as a duplicate.
5. **closed as done, no linked change**: closed by a person as completed with no linked merged change. Ambiguous:
   the tracker marked every close made before the close reason existed as completed, and some projects close declined
   requests that way. Counted as not shipped in the main analysis; a sensitivity run counts it as shipped.
6. **open**: still open at collection (a reopened request that is open now is open).

A request the API no longer returns (deleted or moved) is reported as missing, never guessed.

## Measures

- **Shipped within three years**: shipped with ship date no more than 1,095 days after opening. Every request has a
  full three-year window, so no request is censored.
- **Vote deciles**: the 1,580 requests sorted by thumbs-up at collection, ties broken by a fixed hash of project and
  number, cut into ten equal groups. Decile 10 is the most-voted.
- **Shipping curves**: share shipped by days since opening, 0 to 1,095, per vote decile.
- **Within-project comparison** (the control for project size and habits): in each project, the three-year shipped
  share of its 5 most-voted requests minus that of ranks 16 to 20; the mean over projects, with a 95% interval from
  2,000 bootstrap resamples of projects (seed 20261109).
- **Speed**: median days from opening to shipping among shipped requests, ranks 1 to 5 against ranks 16 to 20.

## What votes collected later can do, and the check for it

Votes keep arriving while a request stays open and mostly stop once it closes. A request that ships in its first month
therefore collects fewer votes than it would have, which pushes votes and shipping apart by construction. The check is
a 90-day landmark: among requests still open 90 days after opening, rank by the votes cast in those first 90 days (from
the reaction timestamps; the API returns the first 60, so a count of 60 means 60 or more), and compare the share
shipped by three years. Within each project, the half with more early votes against the half with fewer (ties broken by
the same hash), mean over projects, same bootstrap.

## Verification of outcomes against a second record

After classification, a seeded sample of 60 requests (30 classed shipped, 30 classed anything else; seed 20261110) is
checked against records read through other endpoints: for a shipped request, the closing or referencing pull request is
fetched and must be merged into the repository's default branch (or the closing commit must be on it); for any other
class, the repository's merged pull requests are searched for the request's number, and one whose description says it
closes, fixes or resolves that request counts as a disagreement. The page publishes the disagreement count over 60
with a 95% Wilson interval. The classifier is not changed after the sample is read; a disagreement stays a disagreement.

## Predictions

In `predictions-r1.json` (P1 to P6), each reported as held, missed or untestable. P1 holds the expected finding and
its opposite.

## What this cannot show

- Votes are a visible, free signal; maintainers may react to the same underlying demand through other channels.
  The study measures association, not whether votes cause shipping.
- Only projects whose votes are dense enough to rank are in; the result describes popular data tools, and only
  requests with a feature-request label.
- A pull request that merged may ship only part of the request.
