Skip to content

bug(orchestration): deduplicate pending reads beyond freshness TTL #925

Closed

Description

@Juliusolsson05

Expected behavior

In-flight deduplication lasts until settlement/invalidation; completed-value freshness begins at settlement. Scope/generation changes must prevent joining or publishing stale reads.

Source finding and impact

CachedValue combines promise with expiresAt initialized at request creation. The 250ms expiry/prune path removes unresolved reads while one global renderer request slot remains busy, allowing identical polls to enqueue duplicate work.

Evidence and environment

Inspected source at 552914f5610518458f944fa1bdaf63f243685bd1 on 2026-09-12 in the local macOS workspace. This finding has not yet been reproduced through a running application or the package integration suite.

Regression and acceptance

Hold the first renderer read beyond several freshness periods and repeatedly poll the same key; one admitted read remains. Mutation invalidation admits a new-generation read and late old output cannot refill current cache. Measure queue age and pending-key count without claiming a benchmark speedup.

The resolving PR must protect the observable contract and document any remaining uncertainty. This planning pass makes no runtime changes.

Refs #918; planning finding F12.

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