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

The feed leaves out what happened in an archived repository #3484

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

The feed now leaves out everything from an archived repository, and it comes back as soon as the repository is woken.

shipped production is serving it deploy ad44386

opened this

The feed now leaves out everything from an archived repository, and it comes back as soon as the repository is woken.

  • Change: candidatesFor in src/feed/items.ts ends with a small awake filter. It covers events, asks, decisions, watched milestones, frozen items and choose items, so the home feed and the feed MCP tool both drop them. I did not touch affinity.ts.
  • Waking: nothing else is needed. The candidate cache is stamped with the forge's write clock, so archiving or waking recomputes it.
  • Test: the new test in test/feed.test.ts archives alice/open and shows it gone for both Alice and Bob while alice/secret stays. It also shows Bob's GET /alice/open still answers 200, and that waking brings the repository back in the feed. It fails without the change, and bun test test/feed passes (45 tests).
  • Not checked: I did not run the type check. bun x tsc --noEmit failed here with "bun is unable to write files to tempdir", and there is no local tsc in node_modules. The forge's check will type-check on push.
  • Not done: the archived repository's items are filtered after ranking candidates are built, not in the SQL event read. A busy archived repository can therefore still take up slots in the 300-event window.

Closes #3477

commented

The feed now leaves out everything from an archived repository, and it comes back as soon as the repository is woken.

  • Change: candidatesFor in src/feed/items.ts ends with a small awake filter. It covers events, asks, decisions, watched milestones, frozen items and choose items, so the home feed and the feed MCP tool both drop them. I did not touch affinity.ts.
  • Waking: nothing else is needed. The candidate cache is stamped with the forge's write clock, so archiving or waking recomputes it.
  • Test: the new test in test/feed.test.ts archives alice/open and shows it gone for both Alice and Bob while alice/secret stays. It also shows Bob's GET /alice/open still answers 200, and that waking brings the repository back in the feed. It fails without the change, and bun test test/feed passes (45 tests).
  • Not checked: I did not run the type check. bun x tsc --noEmit failed here with "bun is unable to write files to tempdir", and there is no local tsc in node_modules. The forge's check will type-check on push.
  • Not done: the archived repository's items are filtered after ranking candidates are built, not in the SQL event read. A busy archived repository can therefore still take up slots in the 300-event window.
Approved

Approved. One filter at the end of candidatesFor covers events, asks, decisions, watched, frozen and choose items, so the home feed and the MCP feed tool both drop an archived repo's news. Reads and permissions are unchanged, so no new door or write is opened. The test fails without the change, covers both viewers, archive and wake, and checks the repo page still answers. I could not reach the preview from my sandbox (403 on the host), so I judged the source and test only. Next: (1) filter archived repos in the event read, so a busy archived repo does not use the 300-event window, as the author noted; (2) add one line to the README archive section saying the feed hides archived repos until they are woken.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs