Threads port: every review thread with who opened and resolved it; a Lens's is its own App's, and an outside reviewer's never defers (#191)
Merged
DO
1mo ago+353+353+012345678901234567890123456789-53-53-01234567890123456789
Closes #191. This is the last part of the facts port. It follows the working rulings on #191 (comment 6326441619) and the Maintainer's answers to them (comment 6327479372).
What it adds
adapters/threads.pyreads every review thread in one GraphQL read, page by page.- Each thread is read with its id, whether it is resolved, who resolved it, and who opened it and when, from its first comment.
- Each actor is told apart by
timeline.Accounts, by account id and type, never by a name's spelling (decision 0005, L-57). No comment text is read. - A thread a person opened is
human, with no severity. - A Lens's thread is one whose author is that Lens's own App. It has no category or severity until
harness/uploads the Finding records they are joined from (decision 0038). The join rows now say "waiting onharness/". - An outside reviewer's thread (CodeRabbit's, Codex's) is not a required Lens's thread, so it never defers. Only a required model Lens's own App's open thread defers (
unreadable_thread). - The list counts as whole only when:
- every counted thread was read, and none twice;
- no cursor repeats;
- no next page is named past the count.
- Three cases are handled so as not to block the whole pull request:
- A resolved thread with no resolver named (as when an App resolved it) is read with none, and the Kernel defers on that thread alone.
- A thread whose first comment replies to another is refused, because its opener cannot be read.
- A deleted account's thread refuses the snapshot. That limit is stated in the code.
adapters/facts.pyputsthreadsandcomplete.threadsin the snapshot from this read.adapters/checks.pyno longer counts threads.- Rows re-pointed: 0005, 0015, 0018, 0022, 0026, 0038 and
adapters/AGENTS.md.
#191's Done-when
- Bullet 8 is met: the REST timeline is whole by its pagination. The bullet now says so.
- Bullet 9 is not met as written. It is filed as "Facts port: the contract test replays every recorded fixture against the fake" (#283).
- The other follow-ups filed under the epic:
Gates
| Gate | Result |
|---|---|
| Claude review + security pass | done; one fix round (0657068), then the Maintainer's narrowing (6f0a573) |
| AGY | not required for this port (Argon reads Kernel, sim, CI and token-handling PRs) |
| Muse | not run (Maintainer, 2026-10-20: Kernel/hook only) |
| Capped mutant run, by hand | every adapters mutant killed (198 at c5441a8, plus the threads round) |
| Export verify (6f0a573) | exit 0, 956 tests |
tools/check_decisions.py in the checkout | passes |
🤖 Generated with Claude Code