Skip to content

docs(aggregator): success-only memoization contract + highlight latch fix (#3880) - #6796

Merged
developing-today[bot] merged 1 commit into
mainfrom
queue/3880-phase3-memoization-audit
Nov 7, 2026
Merged

developing-today[bot] merged 1 commit into
mainfrom
queue/3880-phase3-memoization-audit

Conversation

@dezren39

@dezren39 dezren39 commented Nov 7, 2026 •

Copy link
Copy Markdown
Member

Phase 3 (closing audit) of design #3879 — gate verified fresh before starting: Phase 1 #3732 CLOSED, Phase 2 #3729 CLOSED.

What lands here (part a + the one confirmed fix from part b)

  • Contract statement in pm-stack/aggregator/README.md ("Lazy-initialization contract (Design: failure is not a result — one success-only memoization contract for lazy initializers (aggregator first) #3879)"), matching the design's wording: a lazy initializer memoizes success, never failure; clear on settle; every layer clears independently; failure values count as failure; in-flight sharing preserved; retry cost bounded by the secrets layer, not per-site TTLs.
  • Pointer comments at the three memo sites: src/supabase.ts (clientPromise), src/alerts.ts (storePromise), src/push.ts (configurePromise).
  • pkgs/id/web/src/highlight.ts fix: highlighterPromise was the one confirmed same-shape latch in the repo-wide inventory — a rejected createHighlighterCore (e.g. a transient chunk-load failure) latched for the page lifetime. It now clears the memo on rejection, exactly per the contract; success stays cached and concurrent callers still share the in-flight attempt. No other behaviour change.

Parts b/c/d (recorded on the issues, not in this diff)

Tests: CI (fleet CI-first policy — no local builds). The highlight change is covered by the existing highlight.test.ts / highlight-e2e.test.ts suites; the rest is docs/comments.

Closes the implementation half of #3880; #3879 stays open for its own triage close-out.

🤖 Queue worker lane F (fallback mode, queue backend down — code#6619).

… fix (#3880)

Phase 3 closing audit of design #3879 (gate cleared: #3732 + #3729 closed):
- contract statement in pm-stack/aggregator/README.md matching the design wording
- one-line pointer comments at the three memo sites (supabase clientPromise, alerts storePromise, push configurePromise)
- pkgs/id/web highlight.ts: highlighterPromise now clears on rejection (success-only memoization) - the one confirmed same-shape latch found by the repo-wide inventory; success stays cached, in-flight sharing preserved
@dezren39
dezren39 requested a review from a team as a code owner November 7, 2026 05:09
@coderabbitai

coderabbitai Bot commented Nov 7, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 35 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 33ff7737-80c8-4df8-978c-8741b1956d0e
Commits

Reviewing files that changed from the base of the PR and between 962dbfc and 95c73be.

Files selected for processing: 5

  • pkgs/id/web/src/highlight.ts
  • pm-stack/aggregator/README.md
  • pm-stack/aggregator/src/alerts.ts
  • pm-stack/aggregator/src/push.ts
  • pm-stack/aggregator/src/supabase.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-07T05:11:32.150764Z 95c73be PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant