Skip to content

Complete PostgreSQL push storage and activity parity #1794

Open

Description

@dcoric

PostgreSQL parity for push storage and repository activity

The PostgreSQL sink in #1687 is merged, so this work is no longer blocked. The #1691 implementation is split by responsibility, with all three sinks covered in each PR:

Keep this issue open until both PRs merge. Together they cover the agreed #1691 scope. The Action.diff refactor in #1693 and #1701 remains separate.

Acceptance criteria

  • New audit writes avoid redundant diff logs and an identical lastStep payload. Detail reads restore the complete reviewable audit.
  • Push lists and user-profile activity return the same metadata fields across all sinks, without embedded diffs or processor payloads.
  • Repository activity preserves status precedence, canonical URL matching, counts, and latest push/pending timestamps. Warm reads use saved summaries without scanning audit history.
  • Repeated writes, approval, rejection, cancellation, deletion, and concurrent updates preserve correct counts and audits.
  • Existing records remain readable. Initialization, interrupted refresh recovery, and rebuilding derived data are documented and tested.
  • Real PostgreSQL tests verify parity with the file/MongoDB contracts. API and UI checks cover lists, diffs, repository badges, reviewer activity, and review transitions.

Verification

Both PRs have passed their unit and real-database integration suites. PostgreSQL-backed verification passed six real Git push/fetch scenarios and all 24 Cypress scenarios. Manual checks covered diff rendering, approval, immediate count refresh without reloading, timestamps, and reviewer profile activity.

The two branches were also combined locally, with 726 unit/service/processor tests, 89 MongoDB integration tests, and 100 PostgreSQL integration tests passing. Their adapter overlap must be reconciled in the second PR after the first merges; that resolution has been verified locally.

On a local synthetic PostgreSQL history of 10,000 pushes across 10 repositories, five-run median warm reads were 2.44 ms for summaries versus 11.27 ms for the previous history query. Initial backfill took 178.51 ms. A constructed audit with a 2 MiB final-step diff shrank from 8,389,308 to 2,097,722 serialized bytes after compaction. These examples are workload-specific.

Related: #1497 (sink), #1692 (earlier query/index improvements). Retention policies and moving diffs to a separate store are outside the agreed scope.

Activity

  1. self-assigned this
    on Oct 4, 2026
  2. changed the title [-]Bring PostgreSQL push storage and activity rollups to parity after the sink merges[/-] [+]Complete PostgreSQL push storage and activity parity[/+] on Oct 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions