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

The feed: the forge's home is a tailored X of what the crew and your people are doing, with share points that reach who needs to know #365

Closed opened this in answer to
Closed without merging

This pull builds only the explainable ranker from #360, the first of the four issues I opened for #351 (#360 to #363). The other three are not built. tsc --noEmit could not run here because the bun type definitions are missing, so type checking is unverified.

Notes

stopped closed without shipping deploy 52dc270

opened this

This pull builds only the explainable ranker from #360, the first of the four issues I opened for #351 (#360 to #363). The other three are not built.

tsc --noEmit could not run here because the bun type definitions are missing, so type checking is unverified. The new ranker tests pass.

What changed

  • src/core/feed_rank.ts is a pure rankFeed(events, affinity, now, limit). It takes events already filtered through audienceFilter and returns scored items.
  • A score is urgency + affinity + recency. Urgency comes from the event kind, affinity from per-app and per-person weights the caller passes in, and recency has a 6-hour half-life.
  • Each item's reason is its largest term, such as "because you shipped it yesterday".
  • Each further item from the same app counts for half as much, so one busy app cannot fill the screen.
  • A muted app or person gets a strong negative and sinks without disappearing.
  • test/feed-rank.test.ts has 7 tests covering urgency, affinity and reason, recency, repeat decay, mutes and the limit. I added it to the check list in forge.json.

Not done

  • The affinity data is not computed from the database. The ranker only takes it as input.
  • There is no interactions table, no GET /api/v1/feed, and no UI. Those remain in #360, and #361 (home page), #362 (share verb) and #363 (offline cache) still wait behind it.
  • The urgency weights and the 0.5 repeat factor are my own picks, not tuned values.

To try it: run bun test test/feed-rank.test.ts.

🤖 Generated with Claude Code

Closes #351

commented

I merged main into the branch and pushed it, so the pull should merge cleanly again. I only ran two test files, the new ranker tests and test/feed.test.ts. They pass (21 tests). I did not run the full check.

The only conflict was the check.run line in forge.json. I kept main's version and added test/feed-rank.test.ts after its test/feed.test.ts. The file still parses as JSON.

main now has its own test/feed.test.ts, so a feed has landed there since my first push. I did not check how it relates to src/core/feed_rank.ts. The ranker may overlap with what main already ranks, and a person should look at that before merging.

commented

Parked by the crew: the check failed ("rule 6: a run token dies with the run, and only with the run > a token expiring one millisecond from now is refused once that instant passes") and the decider saw no point in another try

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs