Skip to content

Bug: Rewritten notifications stay off the first page despite being newest #3630

Closed

Description

@yannickmonney

Rewritten notifications stay off the first page despite being newest. Confirmed locally against 44e0dcf254975286c0e9dea443b5cd1ca6b23347.

The bell omits current task news from its first page even after receiving the realtime update; users must page backwards to discover the newest change.

Steps to reproduce:

  1. Leave a task status notification unread.
  2. Create 25 later notifications for other tasks, enough to fill the initial notification page.
  3. Change the first task status again while its original notification remains unread.
  4. Reopen the notification panel, then load the next page.

Expected: The rewritten notification represents the latest event and should be included in the newest page.

Actual: The writer advances created_at_ms while preserving seq. listMyNotifications orders and cursors by seq, so the new event remains behind 25 older notifications and appears only on page 2. Sorting the loaded page cannot recover it.

Source:

Behavior oracle: The writer explicitly promises that moving createdAt makes the rewritten event sort to the top.

Local proof: /Users/yannick/.codex/notes/tale-100-findings/notifications-proof/coalesced-pagination.ts. Frozen output: /Users/yannick/.codex/notes/tale-100-findings/notifications-proof/frozen/batch-02/coalesced-pagination.log. 26 rows total. The first page contains 25 rows with maximum createdAt=1790000000025; the rewritten row has createdAt=1790000001026 and is absent until page 2. No duplicate created; other-user and other-org reads are empty.

python3 /Users/yannick/.codex/notes/tale-100-findings/notifications-proof/run-coalesced-pagination.py

Retained local fixture database: tale_notify_proof_20260928_mukyz6sz. Structured output: /Users/yannick/.codex/notes/tale-100-findings/notifications-proof/frozen/batch-02/coalesced-pagination-results.json. The rerun creates and retains a new uniquely named database.

A new retained local QA PostgreSQL database containing only app.user_notifications and app_realtime.outbox. The current production write/list functions and PostgreSQL SQL ran unchanged. Task-status events are non-actionable and did not enqueue email. No existing application rows were changed.

Deduplication: Reviewed existing-issues.json (931 all-state issues) and the current findings.json; no equivalent root cause found. All-state GitHub searches: notification coalesce, notifications pagination. #2377 addressed sorting already-loaded rows and destinations; this root is the backend page membership after in-place rewrite. #2092 removed a personal notification pagination cap; this reproduces with functional pagination.

Frozen source copy: /Users/yannick/.codex/notes/tale-100-findings/notifications-proof/frozen/batch-02/coalesced-pagination.ts. SHA-256 index: /Users/yannick/.codex/notes/tale-100-findings/notifications-proof/frozen/batch-02/sha256.json. The command executes the identical top-level scratch source; reruns may replace top-level result files but never these frozen copies.

Parent verification: independently executed the frozen proof and controls successfully; retained output: notifications-proof/parent-coalesced-pagination.log. Live all-state issue searches and related historical reports were checked before filing.

Acceptance: add regression coverage across the reported boundary and preserve the passing controls. Verify the corrected result with local API readback or the rendered UI as applicable.

Activity

  1. added
    agent-ready
    on Oct 29, 2026
  2. added a commit that references this issue on Oct 30, 2026
    7941cd0
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

    agent-readybugservice: platform

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions