Summary #
AppView currently does not subscribe to or ingest sh.tangled.repo.pull.status records. This leaves protocol-level pull request state records invisible to the web UI and can make AppView show stale state.
Reproduction / evidence #
For onev.cat/tang PR #2:
- Pull record:
at://did:plc:kl2ejrmz5zmxnno3ll4luz76/sh.tangled.repo.pull/3mkuuamwfj322 - Status record on the author's PDS:
at://did:plc:kl2ejrmz5zmxnno3ll4luz76/sh.tangled.repo.pull.status/3mkuuaumwkn2j - Status value:
sh.tangled.repo.pull.status.merged - AppView page still renders the PR as open:
https://tangled.org/onev.cat/tang/pulls/2/round/0
The same issue affects clients that write pull status records through ATProto: the record exists on the PDS and can be discovered by protocol-aware clients, but AppView does not reflect it.
Likely cause #
In appview/state/state.go, the Jetstream subscription list includes sh.tangled.repo.pull but not sh.tangled.repo.pull.status.
In appview/ingester.go, the commit dispatch handles tangled.RepoPullNSID, issues, comments, labels, etc., but has no tangled.RepoPullStatusNSID case.
The web UI close/reopen/merge paths appear to update the AppView database directly via db.ClosePulls, db.ReopenPulls, and db.MergePulls, which means AppView DB state and ATProto status records can diverge.
Expected behavior #
AppView should ingest sh.tangled.repo.pull.status records and update the corresponding pull state (open, closed, merged) in its indexed database, or otherwise define a single canonical source of truth for PR state.
Related context: #462 and #356.
Additional confirmation: this appears to have the same root cause as #462.
A wrongly-created issue in
onev.cat/tangwas closed via an ATProtosh.tangled.repo.issue.staterecord:Protocol/PDS-aware clients show that issue as closed, but AppView still renders it as open. So both issue state and pull status records seem to be affected by the same missing AppView subscription/ingestion path for
sh.tangled.repo.*state records.#282 is also relevant background: it frames the broader repo-record atprotation problem as keeping knot state, AppView state, and PDS state consistent. This issue looks like the narrower issue/pull-state version of that same consistency gap.