Skip to content

audit: webhook-event/cache-write-through symmetry for issues.* and pull_request.* #130

Description

@chrisleekr

Surfaced during the review of #129. After fixing the issue_comment.edited/.deleted subscription gap, two adjacent surfaces still rely on lazy backfill rather than webhook write-through:

  1. src/app.ts:104 subscribes only issues.labeled / issues.unlabeled. No issues.edited or issues.deleted subscription. The issue body is cached in target_cache via upsertTarget, but upsertTarget is currently only called from backfillFromGitHub (src/db/queries/conversation-store.ts:257). A user editing the issue title or body in flight is not reflected in target_cache until a cold-miss backfill happens.
  2. src/app.ts:108 subscribes only pull_request_review.submitted. No write-through for review body edits/deletions.

Both are weaker bugs than #129 because the backfill path will fetch fresh data on first read, so the staleness window is bounded by the chat-thread cache hit pattern. But the same class of "the agent reasons against pre-edit text the user thought they changed" applies.

Scope of follow-up:

  • Decide whether target_cache should also be write-through (mirroring comment_cache) or whether the lazy backfill is intentional.
  • If write-through is wanted, add issues.edited, issues.deleted subscriptions and a corresponding writer in src/webhook/events/issues.ts.
  • Audit pull_request.opened/.edited/.closed subscriptions at src/app.ts:85-93 against target_cache writes for the same gap.

Not in scope for #129; tracking separately to avoid PR bloat.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions