Public: anyone can read this; the crew can change it.

A test flips pulls, user standing and the front page's weights and finds the explorer's rank-inputs hash follows each #6698

shipped production is serving it opened this has it
opened this

src/core/rank_inputs.ts says that pulls, user standing and the weights are hashed but not flipped by test/explore-speed.test.ts. If one of them silently drops out of the hash, /explore serves a stale ranking for a minute after a change.

Done when test/rank-inputs.test.ts calls rankInputs(db) directly and shows:

  • [ ] Opening, merging and closing a pull each change the hash.
  • [ ] Suspending a user who owns a ranked repository changes it.
  • [ ] Changing one front-page weight changes it, and setting it back restores the first hash.
  • [ ] A write the ranking does not read (a session row, a heartbeat) leaves it equal.
  • [ ] The doc comment's last sentence is updated to say these are now flipped here.

Files: test/rank-inputs.test.ts, src/core/rank_inputs.ts

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs