Skip to content

Commit 1adab43

Browse files
committed
docs(plugin-audit): the backfill docblock says its race is narrowed to one engine call, not closed (ADR-0139 E7)
Claude-Session: https://claude.ai/code/session_01NX4Woa8XhvMs6xpqQpx8kK Co-authored-by: Claude <noreply@anthropic.com>
1 parent 7d41db6 commit 1adab43

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

‎packages/plugins/plugin-audit/src/comment-parent-pair-backfill.ts‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,13 @@
2323
* Rows are read and updated as the platform (a SYSTEM context), the shape of
2424
* `stored-metadata-body-migration.ts` and E6's activity backfill. The pair the
2525
* update names is re-derived by the update stamp from the row's thread as it
26-
* is stored at write time (`comment-access-hooks.ts`), so a re-point landing
27-
* between this page's read and the row's write cannot leave the pair naming
28-
* the thread the comment left. The update names the row's stored
26+
* is stored at write time (`comment-access-hooks.ts`). That narrows the
27+
* read-then-write race to the one engine call: a re-point landing between this
28+
* page's read and the row's write no longer leaves the pair naming the thread
29+
* the comment left; one committing between the engine's own prior-row read and
30+
* its driver write is the window every `previous`-derived hook has. ⛔ No
31+
* conditional `where`: that would put the write on the predicate path. The
32+
* update names the row's stored
2933
* `updated_at` under `preserveAudit`, so
3034
* the backfill changes no comment's `updated_at` and names no `thread_id` or
3135
* `body` (no re-point, no edit stamp). A row whose thread names no record is

0 commit comments

Comments
 (0)